summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.commit-template2
-rw-r--r--.gitignore1
-rwxr-xr-xbin/elf2e32_qtwrapper148
-rw-r--r--bin/elf2e32_qtwrapper.bat3
-rwxr-xr-xbin/elf2e32_qtwrapper.pl265
-rw-r--r--config.tests/unix/endian/endiantest.cpp8
-rwxr-xr-xconfigure186
-rwxr-xr-xconfigure.exebin1326592 -> 1329152 bytes
-rw-r--r--demos/browser/networkaccessmanager.cpp2
-rw-r--r--demos/demos.pro11
-rw-r--r--demos/embedded/lightmaps/lightmaps.cpp693
-rw-r--r--demos/embedded/lightmaps/lightmaps.h88
-rw-r--r--demos/embedded/lightmaps/lightmaps.pro8
-rw-r--r--demos/embedded/lightmaps/main.cpp63
-rw-r--r--demos/embedded/lightmaps/mapzoom.cpp147
-rw-r--r--demos/embedded/lightmaps/mapzoom.h69
-rw-r--r--demos/embedded/lightmaps/slippymap.cpp213
-rw-r--r--demos/embedded/lightmaps/slippymap.h87
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.pro3
-rw-r--r--demos/mobile/guitartuner/guitartuner.pro89
-rw-r--r--demos/mobile/guitartuner/guitartuner.qrc43
-rw-r--r--demos/mobile/guitartuner/images/guitartab.svg174
-rw-r--r--demos/mobile/guitartuner/images/guitartuner_icon.svg247
-rw-r--r--demos/mobile/guitartuner/images/inputMode.svg161
-rw-r--r--demos/mobile/guitartuner/images/note.svg101
-rw-r--r--demos/mobile/guitartuner/images/noteNo.svg105
-rw-r--r--demos/mobile/guitartuner/src/application.qml328
-rw-r--r--demos/mobile/guitartuner/src/constants.h54
-rw-r--r--demos/mobile/guitartuner/src/fastfouriertransformer.cpp184
-rw-r--r--demos/mobile/guitartuner/src/fastfouriertransformer.h67
-rw-r--r--demos/mobile/guitartuner/src/fftpack.c1406
-rw-r--r--demos/mobile/guitartuner/src/guitartuner.cpp359
-rw-r--r--demos/mobile/guitartuner/src/guitartuner.h95
-rw-r--r--demos/mobile/guitartuner/src/guitartuner.rc23
-rw-r--r--demos/mobile/guitartuner/src/guitartuner.ui178
-rw-r--r--demos/mobile/guitartuner/src/guitartunerui.cpp341
-rw-r--r--demos/mobile/guitartuner/src/guitartunerui.h111
-rw-r--r--demos/mobile/guitartuner/src/guitartunerui.ui178
-rw-r--r--demos/mobile/guitartuner/src/main.cpp60
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/Adjuster.qml131
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/Meter.qml (renamed from doc/src/snippets/declarative/animation-groups.qml)104
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/NoteButtonView.qml84
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/NotesModel.qml105
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/ToggleButton.qml110
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/adjustbars.js89
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/big_a.pngbin0 -> 575 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/big_b.pngbin0 -> 599 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/big_d.pngbin0 -> 465 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/big_e.pngbin0 -> 327 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/big_g.pngbin0 -> 610 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/glowing_a.pngbin0 -> 2978 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/glowing_b.pngbin0 -> 3084 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/glowing_d.pngbin0 -> 2940 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/glowing_e.pngbin0 -> 2696 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/glowing_g.pngbin0 -> 3046 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/guitartuner_malli.pngbin0 -> 143243 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/guitartuner_skin.pngbin0 -> 129068 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/lcdFrame.pngbin0 -> 176107 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/meterBG.pngbin0 -> 8378 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/mute.pngbin0 -> 3630 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/pointer.pngbin0 -> 965 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/pointerShadow.pngbin0 -> 1694 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/power.pngbin0 -> 3190 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/quit.pngbin0 -> 1363 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/sensitivity.pngbin0 -> 835 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_a.pngbin0 -> 3233 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_a_on.pngbin0 -> 3068 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_auto.pngbin0 -> 3619 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_auto_on.pngbin0 -> 3281 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_b.pngbin0 -> 3324 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_b_on.pngbin0 -> 3132 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_d.pngbin0 -> 3266 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_d_on.pngbin0 -> 3009 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_e.pngbin0 -> 3171 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_e_on.pngbin0 -> 2955 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_g.pngbin0 -> 3292 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/tuner_g_on.pngbin0 -> 3089 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/voicemode_off.pngbin0 -> 3775 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/voicemode_on.pngbin0 -> 3484 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/volume.pngbin0 -> 351 bytes
-rw-r--r--demos/mobile/guitartuner/src/mycomponents/images/volume_off.pngbin0 -> 2235 bytes
-rw-r--r--demos/mobile/guitartuner/src/voiceanalyzer.cpp295
-rw-r--r--demos/mobile/guitartuner/src/voiceanalyzer.h93
-rw-r--r--demos/mobile/guitartuner/src/voicegenerator.cpp246
-rw-r--r--demos/mobile/guitartuner/src/voicegenerator.h86
-rwxr-xr-xdemos/mobile/qcamera/businesscardhandling.cpp148
-rwxr-xr-xdemos/mobile/qcamera/businesscardhandling.h83
-rwxr-xr-xdemos/mobile/qcamera/button.cpp110
-rwxr-xr-xdemos/mobile/qcamera/button.h72
-rwxr-xr-xdemos/mobile/qcamera/cameraexample.cpp517
-rwxr-xr-xdemos/mobile/qcamera/cameraexample.h157
-rwxr-xr-xdemos/mobile/qcamera/contactsdlg.cpp159
-rwxr-xr-xdemos/mobile/qcamera/contactsdlg.h83
-rwxr-xr-xdemos/mobile/qcamera/icons/camera.pngbin0 -> 15868 bytes
-rwxr-xr-xdemos/mobile/qcamera/icons/cameramms_icon.svg255
-rwxr-xr-xdemos/mobile/qcamera/icons/exit.pngbin0 -> 14026 bytes
-rwxr-xr-xdemos/mobile/qcamera/icons/mms.pngbin0 -> 12281 bytes
-rwxr-xr-xdemos/mobile/qcamera/main.cpp127
-rwxr-xr-xdemos/mobile/qcamera/messagehandling.cpp183
-rwxr-xr-xdemos/mobile/qcamera/messagehandling.h92
-rwxr-xr-xdemos/mobile/qcamera/qcamera.pro62
-rw-r--r--demos/mobile/qcamera/qcamera.pro.user582
-rwxr-xr-xdemos/mobile/qcamera/resources.qrc7
-rw-r--r--demos/mobile/qtbubblelevel/accelerometerfilter.cpp85
-rw-r--r--demos/mobile/qtbubblelevel/accelerometerfilter.h69
-rw-r--r--demos/mobile/qtbubblelevel/debian/changelog19
-rw-r--r--demos/mobile/qtbubblelevel/debian/compat1
-rw-r--r--demos/mobile/qtbubblelevel/debian/control12
-rw-r--r--demos/mobile/qtbubblelevel/debian/copyright36
-rw-r--r--demos/mobile/qtbubblelevel/debian/dirs2
-rw-r--r--demos/mobile/qtbubblelevel/debian/files1
-rw-r--r--demos/mobile/qtbubblelevel/debian/postinst5
-rw-r--r--demos/mobile/qtbubblelevel/debian/rules91
-rw-r--r--demos/mobile/qtbubblelevel/icons/26x26/qtbubblelevel.pngbin0 -> 1113 bytes
-rw-r--r--demos/mobile/qtbubblelevel/icons/40x40/qtbubblelevel.pngbin0 -> 2048 bytes
-rw-r--r--demos/mobile/qtbubblelevel/icons/64x64/qtbubblelevel.pngbin0 -> 4154 bytes
-rw-r--r--demos/mobile/qtbubblelevel/icons/bubblelevel.svg264
-rw-r--r--demos/mobile/qtbubblelevel/icons/qtbl_icon.pngbin0 -> 11181 bytes
-rw-r--r--demos/mobile/qtbubblelevel/icons/xpm/qtbubblelevel.xpm1783
-rw-r--r--demos/mobile/qtbubblelevel/main.cpp135
-rw-r--r--demos/mobile/qtbubblelevel/qml/BubbleLevel.qml225
-rw-r--r--demos/mobile/qtbubblelevel/qml/Button.qml (renamed from doc/src/snippets/declarative/animation-standalone.qml)44
-rw-r--r--demos/mobile/qtbubblelevel/qml/Tube.qml (renamed from doc/src/snippets/declarative/grid/grid-no-spacing.qml)51
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/board.pngbin0 -> 520721 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/bubble.pngbin0 -> 4951 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/calibbutton.pngbin0 -> 4881 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/exit.pngbin0 -> 2308 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/reflection.pngbin0 -> 1306 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/scale.pngbin0 -> 271 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/signblank.pngbin0 -> 41230 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/signwithtext.pngbin0 -> 47648 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qml/images/taskswitcher.pngbin0 -> 767 bytes
-rw-r--r--demos/mobile/qtbubblelevel/qtbubblelevel.pro61
-rw-r--r--demos/mobile/qtbubblelevel/resources.qrc16
-rw-r--r--demos/mobile/qtbubblelevel/settings.h66
-rw-r--r--demos/mobile/qtbubblelevel/taskswitcher.cpp61
-rw-r--r--demos/mobile/qtbubblelevel/taskswitcher.h54
-rw-r--r--demos/mobile/quickhit/Button.qml (renamed from doc/src/snippets/declarative/qml-intro/transformations1.qml)64
-rw-r--r--demos/mobile/quickhit/Game.js180
-rw-r--r--demos/mobile/quickhit/Game.qml439
-rw-r--r--demos/mobile/quickhit/InvSounds.cpp189
-rw-r--r--demos/mobile/quickhit/InvSounds.h91
-rw-r--r--demos/mobile/quickhit/Menu.qml163
-rw-r--r--demos/mobile/quickhit/MenuItem.qml103
-rw-r--r--demos/mobile/quickhit/Message.qml147
-rw-r--r--demos/mobile/quickhit/Missile.qml143
-rw-r--r--demos/mobile/quickhit/MyShip.qml184
-rw-r--r--demos/mobile/quickhit/debian/changelog11
-rw-r--r--demos/mobile/quickhit/debian/compat1
-rw-r--r--demos/mobile/quickhit/debian/control11
-rw-r--r--demos/mobile/quickhit/debian/copyright8
-rw-r--r--demos/mobile/quickhit/debian/dirs2
-rw-r--r--demos/mobile/quickhit/debian/postinst5
-rw-r--r--demos/mobile/quickhit/debian/rules91
-rw-r--r--demos/mobile/quickhit/freesound.org.licence.txt24
-rw-r--r--demos/mobile/quickhit/ga_src/GEAudioBuffer.cpp391
-rw-r--r--demos/mobile/quickhit/ga_src/GEAudioBuffer.h137
-rw-r--r--demos/mobile/quickhit/ga_src/GEAudioOut.cpp144
-rw-r--r--demos/mobile/quickhit/ga_src/GEAudioOut.h89
-rw-r--r--demos/mobile/quickhit/ga_src/GEInterfaces.cpp177
-rw-r--r--demos/mobile/quickhit/ga_src/GEInterfaces.h88
-rw-r--r--demos/mobile/quickhit/gameengine.cpp592
-rw-r--r--demos/mobile/quickhit/gameengine.h148
-rw-r--r--demos/mobile/quickhit/gfx/back.pngbin0 -> 2234 bytes
-rw-r--r--demos/mobile/quickhit/gfx/background2.pngbin0 -> 113110 bytes
-rw-r--r--demos/mobile/quickhit/gfx/bigship.pngbin0 -> 98253 bytes
-rw-r--r--demos/mobile/quickhit/gfx/exit.pngbin0 -> 2810 bytes
-rw-r--r--demos/mobile/quickhit/gfx/pause.pngbin0 -> 1986 bytes
-rw-r--r--demos/mobile/quickhit/gfx/quickhit_logo.pngbin0 -> 8974 bytes
-rw-r--r--demos/mobile/quickhit/gfx/soundOff.pngbin0 -> 3122 bytes
-rw-r--r--demos/mobile/quickhit/gfx/soundOn.pngbin0 -> 2420 bytes
-rw-r--r--demos/mobile/quickhit/icon.svg305
-rw-r--r--demos/mobile/quickhit/main.cpp101
-rw-r--r--demos/mobile/quickhit/mainwindow.cpp248
-rw-r--r--demos/mobile/quickhit/mainwindow.h85
-rw-r--r--demos/mobile/quickhit/myeventfilter.cpp67
-rw-r--r--demos/mobile/quickhit/myeventfilter.h63
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/Level.qml214
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/changelog11
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/compat1
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/control11
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/copyright8
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/dirs2
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/postinst5
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/debian/rules91
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/background3.pngbin0 -> 113110 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/enemy1.pngbin0 -> 4508 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/enemy2.pngbin0 -> 4344 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/enemy_missile2.pngbin0 -> 452 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/fire.pngbin0 -> 1036 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/fire2.pngbin0 -> 2558 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/missile2.pngbin0 -> 392 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/red_fire.pngbin0 -> 4737 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/ship.pngbin0 -> 5408 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/star3.pngbin0 -> 409 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/gfx/transparent.pngbin0 -> 1000 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/levelone.cpp120
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/levelone.h91
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/levelone.pro100
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/sound/crash.wavbin0 -> 963020 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/sound/levelonestart.wavbin0 -> 500528 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/sound/rocket.wavbin0 -> 41336 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelOne/sound/rocket_explosion.wavbin0 -> 289420 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/changelog11
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/compat1
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/control11
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/copyright8
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/dirs2
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist41
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/postinst5
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/debian/rules91
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.pngbin0 -> 38263 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.pngbin0 -> 4508 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.pngbin0 -> 4344 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.pngbin0 -> 452 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.pngbin0 -> 392 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/ship.pngbin0 -> 5408 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.pngbin0 -> 1000 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp126
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h95
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro103
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml (renamed from doc/src/snippets/declarative/grid/grid-items.qml)29
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.js42
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml103
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/crash.wavbin0 -> 963020 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wavbin0 -> 78380 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wavbin0 -> 219642 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/laser.wavbin0 -> 46764 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/level2.wavbin0 -> 84034 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wavbin0 -> 120474 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wavbin0 -> 41336 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wavbin0 -> 289420 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/changelog11
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/compat1
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/control11
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/copyright8
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/dirs2
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/levelone.tarlist41
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/postinst5
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/debian/rules91
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/background2.pngbin0 -> 149307 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/background_loop.pngbin0 -> 163319 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/blue_fire.pngbin0 -> 38263 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy1.pngbin0 -> 4508 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy_missile2.pngbin0 -> 370 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/fire.pngbin0 -> 1036 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/fire2.pngbin0 -> 2558 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/missile.pngbin0 -> 289 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/missile2.pngbin0 -> 392 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/ship.pngbin0 -> 5408 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/star3.pngbin0 -> 1288 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/gfx/transparent.pngbin0 -> 1000 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp122
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h91
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/leveltwo.pro108
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/qml/Enemy.qml84
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/qml/Level.js42
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/qml/Level.qml228
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/crash.wavbin0 -> 963020 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/enableship.wavbin0 -> 78380 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/enemy_explosion.wavbin0 -> 219642 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/laser.wavbin0 -> 46764 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/level2.wavbin0 -> 84034 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/myship_explosion.wavbin0 -> 120474 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/rocket.wavbin0 -> 41336 bytes
-rw-r--r--demos/mobile/quickhit/plugins/LevelTwo/sound/rocket_explosion.wavbin0 -> 289420 bytes
-rw-r--r--demos/mobile/quickhit/plugins/levelplugininterface.h86
-rw-r--r--demos/mobile/quickhit/quickhit.pngbin0 -> 4511 bytes
-rw-r--r--demos/mobile/quickhit/quickhit.pro91
-rw-r--r--demos/mobile/quickhit/resources.qrc25
-rw-r--r--demos/mobile/quickhit/sound/gameover.wavbin0 -> 46868 bytes
-rw-r--r--demos/mobile/quickhit/sound/gamestart.wavbin0 -> 573486 bytes
-rw-r--r--demos/mobile/quickhit/sound/menu1.wavbin0 -> 22444 bytes
-rw-r--r--demos/mobile/quickhit/sound/menu2.wavbin0 -> 25644 bytes
-rw-r--r--demos/mobile/quickhit/sound/youwin.wavbin0 -> 458554 bytes
-rw-r--r--demos/qtdemo/examplecontent.cpp6
-rw-r--r--demos/spectrum/spectrum.pri6
-rw-r--r--dist/changes-4.7.359
-rw-r--r--dist/changes-4.7.431
-rw-r--r--doc/doc.pri4
-rw-r--r--doc/src/classes.qdoc2
-rw-r--r--doc/src/classes/phonon-api.qdoc42
-rw-r--r--doc/src/declarative/anchor-layout.qdoc9
-rw-r--r--doc/src/declarative/animation.qdoc394
-rw-r--r--doc/src/declarative/basicelements.qdoc114
-rw-r--r--doc/src/declarative/basictypes.qdoc35
-rw-r--r--doc/src/declarative/declarativeui.qdoc139
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc42
-rw-r--r--doc/src/declarative/elements.qdoc9
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc4
-rw-r--r--doc/src/declarative/examples.qdoc1
-rw-r--r--doc/src/declarative/extending-tutorial.qdoc54
-rw-r--r--doc/src/declarative/extending.qdoc514
-rw-r--r--doc/src/declarative/focus.qdoc7
-rw-r--r--doc/src/declarative/integrating.qdoc19
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc9
-rw-r--r--doc/src/declarative/modules.qdoc100
-rw-r--r--doc/src/declarative/mouseevents.qdoc120
-rw-r--r--doc/src/declarative/network.qdoc6
-rw-r--r--doc/src/declarative/positioners.qdoc17
-rw-r--r--doc/src/declarative/propertybinding.qdoc414
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc52
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc5
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc200
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc233
-rw-r--r--doc/src/declarative/qml-intro.qdoc616
-rw-r--r--doc/src/declarative/qmlevents.qdoc127
-rw-r--r--doc/src/declarative/qmlreusablecomponents.qdoc143
-rw-r--r--doc/src/declarative/qmlruntime.qdoc42
-rw-r--r--doc/src/declarative/qmlsyntax.qdoc155
-rw-r--r--doc/src/declarative/qmltexthandling.qdoc76
-rw-r--r--doc/src/declarative/qmlviewer.qdoc60
-rw-r--r--doc/src/declarative/qmlviews.qdoc114
-rw-r--r--doc/src/declarative/qmlwebkit.qdoc52
-rw-r--r--doc/src/declarative/qtbinding.qdoc18
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc5
-rw-r--r--doc/src/declarative/qtquick-intro.qdoc124
-rw-r--r--doc/src/declarative/scope.qdoc122
-rw-r--r--doc/src/declarative/tutorial.qdoc2
-rw-r--r--doc/src/demos/guitartuner.qdoc45
-rw-r--r--doc/src/demos/mobiledemos.qdoc41
-rw-r--r--doc/src/demos/qcamera.qdoc68
-rw-r--r--doc/src/demos/qml-qtbubblelevel.qdoc109
-rw-r--r--doc/src/deployment/deployment-plugins.qdoc2
-rw-r--r--doc/src/deployment/deployment.qdoc24
-rw-r--r--doc/src/development/activeqt-dumpcpp.qdoc10
-rw-r--r--doc/src/development/debug.qdoc6
-rw-r--r--doc/src/development/designer-manual.qdoc114
-rw-r--r--doc/src/development/moc.qdoc18
-rw-r--r--doc/src/development/qmake-manual.qdoc2158
-rw-r--r--doc/src/development/qtestlib.qdoc10
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc68
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo.qdocinc2
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc4
-rw-r--r--doc/src/examples/arrowpad.qdoc2
-rw-r--r--doc/src/examples/containerextension.qdoc2
-rw-r--r--doc/src/examples/customwidgetplugin.qdoc2
-rw-r--r--doc/src/examples/editabletreemodel.qdoc4
-rw-r--r--doc/src/examples/fademessage.qdoc8
-rw-r--r--doc/src/examples/fancybrowser.qdoc4
-rw-r--r--doc/src/examples/globalVariables.qdoc61
-rw-r--r--doc/src/examples/icons.qdoc6
-rw-r--r--doc/src/examples/imageviewer.qdoc6
-rw-r--r--doc/src/examples/qml-examples.qdoc36
-rw-r--r--doc/src/examples/qtscriptcustomclass.qdoc12
-rw-r--r--doc/src/examples/rogue.qdoc4
-rw-r--r--doc/src/examples/simpledommodel.qdoc2
-rw-r--r--doc/src/examples/taskmenuextension.qdoc2
-rw-r--r--doc/src/examples/textfinder.qdoc2
-rw-r--r--doc/src/examples/trollprint.qdoc8
-rw-r--r--doc/src/examples/undoframework.qdoc3
-rw-r--r--doc/src/examples/worldtimeclockplugin.qdoc2
-rw-r--r--doc/src/external-resources.qdoc25
-rw-r--r--doc/src/files-and-resources/resources.qdoc4
-rw-r--r--doc/src/frameworks-technologies/accessible.qdoc59
-rw-r--r--doc/src/frameworks-technologies/activeqt-container.qdoc4
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc36
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc48
-rw-r--r--doc/src/frameworks-technologies/dbus-adaptors.qdoc26
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc14
-rw-r--r--doc/src/frameworks-technologies/implicit-sharing.qdoc4
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc16
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc2
-rw-r--r--doc/src/frameworks-technologies/plugins-howto.qdoc10
-rw-r--r--doc/src/frameworks-technologies/qthelp.qdoc2
-rw-r--r--doc/src/frameworks-technologies/richtext.qdoc14
-rw-r--r--doc/src/frameworks-technologies/unicode.qdoc8
-rw-r--r--doc/src/getting-started/demos.qdoc25
-rw-r--r--doc/src/getting-started/examples.qdoc12
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc2
-rw-r--r--doc/src/getting-started/gettingstartedqt.qdoc224
-rw-r--r--doc/src/getting-started/how-to-learn-qt.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc250
-rw-r--r--doc/src/getting-started/tutorials.qdoc152
-rw-r--r--doc/src/howtos/appicon.qdoc6
-rw-r--r--doc/src/howtos/developmentsteps.qdoc186
-rw-r--r--doc/src/howtos/exceptionsafety.qdoc5
-rw-r--r--doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc97
-rw-r--r--doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc49
-rw-r--r--doc/src/howtos/scalabilityintro.qdoc324
-rw-r--r--doc/src/howtos/unix-signal-handlers.qdoc10
-rw-r--r--doc/src/images/guide.pngbin0 -> 7376 bytes
-rw-r--r--doc/src/images/listview-decorations.pngbin0 -> 12131 bytes
-rw-r--r--doc/src/images/listview-section.pngbin0 -> 11053 bytes
-rw-r--r--doc/src/images/listview-setup.pngbin0 -> 7117 bytes
-rw-r--r--doc/src/images/mobile.pngbin0 -> 31620 bytes
-rw-r--r--doc/src/images/qcameraexample.pngbin0 -> 27135 bytes
-rw-r--r--doc/src/images/qml-dial.pngbin43754 -> 0 bytes
-rw-r--r--doc/src/images/qml-guitartuner-example.pngbin0 -> 46135 bytes
-rw-r--r--doc/src/images/qml-intro-anchors1.pngbin15198 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-anchors2.pngbin15343 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-anchors3.pngbin16745 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-helloa.pngbin18246 -> 0 bytes
-rw-r--r--doc/src/images/qml-listview-snippet.pngbin2048 -> 0 bytes
-rw-r--r--doc/src/images/qml-qtbubblelevel-demo.pngbin0 -> 72591 bytes
-rw-r--r--doc/src/images/qml.pngbin0 -> 8662 bytes
-rw-r--r--doc/src/images/qmldesigner-visual-editor.pngbin0 -> 102238 bytes
-rw-r--r--doc/src/images/qt-logo_large.pngbin0 -> 11801 bytes
-rw-r--r--doc/src/images/qtcreator-target-selector.pngbin0 -> 36463 bytes
-rw-r--r--doc/src/images/roaming-states.pngbin0 -> 9527 bytes
-rw-r--r--doc/src/images/thread_clock.pngbin0 -> 5964 bytes
-rw-r--r--doc/src/images/threads-examples.pngbin0 -> 7966 bytes
-rw-r--r--doc/src/images/threadvisual-example.pngbin0 -> 16823 bytes
-rw-r--r--doc/src/images/tools.pngbin0 -> 9684 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_arcTo.pngbin0 -> 8917 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_arcTo2.pngbin0 -> 6532 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_clip-complex.pngbin0 -> 70000 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_clip.pngbin0 -> 27933 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_clip_aqu.pngbin0 -> 114102 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_closepath.gifbin0 -> 1786 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_composite.pngbin0 -> 41457 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_context.gifbin0 -> 4473 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_lineStrokeTo.gifbin0 -> 1400 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_linecap.pngbin0 -> 1601 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_math.pngbin0 -> 1961 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_math_rotate.pngbin0 -> 3206 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_pattern.pngbin0 -> 6896 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_rectangles.gifbin0 -> 3496 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_rotate.pngbin0 -> 8238 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_scale.pngbin0 -> 4988 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_scalex.pngbin0 -> 1023 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_scaley.pngbin0 -> 1080 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_skewx.pngbin0 -> 1857 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_skewy.pngbin0 -> 2654 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_startAngle.pngbin0 -> 10254 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_text.pngbin0 -> 8095 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_translate.pngbin0 -> 1269 bytes
-rw-r--r--doc/src/images/webkit-guide/canvas_translatey.pngbin0 -> 1666 bytes
-rw-r--r--doc/src/images/webkit-guide/mask0.pngbin0 -> 5842 bytes
-rw-r--r--doc/src/images/webkit-guide/mask1.pngbin0 -> 76460 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_accord.pngbin0 -> 26980 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_demo-rotate.pngbin0 -> 16357 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_demo-scale.pngbin0 -> 2686 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_demo-skew.pngbin0 -> 11635 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_gallery.pngbin0 -> 51798 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_panel.pngbin0 -> 5640 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_pulse.pngbin0 -> 11887 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_skew.pngbin0 -> 29181 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_slide1.pngbin0 -> 11965 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_anim_tabbedSkew.pngbin0 -> 11722 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_backgrounds.pngbin0 -> 9719 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_border-img.pngbin0 -> 31413 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_grad-radial.pngbin0 -> 12008 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_gradientBack.pngbin0 -> 12192 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_gradientBackStop.pngbin0 -> 9078 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_gradientButton.pngbin0 -> 10291 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_mask-grad.pngbin0 -> 94781 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_mask-img.pngbin0 -> 60911 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_multicol.pngbin0 -> 10574 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_reflect.pngbin0 -> 100120 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_scroll.pngbin0 -> 20209 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_sel-nth.pngbin0 -> 25509 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_text-overflow.pngbin0 -> 14994 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_text-shadow.pngbin0 -> 17357 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_css3_text-stroke.pngbin0 -> 13330 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_form_tapper.pngbin0 -> 13604 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_form_toggler.pngbin0 -> 10095 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_layout_link-fmt.pngbin0 -> 20323 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_layout_tbl-keyhole.pngbin0 -> 14996 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_mob_condjs.pngbin0 -> 11465 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_mob_layout.pngbin0 -> 6679 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_mob_mediaquery.pngbin0 -> 7448 bytes
-rw-r--r--doc/src/images/webkit-guide/scr_storage.pngbin0 -> 6673 bytes
-rw-r--r--doc/src/index.qdoc211
-rw-r--r--doc/src/internationalization/i18n.qdoc32
-rw-r--r--doc/src/internationalization/linguist-manual.qdoc323
-rw-r--r--doc/src/ja_JP/development/qmake-manual.qdoc30
-rw-r--r--doc/src/ja_JP/development/qtestlib.qdoc4
-rw-r--r--doc/src/ja_JP/examples/arrowpad.qdoc2
-rw-r--r--doc/src/ja_JP/examples/trollprint.qdoc8
-rw-r--r--doc/src/legal/qtquicklicense.qdoc40
-rw-r--r--doc/src/mainpage.qdoc233
-rw-r--r--doc/src/modules.qdoc66
-rw-r--r--doc/src/objectmodel/objecttrees.qdoc4
-rw-r--r--doc/src/objectmodel/properties.qdoc20
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc2
-rw-r--r--doc/src/overviews.qdoc63
-rw-r--r--doc/src/painting-and-printing/coordsys.qdoc12
-rw-r--r--doc/src/platforms/emb-performance.qdoc2
-rw-r--r--doc/src/platforms/emb-pointer.qdoc2
-rw-r--r--doc/src/platforms/mac-differences.qdoc4
-rw-r--r--doc/src/platforms/supported-platforms.qdoc700
-rw-r--r--doc/src/platforms/wince-customization.qdoc2
-rw-r--r--doc/src/porting/porting-qsa.qdoc28
-rw-r--r--doc/src/porting/porting4-canvas.qdoc20
-rw-r--r--doc/src/porting/porting4-designer.qdoc14
-rw-r--r--doc/src/porting/porting4-dnd.qdoc6
-rw-r--r--doc/src/porting/porting4.qdoc140
-rw-r--r--doc/src/porting/qt3to4.qdoc2
-rw-r--r--doc/src/porting/qt4-accessibility.qdoc8
-rw-r--r--doc/src/porting/qt4-arthur.qdoc22
-rw-r--r--doc/src/porting/qt4-mainwindow.qdoc20
-rw-r--r--doc/src/porting/qt4-sql.qdoc4
-rw-r--r--doc/src/porting/qt4-styles.qdoc8
-rw-r--r--doc/src/porting/qt4-tulip.qdoc22
-rw-r--r--doc/src/qt-webpages.qdoc157
-rw-r--r--doc/src/qt4-intro.qdoc38
-rw-r--r--doc/src/scripting/qtscriptextensions.qdoc2
-rw-r--r--doc/src/scripting/scripting.qdoc180
-rw-r--r--doc/src/snippets/accessibilityfactorysnippet.cpp5
-rw-r--r--doc/src/snippets/accessibilitypluginsnippet.cpp6
-rw-r--r--doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp (renamed from doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_appicon.pro53
-rw-r--r--doc/src/snippets/code/doc_src_appicon.qdoc14
-rw-r--r--doc/src/snippets/code/doc_src_containers.cpp (renamed from doc/src/snippets/code/doc_src_containers.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_coordsys.cpp (renamed from doc/src/snippets/code/doc_src_coordsys.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_debug.cpp (renamed from doc/src/snippets/code/doc_src_debug.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_deployment.cpp56
-rw-r--r--doc/src/snippets/code/doc_src_deployment.pro87
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc27
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.cpp (renamed from doc/src/snippets/code/doc_src_designer-manual.qdoc)26
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.js43
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.pro59
-rw-r--r--doc/src/snippets/code/doc_src_dnd.cpp (renamed from doc/src/snippets/code/doc_src_dnd.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_emb-performance.cpp71
-rw-r--r--doc/src/snippets/code/doc_src_emb-performance.qdoc33
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.pro46
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.qdoc5
-rw-r--r--doc/src/snippets/code/doc_src_examples_containerextension.pro (renamed from doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro (renamed from doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp (renamed from doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.cpp44
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.cpp54
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.qdoc16
-rw-r--r--doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp (renamed from doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpledommodel.cpp (renamed from doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_taskmenuextension.pro (renamed from doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_textfinder.pro (renamed from doc/src/snippets/code/doc_src_examples_textfinder.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_trollprint.cpp (renamed from doc/src/snippets/code/doc_src_examples_trollprint.qdoc)2
-rw-r--r--doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro (renamed from doc/src/snippets/code/doc_src_examples_containerextension.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_graphicsview.cpp (renamed from doc/src/snippets/code/doc_src_graphicsview.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_groups.cpp (renamed from doc/src/snippets/code/doc_src_groups.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_i18n.cpp175
-rw-r--r--doc/src/snippets/code/doc_src_i18n.qdoc137
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_layout.cpp (renamed from doc/src/snippets/code/doc_src_layout.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.cpp157
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.pro62
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.qdoc144
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.cpp52
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.pro43
-rw-r--r--doc/src/snippets/code/doc_src_moc.cpp144
-rw-r--r--doc/src/snippets/code/doc_src_moc.qdoc106
-rw-r--r--doc/src/snippets/code/doc_src_model-view-programming.cpp (renamed from doc/src/snippets/code/doc_src_model-view-programming.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_modules.pro (renamed from doc/src/snippets/code/doc_src_modules.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_objecttrees.cpp (renamed from doc/src/snippets/code/doc_src_objecttrees.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_phonon-api.cpp (renamed from doc/src/snippets/code/doc_src_phonon-api.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_phonon.pro43
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.cpp89
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.pro50
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.qdoc63
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.cpp89
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.js117
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.qdoc128
-rw-r--r--doc/src/snippets/code/doc_src_porting4-canvas.cpp (renamed from doc/src/snippets/code/doc_src_porting4-canvas.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.cpp173
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.pro43
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.qdoc140
-rw-r--r--doc/src/snippets/code/doc_src_porting4.cpp (renamed from doc/src/snippets/code/doc_src_porting4.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_properties.cpp (renamed from doc/src/snippets/code/doc_src_properties.qdoc)1
-rw-r--r--doc/src/snippets/code/doc_src_q3asciidict.cpp (renamed from doc/src/snippets/code/doc_src_q3asciidict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3dict.cpp (renamed from doc/src/snippets/code/doc_src_q3dict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3intdict.cpp (renamed from doc/src/snippets/code/doc_src_q3intdict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3memarray.cpp108
-rw-r--r--doc/src/snippets/code/doc_src_q3memarray.qdoc70
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrdict.cpp (renamed from doc/src/snippets/code/doc_src_q3ptrdict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrlist.cpp (renamed from doc/src/snippets/code/doc_src_q3ptrlist.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuelist.cpp (renamed from doc/src/snippets/code/doc_src_q3valuelist.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuestack.cpp (renamed from doc/src/snippets/code/doc_src_q3valuestack.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuevector.cpp (renamed from doc/src/snippets/code/doc_src_q3valuevector.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qalgorithms.cpp (renamed from doc/src/snippets/code/doc_src_qalgorithms.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qaxcontainer.pro (renamed from doc/src/snippets/code/doc_src_qaxcontainer.qdoc)8
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.cpp218
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.pro64
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.qdoc206
-rw-r--r--doc/src/snippets/code/doc_src_qcache.cpp (renamed from doc/src/snippets/code/doc_src_qcache.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qdbusadaptors.cpp (renamed from doc/src/snippets/code/doc_src_qdbusadaptors.qdoc)152
-rw-r--r--doc/src/snippets/code/doc_src_qiterator.cpp (renamed from doc/src/snippets/code/doc_src_qiterator.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.cpp58
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.pro (renamed from doc/src/snippets/code/doc_src_qmake-manual.qdoc)642
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.cpp59
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.qdoc21
-rw-r--r--doc/src/snippets/code/doc_src_qpair.cpp (renamed from doc/src/snippets/code/doc_src_qpair.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.cpp (renamed from doc/src/snippets/code/doc_src_qplugin.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.pro44
-rw-r--r--doc/src/snippets/code/doc_src_qset.cpp (renamed from doc/src/snippets/code/doc_src_qset.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qsignalspy.cpp (renamed from doc/src/snippets/code/doc_src_qsignalspy.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt3support.cpp (renamed from doc/src/snippets/code/doc_src_qt3support.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qt3support.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qt3to4.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qt4-accessibility.cpp (renamed from doc/src/snippets/code/doc_src_qt4-accessibility.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-arthur.cpp (renamed from doc/src/snippets/code/doc_src_qt4-arthur.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-intro.cpp (renamed from doc/src/snippets/code/doc_src_qt4-intro.qdoc)35
-rw-r--r--doc/src/snippets/code/doc_src_qt4-intro.pro73
-rw-r--r--doc/src/snippets/code/doc_src_qt4-mainwindow.cpp (renamed from doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-sql.cpp (renamed from doc/src/snippets/code/doc_src_qt4-sql.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-styles.cpp (renamed from doc/src/snippets/code/doc_src_qt4-styles.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-tulip.cpp (renamed from doc/src/snippets/code/doc_src_qt4-tulip.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtcore.cpp (renamed from doc/src/snippets/code/doc_src_qtcore.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtdbus.cpp (renamed from doc/src/snippets/code/doc_src_qtdbus.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtdbus.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtdesigner.cpp (renamed from doc/src/snippets/code/doc_src_qtdesigner.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtdesigner.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtestevent.cpp (renamed from doc/src/snippets/code/doc_src_qtestevent.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.cpp88
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.qdoc55
-rw-r--r--doc/src/snippets/code/doc_src_qtgui.pro (renamed from doc/src/snippets/code/doc_src_qtgui.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_qthelp.cpp63
-rw-r--r--doc/src/snippets/code/doc_src_qthelp.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_qtmultimedia.cpp (renamed from doc/src/snippets/code/doc_src_qtmultimedia.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtmultimedia.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.cpp (renamed from doc/src/snippets/code/doc_src_qtnetwork.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtopengl.cpp (renamed from doc/src/snippets/code/doc_src_qtopengl.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtopengl.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.cpp568
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.js444
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.qdoc937
-rw-r--r--doc/src/snippets/code/doc_src_qtscriptextensions.js (renamed from doc/src/snippets/code/doc_src_qtscriptextensions.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtscripttools.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qtscripttools.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.cpp (renamed from doc/src/snippets/code/doc_src_qtsql.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtsvg.cpp (renamed from doc/src/snippets/code/doc_src_qtsvg.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtsvg.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qttest.cpp (renamed from doc/src/snippets/code/doc_src_qttest.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qttest.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtuiloader.cpp (renamed from doc/src/snippets/code/doc_src_qtuiloader.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtuiloader.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.qdoc15
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.cpp44
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.pro44
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc9
-rw-r--r--doc/src/snippets/code/doc_src_qvarlengtharray.cpp (renamed from doc/src/snippets/code/doc_src_qvarlengtharray.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_resources.cpp (renamed from doc/src/snippets/declarative/qml-intro/hello-world1.qml)21
-rw-r--r--doc/src/snippets/code/doc_src_resources.qdoc16
-rw-r--r--doc/src/snippets/code/doc_src_richtext.cpp85
-rw-r--r--doc/src/snippets/code/doc_src_richtext.qdoc47
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.cpp82
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.qdoc44
-rw-r--r--doc/src/snippets/code/doc_src_styles.cpp (renamed from doc/src/snippets/code/doc_src_styles.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.cpp140
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.qdoc103
-rw-r--r--doc/src/snippets/code/doc_src_unicode.cpp (renamed from doc/src/snippets/code/doc_src_unicode.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_unix-signal-handlers.cpp (renamed from doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_wince-customization.cpp (renamed from doc/src/snippets/declarative/animation-behavioral.qml)33
-rw-r--r--doc/src/snippets/code/doc_src_wince-customization.qdoc19
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpen.cpp2
-rw-r--r--doc/src/snippets/declarative/Button.qml (renamed from doc/src/snippets/declarative/qml-intro/anchors2.qml)33
-rw-r--r--doc/src/snippets/declarative/animation.qml226
-rw-r--r--doc/src/snippets/declarative/bestpractices/group.qml (renamed from doc/src/snippets/declarative/animation-propertyvaluesource.qml)37
-rw-r--r--doc/src/snippets/declarative/events.qml141
-rw-r--r--doc/src/snippets/declarative/focus/advancedFocus.qml2
-rw-r--r--doc/src/snippets/declarative/focus/basicwidget.qml2
-rw-r--r--doc/src/snippets/declarative/focus/focusscopewidget.qml4
-rw-r--r--doc/src/snippets/declarative/focus/myclickablewidget.qml2
-rw-r--r--doc/src/snippets/declarative/focus/myfocusscopewidget.qml6
-rw-r--r--doc/src/snippets/declarative/focus/mywidget.qml4
-rw-r--r--doc/src/snippets/declarative/focus/widget.qml2
-rw-r--r--doc/src/snippets/declarative/grid-spacing.qml (renamed from doc/src/snippets/declarative/grid/grid-spacing.qml)0
-rw-r--r--doc/src/snippets/declarative/imports/best-practices.qml (renamed from doc/src/snippets/code/doc_src_phonon.qdoc)20
-rw-r--r--doc/src/snippets/declarative/imports/chart.qml46
-rw-r--r--doc/src/snippets/declarative/imports/installed-module.qml47
-rw-r--r--doc/src/snippets/declarative/imports/merged-named-imports.qml (renamed from doc/src/snippets/code/doc.src.qtscripttools.qdoc)13
-rw-r--r--doc/src/snippets/declarative/imports/named-imports.qml (renamed from doc/src/snippets/declarative/qml-intro/hello-world4.qml)30
-rw-r--r--doc/src/snippets/declarative/imports/network-imports.qml47
-rw-r--r--doc/src/snippets/declarative/imports/qtquick-1.0.qml46
-rw-r--r--doc/src/snippets/declarative/imports/timeexample.qml46
-rw-r--r--doc/src/snippets/declarative/listview-decorations.qml111
-rw-r--r--doc/src/snippets/declarative/listview-sections.qml (renamed from doc/src/snippets/declarative/qml-intro/states1.qml)91
-rw-r--r--doc/src/snippets/declarative/listview.qml (renamed from doc/src/snippets/declarative/qml-intro/number-animation1.qml)53
-rw-r--r--doc/src/snippets/declarative/models/views-models-delegates.qml78
-rw-r--r--doc/src/snippets/declarative/models/visual-model-and-view.qml (renamed from doc/src/snippets/declarative/animation-transitions.qml)31
-rw-r--r--doc/src/snippets/declarative/mousearea/mousearea-snippet.qml55
-rw-r--r--doc/src/snippets/declarative/pics/qt.pngbin514 -> 2991 bytes
-rw-r--r--doc/src/snippets/declarative/properties.qml315
-rw-r--r--doc/src/snippets/declarative/qml-intro/anchors3.qml65
-rw-r--r--doc/src/snippets/declarative/qml-intro/hello-world2.qml56
-rw-r--r--doc/src/snippets/declarative/qml-intro/hello-world3.qml57
-rw-r--r--doc/src/snippets/declarative/qml-intro/images/qt-logo.svg104
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/Button.qml84
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/application.qml (renamed from doc/src/snippets/declarative/qml-intro/anchors1.qml)17
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/component.qml77
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/focusbutton.qml (renamed from doc/src/snippets/declarative/qml-intro/sequential-animation3.qml)84
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/qmldir4
-rw-r--r--doc/src/snippets/declarative/states.qml85
-rw-r--r--doc/src/snippets/declarative/texthandling.qml (renamed from doc/src/snippets/declarative/qml-intro/sequential-animation1.qml)56
-rw-r--r--doc/src/snippets/declarative/webview/webview.qml2
-rw-r--r--doc/src/snippets/qtreeview-dnd/dragdropmodel.h11
-rw-r--r--doc/src/snippets/qtscript/evaluation/main.cpp4
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/main.cpp4
-rw-r--r--doc/src/snippets/qtscript/registeringvalues/main.cpp4
-rw-r--r--doc/src/snippets/textblock-fragments/xmlwriter.cpp5
-rw-r--r--doc/src/snippets/textdocument-frames/xmlwriter.cpp2
-rw-r--r--doc/src/snippets/textdocument-tables/xmlwriter.cpp2
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc12
-rw-r--r--doc/src/template/style/offline.css33
-rwxr-xr-xdoc/src/template/style/style.css199
-rw-r--r--doc/src/tutorials/modelview.qdoc2
-rw-r--r--doc/src/tutorials/threads.qdoc572
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc83
-rw-r--r--doc/src/webkit/guide/chapter_cache.qdoc511
-rw-r--r--doc/src/webkit/guide/chapter_canvas.qdoc1016
-rw-r--r--doc/src/webkit/guide/chapter_css.qdoc1519
-rw-r--r--doc/src/webkit/guide/guidelinks.qdoc488
-rw-r--r--doc/src/webkit/webkit.qdoc103
-rw-r--r--doc/src/widgets-and-layouts/layout.qdoc16
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc14
-rw-r--r--doc/src/widgets-and-layouts/stylesheet.qdoc30
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc8
-rw-r--r--doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc2
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.cpp53
-rw-r--r--examples/declarative/screenorientation/Core/Bubble.qml53
-rw-r--r--examples/declarative/screenorientation/Core/Button.qml53
-rw-r--r--examples/declarative/screenorientation/Core/screenorientation.js53
-rw-r--r--examples/declarative/screenorientation/screenorientation.qml53
-rw-r--r--examples/declarative/text/textselection/textselection.qml53
-rw-r--r--examples/declarative/ui-components/tabwidget/TabWidget.qml2
-rw-r--r--examples/graphicsview/diagramscene/arrow.h2
-rw-r--r--examples/ja_JP/linguist/hellotr/main.cpp53
-rw-r--r--examples/phonon/phonon.pro3
-rw-r--r--examples/tools/undoframework/commands.cpp6
-rw-r--r--examples/tools/undoframework/commands.h1
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/gsqt.pro13
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part1/main.cpp53
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part2/main.cpp63
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part3/main.cpp97
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part4/main.cpp108
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part5/main.cpp134
-rwxr-xr-xexamples/tutorials/threads/clock/clock.pro14
-rw-r--r--examples/tutorials/threads/clock/clockthread.cpp66
-rw-r--r--examples/tutorials/threads/clock/clockthread.h64
-rwxr-xr-xexamples/tutorials/threads/clock/main.cpp67
-rwxr-xr-xexamples/tutorials/threads/helloconcurrent/helloconcurrent.cpp61
-rwxr-xr-xexamples/tutorials/threads/helloconcurrent/helloconcurrent.pro16
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.cpp53
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.h54
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.pro17
-rwxr-xr-xexamples/tutorials/threads/hellothread/main.cpp54
-rwxr-xr-xexamples/tutorials/threads/hellothreadpool/hellothreadpool.cpp65
-rwxr-xr-xexamples/tutorials/threads/hellothreadpool/hellothreadpool.pro17
-rwxr-xr-xexamples/tutorials/threads/movedobject/main.cpp69
-rwxr-xr-xexamples/tutorials/threads/movedobject/movedobject.pro18
-rw-r--r--examples/tutorials/threads/movedobject/thread.cpp101
-rw-r--r--examples/tutorials/threads/movedobject/thread.h67
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.cpp87
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.h64
-rw-r--r--examples/tutorials/threads/threads.pro8
-rw-r--r--examples/tutorials/tutorials.pro3
-rw-r--r--examples/webkit/fancybrowser/fancybrowser.pro2
-rw-r--r--examples/webkit/webkit-guide/_copyright.txt40
-rw-r--r--examples/webkit/webkit-guide/_image_assets.htm331
-rw-r--r--examples/webkit/webkit-guide/_index.html322
-rw-r--r--examples/webkit/webkit-guide/anim_accord.htm122
-rw-r--r--examples/webkit/webkit-guide/anim_demo-rotate.htm63
-rw-r--r--examples/webkit/webkit-guide/anim_demo-scale.htm67
-rw-r--r--examples/webkit/webkit-guide/anim_demo-skew.htm62
-rw-r--r--examples/webkit/webkit-guide/anim_gallery.htm114
-rw-r--r--examples/webkit/webkit-guide/anim_panel.htm63
-rw-r--r--examples/webkit/webkit-guide/anim_pulse.htm71
-rw-r--r--examples/webkit/webkit-guide/anim_skew.htm80
-rw-r--r--examples/webkit/webkit-guide/anim_slide1.htm61
-rw-r--r--examples/webkit/webkit-guide/anim_slide2.htm62
-rw-r--r--examples/webkit/webkit-guide/anim_slide3.htm65
-rw-r--r--examples/webkit/webkit-guide/anim_tabbedSkew.htm88
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_accord.css246
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_demo-rotate.css95
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_demo-scale.css112
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_demo-skew.css98
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_gallery.css110
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_panel.css116
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_pulse.css100
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_skew.css186
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_slide.css148
-rwxr-xr-xexamples/webkit/webkit-guide/css/anim_tabbedSkew.css113
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_backgrounds.css105
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_border-img.css70
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_grad-radial.css66
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_gradientBack.css77
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_gradientBackStop.css77
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_gradientButton.css88
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/css/css3_mask-grad.css (renamed from doc/src/snippets/declarative/animation-elements.qml)36
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_mask-img.css58
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_multicol.css110
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_reflect.css127
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_scroll.css93
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_sel-nth.css63
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_shadow.css145
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_shadowBlur.css145
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_text-overflow.css119
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_text-shadow.css67
-rwxr-xr-xexamples/webkit/webkit-guide/css/css3_text-stroke.css75
-rwxr-xr-xexamples/webkit/webkit-guide/css/form_tapper.css108
-rwxr-xr-xexamples/webkit/webkit-guide/css/form_toggler.css200
-rwxr-xr-xexamples/webkit/webkit-guide/css/layout_link-fmt.css137
-rwxr-xr-xexamples/webkit/webkit-guide/css/layout_tbl-keyhole.css147
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/css/mob_condjs.css (renamed from doc/src/snippets/declarative/animation-easing.qml)26
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/css/mob_mediaquery.css (renamed from doc/src/snippets/declarative/qml-intro/rectangle.qml)17
-rwxr-xr-xexamples/webkit/webkit-guide/css/mobile.css82
-rwxr-xr-xexamples/webkit/webkit-guide/css/mq_desktop.css70
-rwxr-xr-xexamples/webkit/webkit-guide/css/mq_mobile.css69
-rwxr-xr-xexamples/webkit/webkit-guide/css/mq_touch.css69
-rwxr-xr-xexamples/webkit/webkit-guide/css/mqlayout_desktop.css92
-rwxr-xr-xexamples/webkit/webkit-guide/css/mqlayout_mobile.css82
-rwxr-xr-xexamples/webkit/webkit-guide/css/mqlayout_touch.css86
-rwxr-xr-xexamples/webkit/webkit-guide/css/storage.css156
-rw-r--r--examples/webkit/webkit-guide/css3_backgrounds.htm87
-rw-r--r--examples/webkit/webkit-guide/css3_border-img.htm78
-rw-r--r--examples/webkit/webkit-guide/css3_grad-radial.htm61
-rw-r--r--examples/webkit/webkit-guide/css3_gradientBack.htm79
-rw-r--r--examples/webkit/webkit-guide/css3_gradientBackStop.htm92
-rw-r--r--examples/webkit/webkit-guide/css3_gradientButton.htm66
-rw-r--r--examples/webkit/webkit-guide/css3_mask-grad.htm66
-rw-r--r--examples/webkit/webkit-guide/css3_mask-img.htm56
-rw-r--r--examples/webkit/webkit-guide/css3_multicol.htm91
-rw-r--r--examples/webkit/webkit-guide/css3_reflect.htm100
-rw-r--r--examples/webkit/webkit-guide/css3_scroll.htm94
-rw-r--r--examples/webkit/webkit-guide/css3_sel-nth.htm80
-rw-r--r--examples/webkit/webkit-guide/css3_shadow.htm78
-rw-r--r--examples/webkit/webkit-guide/css3_text-overflow.htm117
-rw-r--r--examples/webkit/webkit-guide/css3_text-shadow.htm74
-rw-r--r--examples/webkit/webkit-guide/css3_text-stroke.htm74
-rw-r--r--examples/webkit/webkit-guide/form_tapper.htm74
-rw-r--r--examples/webkit/webkit-guide/form_toggler.htm140
-rwxr-xr-xexamples/webkit/webkit-guide/img/border-frame.pngbin0 -> 5534 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal1.jpgbin0 -> 44584 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal2.jpgbin0 -> 45495 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal3.jpgbin0 -> 51291 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal4.jpgbin0 -> 57195 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal5.jpgbin0 -> 31293 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal6.jpgbin0 -> 30854 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal7.jpgbin0 -> 35211 bytes
-rw-r--r--examples/webkit/webkit-guide/img/gal8.jpgbin0 -> 35269 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/gradient.jpgbin0 -> 710 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/gray_icon_close.pngbin0 -> 658 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ag_016.pngbin0 -> 598 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ag_032.pngbin0 -> 1275 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ag_036.pngbin0 -> 1803 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ag_048.pngbin0 -> 1885 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_al_016.pngbin0 -> 625 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_al_032.pngbin0 -> 1259 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_al_036.pngbin0 -> 1755 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_al_048.pngbin0 -> 1795 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ar_016.pngbin0 -> 608 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ar_032.pngbin0 -> 1233 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ar_036.pngbin0 -> 1777 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ar_048.pngbin0 -> 1828 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_b_016.pngbin0 -> 580 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_b_032.pngbin0 -> 1166 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_b_036.pngbin0 -> 1668 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_b_048.pngbin0 -> 1623 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_be_016.pngbin0 -> 614 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_be_032.pngbin0 -> 1322 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_be_036.pngbin0 -> 1811 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_be_048.pngbin0 -> 1824 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_c_016.pngbin0 -> 545 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_c_032.pngbin0 -> 1102 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_c_036.pngbin0 -> 1595 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_c_048.pngbin0 -> 1622 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ca_016.pngbin0 -> 606 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ca_032.pngbin0 -> 1229 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ca_036.pngbin0 -> 1771 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ca_048.pngbin0 -> 1820 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cl_016.pngbin0 -> 602 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cl_032.pngbin0 -> 1197 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cl_036.pngbin0 -> 1731 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cl_048.pngbin0 -> 1816 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cu_016.pngbin0 -> 580 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cu_032.pngbin0 -> 1183 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cu_036.pngbin0 -> 1742 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_cu_048.pngbin0 -> 1729 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_f_016.pngbin0 -> 539 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_f_032.pngbin0 -> 1047 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_f_036.pngbin0 -> 1487 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_f_048.pngbin0 -> 1488 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_fe_016.pngbin0 -> 591 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_fe_032.pngbin0 -> 1171 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_fe_036.pngbin0 -> 1726 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_fe_048.pngbin0 -> 1745 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_h_016.pngbin0 -> 583 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_h_032.pngbin0 -> 1135 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_h_036.pngbin0 -> 1600 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_h_048.pngbin0 -> 1644 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_he_016.pngbin0 -> 606 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_he_032.pngbin0 -> 1179 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_he_036.pngbin0 -> 1746 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_he_048.pngbin0 -> 1675 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_k_016.pngbin0 -> 600 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_k_032.pngbin0 -> 1189 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_k_036.pngbin0 -> 1657 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_k_048.pngbin0 -> 1706 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_li_016.pngbin0 -> 584 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_li_032.pngbin0 -> 1125 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_li_036.pngbin0 -> 1596 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_li_048.pngbin0 -> 1691 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_mg_016.pngbin0 -> 628 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_mg_032.pngbin0 -> 1286 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_mg_036.pngbin0 -> 1832 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_mg_048.pngbin0 -> 1908 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_n_016.pngbin0 -> 605 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_n_032.pngbin0 -> 1203 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_n_036.pngbin0 -> 1728 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_n_048.pngbin0 -> 1718 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_na_016.pngbin0 -> 609 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_na_032.pngbin0 -> 1302 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_na_036.pngbin0 -> 1811 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_na_048.pngbin0 -> 1879 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ne_016.pngbin0 -> 619 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ne_032.pngbin0 -> 1278 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ne_036.pngbin0 -> 1798 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ne_048.pngbin0 -> 1811 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ni_016.pngbin0 -> 627 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ni_032.pngbin0 -> 1248 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ni_036.pngbin0 -> 1805 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_ni_048.pngbin0 -> 1837 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_o_016.pngbin0 -> 580 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_o_032.pngbin0 -> 1182 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_o_036.pngbin0 -> 1668 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_o_048.pngbin0 -> 1752 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_pt_016.pngbin0 -> 600 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_pt_032.pngbin0 -> 1212 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_pt_036.pngbin0 -> 1728 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_pt_048.pngbin0 -> 1675 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_si_016.pngbin0 -> 588 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_si_032.pngbin0 -> 1198 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_si_036.pngbin0 -> 1761 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_si_048.pngbin0 -> 1820 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_zn_016.pngbin0 -> 572 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_zn_032.pngbin0 -> 1164 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_zn_036.pngbin0 -> 1689 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/ic_zn_048.pngbin0 -> 1721 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_check.pngbin0 -> 678 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_check_x24green.pngbin0 -> 776 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_dismiss.pngbin0 -> 613 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_dismiss_x22.pngbin0 -> 539 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_drill-down.pngbin0 -> 605 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_drill-down_x32.pngbin0 -> 3593 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_drill-up.pngbin0 -> 592 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_drill-up_x32.pngbin0 -> 3685 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_expand-nav.pngbin0 -> 675 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_head-collapsed.pngbin0 -> 285 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_head-collapsed_x13.pngbin0 -> 201 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_head-expanded.pngbin0 -> 295 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_head-expanded_x13.pngbin0 -> 3017 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_info.pngbin0 -> 512 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_info_x24.pngbin0 -> 652 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-doc.pngbin0 -> 610 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-email.pngbin0 -> 542 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-external.pngbin0 -> 1106 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-pdf.pngbin0 -> 637 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-ppt.pngbin0 -> 536 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-rss.pngbin0 -> 684 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-sms.pngbin0 -> 1086 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-tel.pngbin0 -> 1205 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_link-xls.pngbin0 -> 603 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_list-all.pngbin0 -> 545 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_list-all_circ.pngbin0 -> 665 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_nav-start.pngbin0 -> 594 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_nav-top.pngbin0 -> 634 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_nav-up.pngbin0 -> 551 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_nav_end.pngbin0 -> 643 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_question.pngbin0 -> 802 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_scroll-left.pngbin0 -> 660 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_scroll-right.pngbin0 -> 682 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/icon_trash.pngbin0 -> 717 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land1.jpgbin0 -> 40695 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land2.jpgbin0 -> 38387 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land3.jpgbin0 -> 27180 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land4.jpgbin0 -> 45132 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land5.jpgbin0 -> 85110 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land6.jpgbin0 -> 38369 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land7.jpgbin0 -> 38923 bytes
-rw-r--r--examples/webkit/webkit-guide/img/land8.jpgbin0 -> 54475 bytes
-rwxr-xr-xexamples/webkit/webkit-guide/img/mask.pngbin0 -> 5842 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal1.jpgbin0 -> 44584 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal2.jpgbin0 -> 45495 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal3.jpgbin0 -> 51291 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal4.jpgbin0 -> 57195 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal5.jpgbin0 -> 31293 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal6.jpgbin0 -> 30854 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal7.jpgbin0 -> 35211 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/gal8.jpgbin0 -> 35269 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land1.jpgbin0 -> 40695 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land2.jpgbin0 -> 38387 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land3.jpgbin0 -> 27180 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land4.jpgbin0 -> 45132 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land5.jpgbin0 -> 85110 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land6.jpgbin0 -> 38369 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land7.jpgbin0 -> 38923 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tmp/land8.jpgbin0 -> 54475 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal1.pngbin0 -> 16437 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal2.pngbin0 -> 14736 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal3.pngbin0 -> 15882 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal4.pngbin0 -> 18863 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal5.pngbin0 -> 15854 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal6.pngbin0 -> 17339 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal7.pngbin0 -> 17102 bytes
-rw-r--r--examples/webkit/webkit-guide/img/tnail_gal8.pngbin0 -> 17933 bytes
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/js/anim_accord.js (renamed from doc/src/snippets/declarative/qml-intro/sequential-animation2.qml)67
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/js/anim_gallery.js (renamed from doc/src/snippets/declarative/qml-intro/number-animation2.qml)61
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_panel.js53
-rwxr-xr-xexamples/webkit/webkit-guide/js/anim_skew.js97
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/js/css3_backgrounds.js (renamed from doc/src/snippets/declarative/animation-signalhandler.qml)26
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_border-img.js44
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_grad-radial.js75
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_mask-grad.js44
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_mask-img.js44
-rwxr-xr-xexamples/webkit/webkit-guide/js/css3_text-overflow.js54
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/js/form_tapper.js (renamed from doc/src/snippets/declarative/qml-intro/hello-world5.qml)38
-rwxr-xr-xexamples/webkit/webkit-guide/js/mob_condjs.js79
-rwxr-xr-x[-rw-r--r--]examples/webkit/webkit-guide/js/mobile.js (renamed from doc/src/snippets/declarative/listview/listview-snippet.qml)20
-rwxr-xr-xexamples/webkit/webkit-guide/js/storage.js94
-rw-r--r--examples/webkit/webkit-guide/layout_link-fmt.htm81
-rw-r--r--examples/webkit/webkit-guide/layout_tbl-keyhole.htm141
-rw-r--r--examples/webkit/webkit-guide/mob_condjs.htm65
-rw-r--r--examples/webkit/webkit-guide/mob_layout.htm59
-rw-r--r--examples/webkit/webkit-guide/mob_mediaquery.htm59
-rw-r--r--examples/webkit/webkit-guide/storage.htm71
-rw-r--r--examples/webkit/webkit-guide/webkit-guide.pro257
-rw-r--r--examples/webkit/webkit.pro2
-rw-r--r--mkspecs/common/armcc.conf1
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf31
-rw-r--r--mkspecs/common/symbian/symbian.conf98
-rw-r--r--mkspecs/common/symbian/symbianincludes.h58
-rw-r--r--mkspecs/features/incredibuild_xge.prf2
-rw-r--r--mkspecs/features/moc.prf8
-rw-r--r--mkspecs/features/symbian/def_files.prf18
-rw-r--r--mkspecs/features/symbian/default_post.prf36
-rw-r--r--mkspecs/features/symbian/do_not_build_as_thumb.prf7
-rw-r--r--mkspecs/features/symbian/localize_deployment.prf9
-rw-r--r--mkspecs/features/symbian/prepend_includepath.prf14
-rw-r--r--mkspecs/features/symbian/qt.prf47
-rw-r--r--mkspecs/features/symbian/qt_config.prf2
-rw-r--r--mkspecs/features/symbian/symbian_building.prf192
-rw-r--r--mkspecs/features/uic.prf1
-rw-r--r--mkspecs/features/win32/embed_manifest_dll.prf2
-rw-r--r--mkspecs/features/win32/embed_manifest_exe.prf2
-rw-r--r--mkspecs/features/win32/qaxserver.prf10
-rw-r--r--mkspecs/symbian-armcc/features/default_post.prf (renamed from mkspecs/symbian/linux-armcc/features/default_post.prf)0
-rw-r--r--mkspecs/symbian-armcc/qmake.conf (renamed from mkspecs/symbian/linux-armcc/qmake.conf)17
-rw-r--r--mkspecs/symbian-armcc/qplatformdefs.h (renamed from mkspecs/symbian/linux-armcc/qplatformdefs.h)2
-rw-r--r--mkspecs/symbian-gcce/features/default_post.prf (renamed from mkspecs/symbian/linux-gcce/features/default_post.prf)0
-rw-r--r--mkspecs/symbian-gcce/qmake.conf (renamed from mkspecs/symbian/linux-gcce/qmake.conf)49
-rw-r--r--mkspecs/symbian-gcce/qplatformdefs.h (renamed from mkspecs/symbian/linux-gcce/qplatformdefs.h)2
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm2
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm1
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qmake.conf6
-rw-r--r--mkspecs/win32-g++/qmake.conf8
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wince50standard-x86-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wincewm50pocket-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wincewm50smart-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wincewm60professional-msvc2005/default_post.prf2
-rw-r--r--mkspecs/wincewm60standard-msvc2005/default_post.prf2
-rw-r--r--qmake/Makefile.win32-g++2
-rw-r--r--qmake/Makefile.win32-g++-sh2
-rw-r--r--qmake/generators/makefile.cpp49
-rw-r--r--qmake/generators/metamakefile.cpp4
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp3
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp5
-rw-r--r--qmake/generators/unix/unixmake2.cpp3
-rw-r--r--qmake/generators/win32/mingw_make.cpp80
-rw-r--r--qmake/generators/win32/mingw_make.h4
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp5
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp5
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp48
-rw-r--r--qmake/generators/win32/msvc_vcproj.h1
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp6
-rw-r--r--qmake/generators/win32/winmakefile.cpp44
-rw-r--r--qmake/project.cpp35
-rw-r--r--qmake/project.h1
-rw-r--r--qmake/qmake.pri2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h2
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro17
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri4
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp2
-rw-r--r--src/corelib/global/global.pri7
-rw-r--r--src/corelib/global/qglobal.cpp116
-rw-r--r--src/corelib/global/qglobal.h26
-rw-r--r--src/corelib/global/qnamespace.h5
-rw-r--r--src/corelib/global/qnamespace.qdoc97
-rw-r--r--src/corelib/io/qdiriterator.cpp28
-rw-r--r--src/corelib/io/qiodevice.cpp9
-rw-r--r--src/corelib/io/qresource.cpp6
-rw-r--r--src/corelib/kernel/qtranslator.cpp13
-rw-r--r--src/corelib/plugin/qplugin.qdoc8
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp3
-rw-r--r--src/corelib/thread/qthread_unix.cpp27
-rw-r--r--src/corelib/tools/qalgorithms.qdoc52
-rw-r--r--src/corelib/tools/qbytearray.cpp2
-rw-r--r--src/corelib/tools/qcache.qdoc6
-rw-r--r--src/corelib/tools/qiterator.qdoc80
-rw-r--r--src/corelib/tools/qmap.cpp2
-rw-r--r--src/corelib/tools/qpair.qdoc6
-rw-r--r--src/corelib/tools/qset.qdoc30
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp3
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp6
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp46
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp17
-rw-r--r--src/declarative/qml/qdeclarativetypeloader_p.h2
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp172
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp6
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp2
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp6
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp13
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp12
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp20
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp6
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp22
-rw-r--r--src/declarative/util/qdeclarativeview.cpp12
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp18
-rw-r--r--src/gui/dialogs/qmessagebox.cpp48
-rw-r--r--src/gui/embedded/qvfbhdr.h41
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp32
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h3
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h6
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp27
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h1
-rw-r--r--src/gui/gui.pro8
-rw-r--r--src/gui/image/image.pri15
-rw-r--r--src/gui/image/qicon.cpp13
-rw-r--r--src/gui/image/qimage.cpp4
-rw-r--r--src/gui/image/qimagereader.cpp3
-rw-r--r--src/gui/image/qimagewriter.cpp3
-rw-r--r--src/gui/image/qnativeimagehandleprovider_p.h69
-rw-r--r--src/gui/image/qpixmap.cpp2
-rw-r--r--src/gui/image/qpixmap_raster.cpp3
-rw-r--r--src/gui/image/qpixmap_s60.cpp31
-rw-r--r--src/gui/image/qpixmapdata_p.h4
-rw-r--r--src/gui/image/qvolatileimage.cpp318
-rw-r--r--src/gui/image/qvolatileimage_p.h101
-rw-r--r--src/gui/image/qvolatileimagedata.cpp113
-rw-r--r--src/gui/image/qvolatileimagedata_p.h97
-rw-r--r--src/gui/image/qvolatileimagedata_symbian.cpp474
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h11
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp276
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp7
-rw-r--r--src/gui/itemviews/qheaderview.cpp8
-rw-r--r--src/gui/itemviews/qlistwidget.cpp7
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp15
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.h1
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp5
-rw-r--r--src/gui/itemviews/qtreeview.cpp11
-rw-r--r--src/gui/itemviews/qtreewidget.cpp6
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp382
-rw-r--r--src/gui/kernel/qapplication_win.cpp34
-rw-r--r--src/gui/kernel/qclipboard_win.cpp15
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h18
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qdesktopwidget_s60.cpp164
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp31
-rw-r--r--src/gui/kernel/qsoftkeymanager_common_p.h3
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp12
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm1
-rw-r--r--src/gui/kernel/qt_s60_p.h119
-rw-r--r--src/gui/kernel/qwidget.cpp17
-rw-r--r--src/gui/kernel/qwidget_mac.mm14
-rw-r--r--src/gui/kernel/qwidget_p.h7
-rw-r--r--src/gui/kernel/qwidget_s60.cpp85
-rw-r--r--src/gui/painting/qbackingstore.cpp5
-rw-r--r--src/gui/painting/qbrush.cpp6
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp4
-rw-r--r--src/gui/painting/qgraphicssystem.cpp5
-rw-r--r--src/gui/painting/qgraphicssystem_p.h2
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp6
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
-rw-r--r--src/gui/painting/qpaintengine_s60.cpp21
-rw-r--r--src/gui/painting/qpainterpath.cpp24
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp28
-rw-r--r--src/gui/s60framework/qs60mainappui.cpp9
-rw-r--r--src/gui/styles/qs60style.cpp196
-rw-r--r--src/gui/styles/qs60style_p.h14
-rw-r--r--src/gui/styles/qs60style_s60.cpp114
-rw-r--r--src/gui/styles/qs60style_simulated.cpp7
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp7
-rw-r--r--src/gui/text/qfontengine_mac.mm19
-rw-r--r--src/gui/text/qfragmentmap_p.h5
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp5
-rw-r--r--src/gui/text/qtextengine_mac.cpp5
-rw-r--r--src/gui/text/qtextlayout.cpp47
-rw-r--r--src/gui/text/qtextobject.cpp7
-rw-r--r--src/gui/text/qtextobject.h2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp16
-rw-r--r--src/gui/widgets/qmenu.cpp36
-rw-r--r--src/gui/widgets/qscrollbar.cpp2
-rw-r--r--src/gui/widgets/qsplitter.cpp2
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
-rw-r--r--src/multimedia/audio/qaudioinput.cpp17
-rw-r--r--src/network/access/qftp.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp15
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp18
-rw-r--r--src/network/access/qnetworkcookie.cpp21
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp7
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp20
-rw-r--r--src/network/bearer/qnetworksession.h5
-rw-r--r--src/network/bearer/qsharednetworksession.cpp9
-rw-r--r--src/network/kernel/qnetworkinterface_symbian.cpp2
-rw-r--r--src/network/ssl/qsslcertificate.cpp34
-rw-r--r--src/network/ssl/qsslcertificate_p.h1
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp20
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp32
-rw-r--r--src/opengl/opengl.pro9
-rw-r--r--src/opengl/qgl.cpp21
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_egl.cpp27
-rw-r--r--src/opengl/qgl_symbian.cpp132
-rw-r--r--src/opengl/qglpaintdevice.cpp2
-rw-r--r--src/opengl/qgltexturepool.cpp244
-rw-r--r--src/opengl/qgltexturepool_p.h147
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp23
-rw-r--r--src/opengl/qgraphicssystem_gl_p.h4
-rw-r--r--src/opengl/qpixmapdata_gl.cpp159
-rw-r--r--src/opengl/qpixmapdata_gl_p.h68
-rw-r--r--src/opengl/qpixmapdata_poolgl.cpp936
-rw-r--r--src/opengl/qwindowsurface_gl.cpp155
-rw-r--r--src/openvg/qpaintengine_vg.cpp140
-rw-r--r--src/openvg/qpaintengine_vg_p.h2
-rw-r--r--src/openvg/qpixmapdata_vg.cpp182
-rw-r--r--src/openvg/qpixmapdata_vg_p.h28
-rw-r--r--src/openvg/qvg_symbian.cpp180
-rw-r--r--src/openvg/qvgfontglyphcache_p.h2
-rw-r--r--src/openvg/qvgimagepool.cpp15
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp5
-rw-r--r--src/plugins/audio/audio.pro3
-rw-r--r--src/plugins/bearer/icd/dbusdispatcher.cpp9
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp14
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp5
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp12
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp5
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp223
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.h23
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp35
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h7
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp18
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h2
-rw-r--r--src/plugins/plugins.pro1
-rw-r--r--src/plugins/qpluginbase.pri2
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri16
-rw-r--r--src/qbase.pri2
-rw-r--r--src/qt3support/tools/q3asciidict.qdoc6
-rw-r--r--src/qt3support/tools/q3dict.qdoc4
-rw-r--r--src/qt3support/tools/q3intdict.qdoc6
-rw-r--r--src/qt3support/tools/q3memarray.qdoc8
-rw-r--r--src/qt3support/tools/q3ptrdict.qdoc6
-rw-r--r--src/qt3support/tools/q3ptrlist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuelist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuestack.qdoc2
-rw-r--r--src/qt3support/tools/q3valuevector.qdoc10
-rw-r--r--src/s60installs/bwins/QtGuiu.def29
-rw-r--r--src/s60installs/bwins/QtOpenGLu.def19
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def10
-rw-r--r--src/s60installs/eabi/QtGuiu.def35
-rw-r--r--src/s60installs/eabi/QtOpenGLu.def17
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def10
-rw-r--r--src/s60installs/qt.iby20
-rw-r--r--src/s60installs/s60installs.pro4
-rw-r--r--src/s60main/s60main.pro2
-rw-r--r--src/script/api/qscriptcontext.cpp10
-rw-r--r--src/script/api/qscriptengine.cpp31
-rw-r--r--src/script/api/qscriptvalue.cpp5
-rw-r--r--src/src.pro2
-rw-r--r--src/testlib/qsignalspy.qdoc10
-rw-r--r--src/testlib/qtestevent.qdoc2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp2
-rw-r--r--tests/auto/gui.pro1
-rw-r--r--tests/auto/macnativeevents/tst_macnativeevents.cpp8
-rw-r--r--tests/auto/mediaobject/dummy/dummy.pro2
-rw-r--r--tests/auto/nativeimagehandleprovider/nativeimagehandleprovider.pro6
-rw-r--r--tests/auto/nativeimagehandleprovider/tst_nativeimagehandleprovider.cpp237
-rw-r--r--tests/auto/other.pro3
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp5
-rw-r--r--tests/auto/qdir/qdir.pro2
-rw-r--r--tests/auto/qdiriterator/tst_qdiriterator.cpp55
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp148
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp31
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp14
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp3
-rw-r--r--tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp24
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp191
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp22
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp9
-rw-r--r--tests/auto/qpixmap/qpixmap.pro1
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp121
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp11
-rw-r--r--tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp34
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp57
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted1.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted2.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted3.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted4.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted5.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted6.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted7.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted8.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted9.pem19
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp11
-rw-r--r--tests/auto/qsslsocket/certs/fake-login.live.com.key15
-rw-r--r--tests/auto/qsslsocket/certs/fake-login.live.com.pem19
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp43
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp12
-rw-r--r--tests/auto/qtextblock/tst_qtextblock.cpp19
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp49
-rw-r--r--tests/auto/qvolatileimage/qvolatileimage.pro7
-rw-r--r--tests/auto/qvolatileimage/tst_qvolatileimage.cpp403
-rw-r--r--tests/auto/selftests/expected_cmptest.txt2
-rw-r--r--tests/auto/selftests/expected_crashes_3.txt2
-rw-r--r--tests/auto/selftests/expected_longstring.txt2
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt2
-rw-r--r--tests/auto/selftests/expected_skip.txt2
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdocconf4
-rw-r--r--tools/configure/configureapp.cpp2
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp2
-rw-r--r--tools/designer/src/lib/sdk/membersheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/propertysheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/taskmenu.qdoc6
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp6
-rw-r--r--tools/designer/src/lib/uilib/container.qdoc6
-rw-r--r--tools/designer/src/lib/uilib/customwidget.qdoc6
-rw-r--r--tools/linguist/lconvert/main.cpp2
-rw-r--r--tools/linguist/lupdate/main.cpp71
-rw-r--r--tools/linguist/shared/qm.cpp2
-rw-r--r--tools/linguist/shared/ts.cpp12
-rw-r--r--tools/qdoc3/atom.cpp8
-rw-r--r--tools/qdoc3/atom.h87
-rw-r--r--tools/qdoc3/codemarker.cpp4
-rw-r--r--tools/qdoc3/codemarker.h2
-rw-r--r--tools/qdoc3/config.cpp28
-rw-r--r--tools/qdoc3/config.h3
-rw-r--r--tools/qdoc3/cppcodeparser.cpp43
-rw-r--r--tools/qdoc3/declarativeparser/parser.pri21
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejs.g3149
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsast.cpp956
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsast_p.h2546
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsastfwd_p.h189
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsastvisitor.cpp58
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsastvisitor_p.h335
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsengine_p.cpp212
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsengine_p.h173
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsglobal_p.h64
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsgrammar.cpp989
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsgrammar_p.h210
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejslexer.cpp1258
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejslexer_p.h249
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsmemorypool_p.h133
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsnodepool_p.h139
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsparser.cpp1904
-rw-r--r--tools/qdoc3/declarativeparser/qdeclarativejsparser_p.h246
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp2551
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h239
-rw-r--r--tools/qdoc3/doc.cpp314
-rw-r--r--tools/qdoc3/doc.h3
-rw-r--r--tools/qdoc3/doc/config/compat.qdocconf28
-rw-r--r--tools/qdoc3/doc/config/macros.qdocconf37
-rw-r--r--tools/qdoc3/doc/config/qdoc-online.qdocconf2
-rw-r--r--tools/qdoc3/doc/config/qdoc-project.qdocconf47
-rw-r--r--tools/qdoc3/doc/config/qdoc.qdocconf2
-rw-r--r--tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf98
-rw-r--r--tools/qdoc3/doc/config/qt-defines.qdocconf17
-rw-r--r--tools/qdoc3/doc/config/qt-html-default-styles.qdocconf32
-rw-r--r--tools/qdoc3/doc/config/qt-html-online-styles.qdocconf72
-rw-r--r--tools/qdoc3/doc/config/qt-html-templates-online.qdocconf115
-rw-r--r--tools/qdoc3/doc/config/qt-html-templates.qdocconf54
-rwxr-xr-xtools/qdoc3/doc/config/scripts/functions.js258
-rwxr-xr-xtools/qdoc3/doc/config/scripts/jquery.js152
-rw-r--r--tools/qdoc3/doc/config/scripts/narrow.js133
-rw-r--r--tools/qdoc3/doc/config/scripts/superfish.js121
-rw-r--r--tools/qdoc3/doc/config/style/narrow.css271
-rw-r--r--tools/qdoc3/doc/config/style/offline.css673
-rw-r--r--tools/qdoc3/doc/config/style/style.css1733
-rw-r--r--tools/qdoc3/doc/config/style/style_ie6.css54
-rw-r--r--tools/qdoc3/doc/config/style/style_ie7.css19
-rw-r--r--tools/qdoc3/doc/config/style/style_ie8.css0
-rw-r--r--tools/qdoc3/doc/config/style/superfish.css51
-rw-r--r--tools/qdoc3/doc/files/qt.qdocconf8
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdoc10279
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdocconf234
-rw-r--r--tools/qdoc3/generator.cpp77
-rw-r--r--tools/qdoc3/generator.h5
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp13
-rw-r--r--tools/qdoc3/htmlgenerator.cpp242
-rw-r--r--tools/qdoc3/jscodemarker.cpp10
-rw-r--r--tools/qdoc3/main.cpp20
-rw-r--r--tools/qdoc3/node.cpp137
-rw-r--r--tools/qdoc3/node.h4
-rw-r--r--tools/qdoc3/qdoc3.pro20
-rw-r--r--tools/qdoc3/qmlcodemarker.cpp12
-rw-r--r--tools/qdoc3/qmlcodemarker.h2
-rw-r--r--tools/qdoc3/qmlcodeparser.cpp8
-rw-r--r--tools/qdoc3/qmlcodeparser.h6
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.cpp6
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.h2
-rw-r--r--tools/qdoc3/qmlvisitor.cpp6
-rw-r--r--tools/qdoc3/qmlvisitor.h2
-rw-r--r--tools/qdoc3/quoter.cpp3
-rw-r--r--tools/qdoc3/quoter.h2
-rw-r--r--tools/qdoc3/test/assistant.qdocconf4
-rw-r--r--tools/qdoc3/test/designer.qdocconf4
-rw-r--r--tools/qdoc3/test/linguist.qdocconf4
-rw-r--r--tools/qdoc3/test/macros.qdocconf1
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf8
-rw-r--r--tools/qdoc3/test/qmake.qdocconf4
-rw-r--r--tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf10
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf10
-rw-r--r--tools/qdoc3/test/qt-html-templates-online.qdocconf40
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf256
-rw-r--r--tools/qdoc3/test/qt-project.qdocconf19
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp47
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h36
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.cpp70
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.h8
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp2
-rw-r--r--tools/shared/symbian/epocroot.cpp5
-rw-r--r--translations/assistant_pl.ts828
-rw-r--r--translations/designer_pl.ts64
-rw-r--r--translations/linguist_de.ts7
-rw-r--r--translations/linguist_pl.ts1201
-rw-r--r--translations/qt_de.ts71
-rw-r--r--translations/qt_help_pl.ts72
-rw-r--r--translations/qt_pl.ts172
-rw-r--r--translations/qtconfig_pl.ts197
-rw-r--r--translations/qvfb_pl.ts208
1446 files changed, 82616 insertions, 19321 deletions
diff --git a/.commit-template b/.commit-template
index 6e0e3a4e7c..589ca89586 100644
--- a/.commit-template
+++ b/.commit-template
@@ -5,6 +5,6 @@
# ---[ Fields ]-----------------[ uncomment and edit as applicable ]---|
#Task-number:
-Reviewed-by: pending
+#Reviewed-by:
# ==================================[ please wrap at 72 characters ]===|
diff --git a/.gitignore b/.gitignore
index f9a4454229..d6ba7b5e34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ examples/*/*/*
examples/*/*/*[.]app
!examples/declarative/*
!examples/tutorials/*
+!examples/tutorials/*/*
!examples/ja_JP/*/*
demos/*/*
!demos/spectrum/*
diff --git a/bin/elf2e32_qtwrapper b/bin/elf2e32_qtwrapper
index 694d54a34c..a3a4065f30 100755
--- a/bin/elf2e32_qtwrapper
+++ b/bin/elf2e32_qtwrapper
@@ -1,145 +1,3 @@
-#!/usr/bin/perl -w
-
-# A script to get around some shortcomings in elf2e32, namely:
-# - Returning 0 even when there are errors.
-# - Excluding symbols from the dso file even when they are present in the ELF file.
-# - Including symbols in the the dso file even when they are not present in the ELF file.
-# - Overwriting the old dso file even when there are no changes (increases build time).
-
-use File::Copy;
-
-my @args = ();
-my @definput;
-my @defoutput;
-my @dso;
-my @tmpdso;
-foreach (@ARGV) {
- if (/^--definput/o) {
- @definput = split('=', $_);
- } elsif (/^--defoutput/o) {
- @defoutput = split('=', $_);
- } elsif (/^--dso/o) {
- @dso = split('=', $_);
- } elsif (/^--tmpdso/o) {
- @tmpdso = split('=', $_);
- $tmpdso[0] = "--dso";
- } else {
- push(@args, $_);
- }
-}
-
-@definput = () if (!@definput || ! -e $definput[1]);
-
-if (@dso && !@tmpdso || !@dso && @tmpdso) {
- print("--dso and --tmpdso must be used together.\n");
- exit 1;
-}
-
-my $buildingLibrary = (@defoutput && @dso) ? 1 : 0;
-
-my $fixupFile = "";
-my $runCount = 0;
-my $returnCode = 0;
-
-while (1) {
- if (++$runCount > 2) {
- print("Internal error in $0, link succeeded, but exports may be wrong.\n");
- last;
- }
-
- my $elf2e32Pipe;
- my $elf2e32Cmd = "elf2e32 @args"
- . " " . join("=", @definput)
- . " " . join("=", @defoutput)
- . " " . join("=", @tmpdso);
- open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32");
-
- my %fixupSymbols;
- my $foundBrokenSymbols = 0;
- my $errors = 0;
- while (<$elf2e32Pipe>) {
- print;
- if (/Error:/io) {
- $errors = 1;
- } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) {
- $fixupSymbols{$1} = 1;
- $foundBrokenSymbols = 1;
- } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) {
- $foundBrokenSymbols = 1;
- }
- }
- close($elf2e32Pipe);
-
- if ($errors) {
- $returnCode = 1;
- last;
- }
-
- if ($buildingLibrary) {
- my $tmpDefFile;
- my $defFile;
- open($defFile, "< $defoutput[1]") or die("Could not open $defoutput[1]");
- open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp");
- $fixupFile = "$defoutput[1].tmp";
- while (<$defFile>) {
- s/\r//;
- s/\n//;
- next if (/; NEW:/);
- if (/([a-z0-9_]+) @/i) {
- if (exists($fixupSymbols{$1})) {
- s/ ABSENT//;
- } elsif (s/; MISSING://) {
- s/$/ ABSENT/;
- }
- }
- print($tmpDefFile "$_\n");
- }
- close($defFile);
- close($tmpDefFile);
-
- $definput[1] = "$defoutput[1].tmp";
-
- if (!$foundBrokenSymbols || $errors) {
- last;
- }
-
- print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n");
- } else {
- last;
- }
-};
-
-if ($fixupFile) {
- unlink($defoutput[1]);
- move($fixupFile, $defoutput[1]);
-}
-
-exit $returnCode if ($returnCode != 0);
-
-if ($buildingLibrary) {
- my $differenceFound = 0;
-
- if (-e $dso[1]) {
- my $dsoFile;
- my $tmpdsoFile;
- my $dsoBuf;
- my $tmpdsoBuf;
- open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]");
- open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]");
- binmode($dsoFile);
- binmode($tmpdsoFile);
- while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) {
- if ($dsoBuf ne $tmpdsoBuf) {
- $differenceFound = 1;
- }
- }
- close($tmpdsoFile);
- close($dsoFile);
- } else {
- $differenceFound = 1;
- }
-
- if ($differenceFound) {
- copy($tmpdso[1], $dso[1]);
- }
-}
+#!/bin/sh
+scriptpath=`dirname $0`
+perl $scriptpath/elf2e32_qtwrapper.pl "$@"
diff --git a/bin/elf2e32_qtwrapper.bat b/bin/elf2e32_qtwrapper.bat
new file mode 100644
index 0000000000..52910df007
--- /dev/null
+++ b/bin/elf2e32_qtwrapper.bat
@@ -0,0 +1,3 @@
+@echo off
+set scriptpath=%~dp0
+perl %scriptpath%elf2e32_qtwrapper.pl %*
diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl
new file mode 100755
index 0000000000..a2aff75ba1
--- /dev/null
+++ b/bin/elf2e32_qtwrapper.pl
@@ -0,0 +1,265 @@
+#!/usr/bin/perl -w
+#############################################################################
+##
+## 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 S60 port 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$
+##
+#############################################################################
+
+# A script to get around some shortcomings in elf2e32, namely:
+# - Returning 0 even when there are errors.
+# - Excluding symbols from the dso file even when they are present in the ELF file.
+# - Including symbols in the the dso file even when they are not present in the ELF file.
+# - Overwriting the old dso file even when there are no changes (increases build time).
+
+use File::Copy;
+
+my @args = ();
+my @definput;
+my @defoutput;
+my @dso;
+my @tmpdso;
+foreach (@ARGV) {
+ if (/^--definput/o) {
+ @definput = split('=', $_);
+ } elsif (/^--defoutput/o) {
+ @defoutput = split('=', $_);
+ } elsif (/^--dso/o) {
+ @dso = split('=', $_);
+ } elsif (/^--tmpdso/o) {
+ @tmpdso = split('=', $_);
+ $tmpdso[0] = "--dso";
+ } else {
+ push(@args, $_);
+ }
+}
+
+@definput = () if (!@definput || ! -e $definput[1]);
+
+if (@dso && !@tmpdso || !@dso && @tmpdso) {
+ print("--dso and --tmpdso must be used together.\n");
+ exit 1;
+}
+
+my $buildingLibrary = (@defoutput && @dso) ? 1 : 0;
+
+my $fixupFile = "";
+my $runCount = 0;
+my $returnCode = 0;
+
+while (1) {
+ if (++$runCount > 2) {
+ print("Internal error in $0, link succeeded, but exports may be wrong.\n");
+ last;
+ }
+
+ my $elf2e32Pipe;
+ my $elf2e32Cmd = "elf2e32 @args"
+ . " " . join("=", @definput)
+ . " " . join("=", @defoutput)
+ . " " . join("=", @tmpdso);
+ open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32");
+
+ my %fixupSymbols;
+ my $foundBrokenSymbols = 0;
+ my $errors = 0;
+ while (<$elf2e32Pipe>) {
+ print;
+ if (/Error:/io) {
+ $errors = 1;
+ } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) {
+ $fixupSymbols{$1} = 1;
+ $foundBrokenSymbols = 1;
+ } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) {
+ $foundBrokenSymbols = 1;
+ }
+ }
+ close($elf2e32Pipe);
+
+ if ($errors) {
+ $returnCode = 1;
+ last;
+ }
+
+ if ($buildingLibrary && $runCount == 1) {
+ my $tmpDefFile;
+ my $newDefFile;
+ my $origDefFile;
+ my $savedNewDefFileLine = "";
+ if ($definput[1]) {
+ open($origDefFile, "< $definput[1]") or die("Could not open $definput[1]");
+ }
+ open($newDefFile, "< $defoutput[1]") or die("Could not open $defoutput[1]");
+ open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp");
+ print($tmpDefFile "EXPORTS\n");
+ $fixupFile = "$defoutput[1].tmp";
+ while (1) {
+ my $origDefLine;
+ my $origSym;
+ my $origOrdinal;
+ my $origExtraData;
+ my $newDefLine;
+ my $newSym;
+ my $newOrdinal;
+ my $newExtraData;
+ my $defLine;
+ my $sym;
+ my $ordinal;
+ my $extraData;
+ if ($definput[1]) {
+ # Read from original def file, and skip non-symbol lines
+ while (1) {
+ $origDefLine = <$origDefFile>;
+ if (defined($origDefLine)) {
+ $origDefLine =~ s/[\n\r]//;
+ if ($origDefLine =~ /([a-z0-9_]+) +\@ *([0-9]+) (.*)/i) {
+ $origSym = $1;
+ $origOrdinal = $2;
+ $origExtraData = $3;
+ last;
+ }
+ } else {
+ last;
+ }
+ }
+ }
+
+ if ($savedNewDefFileLine) {
+ # This happens if the new def file was missing an entry.
+ $newDefLine = $savedNewDefFileLine;
+ $newDefLine =~ /([a-z0-9_]+) +\@ *([0-9]+) (.*)/i or die("$0: Shouldn't happen");
+ $newSym = $1;
+ $newOrdinal = $2;
+ $newExtraData = $3;
+ } else {
+ # Read from new def file, and skip non-symbol lines
+ while (1) {
+ $newDefLine = <$newDefFile>;
+ if (defined($newDefLine)) {
+ $newDefLine =~ s/[\n\r]//;
+ if ($newDefLine =~ /([a-z0-9_]+) +\@ *([0-9]+) (.*)/i) {
+ $newSym = $1;
+ $newOrdinal = $2;
+ $newExtraData = $3;
+ last;
+ }
+ } else {
+ last;
+ }
+ }
+ }
+ $savedNewDefFileLine = "";
+ last if (!defined($origDefLine) && !defined($newDefLine));
+
+ if (defined($origOrdinal) && (!defined($newOrdinal) || $origOrdinal != $newOrdinal)) {
+ # If the symbol is missing from the new def file, use the original symbol.
+ $savedNewDefFileLine = $newDefLine;
+ $defLine = $origDefLine;
+ $sym = $origSym;
+ $ordinal = $origOrdinal;
+ $extraData = $origExtraData;
+ } else {
+ $defLine = $newDefLine;
+ $sym = $newSym;
+ $ordinal = $newOrdinal;
+ if ($newExtraData =~ /ABSENT/) {
+ # Special case to keep "DATA [0-9]+" data in absent entries.
+ $extraData = $origExtraData;
+ } else {
+ $extraData = $newExtraData;
+ }
+ }
+ if (exists($fixupSymbols{$sym})) {
+ # Fix symbols that have returned after first being marked ABSENT.
+ $extraData =~ s/ ABSENT//;
+ } elsif ($defLine =~ s/; MISSING://) {
+ # Auto-absent symbols.
+ $extraData .= " ABSENT";
+ }
+ print($tmpDefFile "\t$sym \@ $ordinal $extraData\n");
+ }
+ print($tmpDefFile "\n");
+ close($origDefFile) if ($definput[1]);
+ close($newDefFile);
+ close($tmpDefFile);
+
+ $definput[1] = "$defoutput[1].tmp";
+
+ if (!$foundBrokenSymbols || $errors) {
+ last;
+ }
+
+ print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n");
+ } else {
+ last;
+ }
+};
+
+if ($fixupFile) {
+ unlink($defoutput[1]);
+ move($fixupFile, $defoutput[1]);
+}
+
+exit $returnCode if ($returnCode != 0);
+
+if ($buildingLibrary) {
+ my $differenceFound = 0;
+
+ if (-e $dso[1]) {
+ my $dsoFile;
+ my $tmpdsoFile;
+ my $dsoBuf;
+ my $tmpdsoBuf;
+ open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]");
+ open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]");
+ binmode($dsoFile);
+ binmode($tmpdsoFile);
+ while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) {
+ if ($dsoBuf ne $tmpdsoBuf) {
+ $differenceFound = 1;
+ }
+ }
+ close($tmpdsoFile);
+ close($dsoFile);
+ } else {
+ $differenceFound = 1;
+ }
+
+ if ($differenceFound) {
+ copy($tmpdso[1], $dso[1]);
+ }
+}
diff --git a/config.tests/unix/endian/endiantest.cpp b/config.tests/unix/endian/endiantest.cpp
index 296f8900a1..40b2c3862d 100644
--- a/config.tests/unix/endian/endiantest.cpp
+++ b/config.tests/unix/endian/endiantest.cpp
@@ -48,9 +48,9 @@ short lsb_littleendian[] = { 0x0000, 0x654c, 0x7361, 0x5374, 0x6769, 0x696e, 0x6
int main(int, char **)
{
// make sure the linker doesn't throw away the arrays
- char *msb_bigendian_string = (char *) msb_bigendian;
- char *lsb_littleendian_string = (char *) lsb_littleendian;
- (void) msb_bigendian_string;
- (void) lsb_littleendian_string;
+ void (*msb_bigendian_string)() = (void (*)())msb_bigendian;
+ void (*lsb_littleendian_string)() = (void (*)())lsb_littleendian;
+ (void)msb_bigendian_string();
+ (void)lsb_littleendian_string();
return msb_bigendian[1] == lsb_littleendian[1];
}
diff --git a/configure b/configure
index 5e8ef17f86..835599773d 100755
--- a/configure
+++ b/configure
@@ -641,10 +641,10 @@ CFG_XRANDR=runtime
CFG_XRENDER=auto
CFG_MITSHM=auto
CFG_OPENGL=auto
-CFG_OPENVG=no
+CFG_OPENVG=auto
CFG_OPENVG_LC_INCLUDES=no
-CFG_OPENVG_SHIVA=no
-CFG_OPENVG_ON_OPENGL=no
+CFG_OPENVG_SHIVA=auto
+CFG_OPENVG_ON_OPENGL=auto
CFG_EGL=no
CFG_EGL_GLES_INCLUDES=no
CFG_SSE=auto
@@ -761,8 +761,10 @@ L_FLAGS=
RPATH_FLAGS=
l_FLAGS=
QCONFIG_FLAGS=
-XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
+XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce"
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
+XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*)
+XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2)
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -1458,6 +1460,8 @@ while [ "$#" -gt 0 ]; do
xplatform)
XPLATFORM="$VAL"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
+ case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
+ case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
@@ -2735,6 +2739,8 @@ fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
+case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac
+case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac
if [ -d "$PLATFORM" ]; then
QMAKESPEC="$PLATFORM"
@@ -3010,7 +3016,7 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
esac
elif [ "$XPLATFORM_MINGW" = "yes" ]; then
[ -z "$CFG_ARCH" ] && CFG_ARCH="windows"
-elif echo "$XPLATFORM" | grep symbian > /dev/null; then
+elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_ARCH=symbian
elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
CFG_ARCH=$CFG_HOST_ARCH
@@ -3138,7 +3144,7 @@ QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" |
TEST_COMPILER="$CXX"
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
-if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
#for Symbian we don't need this checking
if [ -z "$TEST_COMPILER" ]; then
echo "ERROR: Cannot set the compiler for the configuration tests"
@@ -3238,7 +3244,7 @@ if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
fi
# mac
-if [ "$PLATFORM_MAC" = "yes" ]; then
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
CFG_OPENGL=desktop
fi
@@ -3305,16 +3311,18 @@ if [ -z "$QT_INSTALL_PREFIX" ]; then
if [ "$PLATFORM" != "$XPLATFORM" ]; then
QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
fi
- elif [ -d "$EPOCROOT" ] && echo $XPLATFORM | grep symbian > /dev/null; then
- QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
- QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
+ elif [ -d "$EPOCROOT" ]; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
+ QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
+ QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
+ fi
else
QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
fi
fi
QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
-if echo $XPLATFORM | grep symbian > /dev/null; then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
[ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX"
[ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS=
[ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS=
@@ -4172,7 +4180,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
EOF
fi
-case "$XPLATFORM" in *symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
cat << EOF
Qt for Symbian only:
@@ -4184,9 +4192,7 @@ Qt for Symbian only:
-no-usedeffiles .... Disable the usage of DEF files.
* -usedeffiles ....... Enable the usage of DEF files.
EOF
-;;
-esac
-
+fi
[ "x$ERROR" = "xyes" ] && exit 1
exit 0
fi # Help
@@ -4198,10 +4204,10 @@ fi # Help
if [ "$PLATFORM_QWS" = "yes" ]; then
Platform="Qt for Embedded Linux"
+elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
+ Platform="Qt for Symbian"
elif [ "$PLATFORM_MAC" = "yes" ]; then
Platform="Qt for Mac OS X"
-elif echo "$XPLATFORM" | grep "symbian" > /dev/null ; then
- Platform="Qt for Symbian"
elif [ "$XPLATFORM_MINGW" = "yes" ]; then
Platform="Qt for Windows"
elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
@@ -4586,12 +4592,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
rm -rf mkspecs/default
- if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then
-#Link is not supported for Symbian build system
- cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
- else
- ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
- fi
+ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
# fix makefiles
for mkfile in GNUmakefile Makefile; do
EXTRA_LFLAGS=
@@ -4838,33 +4839,12 @@ if ( [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ] ) && [ "${CFG_NEON}" =
fi
fi
-# detect zlib
-if [ "$CFG_ZLIB" = "no" ]; then
- # Note: Qt no longer support builds without zlib
- # So we force a "no" to be "auto" here.
- # If you REALLY really need no zlib support, you can still disable
- # it by doing the following:
- # add "no-zlib" to mkspecs/qconfig.pri
- # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
- #
- # There's no guarantee that Qt will build under those conditions
-
- CFG_ZLIB=auto
- ZLIB_FORCED=yes
-fi
-if [ "$CFG_ZLIB" = "auto" ]; then
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
- CFG_ZLIB=system
- else
- CFG_ZLIB=yes
- fi
-fi
-
[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
-case "$XPLATFORM" in *symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
QMakeVar set styles "windows s60" #overwrite previous default
CFG_LIBFREETYPE=no
+ CFG_ZLIB=yes
if [ "$CFG_LARGEFILE" = auto ]; then
CFG_LARGEFILE=no
@@ -4882,7 +4862,7 @@ case "$XPLATFORM" in *symbian*)
exit 1
fi
- if ! echo $XPLATFORM | grep symbian-sbsv2 > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
# Raptor does not support configure tests.
# the main commands needed to compile;
@@ -4906,8 +4886,29 @@ case "$XPLATFORM" in *symbian*)
exit 1;
fi
fi
- ;;
-esac
+fi
+
+# detect zlib
+if [ "$CFG_ZLIB" = "no" ]; then
+ # Note: Qt no longer support builds without zlib
+ # So we force a "no" to be "auto" here.
+ # If you REALLY really need no zlib support, you can still disable
+ # it by doing the following:
+ # add "no-zlib" to mkspecs/qconfig.pri
+ # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
+ #
+ # There's no guarantee that Qt will build under those conditions
+
+ CFG_ZLIB=auto
+ ZLIB_FORCED=yes
+fi
+if [ "$CFG_ZLIB" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
+ CFG_ZLIB=system
+ else
+ CFG_ZLIB=yes
+ fi
+fi
if [ "$CFG_LARGEFILE" = "auto" ]; then
#Large files should be enabled for all Linux systems
@@ -4916,7 +4917,7 @@ fi
if [ "$CFG_S60" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_S60=yes
else
CFG_S60=no
@@ -4924,7 +4925,7 @@ if [ "$CFG_S60" = "auto" ]; then
fi
if [ "$CFG_QS60STYLE" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_QS60STYLE=qt
else
CFG_QS60STYLE=no
@@ -4932,7 +4933,7 @@ if [ "$CFG_QS60STYLE" = "auto" ]; then
fi
if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ]; then
CFG_SYMBIAN_DEFFILES=yes
else
CFG_SYMBIAN_DEFFILES=no
@@ -5011,14 +5012,12 @@ fi
# detect accessibility
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
- case "$XPLATFORM" in
- symbian*)
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# accessibility is currently unsupported
CFG_ACCESSIBILITY=no
- ;;
- *)
+ else
CFG_ACCESSIBILITY=yes
- esac
+ fi
fi
# auto-detect SQL-modules support
@@ -5230,15 +5229,13 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
;;
sqlite)
if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
- case "$XPLATFORM" in
- symbian*)
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver.
# Configuration parameters should be set
CFG_SQL_sqlite=qt
QT_LFLAGS_SQLITE=-lsqlite3
QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
- ;;
- esac
+ fi
fi
if [ "$CFG_SQL_sqlite" != "no" ]; then
SQLITE_AUTODETECT_FAILED="no"
@@ -5540,8 +5537,8 @@ if [ "$PLATFORM_X11" = "yes" ]; then
fi
fi
-# X11/MINGW OpenGL
-if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
+# X11/MINGW/SYMBIAN OpenGL
+if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIAN" = "yes" ]; then
# auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
if [ "$CFG_GUI" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
@@ -6112,10 +6109,10 @@ fi
if [ "$CFG_ENDIAN" = "auto" ]; then
if [ "$XPLATFORM_MINGW" = "yes" ]; then
CFG_ENDIAN="Q_LITTLE_ENDIAN"
- elif [ "$PLATFORM_MAC" = "yes" ]; then
- true #leave as auto
- elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
CFG_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
+ true #leave as auto
else
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
F="$?"
@@ -6201,7 +6198,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
fi
HAVE_STL=no
-if echo "$XPLATFORM" | grep symbian > /dev/null || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
HAVE_STL=yes
fi
@@ -6228,7 +6225,7 @@ if [ "$CFG_IPV6" != "no" ]; then
# Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt
# symbian socket engine.
#
- if echo "$XPLATFORM" | grep symbian > /dev/null; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
CFG_IPV6=no
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
CFG_IPV6=yes
@@ -6343,7 +6340,7 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then
fi
# detect OpenSSL
-if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_OPENSSL" = "auto" ]; then
CFG_OPENSSL=yes
@@ -6360,14 +6357,14 @@ if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
fi
fi
else
- if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+ if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
#OpenSSl should be enabled for Symbian release
CFG_OPENSSL=yes
fi
fi
# detect OpenVG support
-if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
@@ -6424,13 +6421,13 @@ if [ "$CFG_PTMALLOC" != "no" ]; then
QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
fi
-if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
CFG_ALSA=yes
else
CFG_ALSA=no
fi
-elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
+elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
# Disabled for Symbian release
CFG_ALSA=no
fi
@@ -6441,6 +6438,8 @@ if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto"
if [ $? != "0" ]; then
CFG_JAVASCRIPTCORE_JIT=no
fi
+ elif [ "$XPLATFORM" = "symbian-gcce" ]; then
+ CFG_JAVASCRIPTCORE_JIT=no
fi
fi
@@ -6451,7 +6450,7 @@ elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then
fi
if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
- if echo "$XPLATFORM" | grep symbian > /dev/null 2>&1; then
+ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then
CFG_AUDIO_BACKEND=yes
fi
@@ -6463,7 +6462,7 @@ fi
if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
echo "Warning: largefile support cannot be disabled for win32."
CFG_LARGEFILE="yes"
-elif [ "$CFG_LARGEFILE" != "no" ] && echo "$XPLATFORM" | grep "symbian" > /dev/null; then
+elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
echo "Warning: largefile support cannot be enabled for symbian."
CFG_LARGEFILE="no"
fi
@@ -6570,8 +6569,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
fi
fi
-# but disable Cocoa if cross-building for mingw
+# but disable Cocoa if cross-building for mingw and symbian
[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
+[ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
@@ -6649,13 +6649,11 @@ else
fi
# Just check if OpenGL is not set by command argumets for Symbian.
-case "$XPLATFORM" in
- symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
CFG_OPENGL="no"
fi
- ;;
-esac
+fi
# enable opengl
if [ "$CFG_OPENGL" = "no" ]; then
@@ -6839,7 +6837,7 @@ else
fi
-if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
+if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
@@ -7121,11 +7119,10 @@ EOF
canBuildWebKit="no"
canBuildQtConcurrent="no"
;;
- symbian/*-gcce)
- canBuildWebKit="no"
+ symbian-gcce)
canBuildQtConcurrent="no"
;;
- symbian/*-armcc)
+ symbian-armcc)
canBuildQtConcurrent="no"
;;
esac
@@ -7478,14 +7475,11 @@ rm -f .options
BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
# extract the operating system from the XPLATFORM
TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
-case "$XPLATFORM" in
-symbian*)
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
QT_BUILD_KEY_SYSTEM_PART="Symbian"
- ;;
-*)
+else
QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER"
- ;;
-esac
+fi
# when cross-compiling, don't include build-host information (build key is target specific)
QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS"
@@ -7817,8 +7811,7 @@ fi
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
-if echo $XPLATFORM | grep symbian >/dev/null
-then
+if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
# Enable Symbian DLLs and export rules.
# We cannot use Linux's default export rules since they export everything.
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
@@ -7898,12 +7891,7 @@ else
mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
chmod -w "$outpath/src/corelib/global/qconfig.h"
for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
- if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1 ; then
- [ -e "$conf" ] && rm -rf "$conf"
- cp -a "$outpath/src/corelib/global/qconfig.h" "$conf"
- elif [ '!' -f "$conf" ]; then
- ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
- fi
+ ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
done
fi
#-------------------------------------------------------------------------------
@@ -8577,7 +8565,7 @@ for file in .projects .projects.3; do
fi
SPEC=$XQMAKESPEC ;;
*s60main/s60main.pro)
- if [ "$CFG_NOPROCESS" = "yes" ] || ! echo "$XPLATFORM" | grep "symbian" >/dev/null; then
+ if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
continue
fi;;
*examples/activeqt/*) continue ;;
diff --git a/configure.exe b/configure.exe
index 293d667270..a1fceebf5b 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp
index 9e717bb684..34ba432bd6 100644
--- a/demos/browser/networkaccessmanager.cpp
+++ b/demos/browser/networkaccessmanager.cpp
@@ -187,7 +187,7 @@ void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &prox
void NetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError> &error)
{
// check if SSL certificate has been trusted already
- QString replyHost = reply->url().host() + ":" + reply->url().port();
+ QString replyHost = reply->url().host() + QString(":%1").arg(reply->url().port());
if(! sslTrustedHostList.contains(replyHost)) {
BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
diff --git a/demos/demos.pro b/demos/demos.pro
index fdc1e4cd34..b8b743caa7 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -22,7 +22,8 @@ symbian: SUBDIRS = \
demos_shared \
demos_deform \
demos_pathstroke
-
+
+
wince*: SUBDIRS = \
demos_shared \
demos_deform \
@@ -39,7 +40,7 @@ wince*: SUBDIRS = \
demos_embeddeddialogs \
demos_undo \
demos_sub-attaq
-
+
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{
SUBDIRS += demos_boxes
}
@@ -91,6 +92,12 @@ demos_qtdemo.subdir = qtdemo
demos_mediaplayer.subdir = qmediaplayer
demos_declarative.subdir = declarative
+#mobile demos. Requires QtMobility sources. Not included in demo build
+demos_guitartuner.subdir = mobile/guitartuner
+demos_qcamera.subdir = mobile/qcamera
+demos_qtbubblelevel.subdir = mobile/qtbubblelevel
+demos_quickhit.subdir = mobile/quickhit
+
demos_browser.subdir = browser
demos_boxes.subdir = boxes
diff --git a/demos/embedded/lightmaps/lightmaps.cpp b/demos/embedded/lightmaps/lightmaps.cpp
index dfbef06268..8e64e7370c 100644
--- a/demos/embedded/lightmaps/lightmaps.cpp
+++ b/demos/embedded/lightmaps/lightmaps.cpp
@@ -45,6 +45,9 @@
#include <math.h>
+#include "lightmaps.h"
+#include "slippymap.h"
+
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
@@ -59,552 +62,226 @@
// Hint: see above to find why I picked this one :)
#define MAX_MAGNIFIER 229
-uint qHash(const QPoint& p)
+LightMaps::LightMaps(QWidget *parent)
+ : QWidget(parent), pressed(false), snapped(false), zoomed(false),
+ invert(false)
{
- return p.x() * 17 ^ p.y();
+ m_normalMap = new SlippyMap(this);
+ m_largeMap = new SlippyMap(this);
+ connect(m_normalMap, SIGNAL(updated(QRect)), SLOT(updateMap(QRect)));
+ connect(m_largeMap, SIGNAL(updated(QRect)), SLOT(update()));
}
-// tile size in pixels
-const int tdim = 256;
-
-QPointF tileForCoordinate(qreal lat, qreal lng, int zoom)
+void LightMaps::setCenter(qreal lat, qreal lng)
{
- qreal zn = static_cast<qreal>(1 << zoom);
- qreal tx = (lng + 180.0) / 360.0;
- qreal ty = (1.0 - log(tan(lat * M_PI / 180.0) +
- 1.0 / cos(lat * M_PI / 180.0)) / M_PI) / 2.0;
- return QPointF(tx * zn, ty * zn);
+ m_normalMap->latitude = lat;
+ m_normalMap->longitude = lng;
+ m_normalMap->invalidate();
+ m_largeMap->latitude = lat;
+ m_largeMap->longitude = lng;
+ m_largeMap->invalidate();
}
-qreal longitudeFromTile(qreal tx, int zoom)
+void LightMaps::toggleNightMode()
{
- qreal zn = static_cast<qreal>(1 << zoom);
- qreal lat = tx / zn * 360.0 - 180.0;
- return lat;
+ invert = !invert;
+ update();
}
-qreal latitudeFromTile(qreal ty, int zoom)
+void LightMaps::updateMap(const QRect &r)
{
- qreal zn = static_cast<qreal>(1 << zoom);
- qreal n = M_PI - 2 * M_PI * ty / zn;
- qreal lng = 180.0 / M_PI * atan(0.5 * (exp(n) - exp(-n)));
- return lng;
+ update(r);
}
-class SlippyMap: public QObject
+void LightMaps::activateZoom()
{
- Q_OBJECT
-
-public:
- int width;
- int height;
- int zoom;
- qreal latitude;
- qreal longitude;
-
- SlippyMap(QObject *parent = 0)
- : QObject(parent)
- , width(400)
- , height(300)
- , zoom(15)
- , latitude(59.9138204)
- , longitude(10.7387413) {
- m_emptyTile = QPixmap(tdim, tdim);
- m_emptyTile.fill(Qt::lightGray);
-
- QNetworkDiskCache *cache = new QNetworkDiskCache;
- cache->setCacheDirectory(QDesktopServices::storageLocation
- (QDesktopServices::CacheLocation));
- m_manager.setCache(cache);
- connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
- }
-
- void invalidate() {
- if (width <= 0 || height <= 0)
- return;
-
- QPointF ct = tileForCoordinate(latitude, longitude, zoom);
- qreal tx = ct.x();
- qreal ty = ct.y();
-
- // top-left corner of the center tile
- int xp = width / 2 - (tx - floor(tx)) * tdim;
- int yp = height / 2 - (ty - floor(ty)) * tdim;
-
- // first tile vertical and horizontal
- int xa = (xp + tdim - 1) / tdim;
- int ya = (yp + tdim - 1) / tdim;
- int xs = static_cast<int>(tx) - xa;
- int ys = static_cast<int>(ty) - ya;
-
- // offset for top-left tile
- m_offset = QPoint(xp - xa * tdim, yp - ya * tdim);
-
- // last tile vertical and horizontal
- int xe = static_cast<int>(tx) + (width - xp - 1) / tdim;
- int ye = static_cast<int>(ty) + (height - yp - 1) / tdim;
-
- // build a rect
- m_tilesRect = QRect(xs, ys, xe - xs + 1, ye - ys + 1);
-
- if (m_url.isEmpty())
- download();
-
- emit updated(QRect(0, 0, width, height));
- }
-
- void render(QPainter *p, const QRect &rect) {
- for (int x = 0; x <= m_tilesRect.width(); ++x)
- for (int y = 0; y <= m_tilesRect.height(); ++y) {
- QPoint tp(x + m_tilesRect.left(), y + m_tilesRect.top());
- QRect box = tileRect(tp);
- if (rect.intersects(box)) {
- if (m_tilePixmaps.contains(tp))
- p->drawPixmap(box, m_tilePixmaps.value(tp));
- else
- p->drawPixmap(box, m_emptyTile);
- }
- }
- }
-
- void pan(const QPoint &delta) {
- QPointF dx = QPointF(delta) / qreal(tdim);
- QPointF center = tileForCoordinate(latitude, longitude, zoom) - dx;
- latitude = latitudeFromTile(center.y(), zoom);
- longitude = longitudeFromTile(center.x(), zoom);
- invalidate();
- }
-
-private slots:
-
- void handleNetworkData(QNetworkReply *reply) {
- QImage img;
- QPoint tp = reply->request().attribute(QNetworkRequest::User).toPoint();
- QUrl url = reply->url();
- if (!reply->error())
- if (!img.load(reply, 0))
- img = QImage();
- reply->deleteLater();
- m_tilePixmaps[tp] = QPixmap::fromImage(img);
- if (img.isNull())
- m_tilePixmaps[tp] = m_emptyTile;
- emit updated(tileRect(tp));
-
- // purge unused spaces
- QRect bound = m_tilesRect.adjusted(-2, -2, 2, 2);
- foreach(QPoint tp, m_tilePixmaps.keys())
- if (!bound.contains(tp))
- m_tilePixmaps.remove(tp);
-
- download();
- }
-
- void download() {
- QPoint grab(0, 0);
- for (int x = 0; x <= m_tilesRect.width(); ++x)
- for (int y = 0; y <= m_tilesRect.height(); ++y) {
- QPoint tp = m_tilesRect.topLeft() + QPoint(x, y);
- if (!m_tilePixmaps.contains(tp)) {
- grab = tp;
- break;
- }
- }
- if (grab == QPoint(0, 0)) {
- m_url = QUrl();
- return;
- }
-
- QString path = "http://tile.openstreetmap.org/%1/%2/%3.png";
- m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y()));
- QNetworkRequest request;
- request.setUrl(m_url);
- request.setRawHeader("User-Agent", "Nokia (Qt) Graphics Dojo 1.0");
- request.setAttribute(QNetworkRequest::User, QVariant(grab));
- m_manager.get(request);
- }
-
-signals:
- void updated(const QRect &rect);
-
-protected:
- QRect tileRect(const QPoint &tp) {
- QPoint t = tp - m_tilesRect.topLeft();
- int x = t.x() * tdim + m_offset.x();
- int y = t.y() * tdim + m_offset.y();
- return QRect(x, y, tdim, tdim);
- }
-
-private:
- QPoint m_offset;
- QRect m_tilesRect;
- QPixmap m_emptyTile;
- QHash<QPoint, QPixmap> m_tilePixmaps;
- QNetworkAccessManager m_manager;
- QUrl m_url;
-};
+ zoomed = true;
+ tapTimer.stop();
+ m_largeMap->zoom = m_normalMap->zoom + 1;
+ m_largeMap->width = m_normalMap->width * 2;
+ m_largeMap->height = m_normalMap->height * 2;
+ m_largeMap->latitude = m_normalMap->latitude;
+ m_largeMap->longitude = m_normalMap->longitude;
+ m_largeMap->invalidate();
+ update();
+}
-class LightMaps: public QWidget
+void LightMaps::resizeEvent(QResizeEvent *)
{
- Q_OBJECT
-
-public:
- LightMaps(QWidget *parent = 0)
- : QWidget(parent)
- , pressed(false)
- , snapped(false)
- , zoomed(false)
- , invert(false) {
- m_normalMap = new SlippyMap(this);
- m_largeMap = new SlippyMap(this);
- connect(m_normalMap, SIGNAL(updated(QRect)), SLOT(updateMap(QRect)));
- connect(m_largeMap, SIGNAL(updated(QRect)), SLOT(update()));
- }
-
- void setCenter(qreal lat, qreal lng) {
- m_normalMap->latitude = lat;
- m_normalMap->longitude = lng;
- m_normalMap->invalidate();
- m_largeMap->invalidate();
- }
-
-public slots:
- void toggleNightMode() {
- invert = !invert;
- update();
- }
-
-private slots:
- void updateMap(const QRect &r) {
- update(r);
- }
-
-protected:
-
- void activateZoom() {
- zoomed = true;
- tapTimer.stop();
- m_largeMap->zoom = m_normalMap->zoom + 1;
- m_largeMap->width = m_normalMap->width * 2;
- m_largeMap->height = m_normalMap->height * 2;
- m_largeMap->latitude = m_normalMap->latitude;
- m_largeMap->longitude = m_normalMap->longitude;
- m_largeMap->invalidate();
- update();
- }
-
- void resizeEvent(QResizeEvent *) {
- m_normalMap->width = width();
- m_normalMap->height = height();
- m_normalMap->invalidate();
- m_largeMap->width = m_normalMap->width * 2;
- m_largeMap->height = m_normalMap->height * 2;
- m_largeMap->invalidate();
- }
+ m_normalMap->width = width();
+ m_normalMap->height = height();
+ m_normalMap->invalidate();
+ m_largeMap->width = m_normalMap->width * 2;
+ m_largeMap->height = m_normalMap->height * 2;
+ m_largeMap->invalidate();
+}
- void paintEvent(QPaintEvent *event) {
- QPainter p;
- p.begin(this);
- m_normalMap->render(&p, event->rect());
- p.setPen(Qt::black);
+void LightMaps::paintEvent(QPaintEvent *event)
+{
+ QPainter p;
+ p.begin(this);
+ m_normalMap->render(&p, event->rect());
+ p.setPen(Qt::black);
#if defined(Q_OS_SYMBIAN)
- QFont font = p.font();
- font.setPixelSize(13);
- p.setFont(font);
+ QFont font = p.font();
+ font.setPixelSize(13);
+ p.setFont(font);
#endif
- p.drawText(rect(), Qt::AlignBottom | Qt::TextWordWrap,
- "Map data CCBYSA 2009 OpenStreetMap.org contributors");
- p.end();
-
- if (zoomed) {
- int dim = qMin(width(), height());
- int magnifierSize = qMin(MAX_MAGNIFIER, dim * 2 / 3);
- int radius = magnifierSize / 2;
- int ring = radius - 15;
- QSize box = QSize(magnifierSize, magnifierSize);
-
- // reupdate our mask
- if (maskPixmap.size() != box) {
- maskPixmap = QPixmap(box);
- maskPixmap.fill(Qt::transparent);
-
- QRadialGradient g;
- g.setCenter(radius, radius);
- g.setFocalPoint(radius, radius);
- g.setRadius(radius);
- g.setColorAt(1.0, QColor(255, 255, 255, 0));
- g.setColorAt(0.5, QColor(128, 128, 128, 255));
-
- QPainter mask(&maskPixmap);
- mask.setRenderHint(QPainter::Antialiasing);
- mask.setCompositionMode(QPainter::CompositionMode_Source);
- mask.setBrush(g);
- mask.setPen(Qt::NoPen);
- mask.drawRect(maskPixmap.rect());
- mask.setBrush(QColor(Qt::transparent));
- mask.drawEllipse(g.center(), ring, ring);
- mask.end();
- }
-
- QPoint center = dragPos - QPoint(0, radius);
- center = center + QPoint(0, radius / 2);
- QPoint corner = center - QPoint(radius, radius);
-
- QPoint xy = center * 2 - QPoint(radius, radius);
+ p.drawText(rect(), Qt::AlignBottom | Qt::TextWordWrap,
+ "Map data CCBYSA 2009 OpenStreetMap.org contributors");
+ p.end();
+
+ if (zoomed) {
+ int dim = qMin(width(), height());
+ int magnifierSize = qMin(MAX_MAGNIFIER, dim * 2 / 3);
+ int radius = magnifierSize / 2;
+ int ring = radius - 15;
+ QSize box = QSize(magnifierSize, magnifierSize);
+
+ // reupdate our mask
+ if (maskPixmap.size() != box) {
+ maskPixmap = QPixmap(box);
+ maskPixmap.fill(Qt::transparent);
+
+ QRadialGradient g;
+ g.setCenter(radius, radius);
+ g.setFocalPoint(radius, radius);
+ g.setRadius(radius);
+ g.setColorAt(1.0, QColor(255, 255, 255, 0));
+ g.setColorAt(0.5, QColor(128, 128, 128, 255));
+
+ QPainter mask(&maskPixmap);
+ mask.setRenderHint(QPainter::Antialiasing);
+ mask.setCompositionMode(QPainter::CompositionMode_Source);
+ mask.setBrush(g);
+ mask.setPen(Qt::NoPen);
+ mask.drawRect(maskPixmap.rect());
+ mask.setBrush(QColor(Qt::transparent));
+ mask.drawEllipse(g.center(), ring, ring);
+ mask.end();
+ }
- // only set the dimension to the magnified portion
- if (zoomPixmap.size() != box) {
- zoomPixmap = QPixmap(box);
- zoomPixmap.fill(Qt::lightGray);
- }
- if (true) {
- QPainter p(&zoomPixmap);
- p.translate(-xy);
- m_largeMap->render(&p, QRect(xy, box));
- p.end();
- }
+ QPoint center = dragPos - QPoint(0, radius);
+ center = center + QPoint(0, radius / 2);
+ QPoint corner = center - QPoint(radius, radius);
- QPainterPath clipPath;
- clipPath.addEllipse(center, ring, ring);
+ QPoint xy = center * 2 - QPoint(radius, radius);
- QPainter p(this);
- p.setRenderHint(QPainter::Antialiasing);
- p.setClipPath(clipPath);
- p.drawPixmap(corner, zoomPixmap);
- p.setClipping(false);
- p.drawPixmap(corner, maskPixmap);
- p.setPen(Qt::gray);
- p.drawPath(clipPath);
+ // only set the dimension to the magnified portion
+ if (zoomPixmap.size() != box) {
+ zoomPixmap = QPixmap(box);
+ zoomPixmap.fill(Qt::lightGray);
}
- if (invert) {
- QPainter p(this);
- p.setCompositionMode(QPainter::CompositionMode_Difference);
- p.fillRect(event->rect(), Qt::white);
+ if (true) {
+ QPainter p(&zoomPixmap);
+ p.translate(-xy);
+ m_largeMap->render(&p, QRect(xy, box));
p.end();
}
- }
- void timerEvent(QTimerEvent *) {
- if (!zoomed)
- activateZoom();
- update();
+ QPainterPath clipPath;
+ clipPath.addEllipse(center, ring, ring);
+
+ QPainter p(this);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.setClipPath(clipPath);
+ p.drawPixmap(corner, zoomPixmap);
+ p.setClipping(false);
+ p.drawPixmap(corner, maskPixmap);
+ p.setPen(Qt::gray);
+ p.drawPath(clipPath);
}
-
- void mousePressEvent(QMouseEvent *event) {
- if (event->buttons() != Qt::LeftButton)
- return;
- pressed = snapped = true;
- pressPos = dragPos = event->pos();
- tapTimer.stop();
- tapTimer.start(HOLD_TIME, this);
+ if (invert) {
+ QPainter p(this);
+ p.setCompositionMode(QPainter::CompositionMode_Difference);
+ p.fillRect(event->rect(), Qt::white);
+ p.end();
}
+}
- void mouseMoveEvent(QMouseEvent *event) {
- if (!event->buttons())
- return;
- if (!zoomed) {
- if (!pressed || !snapped) {
- QPoint delta = event->pos() - pressPos;
- pressPos = event->pos();
- m_normalMap->pan(delta);
- return;
- } else {
- const int threshold = 10;
- QPoint delta = event->pos() - pressPos;
- if (snapped) {
- snapped &= delta.x() < threshold;
- snapped &= delta.y() < threshold;
- snapped &= delta.x() > -threshold;
- snapped &= delta.y() > -threshold;
- }
- if (!snapped)
- tapTimer.stop();
- }
- } else {
- dragPos = event->pos();
- update();
- }
- }
+void LightMaps::timerEvent(QTimerEvent *)
+{
+ if (!zoomed)
+ activateZoom();
+ update();
+}
- void mouseReleaseEvent(QMouseEvent *) {
- zoomed = false;
- update();
- }
+void LightMaps::mousePressEvent(QMouseEvent *event)
+{
+ if (event->buttons() != Qt::LeftButton)
+ return;
+ pressed = snapped = true;
+ pressPos = dragPos = event->pos();
+ tapTimer.stop();
+ tapTimer.start(HOLD_TIME, this);
+}
- void keyPressEvent(QKeyEvent *event) {
- if (!zoomed) {
- if (event->key() == Qt::Key_Left)
- m_normalMap->pan(QPoint(20, 0));
- if (event->key() == Qt::Key_Right)
- m_normalMap->pan(QPoint(-20, 0));
- if (event->key() == Qt::Key_Up)
- m_normalMap->pan(QPoint(0, 20));
- if (event->key() == Qt::Key_Down)
- m_normalMap->pan(QPoint(0, -20));
- if (event->key() == Qt::Key_Z || event->key() == Qt::Key_Select) {
- dragPos = QPoint(width() / 2, height() / 2);
- activateZoom();
- }
+void LightMaps::mouseMoveEvent(QMouseEvent *event)
+{
+ if (!event->buttons())
+ return;
+ if (!zoomed) {
+ if (!pressed || !snapped) {
+ QPoint delta = event->pos() - pressPos;
+ pressPos = event->pos();
+ m_normalMap->pan(delta);
+ return;
} else {
- if (event->key() == Qt::Key_Z || event->key() == Qt::Key_Select) {
- zoomed = false;
- update();
- }
- QPoint delta(0, 0);
- if (event->key() == Qt::Key_Left)
- delta = QPoint(-15, 0);
- if (event->key() == Qt::Key_Right)
- delta = QPoint(15, 0);
- if (event->key() == Qt::Key_Up)
- delta = QPoint(0, -15);
- if (event->key() == Qt::Key_Down)
- delta = QPoint(0, 15);
- if (delta != QPoint(0, 0)) {
- dragPos += delta;
- update();
+ const int threshold = 10;
+ QPoint delta = event->pos() - pressPos;
+ if (snapped) {
+ snapped &= delta.x() < threshold;
+ snapped &= delta.y() < threshold;
+ snapped &= delta.x() > -threshold;
+ snapped &= delta.y() > -threshold;
}
+ if (!snapped)
+ tapTimer.stop();
}
+ } else {
+ dragPos = event->pos();
+ update();
}
+}
-private:
- SlippyMap *m_normalMap;
- SlippyMap *m_largeMap;
- bool pressed;
- bool snapped;
- QPoint pressPos;
- QPoint dragPos;
- QBasicTimer tapTimer;
- bool zoomed;
- QPixmap zoomPixmap;
- QPixmap maskPixmap;
- bool invert;
-};
-
-class MapZoom : public QMainWindow
+void LightMaps::mouseReleaseEvent(QMouseEvent *)
{
- Q_OBJECT
-
-private:
- LightMaps *map;
- QNetworkSession *networkSession;
-
-public:
- MapZoom(): QMainWindow(0) {
- map = new LightMaps(this);
- setCentralWidget(map);
- map->setFocus();
-
- QAction *osloAction = new QAction("&Oslo", this);
- QAction *berlinAction = new QAction("&Berlin", this);
- QAction *jakartaAction = new QAction("&Jakarta", this);
- QAction *nightModeAction = new QAction("Night Mode", this);
- nightModeAction->setCheckable(true);
- nightModeAction->setChecked(false);
- QAction *osmAction = new QAction("About OpenStreetMap", this);
- connect(osloAction, SIGNAL(triggered()), SLOT(chooseOslo()));
- connect(berlinAction, SIGNAL(triggered()), SLOT(chooseBerlin()));
- connect(jakartaAction, SIGNAL(triggered()), SLOT(chooseJakarta()));
- connect(nightModeAction, SIGNAL(triggered()), map, SLOT(toggleNightMode()));
- connect(osmAction, SIGNAL(triggered()), SLOT(aboutOsm()));
-
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- menuBar()->addAction(osloAction);
- menuBar()->addAction(berlinAction);
- menuBar()->addAction(jakartaAction);
- menuBar()->addAction(nightModeAction);
- menuBar()->addAction(osmAction);
-#else
- QMenu *menu = menuBar()->addMenu("&Options");
- menu->addAction(osloAction);
- menu->addAction(berlinAction);
- menu->addAction(jakartaAction);
- menu->addSeparator();
- menu->addAction(nightModeAction);
- menu->addAction(osmAction);
-#endif
-
- QNetworkConfigurationManager manager;
- if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
- // Get saved network configuration
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- const QString id =
- settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
- settings.endGroup();
-
- // If the saved network configuration is not currently discovered use the system
- // default
- QNetworkConfiguration config = manager.configurationFromIdentifier(id);
- if ((config.state() & QNetworkConfiguration::Discovered) !=
- QNetworkConfiguration::Discovered) {
- config = manager.defaultConfiguration();
- }
-
- networkSession = new QNetworkSession(config, this);
- connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
+ zoomed = false;
+ update();
+}
- networkSession->open();
- } else {
- networkSession = 0;
+void LightMaps::keyPressEvent(QKeyEvent *event)
+{
+ if (!zoomed) {
+ if (event->key() == Qt::Key_Left)
+ m_normalMap->pan(QPoint(20, 0));
+ if (event->key() == Qt::Key_Right)
+ m_normalMap->pan(QPoint(-20, 0));
+ if (event->key() == Qt::Key_Up)
+ m_normalMap->pan(QPoint(0, 20));
+ if (event->key() == Qt::Key_Down)
+ m_normalMap->pan(QPoint(0, -20));
+ if (event->key() == Qt::Key_Z || event->key() == Qt::Key_Select) {
+ dragPos = QPoint(width() / 2, height() / 2);
+ activateZoom();
}
- }
-
-private slots:
-
- void sessionOpened() {
- // Save the used configuration
- QNetworkConfiguration config = networkSession->configuration();
- QString id;
- if (config.type() == QNetworkConfiguration::UserChoice) {
- id = networkSession->sessionProperty(
- QLatin1String("UserChoiceConfiguration")).toString();
- } else {
- id = config.identifier();
+ } else {
+ if (event->key() == Qt::Key_Z || event->key() == Qt::Key_Select) {
+ zoomed = false;
+ update();
+ }
+ QPoint delta(0, 0);
+ if (event->key() == Qt::Key_Left)
+ delta = QPoint(-15, 0);
+ if (event->key() == Qt::Key_Right)
+ delta = QPoint(15, 0);
+ if (event->key() == Qt::Key_Up)
+ delta = QPoint(0, -15);
+ if (event->key() == Qt::Key_Down)
+ delta = QPoint(0, 15);
+ if (delta != QPoint(0, 0)) {
+ dragPos += delta;
+ update();
}
-
- QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
- settings.endGroup();
- }
-
- void chooseOslo() {
- map->setCenter(59.9138204, 10.7387413);
- }
-
- void chooseBerlin() {
- map->setCenter(52.52958999943302, 13.383053541183472);
- }
-
- void chooseJakarta() {
- map->setCenter(-6.211544, 106.845172);
- }
-
- void aboutOsm() {
- QDesktopServices::openUrl(QUrl("http://www.openstreetmap.org"));
}
-};
-
-
-#include "lightmaps.moc"
-
-int main(int argc, char **argv)
-{
-#if defined(Q_WS_X11)
- QApplication::setGraphicsSystem("raster");
-#endif
-
- QApplication app(argc, argv);
- app.setApplicationName("LightMaps");
-
- MapZoom w;
- w.setWindowTitle("OpenStreetMap");
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- w.showMaximized();
-#else
- w.resize(600, 450);
- w.show();
-#endif
-
- return app.exec();
}
diff --git a/demos/embedded/lightmaps/lightmaps.h b/demos/embedded/lightmaps/lightmaps.h
new file mode 100644
index 0000000000..42a80c9f05
--- /dev/null
+++ b/demos/embedded/lightmaps/lightmaps.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#ifndef LIGHTMAPS_H
+#define LIGHTMAPS_H
+
+#include <QBasicTimer>
+#include <QWidget>
+
+class SlippyMap;
+
+class LightMaps: public QWidget
+{
+ Q_OBJECT
+
+public:
+ LightMaps(QWidget *parent = 0);
+ void setCenter(qreal lat, qreal lng);
+
+public slots:
+ void toggleNightMode();
+
+protected:
+ void activateZoom();
+ void resizeEvent(QResizeEvent *);
+ void paintEvent(QPaintEvent *event);
+ void timerEvent(QTimerEvent *);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *);
+ void keyPressEvent(QKeyEvent *event);
+
+private slots:
+ void updateMap(const QRect &r);
+
+private:
+ SlippyMap *m_normalMap;
+ SlippyMap *m_largeMap;
+ bool pressed;
+ bool snapped;
+ QPoint pressPos;
+ QPoint dragPos;
+ QBasicTimer tapTimer;
+ bool zoomed;
+ QPixmap zoomPixmap;
+ QPixmap maskPixmap;
+ bool invert;
+};
+
+#endif \ No newline at end of file
diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro
index 9d837218c1..cf1180b274 100644
--- a/demos/embedded/lightmaps/lightmaps.pro
+++ b/demos/embedded/lightmaps/lightmaps.pro
@@ -1,5 +1,11 @@
TEMPLATE = app
-SOURCES = lightmaps.cpp
+HEADERS = lightmaps.h \
+ mapzoom.h \
+ slippymap.h
+SOURCES = lightmaps.cpp \
+ main.cpp \
+ mapzoom.cpp \
+ slippymap.cpp
QT += network
symbian {
diff --git a/demos/embedded/lightmaps/main.cpp b/demos/embedded/lightmaps/main.cpp
new file mode 100644
index 0000000000..34d8d3d066
--- /dev/null
+++ b/demos/embedded/lightmaps/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mapzoom.h"
+
+int main(int argc, char **argv)
+{
+#if defined(Q_WS_X11)
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ QApplication app(argc, argv);
+ app.setApplicationName("LightMaps");
+
+ MapZoom w;
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
+ w.showMaximized();
+#else
+ w.resize(600, 450);
+ w.show();
+#endif
+
+ return app.exec();
+}
diff --git a/demos/embedded/lightmaps/mapzoom.cpp b/demos/embedded/lightmaps/mapzoom.cpp
new file mode 100644
index 0000000000..6cafc59b1d
--- /dev/null
+++ b/demos/embedded/lightmaps/mapzoom.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+#include "lightmaps.h"
+#include "mapzoom.h"
+
+MapZoom::MapZoom()
+ : QMainWindow(0)
+{
+ map = new LightMaps(this);
+ setCentralWidget(map);
+ map->setFocus();
+
+ QAction *osloAction = new QAction(tr("&Oslo"), this);
+ QAction *berlinAction = new QAction(tr("&Berlin"), this);
+ QAction *jakartaAction = new QAction(tr("&Jakarta"), this);
+ QAction *nightModeAction = new QAction(tr("Night Mode"), this);
+ nightModeAction->setCheckable(true);
+ nightModeAction->setChecked(false);
+ QAction *osmAction = new QAction(tr("About OpenStreetMap"), this);
+ connect(osloAction, SIGNAL(triggered()), SLOT(chooseOslo()));
+ connect(berlinAction, SIGNAL(triggered()), SLOT(chooseBerlin()));
+ connect(jakartaAction, SIGNAL(triggered()), SLOT(chooseJakarta()));
+ connect(nightModeAction, SIGNAL(triggered()), map, SLOT(toggleNightMode()));
+ connect(osmAction, SIGNAL(triggered()), SLOT(aboutOsm()));
+
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
+ menuBar()->addAction(osloAction);
+ menuBar()->addAction(berlinAction);
+ menuBar()->addAction(jakartaAction);
+ menuBar()->addAction(nightModeAction);
+ menuBar()->addAction(osmAction);
+#else
+ QMenu *menu = menuBar()->addMenu(tr("&Options"));
+ menu->addAction(osloAction);
+ menu->addAction(berlinAction);
+ menu->addAction(jakartaAction);
+ menu->addSeparator();
+ menu->addAction(nightModeAction);
+ menu->addAction(osmAction);
+#endif
+
+ QNetworkConfigurationManager manager;
+ if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
+ // Get saved network configuration
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ const QString id =
+ settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
+ settings.endGroup();
+
+ // If the saved network configuration is not currently discovered use the system
+ // default
+ QNetworkConfiguration config = manager.configurationFromIdentifier(id);
+ if ((config.state() & QNetworkConfiguration::Discovered) !=
+ QNetworkConfiguration::Discovered) {
+ config = manager.defaultConfiguration();
+ }
+
+ networkSession = new QNetworkSession(config, this);
+ connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
+
+ networkSession->open();
+ } else {
+ networkSession = 0;
+ }
+
+ setWindowTitle(tr("Light Maps"));
+}
+
+void MapZoom::sessionOpened()
+{
+ // Save the used configuration
+ QNetworkConfiguration config = networkSession->configuration();
+ QString id;
+ if (config.type() == QNetworkConfiguration::UserChoice) {
+ id = networkSession->sessionProperty(
+ QLatin1String("UserChoiceConfiguration")).toString();
+ } else {
+ id = config.identifier();
+ }
+
+ QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
+ settings.beginGroup(QLatin1String("QtNetwork"));
+ settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
+ settings.endGroup();
+}
+
+void MapZoom::chooseOslo()
+{
+ map->setCenter(59.9138204, 10.7387413);
+}
+
+void MapZoom::chooseBerlin()
+{
+ map->setCenter(52.52958999943302, 13.383053541183472);
+}
+
+void MapZoom::chooseJakarta()
+{
+ map->setCenter(-6.211544, 106.845172);
+}
+
+void MapZoom::aboutOsm()
+{
+ QDesktopServices::openUrl(QUrl("http://www.openstreetmap.org"));
+}
diff --git a/demos/embedded/lightmaps/mapzoom.h b/demos/embedded/lightmaps/mapzoom.h
new file mode 100644
index 0000000000..0b1ea8b8c7
--- /dev/null
+++ b/demos/embedded/lightmaps/mapzoom.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#ifndef MAPZOOM_H
+#define MAPZOOM_H
+
+#include <QMainWindow>
+
+class QNetworkSession;
+class LightMaps;
+
+class MapZoom : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MapZoom();
+
+private slots:
+ void sessionOpened();
+ void chooseOslo();
+ void chooseBerlin();
+ void chooseJakarta();
+ void aboutOsm();
+
+private:
+ LightMaps *map;
+ QNetworkSession *networkSession;
+};
+
+#endif \ No newline at end of file
diff --git a/demos/embedded/lightmaps/slippymap.cpp b/demos/embedded/lightmaps/slippymap.cpp
new file mode 100644
index 0000000000..2c76f748bc
--- /dev/null
+++ b/demos/embedded/lightmaps/slippymap.cpp
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#include <math.h>
+
+#include <QtGui>
+#include <QtNetwork>
+#include "slippymap.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+uint qHash(const QPoint& p)
+{
+ return p.x() * 17 ^ p.y();
+}
+
+// tile size in pixels
+const int tdim = 256;
+
+QPointF tileForCoordinate(qreal lat, qreal lng, int zoom)
+{
+ qreal zn = static_cast<qreal>(1 << zoom);
+ qreal tx = (lng + 180.0) / 360.0;
+ qreal ty = (1.0 - log(tan(lat * M_PI / 180.0) +
+ 1.0 / cos(lat * M_PI / 180.0)) / M_PI) / 2.0;
+ return QPointF(tx * zn, ty * zn);
+}
+
+qreal longitudeFromTile(qreal tx, int zoom)
+{
+ qreal zn = static_cast<qreal>(1 << zoom);
+ qreal lat = tx / zn * 360.0 - 180.0;
+ return lat;
+}
+
+qreal latitudeFromTile(qreal ty, int zoom)
+{
+ qreal zn = static_cast<qreal>(1 << zoom);
+ qreal n = M_PI - 2 * M_PI * ty / zn;
+ qreal lng = 180.0 / M_PI * atan(0.5 * (exp(n) - exp(-n)));
+ return lng;
+}
+
+
+SlippyMap::SlippyMap(QObject *parent)
+ : QObject(parent), width(400), height(300), zoom(15),
+ latitude(59.9138204), longitude(10.7387413)
+{
+ m_emptyTile = QPixmap(tdim, tdim);
+ m_emptyTile.fill(Qt::lightGray);
+
+ QNetworkDiskCache *cache = new QNetworkDiskCache;
+ cache->setCacheDirectory(QDesktopServices::storageLocation
+ (QDesktopServices::CacheLocation));
+ m_manager.setCache(cache);
+ connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(handleNetworkData(QNetworkReply*)));
+}
+
+void SlippyMap::invalidate()
+{
+ if (width <= 0 || height <= 0)
+ return;
+
+ QPointF ct = tileForCoordinate(latitude, longitude, zoom);
+ qreal tx = ct.x();
+ qreal ty = ct.y();
+
+ // top-left corner of the center tile
+ int xp = width / 2 - (tx - floor(tx)) * tdim;
+ int yp = height / 2 - (ty - floor(ty)) * tdim;
+
+ // first tile vertical and horizontal
+ int xa = (xp + tdim - 1) / tdim;
+ int ya = (yp + tdim - 1) / tdim;
+ int xs = static_cast<int>(tx) - xa;
+ int ys = static_cast<int>(ty) - ya;
+
+ // offset for top-left tile
+ m_offset = QPoint(xp - xa * tdim, yp - ya * tdim);
+
+ // last tile vertical and horizontal
+ int xe = static_cast<int>(tx) + (width - xp - 1) / tdim;
+ int ye = static_cast<int>(ty) + (height - yp - 1) / tdim;
+
+ // build a rect
+ m_tilesRect = QRect(xs, ys, xe - xs + 1, ye - ys + 1);
+
+ if (m_url.isEmpty())
+ download();
+
+ emit updated(QRect(0, 0, width, height));
+}
+
+void SlippyMap::render(QPainter *p, const QRect &rect)
+{
+ for (int x = 0; x <= m_tilesRect.width(); ++x)
+ for (int y = 0; y <= m_tilesRect.height(); ++y) {
+ QPoint tp(x + m_tilesRect.left(), y + m_tilesRect.top());
+ QRect box = tileRect(tp);
+ if (rect.intersects(box)) {
+ if (m_tilePixmaps.contains(tp))
+ p->drawPixmap(box, m_tilePixmaps.value(tp));
+ else
+ p->drawPixmap(box, m_emptyTile);
+ }
+ }
+}
+
+void SlippyMap::pan(const QPoint &delta)
+{
+ QPointF dx = QPointF(delta) / qreal(tdim);
+ QPointF center = tileForCoordinate(latitude, longitude, zoom) - dx;
+ latitude = latitudeFromTile(center.y(), zoom);
+ longitude = longitudeFromTile(center.x(), zoom);
+ invalidate();
+}
+
+void SlippyMap::handleNetworkData(QNetworkReply *reply)
+{
+ QImage img;
+ QPoint tp = reply->request().attribute(QNetworkRequest::User).toPoint();
+ QUrl url = reply->url();
+ if (!reply->error())
+ if (!img.load(reply, 0))
+ img = QImage();
+ reply->deleteLater();
+ m_tilePixmaps[tp] = QPixmap::fromImage(img);
+ if (img.isNull())
+ m_tilePixmaps[tp] = m_emptyTile;
+ emit updated(tileRect(tp));
+
+ // purge unused spaces
+ QRect bound = m_tilesRect.adjusted(-2, -2, 2, 2);
+ foreach(QPoint tp, m_tilePixmaps.keys())
+ if (!bound.contains(tp))
+ m_tilePixmaps.remove(tp);
+
+ download();
+}
+
+void SlippyMap::download()
+{
+ QPoint grab(0, 0);
+ for (int x = 0; x <= m_tilesRect.width(); ++x)
+ for (int y = 0; y <= m_tilesRect.height(); ++y) {
+ QPoint tp = m_tilesRect.topLeft() + QPoint(x, y);
+ if (!m_tilePixmaps.contains(tp)) {
+ grab = tp;
+ break;
+ }
+ }
+ if (grab == QPoint(0, 0)) {
+ m_url = QUrl();
+ return;
+ }
+
+ QString path = "http://tile.openstreetmap.org/%1/%2/%3.png";
+ m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y()));
+ QNetworkRequest request;
+ request.setUrl(m_url);
+ request.setRawHeader("User-Agent", "Nokia (Qt) Graphics Dojo 1.0");
+ request.setAttribute(QNetworkRequest::User, QVariant(grab));
+ m_manager.get(request);
+}
+
+QRect SlippyMap::tileRect(const QPoint &tp)
+{
+ QPoint t = tp - m_tilesRect.topLeft();
+ int x = t.x() * tdim + m_offset.x();
+ int y = t.y() * tdim + m_offset.y();
+ return QRect(x, y, tdim, tdim);
+}
diff --git a/demos/embedded/lightmaps/slippymap.h b/demos/embedded/lightmaps/slippymap.h
new file mode 100644
index 0000000000..ba43e40c9b
--- /dev/null
+++ b/demos/embedded/lightmaps/slippymap.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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$
+**
+****************************************************************************/
+
+#ifndef SLIPPYMAP_H
+#define SLIPPYMAP_H
+
+#include <QNetworkAccessManager>
+#include <QPixmap>
+#include <QUrl>
+
+class QNetworkReply;
+class QPainter;
+
+class SlippyMap: public QObject
+{
+ Q_OBJECT
+
+public:
+ SlippyMap(QObject *parent = 0);
+ void invalidate();
+ void render(QPainter *p, const QRect &rect);
+ void pan(const QPoint &delta);
+
+ int width;
+ int height;
+ int zoom;
+ qreal latitude;
+ qreal longitude;
+
+signals:
+ void updated(const QRect &rect);
+
+private slots:
+ void handleNetworkData(QNetworkReply *reply);
+ void download();
+
+protected:
+ QRect tileRect(const QPoint &tp);
+
+private:
+ QPoint m_offset;
+ QRect m_tilesRect;
+ QPixmap m_emptyTile;
+ QHash<QPoint, QPixmap> m_tilePixmaps;
+ QNetworkAccessManager m_manager;
+ QUrl m_url;
+};
+
+#endif \ No newline at end of file
diff --git a/demos/embedded/qmlflickr/qmlflickr.pro b/demos/embedded/qmlflickr/qmlflickr.pro
index 39b316a5b9..8d4e03205c 100644
--- a/demos/embedded/qmlflickr/qmlflickr.pro
+++ b/demos/embedded/qmlflickr/qmlflickr.pro
@@ -8,5 +8,6 @@ symbian {
TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.CAPABILITY = NetworkServices
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ # Maximum heap size set to 128 MB in order to allow loading large images.
+ TARGET.EPOCHEAPSIZE = 0x20000 0x8000000
}
diff --git a/demos/mobile/guitartuner/guitartuner.pro b/demos/mobile/guitartuner/guitartuner.pro
new file mode 100644
index 0000000000..62835300bd
--- /dev/null
+++ b/demos/mobile/guitartuner/guitartuner.pro
@@ -0,0 +1,89 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-10-22T14:28:56
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = guitartuner
+TEMPLATE = app
+
+ICON = images/guitartuner_icon.svg
+
+SOURCES += src/main.cpp\
+ src/guitartuner.cpp \
+ src/voicegenerator.cpp \
+ src/voiceanalyzer.cpp \
+ src/guitartunerui.cpp \
+ src/fastfouriertransformer.cpp
+
+HEADERS += src/guitartuner.h \
+ src/voicegenerator.h \
+ src/voiceanalyzer.h \
+ src/constants.h \
+ src/guitartunerui.h \
+ src/fastfouriertransformer.h
+
+FORMS += src/guitartunerui.ui
+
+VERSION = 1.2.0
+
+symbian {
+ INCLUDEPATH += /epoc32/include/mmf/common
+ INCLUDEPATH += /epoc32/include/mmf/server
+ LIBS += -lmmfdevsound
+ TARGET.UID3 = 0xEC46D2C8
+ # TARGET.CAPABILITY +=
+ # TARGET.EPOCSTACKSIZE = 0x14000
+ # TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
+}
+
+RESOURCES += \
+ guitartuner.qrc
+
+# Avoid auto screen rotation
+DEFINES += ORIENTATIONLOCK
+
+symbian {
+ contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -leiksrv -lcone
+}
+
+
+# Add mobility into Qt's CONFIG, and add multimedia into MOBILITY.
+
+win32 {
+ QT += multimedia
+ RC_FILE = src/guitartuner.rc
+}
+else {
+ CONFIG += mobility
+ MOBILITY += multimedia
+}
+
+symbian {
+ TARGET.CAPABILITY = UserEnvironment
+}
+
+# Add declarative module
+QT += declarative
+
+OTHER_FILES += \
+ src/application.qml \
+ src/mycomponents/Adjuster.qml \
+ src/mycomponents/adjustbars.js \
+ src/mycomponents/ToggleButton.qml
+
+OTHER_FILES += \
+ src/mycomponents/NotesModel.qml \
+ src/mycomponents/NoteButtonView.qml \
+ src/mycomponents/Meter.qml
+
+unix:!symbian {
+ maemo5 {
+ target.path = /opt/usr/bin
+ } else {
+ target.path = /usr/local/bin
+ }
+ INSTALLS += target
+}
diff --git a/demos/mobile/guitartuner/guitartuner.qrc b/demos/mobile/guitartuner/guitartuner.qrc
new file mode 100644
index 0000000000..d8ba019941
--- /dev/null
+++ b/demos/mobile/guitartuner/guitartuner.qrc
@@ -0,0 +1,43 @@
+<RCC>
+ <qresource prefix="/">
+ <file>src/application.qml</file>
+ <file>src/mycomponents/adjustbars.js</file>
+ <file>src/mycomponents/Adjuster.qml</file>
+ <file>src/mycomponents/Meter.qml</file>
+ <file>src/mycomponents/NoteButtonView.qml</file>
+ <file>src/mycomponents/NotesModel.qml</file>
+ <file>src/mycomponents/ToggleButton.qml</file>
+ <file>src/mycomponents/images/meterBG.png</file>
+ <file>src/mycomponents/images/pointerShadow.png</file>
+ <file>src/mycomponents/images/sensitivity.png</file>
+ <file>src/mycomponents/images/tuner_a.png</file>
+ <file>src/mycomponents/images/tuner_a_on.png</file>
+ <file>src/mycomponents/images/tuner_b.png</file>
+ <file>src/mycomponents/images/tuner_b_on.png</file>
+ <file>src/mycomponents/images/tuner_d.png</file>
+ <file>src/mycomponents/images/tuner_d_on.png</file>
+ <file>src/mycomponents/images/tuner_e.png</file>
+ <file>src/mycomponents/images/tuner_e_on.png</file>
+ <file>src/mycomponents/images/tuner_g.png</file>
+ <file>src/mycomponents/images/tuner_g_on.png</file>
+ <file>src/mycomponents/images/voicemode_off.png</file>
+ <file>src/mycomponents/images/voicemode_on.png</file>
+ <file>src/mycomponents/images/volume.png</file>
+ <file>src/mycomponents/images/volume_off.png</file>
+ <file>src/mycomponents/images/guitartuner_skin.png</file>
+ <file>src/mycomponents/images/power.png</file>
+ <file>src/mycomponents/images/tuner_auto.png</file>
+ <file>src/mycomponents/images/tuner_auto_on.png</file>
+ <file>src/mycomponents/images/big_a.png</file>
+ <file>src/mycomponents/images/big_b.png</file>
+ <file>src/mycomponents/images/big_d.png</file>
+ <file>src/mycomponents/images/big_e.png</file>
+ <file>src/mycomponents/images/big_g.png</file>
+ <file>src/mycomponents/images/glowing_a.png</file>
+ <file>src/mycomponents/images/glowing_b.png</file>
+ <file>src/mycomponents/images/glowing_d.png</file>
+ <file>src/mycomponents/images/glowing_e.png</file>
+ <file>src/mycomponents/images/glowing_g.png</file>
+ <file>src/mycomponents/images/pointer.png</file>
+ </qresource>
+</RCC>
diff --git a/demos/mobile/guitartuner/images/guitartab.svg b/demos/mobile/guitartuner/images/guitartab.svg
new file mode 100644
index 0000000000..9d88d5d287
--- /dev/null
+++ b/demos/mobile/guitartuner/images/guitartab.svg
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="70.661781"
+ height="55.997791"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="guitartab.svg">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective3604"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3632"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3632-4"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3632-9"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3632-8"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3632-2"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3690"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3712"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="343.43632"
+ inkscape:cy="198.00574"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="888"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ borderlayer="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-45.793001,-702.07386)">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.96666431;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3728"
+ width="68.695114"
+ height="54.031128"
+ x="46.776333"
+ y="703.05719" />
+ <g
+ id="g3732"
+ transform="matrix(0.11166616,0,0,0.11166616,41.003771,673.42071)">
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816"
+ d="m 133.63811,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-7"
+ d="m 223.89631,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-0"
+ d="m 314.15451,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-4"
+ d="m 404.4127,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-8"
+ d="m 494.6709,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-45"
+ d="m 584.92911,570.46864 0,-225.36571"
+ style="fill:none;stroke:#000000;stroke-width:17.61199951;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-5"
+ d="m 124.89988,344.21478 468.77277,0"
+ style="fill:none;stroke:#000000;stroke-width:19.51578331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path2816-5-1"
+ d="m 125.76355,400.6818 467.80305,0"
+ style="fill:none;stroke:#000000;stroke-width:19.4955883;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
diff --git a/demos/mobile/guitartuner/images/guitartuner_icon.svg b/demos/mobile/guitartuner/images/guitartuner_icon.svg
new file mode 100644
index 0000000000..de7ebe0fba
--- /dev/null
+++ b/demos/mobile/guitartuner/images/guitartuner_icon.svg
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="128px" height="128px" viewBox="0 0 128 128" overflow="visible" enable-background="new 0 0 128 128"
+ xml:space="preserve">
+<defs>
+</defs>
+<rect x="0" display="none" fill="#1A171B" width="128" height="128"/>
+<circle fill="#13235B" cx="64" cy="64" r="47"/>
+<g>
+ <g>
+ <path fill="#F29400" d="M14.352,113.699c0,0-13.927-13.928-3.122-24.732c7.203-7.205,11.706-2.701,15.308-6.305
+ c3.602-3.601,1.417-6.729,5.28-10.84c7.547-8.035,15.842,3.149,15.842,3.149l4.765,4.765l-7.204,7.204
+ c0,0,5.134,7.943,12.338,0.74c-3.827,10.578-9.411,9.39-13.014,12.99c-3.602,3.603,0.854,8.058-6.303,15.31
+ C27.508,126.855,14.352,113.699,14.352,113.699z"/>
+ </g>
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="7.122" y="68.918" width="50.437" height="51.368">
+
+ <feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="7.122" y="68.918" width="50.437" height="51.368" id="SVGID_1_">
+ <g filter="url(#Adobe_OpacityMaskFilter)">
+
+ <image overflow="visible" width="55" height="57" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
+EAMCAwYAAAG8AAACPgAAAr//2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADkANwMBIgACEQEDEQH/
+xAB9AAABBQEBAAAAAAAAAAAAAAAAAgQFBgcBAwEBAAAAAAAAAAAAAAAAAAAAABAAAgMAAgICAwAA
+AAAAAAAAAgMBBAUABhBAMBEhEiMRAAICAQMFAQAAAAAAAAAAAAECABEhEEESIDFRIgMwEgEAAAAA
+AAAAAAAAAAAAAABA/9oADAMBAAIRAxEAAADPwAc+F5Kkx0alEcAdmuaSVq5PFkFles5qQR0J/T8X
+0IuyGbQrdAm4IAAcNwsnjAgpIAAf/9oACAECAAEFAPQ//9oACAEDAAEFAPQ//9oACAEBAAEFAPNa
+k2xx+W5UTExPlYSw8bI/jezBFerWBTeCJGVDrjrEZPT1qZUzgSvZT+qtc2zc516mL25WcuABIBHN
+loQvbZXln3+eruEG5bRJfGnAB27WJKzYbC5TslWfh7YECtNZDoagQvst6LDfNW8+qVbtBCN3sRtF
+jDYfw//aAAgBAgIGPwAH/9oACAEDAgY/AAf/2gAIAQEBBj8A1tRichkSj36FRcljUW12hsQlcHQK
+osnsIC952EH0ZbPkwCo1DaOrigD66cmF5gxMDRrMY4Jl7Tie9wVoTGCnJwIWc2Tov0U43i+0u4aM
+4A3m+i0bHiU5IMKoSSYXc2T+X//Z" transform="matrix(1 0 0 1 5.0005 66)">
+ </image>
+ </g>
+ </mask>
+ <g mask="url(#SVGID_1_)">
+ <path fill="#B20000" d="M14.352,113.699c0,0-13.927-13.928-3.122-24.732c7.203-7.205,11.706-2.701,15.308-6.305
+ c3.602-3.601,1.417-6.729,5.28-10.84c7.547-8.035,15.842,3.149,15.842,3.149l4.765,4.765l-7.204,7.204
+ c0,0,5.134,7.943,12.338,0.74c-3.827,10.578-9.411,9.39-13.014,12.99c-3.602,3.603,0.854,8.058-6.303,15.31
+ C27.508,126.855,14.352,113.699,14.352,113.699z"/>
+ </g>
+</g>
+<g>
+ <path fill="#FFEDB8" d="M37.791,69.168c5.189,0,9.624,5.894,9.692,5.98l4.588,4.588l-7.027,7.027l-0.143,0.143l0.11,0.17
+ c0.102,0.158,2.55,3.875,6.503,3.875c1.808,0,3.63-0.791,5.427-2.352c-2.541,6.327-5.777,7.936-8.649,9.362
+ c-1.422,0.707-2.765,1.374-3.924,2.532c-1.562,1.562-1.672,3.261-1.8,5.227c-0.171,2.633-0.384,5.909-4.504,10.084
+ c-2.771,2.808-5.958,4.231-9.472,4.231c-7.46,0-14-6.448-14.064-6.514c-0.137-0.138-13.625-13.877-3.122-24.379
+ c4.152-4.153,7.301-4.348,10.078-4.519c1.97-0.122,3.67-0.227,5.229-1.786c1.829-1.829,2.218-3.585,2.595-5.284
+ c0.384-1.735,0.782-3.529,2.69-5.562C33.761,70.118,35.709,69.168,37.791,69.168 M37.791,68.918c-1.932,0-3.979,0.781-5.974,2.904
+ c-3.862,4.11-1.678,7.239-5.28,10.84c-3.602,3.604-8.104-0.9-15.308,6.305c-10.805,10.805,3.122,24.732,3.122,24.732
+ s6.586,6.587,14.241,6.587c3.164,0,6.51-1.126,9.649-4.306c7.157-7.252,2.701-11.707,6.303-15.31
+ c3.603-3.601,9.187-2.412,13.014-12.99c-2.248,2.247-4.293,3.021-6.044,3.021c-3.862,0-6.293-3.761-6.293-3.761l7.204-7.204
+ l-4.765-4.765C47.66,74.972,43.17,68.918,37.791,68.918L37.791,68.918z"/>
+</g>
+<rect x="35.983" y="67.296" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 146.0415 81.7395)" fill="#41281B" width="40.217" height="7.64"/>
+<rect x="35.697" y="84.509" transform="matrix(-0.7073 0.707 -0.707 -0.7073 128.185 124.851)" fill="#ECEDED" width="5.092" height="8.913"/>
+<rect x="27.593" y="92.612" transform="matrix(-0.7072 0.7071 -0.7071 -0.7072 120.0864 144.402)" fill="#ECEDED" width="5.092" height="8.914"/>
+<rect x="24.55" y="96.293" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 115.1376 156.3543)" fill="#F6F6F6" width="1.273" height="11.46"/>
+<rect x="26.351" y="94.491" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 116.9377 152.0052)" fill="#F6F6F6" width="1.273" height="11.461"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="23.499" y1="99.433" x2="66.495" y2="56.438"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="28" y1="103.934" x2="70.997" y2="60.941"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="27.101" y1="103.034" x2="70.096" y2="60.04"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="26.2" y1="102.134" x2="69.196" y2="59.139"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="25.3" y1="101.233" x2="68.295" y2="58.239"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="24.4" y1="100.333" x2="67.395" y2="57.339"/>
+<circle fill="#1A171B" cx="26.908" cy="113.596" r="1.761"/>
+<path fill="#1A171B" d="M33.138,107.366c0.688,0.687,0.688,1.804,0,2.493c-0.688,0.686-1.804,0.686-2.492,0
+ c-0.688-0.689-0.688-1.807,0-2.493C31.334,106.678,32.45,106.678,33.138,107.366z"/>
+<circle fill="#FFEDB8" cx="36.848" cy="75.131" r="1.762"/>
+<circle fill="#1A171B" cx="32.31" cy="115.397" r="1.762"/>
+<path fill="#1A171B" d="M38.54,109.167c0.689,0.687,0.689,1.804,0,2.493c-0.688,0.686-1.804,0.686-2.492,0
+ c-0.688-0.689-0.688-1.807,0-2.493C36.736,108.479,37.852,108.479,38.54,109.167z"/>
+<g>
+ <g>
+ <path fill="#ECEDED" d="M105.895,10.52l2.704,2.702L70.764,51.056c0,0-2.702,2.702,0,5.404c2.704,2.702,5.405,0,5.405,0
+ l37.833-37.833l2.704,2.702c0,0-35.132,35.131-37.835,37.833c-2.702,2.702-8.107,2.702-10.81,0s-2.702-8.106,0-10.809
+ C70.765,45.649,105.895,10.52,105.895,10.52z"/>
+ </g>
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="66.036" y="10.52" width="50.671" height="50.669">
+
+ <feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="66.036" y="10.52" width="50.671" height="50.669" id="SVGID_2_">
+ <g filter="url(#Adobe_OpacityMaskFilter_1_)">
+
+ <image overflow="visible" width="55" height="56" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
+EAMCAwYAAAGyAAACNwAAA9T/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIADgANwMBIgACEQEDEQH/
+xACCAAEBAQADAAAAAAAAAAAAAAAABgQDBQcBAQAAAAAAAAAAAAAAAAAAAAAQAQEBAAIDAQEAAAAA
+AAAAAAUEBhADACBAAQIRAAIBAgQEBgIDAQAAAAAAAAECAxEEACFREjHBQgUQIGEyUhNBFZEiIwYS
+AQAAAAAAAAAAAAAAAAAAAED/2gAMAwEAAhEDEQAAAPPwDcOwp4w61WCTNwt0YL95scjGN1vxSIv3
+mwzgBUdyENnAAD//2gAIAQIAAQUA+D//2gAIAQMAAQUA+D//2gAIAQEAAQUA9Bx7GLNSHCL3+g49
+jFiKJuMNONS0CLmRkOQ4HHsYsRRNxhppqWgSqqJwxPatd3JeDj2MWIom4w001LQJVVE4Ym66pCrw
+cexixFE3GGmmpaBKqonDE3XVIVcZ+r9JwppqWgSqqJwxN11SFXOV1/8ABHR3bgAvouuqQq9P/9oA
+CAECAgY/AAf/2gAIAQMCBj8AB//aAAgBAQEGPwDyLaWi1Jzdz7UXU4ht7e4+2bb/ALJxofl6eVbS
+0WpObufai6nH6ztlJO4yCskhzNT1vyGPrjrJNId00zZhQepuQx22xhudz3kkcMgNNw3sF3j+fFbS
+0WpObufai6nH6ztlJO4yCskhzNT1vyGPrjrJNId00zZhQepuQwLe3AlvpRkOt3+TaAYXuksm+6SR
+ZVY8AUO5QBoPBbS0WpObufai6nH6ztlJO4yCskhzNT1vyGPrjrJNId00zZhQepuQwLe3AlvpRkOt
+3+TaAYe7u3Mk0hqSeAGg9PBbS0WpObufai6nH6ztlJO4yCskhzNT1vyGPrjrJNId00zZhQepuQwL
+e3AlvpRkOt3+TaAYe7u3Mk0hqSeAGg9PGfuVrFW6ZnBYCpru2Bm9Fx9cdZJpDummbMKD1NyGBb24
+Et9KMh1u/wAm0Aw93duZJpDUk8ANB6eRu33sJnspGJyoSm7j/X8j84ZP+fsgJJM2IT6lB9cqnD3d
+25kmkNSTwA0Hp5f/2Q==" transform="matrix(1 0 0 1 64.0005 8)">
+ </image>
+ </g>
+ </mask>
+ <g opacity="0.77" mask="url(#SVGID_2_)">
+ <path fill="#1C1B1B" d="M105.895,10.52l2.704,2.702L70.764,51.056c0,0-2.702,2.702,0,5.404c2.704,2.702,5.405,0,5.405,0
+ l37.833-37.833l2.704,2.702c0,0-35.132,35.131-37.835,37.833c-2.702,2.702-8.107,2.702-10.81,0s-2.702-8.106,0-10.809
+ C70.765,45.649,105.895,10.52,105.895,10.52z"/>
+ </g>
+</g>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="40.044" y1="81.762" x2="45.447" y2="87.166"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="40.966" y1="80.84" x2="46.37" y2="86.241"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="41.96" y1="79.846" x2="47.363" y2="85.248"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="43.168" y1="78.639" x2="48.57" y2="84.042"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="44.587" y1="77.219" x2="49.99" y2="82.623"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="46.006" y1="75.801" x2="51.41" y2="81.203"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="47.285" y1="74.522" x2="52.688" y2="79.925"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="48.847" y1="72.961" x2="54.249" y2="78.362"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="50.621" y1="71.185" x2="56.023" y2="76.589"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="52.489" y1="69.329" x2="57.891" y2="74.731"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="54.405" y1="67.4" x2="59.709" y2="72.704"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="56.517" y1="65.392" x2="61.821" y2="70.696"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="59.166" y1="62.744" x2="64.469" y2="68.047"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="61.883" y1="60.026" x2="67.187" y2="65.329"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="64.902" y1="57.007" x2="70.206" y2="62.31"/>
+<g display="none">
+ <g display="inline">
+ <path fill="#F29400" d="M0,24.468C0,24.468,0,9,12,9c8,0,8,5,12,5s4.525-2.95,8.952-3.088C41.605,10.642,40,21.458,40,21.458
+ v5.291h-8c0,0-1.56,7.262,6.44,7.262C30.44,37.762,28,34,24,34c-4,0-4,4.948-12,5C0,39.078,0,24.468,0,24.468z"/>
+ </g>
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_2_" filterUnits="userSpaceOnUse" x="0" y="9" width="40.118" height="30">
+
+ <feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="0" y="9" width="40.118" height="30" id="SVGID_3_" display="inline">
+ <g filter="url(#Adobe_OpacityMaskFilter_2_)">
+
+ <image overflow="visible" width="46" height="35" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
+EAMCAwYAAAGrAAACBgAAAl3/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIACMALgMBIgACEQEDEQH/
+xAB+AAABBQEBAAAAAAAAAAAAAAAAAgMFBgcEAQEBAAAAAAAAAAAAAAAAAAAAABAAAgMAAgIDAQAA
+AAAAAAAAAgMBBAUREzAGECAxFBEAAgEEAQMFAAAAAAAAAAAAAAERIUECElEQMYEgIkIDExIBAAAA
+AAAAAAAAAAAAAAAAMP/aAAwDAQACEQMRAAAAoEknQjPuDXogztq4Vo7NJyW2mgQdegRyGUyCwPEg
+AB//2gAIAQIAAQUA8P8A/9oACAEDAAEFAPD/AP/aAAgBAQABBQARkpr4r3DYxLKR6W8zUfA8TzjV
+4dZzMwJB2Mshs4aQm9VWsZAf7vXigbGW4IBllcDp3VwOtrlL+0u2nYmu6jvgIXPZxALHsLnTYdDi
++A/D+n//2gAIAQICBj8AH//aAAgBAwIGPwAf/9oACAEBAQY/AFjipbJdzZLY10c8QbPEi5WsCoVx
+G9UNJGONmxzyI7jhmX1pU5P1uLNdri9w4yHRwbX6/LwX8+j/2Q==" transform="matrix(1 0 0 1 -2.9995 6)">
+ </image>
+ </g>
+ </mask>
+ <g display="inline" mask="url(#SVGID_3_)">
+ <path fill="#B20000" d="M0,24.468C0,24.468,0,9,12,9c8,0,8,5,12,5s4.525-2.95,8.952-3.088C41.605,10.642,40,21.458,40,21.458
+ v5.291h-8c0,0-1.56,7.262,6.44,7.262C30.44,37.762,28,34,24,34c-4,0-4,4.948-12,5C0,39.078,0,24.468,0,24.468z"/>
+ </g>
+</g>
+<g display="none">
+ <path display="inline" fill="#FFEDB8" d="M12,9.25c4.592,0,6.439,1.633,8.07,3.075c1.169,1.033,2.179,1.926,3.93,1.926
+ c2.047,0,3.246-0.764,4.405-1.502c1.171-0.746,2.382-1.518,4.555-1.585c0.104-0.003,0.207-0.005,0.308-0.005
+ c2.021,0,3.606,0.649,4.712,1.931c2.537,2.939,1.782,8.28,1.771,8.37V26.5H32h-0.202l-0.042,0.197
+ c-0.028,0.13-0.663,3.21,1.127,5.426c0.979,1.211,2.483,1.913,4.481,2.093c-1.956,0.813-3.706,1.21-5.323,1.21
+ c-1.76,0-3.121-0.458-4.438-0.9C26.416,34.126,25.295,33.75,24,33.75c-1.755,0-2.766,0.888-3.937,1.916
+ c-1.631,1.432-3.479,3.054-8.064,3.084l-0.095,0C0.388,38.75,0.25,24.61,0.25,24.468C0.25,24.315,0.391,9.25,12,9.25 M12,9
+ C0,9,0,24.468,0,24.468S-0.002,39,11.904,39c0.031,0,0.064,0,0.096,0c8-0.052,8-5,12-5c2.67,0,4.644,1.675,8.041,1.675
+ c1.692,0,3.739-0.416,6.4-1.664c-8,0-6.44-7.262-6.44-7.262h8v-5.291c0,0,1.566-10.551-6.733-10.551
+ c-0.104,0-0.209,0.001-0.316,0.005C28.525,11.05,28,14,24,14S20,9,12,9L12,9z"/>
+</g>
+<rect x="31.032" y="21" display="none" fill="#41281B" width="32.967" height="6"/>
+<rect x="25" y="20.5" display="none" fill="#ECEDED" width="3.999" height="7"/>
+<rect x="16.001" y="20.5" display="none" fill="#ECEDED" width="3.999" height="7"/>
+<rect x="12" y="19.5" display="none" fill="#F6F6F6" width="1" height="9"/>
+<rect x="14" y="19.5" display="none" fill="#F6F6F6" width="1" height="9"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="21.625" x2="60.75" y2="21.625"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="26.625" x2="60.75" y2="26.625"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="25.625" x2="60.75" y2="25.625"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="24.625" x2="60.75" y2="24.625"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="23.625" x2="60.75" y2="23.625"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.15" stroke-miterlimit="10" x1="13" y1="22.625" x2="60.75" y2="22.625"/>
+<circle display="none" fill="#1A171B" cx="7.029" cy="31.382" r="1.384"/>
+<circle display="none" fill="#1A171B" cx="12.564" cy="31.382" r="1.384"/>
+<circle display="none" fill="#FFEDB8" cx="33.908" cy="15.543" r="1.384"/>
+<circle display="none" fill="#1A171B" cx="9.029" cy="35.382" r="1.384"/>
+<circle display="none" fill="#1A171B" cx="14.564" cy="35.382" r="1.384"/>
+<g display="none">
+ <g display="inline">
+ <path fill="#ECEDED" d="M124,16v4H68c0,0-4,0-4,4s4,4,4,4h56v4c0,0-52,0-56,0s-8-4-8-8s4-8,8-8C72.001,16,124,16,124,16z"/>
+ </g>
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_3_" filterUnits="userSpaceOnUse" x="60" y="16" width="64" height="16">
+
+ <feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="60" y="16" width="64" height="16" id="SVGID_4_" display="inline">
+ <g filter="url(#Adobe_OpacityMaskFilter_3_)">
+
+ <image overflow="visible" width="68" height="20" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
+EAMCAwYAAAGtAAACAQAAAsf/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
+Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
+JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIABQARAMBIgACEQEDEQH/
+xACMAAEAAQUAAAAAAAAAAAAAAAAABQECAwQGAQEAAAAAAAAAAAAAAAAAAAAAEAABAgQGAwEAAAAA
+AAAAAAAABicCAwQWMBIUBRUlAREXBxEAAAQCBwcEAwAAAAAAAAAAAAERAhIDITGR0hOjREFxBBQ0
+BRVRYUIzIqKDEgEAAAAAAAAAAAAAAAAAAAAw/9oADAMBAAIRAxEAAACH3tvnSTQwmUMJm2IoarAM
+vTgoAC0OdB//2gAIAQIAAQUAwv/aAAgBAwABBQDC/9oACAEBAAEFAEmk4N2gnSvzWTMbUbUbUbUb
+Uj+c5eq5VKwU28pKpQ6lp5lnqUs9SlnqUs9SlnqUiSKjh8aKq1e08nrXL9OUOUOUOUOUR/R8va8r
+/9oACAECAgY/AC//2gAIAQMCBj8AL//aAAgBAQEGPwB3cO4Pwu3S1KtDeZV07CIHLN815trcw5jm
+nucVA1GaNRmjUZo1GaNRmg4Mddn2j5eNi94oUtrHEdjZOKXxZG80UyP8jiadCKXqIC4TGJFjlOI2
+/tCOgmWtvDoJlrbw6CZa28OgmWtvDoJlrbwV3ATCLe28OSwz5lYcOhVRQzxUfN0w4dabV2JvGoT+
+Q1GUNRlDUZQ1GUNRlA48dNv1D5eSi9ooksqH/9k=" transform="matrix(1 0 0 1 58.0005 14)">
+ </image>
+ </g>
+ </mask>
+ <g display="inline" opacity="0.75" mask="url(#SVGID_4_)">
+ <path fill="#1C1B1B" d="M124,16v4H68c0,0-4,0-4,4s4,4,4,4h56v4c0,0-52,0-56,0s-8-4-8-8s4-8,8-8C72.001,16,124,16,124,16z"/>
+ </g>
+</g>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="32" y1="21" x2="32" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="33.025" y1="21" x2="33.025" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="34.129" y1="21" x2="34.129" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="35.469" y1="21" x2="35.469" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="37.046" y1="21" x2="37.046" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="38.623" y1="21" x2="38.623" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="40.042" y1="21" x2="40.042" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="41.776" y1="21" x2="41.776" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="43.747" y1="21" x2="43.747" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="46.033" y1="21" x2="46.033" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="48.635" y1="21" x2="48.635" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="51.315" y1="21" x2="51.315" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="54.311" y1="21" x2="54.311" y2="27"/>
+<line display="none" fill="none" stroke="#FFFFFF" stroke-width="0.25" stroke-miterlimit="10" x1="57.385" y1="21" x2="57.385" y2="27"/>
+</svg>
diff --git a/demos/mobile/guitartuner/images/inputMode.svg b/demos/mobile/guitartuner/images/inputMode.svg
new file mode 100644
index 0000000000..f95991aff4
--- /dev/null
+++ b/demos/mobile/guitartuner/images/inputMode.svg
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="690.84283"
+ height="597.90881"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="inputMode.svg">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective3604"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3622"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3622-7"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3653"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3653-4"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3653-8"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="220.15692"
+ inkscape:cy="262.65754"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="888"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-9.1421334,-233.17919)">
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path3620"
+ sodipodi:cx="64.649765"
+ sodipodi:cy="472.53461"
+ sodipodi:rx="117.1777"
+ sodipodi:ry="268.70059"
+ d="m 181.82746,472.53461 c 0,148.39924 -52.46224,268.70059 -117.177695,268.70059 -64.71545463,0 -117.177696,-120.30135 -117.177696,-268.70059 0,-148.39924 52.46224137,-268.7006 117.177696,-268.7006 64.715455,0 117.177695,120.30136 117.177695,268.7006 z"
+ transform="matrix(2.8726899,0,0,1.0798196,168.84482,21.881457)" />
+ <g
+ id="g3694"
+ transform="translate(14.702487,2.8571428)">
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path2830"
+ d="m 261.68027,406.82393 36.36549,359.61431 82.97781,0 38.24049,-359.61431"
+ style="fill:none;stroke:#000000;stroke-width:14.10000038;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ transform="translate(-11.060917,113.98119)"
+ d="m 442.4468,276.6803 c 0,49.09448 -41.15572,88.89342 -91.92388,88.89342 -50.76816,0 -91.92388,-39.79894 -91.92388,-88.89342 0,-49.09449 41.15572,-88.89343 91.92388,-88.89343 50.76816,0 91.92388,39.79894 91.92388,88.89343 z"
+ sodipodi:ry="88.893425"
+ sodipodi:rx="91.923882"
+ sodipodi:cy="276.6803"
+ sodipodi:cx="350.52292"
+ id="path2826"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:17.61199951;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ sodipodi:type="arc" />
+ <path
+ id="path3610"
+ d="M 417.09557,336.26145 265.86811,447.10263"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path3610-1"
+ d="M 370.02409,308.17608 244.86468,399.91085"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path3610-4"
+ d="M 266.87874,335.24091 418.10619,446.08209"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path3610-4-9"
+ d="M 306.03234,300.77574 436.914,396.7046"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path3610-4-8"
+ d="m 246.61065,376.5921 132.66972,97.23942"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ id="path3610-4-2"
+ d="M 433.44049,380.0107 304.57747,474.46002"
+ style="fill:none;stroke:#000000;stroke-width:8.15200043;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
diff --git a/demos/mobile/guitartuner/images/note.svg b/demos/mobile/guitartuner/images/note.svg
new file mode 100644
index 0000000000..c1f1771a83
--- /dev/null
+++ b/demos/mobile/guitartuner/images/note.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="690.84283"
+ height="597.90881"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="New document 1">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective3604"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="586.90391"
+ inkscape:cy="224.44944"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="888"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-9.1421334,-233.17919)">
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path3620"
+ sodipodi:cx="64.649765"
+ sodipodi:cy="472.53461"
+ sodipodi:rx="117.1777"
+ sodipodi:ry="268.70059"
+ d="m 181.82746,472.53461 c 0,148.39924 -52.46224,268.70059 -117.177695,268.70059 -64.71545463,0 -117.177696,-120.30135 -117.177696,-268.70059 0,-148.39924 52.46224137,-268.7006 117.177696,-268.7006 64.715455,0 117.177695,120.30136 117.177695,268.7006 z"
+ transform="matrix(2.8726899,0,0,1.0798196,168.84482,21.881457)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 355.87166,686.47203 0,-381.77521"
+ id="path2816"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path2818"
+ sodipodi:cx="284.86301"
+ sodipodi:cy="703.85956"
+ sodipodi:rx="80.812202"
+ sodipodi:ry="83.842659"
+ d="m 365.67521,703.85956 c 0,46.30502 -36.18086,83.84266 -80.8122,83.84266 -44.63135,0 -80.81221,-37.53764 -80.81221,-83.84266 0,-46.30502 36.18086,-83.84266 80.81221,-83.84266 44.63134,0 80.8122,37.53764 80.8122,83.84266 z"
+ transform="matrix(0.86662604,0,0,0.86662604,41.962127,84.107402)" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.49788642;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ d="M 498.23775,478.96203 C 487.43102,436.20815 446.22124,431.4938 416.5823,423.48582 381.21648,411.5191 365.03425,382.76349 358.75673,339.52089 l -2.02761,-36.99987 c 12.76379,33.73415 40.64336,44.6109 67.22015,53.67478 46.38196,11.01541 67.31525,50.25786 74.72373,107.8334 0.48397,6.08567 0.99901,19.27869 0.75259,19.27869 -0.0715,0 -0.60616,-1.95564 -1.1881,-4.34586 l 0,0 2.6e-4,0 z"
+ id="path3618"
+ sodipodi:nodetypes="ccccccsccc" />
+ </g>
+</svg>
diff --git a/demos/mobile/guitartuner/images/noteNo.svg b/demos/mobile/guitartuner/images/noteNo.svg
new file mode 100644
index 0000000000..888d23085d
--- /dev/null
+++ b/demos/mobile/guitartuner/images/noteNo.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="690.84283"
+ height="597.90881"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="noteCrossed.svg">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective3604"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="289.91906"
+ inkscape:cy="224.44944"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="888"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-9.1421334,-233.17919)">
+ <path
+ sodipodi:type="arc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path3620"
+ sodipodi:cx="64.649765"
+ sodipodi:cy="472.53461"
+ sodipodi:rx="117.1777"
+ sodipodi:ry="268.70059"
+ d="m 181.82746,472.53461 c 0,148.39924 -52.46224,268.70059 -117.177695,268.70059 -64.71545463,0 -117.177696,-120.30135 -117.177696,-268.70059 0,-148.39924 52.46224137,-268.7006 117.177696,-268.7006 64.715455,0 117.177695,120.30136 117.177695,268.7006 z"
+ transform="matrix(2.8726899,0,0,1.0798196,168.84482,21.881457)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 355.87166,686.47203 0,-381.77521"
+ id="path2816"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path2818"
+ sodipodi:cx="284.86301"
+ sodipodi:cy="703.85956"
+ sodipodi:rx="80.812202"
+ sodipodi:ry="83.842659"
+ d="m 365.67521,703.85956 c 0,46.30502 -36.18086,83.84266 -80.8122,83.84266 -44.63135,0 -80.81221,-37.53764 -80.81221,-83.84266 0,-46.30502 36.18086,-83.84266 80.81221,-83.84266 44.63134,0 80.8122,37.53764 80.8122,83.84266 z"
+ transform="matrix(0.86662604,0,0,0.86662604,41.962127,84.107402)" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.49788642;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ d="M 498.23775,478.96203 C 487.43102,436.20815 446.22124,431.4938 416.5823,423.48582 381.21648,411.5191 365.03425,382.76349 358.75673,339.52089 l -2.02761,-36.99987 c 12.76379,33.73415 40.64336,44.6109 67.22015,53.67478 46.38196,11.01541 67.31525,50.25786 74.72373,107.8334 0.48397,6.08567 0.99901,19.27869 0.75259,19.27869 -0.0715,0 -0.60616,-1.95564 -1.1881,-4.34586 l 0,0 2.6e-4,0 z"
+ id="path3618"
+ sodipodi:nodetypes="ccccccsccc" />
+ <path
+ style="fill:none;stroke:#ff0000;stroke-width:16;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 176.92972,346.31704 369.5113,373.55192"
+ id="path2817" />
+ </g>
+</svg>
diff --git a/demos/mobile/guitartuner/src/application.qml b/demos/mobile/guitartuner/src/application.qml
new file mode 100644
index 0000000000..7da138d581
--- /dev/null
+++ b/demos/mobile/guitartuner/src/application.qml
@@ -0,0 +1,328 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import "mycomponents"
+
+/* The base canvas for all QML drawing. */
+Rectangle {
+ id: application
+
+ property int targetNoteIndex: 0
+ property alias frequency: noteChooser.currentFrequency
+ //Data provided to C++.
+ property bool isInput: true
+ property bool isMuted: false
+ property bool isAuto: true
+ property alias maxVoiceDifference: voiceDifferenceMeter.maxValue
+ property real volume: 0.5
+ property real sensitivity: 0.5
+
+ //Signals to C++.
+ signal volumeChanged(real volume)
+ signal microphoneSensitivityChanged(real sensitivity)
+ signal targetFrequencyChanged(real frequency)
+ signal modeChanged(bool isInput)
+ signal muteStateChanged(bool isMuted)
+
+ //Slots for signals coming from C++.
+ function voiceDifferenceChanged(difference) {
+ if (isAuto) timer.running = true;
+ voiceDifferenceMeter.valueChanged(difference);
+ noteImage.glowing = false
+ }
+ function correctFrequencyObtained() {
+ noteImage.glowing = true
+ }
+ function lowVoice() {
+ noteImage.glowing = false
+ }
+
+ //Private function for changing the target frequency automatically.
+ function calculateTargetFrequency(difference) {
+ var tempDifference = Math.abs(difference);
+ var tempIndex = targetNoteIndex
+ while (!(difference < 0 && tempIndex == 0) &&
+ tempDifference >= notes.get(tempIndex-(difference<0)).interval/2) {
+ tempDifference -= notes.get(tempIndex-(difference<0)).interval;
+ tempIndex += difference/Math.abs(difference);
+ }
+ if (tempIndex != targetNoteIndex) {
+ targetNoteIndex = tempIndex
+ noteChooser.currentFrequency = notes.get(targetNoteIndex).frequency;
+ targetFrequencyChanged(frequency);
+ }
+ }
+
+ width: 360; height: 640
+ color: "black"
+
+ //Provides data for functions.
+ NotesModel {id: notes}
+
+ /* A timer for changing the target frequency automatically.
+ * This is needed for avoiding recursion. */
+ Timer {
+ id: timer
+
+ interval: 1
+ onTriggered: calculateTargetFrequency(voiceDifferenceMeter.value)
+ }
+
+ //A meter for showing the difference between current and target frequency.
+ Meter {
+ id: voiceDifferenceMeter
+
+ maxValue: 12
+ minValue: -maxValue
+ height: imageSize.height/background.sourceSize.height*parent.height
+ width: imageSize.width/background.sourceSize.width*parent.width
+ anchors {
+ topMargin: 100/background.sourceSize.height*parent.height
+ horizontalCenter: parent.horizontalCenter
+ top: parent.top
+ }
+ }
+
+ Image {
+ id: background
+
+ anchors.fill: parent
+ smooth: true
+ source: "./mycomponents/images/guitartuner_skin.png"
+ }
+
+ //A button for quitting the application.
+ Image {
+ id: quitButton
+
+ width: sourceSize.width/background.sourceSize.width*parent.width
+ height: sourceSize.height/background.sourceSize.height*parent.height
+ source: "./mycomponents/images/power.png"
+ smooth: true
+ KeyNavigation.up: volumeAdjuster
+ KeyNavigation.down: modeButton
+ Keys.onEnterPressed: Qt.quit()
+ anchors{
+ leftMargin: 297/background.sourceSize.width*parent.width
+ left: parent.left;
+ topMargin: 17/background.sourceSize.height*parent.height
+ top: parent.top
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
+
+ //An image for showing the target note.
+ Image {
+ id: noteImage
+
+ property bool glowing: false
+
+ width: sourceSize.width/background.sourceSize.width*parent.width
+ height: sourceSize.height/background.sourceSize.height*parent.height
+ source: glowing ? notes.get(targetNoteIndex).glowSource : notes.get(targetNoteIndex).bigSource
+
+ anchors {
+ topMargin: 273/background.sourceSize.height*parent.height
+ top: parent.top
+ horizontalCenter: parent.horizontalCenter
+ }
+ }
+
+ //A button for choosing the input/output mode.
+ Image {
+ id: modeButton
+
+ function buttonPressed() {
+ isInput = !isInput
+ modeChanged(isInput)
+ if (isInput) {
+ soundIcons.source = "./mycomponents/images/sensitivity.png"
+ source = "./mycomponents/images/voicemode_off.png"
+ volumeAdjuster.setValue(sensitivity)
+ }
+ else {
+ //Change off from "auto" mode
+ if (isAuto) {
+ noteChooser.pushButton(targetNoteIndex)
+ }
+ if (isMuted) {
+ soundIcons.source = "./mycomponents/images/volume_off.png";
+ }
+ else
+ soundIcons.source = "./mycomponents/images/volume.png"
+ source = "./mycomponents/images/voicemode_on.png"
+ volumeAdjuster.setValue(volume)
+ }
+ }
+
+ width: sourceSize.width/background.sourceSize.width*parent.width
+ height: sourceSize.height/background.sourceSize.height*parent.height
+ smooth: true
+ source: "./mycomponents/images/voicemode_off.png"
+ KeyNavigation.up: quitButton
+ KeyNavigation.down: noteChooser
+ Keys.onEnterPressed: buttonPressed()
+ anchors {
+ leftMargin: 16/background.sourceSize.width*parent.width
+ left: parent.left
+ topMargin: 353/background.sourceSize.height*parent.height
+ top: parent.top
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ parent.focus = true
+ parent.scale = 0.95
+ }
+ onReleased: {
+ parent.scale = 1/0.95
+ }
+ onClicked: parent.buttonPressed()
+ }
+ }
+
+ //Buttons for choosing the target note.
+ NoteButtonView {
+ id: noteChooser
+
+ width: parent.width*0.95; height: width/model.count
+ onNoteSelected: {
+ if (note == "Auto") {
+ if (!isAuto) {
+ isAuto = true
+ }
+ if (!isInput) {
+ modeButton.buttonPressed()
+ }
+ }
+ else {
+ timer.running = false;
+ isAuto = false
+ targetNoteIndex = index
+ targetFrequencyChanged(frequency)
+ }
+ focus = true
+ }
+ KeyNavigation.up: modeButton
+ KeyNavigation.down: soundIcons
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ topMargin: 454/background.sourceSize.height*parent.height
+ top: parent.top
+ }
+ }
+
+ //An element for showing the mode and changing the mute state.
+ Image {
+ id: soundIcons
+
+ function stateChanged() {
+ isMuted = !isMuted
+ muteStateChanged(isMuted)
+ if (isMuted) {
+ source = "qrc:/src/mycomponents/images/volume_off.png"
+ }
+ else {
+ source = "qrc:/src/mycomponents/images/volume.png"
+ }
+ }
+
+ width: sourceSize.width/background.sourceSize.width*parent.width
+ height: sourceSize.height/background.sourceSize.height*parent.height
+ smooth: true
+ source: "./mycomponents/images/sensitivity.png"
+ Keys.onEnterPressed: stateChanged()
+ KeyNavigation.up: noteChooser
+ KeyNavigation.down: quitButton
+ KeyNavigation.left: volumeAdjuster
+ KeyNavigation.right: volumeAdjuster
+ anchors {
+ leftMargin: 42/background.sourceSize.width*parent.width
+ left: parent.left
+ topMargin: 565/background.sourceSize.height*parent.height
+ top: parent.top
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (!isInput) {
+ parent.stateChanged()
+ }
+ parent.focus = true
+ }
+ }
+ }
+
+ //An element for adjusting volume.
+ Adjuster {
+ id: volumeAdjuster
+
+ max: 1
+ value: 0.5
+ width: 222/background.sourceSize.width*parent.width
+ height: parent.height*0.1
+ onFocusChangedByClick: focus = true
+ onArrowPressedWhenValueOverLimits: soundIcons.focus = true
+ KeyNavigation.up: modeButton
+ KeyNavigation.down: quitButton
+ anchors {
+ leftMargin: 98/background.sourceSize.width*parent.width
+ left: parent.left
+ verticalCenter: soundIcons.verticalCenter
+ }
+ onValueChanged: {
+ if (isInput) {
+ sensitivity = value;
+ microphoneSensitivityChanged(1-sensitivity)
+ }
+ else {
+ volume = value
+ volumeChanged(volume)
+ }
+ }
+ }
+}
diff --git a/demos/mobile/guitartuner/src/constants.h b/demos/mobile/guitartuner/src/constants.h
new file mode 100644
index 0000000000..c3eddaa973
--- /dev/null
+++ b/demos/mobile/guitartuner/src/constants.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 CONSTANTS_H
+#define CONSTANTS_H
+
+#define M_MAX_AMPLITUDE_8BIT_SIGNED 127
+#define M_MAX_AMPLITUDE_8BIT_UNSIGNED 255
+#define M_MAX_AMPLITUDE_16BIT_SIGNED 32767
+#define M_MAX_AMPLITUDE_16BIT_UNSIGNED 65535
+
+#define M_TWELTH_ROOT_OF_2 1.05946309435930000000
+
+// M_SAMPLE_COUNT_MULTIPLIER is 2/(M_TWELTH_ROOT_OF_2 - 1)
+#define M_SAMPLE_COUNT_MULTIPLIER 33.63430749021150000000
+
+#endif // CONSTANTS_H
diff --git a/demos/mobile/guitartuner/src/fastfouriertransformer.cpp b/demos/mobile/guitartuner/src/fastfouriertransformer.cpp
new file mode 100644
index 0000000000..9158fd4814
--- /dev/null
+++ b/demos/mobile/guitartuner/src/fastfouriertransformer.cpp
@@ -0,0 +1,184 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "fastfouriertransformer.h"
+#include "math.h"
+
+#define STIN inline
+#define __STATIC
+
+#include "fftpack.c"
+
+// called by __ogg_fdrffti
+__STATIC void drfti1(int n, float *wa, int *ifac);
+void __ogg_fdrffti(int n, float *wsave, int *ifac);
+void __ogg_fdcosqi(int n, float *wsave, int *ifac);
+// called by drftf1
+STIN void dradf2(int ido,int l1,float *cc,float *ch,float *wa1);
+// called by drftf1
+STIN void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2,float *wa3);
+// called by drftf1
+STIN void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+ float *c2,float *ch,float *ch2,float *wa);
+// called by drftf1
+STIN void drftf1(int n,float *c,float *ch,float *wa,int *ifac);
+void __ogg_fdrfftf(int n,float *r,float *wsave,int *ifac);
+STIN void dcsqf1(int n,float *x,float *w,float *xh,int *ifac);
+void __ogg_fdcosqf(int n,float *x,float *wsave,int *ifac);
+STIN void dradb2(int ido,int l1,float *cc,float *ch,float *wa1);
+STIN void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2);
+STIN void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2,float *wa3);
+STIN void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+ float *c2,float *ch,float *ch2,float *wa);
+STIN void drftb1(int n, float *c, float *ch, float *wa, int *ifac);
+void __ogg_fdrfftb(int n, float *r, float *wsave, int *ifac);
+STIN void dcsqb1(int n,float *x,float *w,float *xh,int *ifac);
+void __ogg_fdcosqb(int n,float *x,float *wsave,int *ifac);
+
+FastFourierTransformer::FastFourierTransformer(QObject *parent) :
+ QObject(parent),
+ m_waveFloat(0),
+ m_workingArray(0),
+ m_ifac(0),
+ m_last_n(-1)
+{
+}
+
+FastFourierTransformer::~FastFourierTransformer()
+{
+ if (m_waveFloat != 0) {
+ delete [] m_waveFloat;
+ }
+ if (m_workingArray != 0) {
+ delete [] m_workingArray;
+ }
+ if (m_ifac != 0) {
+ delete [] m_ifac;
+ }
+}
+
+/**
+ * Prepares the arrays to be of length n.
+ */
+void FastFourierTransformer::reserve(int n)
+{
+ Q_ASSERT(n>0);
+ if (m_waveFloat != 0) {
+ delete [] m_waveFloat;
+ }
+ if (m_workingArray != 0) {
+ delete [] m_workingArray;
+ }
+ if (m_ifac != 0) {
+ delete [] m_ifac;
+ }
+ m_workingArray = new float[2*n+15];
+ m_waveFloat = new float[n];
+ m_ifac = new int[n];
+ __ogg_fdrffti(n, m_workingArray, m_ifac);
+ m_last_n = n;
+}
+
+/**
+ * Calculates the Fast Fourier Transformation (FFT).
+ */
+void FastFourierTransformer::calculateFFT(QList<qint16> wave)
+{
+ const int n = wave.size();
+ if (m_last_n != n) {
+ reserve(n);
+ }
+ for (int i = 0; i < n; i++) {
+ m_waveFloat[i] = (float) wave.at(i);
+ }
+
+ __ogg_fdrfftf(n, m_waveFloat, m_workingArray, m_ifac);
+
+}
+
+/**
+ * Returns the index which corresponds to the maximum density
+ * of the FFT.
+ */
+int FastFourierTransformer::getMaximumDensityIndex()
+{
+ const int halfN = m_last_n / 2;
+ float maxDensity = 0;
+ int maxDensityIndex = 0;
+ float densitySquared = 0.f;
+ for (int k = 1; k < halfN; k++) {
+ // Here, we calculate the frequency k/N.
+ // k=1, the wave oscillation time is N, and the frequency
+ // is 1/sample.
+ // k=2, the wave oscillation time is N/2, and the frequency
+ // is 2/sample.
+ // k=3, the wave oscillation time is N/3, and the frequency
+ // is 3/sample.
+ // Note, that the documentation is for Fortran, so indexes in the
+ // documentation does not match.
+ // The sine and cosine coefficients are obtained thus as follows:
+ const float cosCoefficient = qAbs(m_waveFloat[2*k-1]);
+ const float sinCoefficient = qAbs(m_waveFloat[2*k]);
+
+ densitySquared = sinCoefficient*sinCoefficient + cosCoefficient*cosCoefficient;
+ if (densitySquared > maxDensity) {
+ maxDensity = densitySquared;
+ maxDensityIndex = k;
+ }
+ }
+
+ if (m_cutOffForDensitySquared < maxDensity) {
+ return maxDensityIndex;
+ }
+ else {
+ return -1;
+ }
+}
+
+/**
+ * Sets the cutoff density.
+ */
+void FastFourierTransformer::setCutOffForDensity(float cutoff)
+{
+ m_cutOffForDensitySquared = cutoff*cutoff;
+}
diff --git a/demos/mobile/guitartuner/src/fastfouriertransformer.h b/demos/mobile/guitartuner/src/fastfouriertransformer.h
new file mode 100644
index 0000000000..d126b4519d
--- /dev/null
+++ b/demos/mobile/guitartuner/src/fastfouriertransformer.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 FASTFOURIERTRANSFORM_H
+#define FASTFOURIERTRANSFORM_H
+
+#include <QObject>
+#include <QList>
+
+class FastFourierTransformer : public QObject
+{
+ Q_OBJECT
+
+public:
+ FastFourierTransformer(QObject *parent = 0);
+ ~FastFourierTransformer();
+ void reserve(int n);
+ void calculateFFT(QList<qint16> wave);
+ int getMaximumDensityIndex();
+ void setCutOffForDensity(float cutoff);
+
+private:
+ float *m_waveFloat;
+ float *m_workingArray;
+ int *m_ifac;
+ int m_last_n;
+ float m_cutOffForDensitySquared;
+};
+
+#endif // FASTFOURIERTRANSFORM_H
diff --git a/demos/mobile/guitartuner/src/fftpack.c b/demos/mobile/guitartuner/src/fftpack.c
new file mode 100644
index 0000000000..24eaa57b7a
--- /dev/null
+++ b/demos/mobile/guitartuner/src/fftpack.c
@@ -0,0 +1,1406 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+/********************************************************************
+
+ The routines in this file are from http://www.netlib.org/fftpack/.
+ According to the comments in the original file (which are provided below)
+ and according to the wikipedia article about the FFTPACK[1],
+ they are released as public domain.
+
+ For information about the author of the original, Fortran routines,
+ and the author of the C translation these routines,
+ see the comments below.
+
+ [1] http://en.wikipedia.org/wiki/FFTPACK, referenced 2010-12-21.
+
+ ********************************************************************/
+
+/********************************************************************
+
+ file: fft.c
+ function: Fast discrete Fourier and cosine transforms and inverses
+ author: Monty <xiphmont@mit.edu>
+ modifications by: Monty
+ last modification date: Jul 1 1996
+
+ ********************************************************************/
+
+/* These Fourier routines were originally based on the Fourier
+ routines of the same names from the NETLIB bihar and fftpack
+ fortran libraries developed by Paul N. Swarztrauber at the National
+ Center for Atmospheric Research in Boulder, CO USA. They have been
+ reimplemented in C and optimized in a few ways for OggSquish. */
+
+/* As the original fortran libraries are public domain, the C Fourier
+ routines in this file are hereby released to the public domain as
+ well. The C routines here produce output exactly equivalent to the
+ original fortran routines. Of particular interest are the facts
+ that (like the original fortran), these routines can work on
+ arbitrary length vectors that need not be powers of two in
+ length. */
+
+#include <math.h>
+
+__STATIC void drfti1(int n, float *wa, int *ifac){
+ static int ntryh[4] = { 4,2,3,5 };
+ static float tpi = 6.28318530717958647692528676655900577;
+ float arg,argh,argld,fi;
+ int ntry=0,i,j=-1;
+ int k1, l1, l2, ib;
+ int ld, ii, ip, is, nq, nr;
+ int ido, ipm, nfm1;
+ int nl=n;
+ int nf=0;
+
+ L101:
+ j++;
+ if (j < 4)
+ ntry=ntryh[j];
+ else
+ ntry+=2;
+
+ L104:
+ nq=nl/ntry;
+ nr=nl-ntry*nq;
+ if (nr!=0) goto L101;
+
+ nf++;
+ ifac[nf+1]=ntry;
+ nl=nq;
+ if (ntry!=2) goto L107;
+ if (nf==1) goto L107;
+
+ for (i=1;i<nf;i++){
+ ib=nf-i+1;
+ ifac[ib+1]=ifac[ib];
+ }
+ ifac[2] = 2;
+
+ L107:
+ if (nl!=1) goto L104;
+ ifac[0]=n;
+ ifac[1]=nf;
+ argh=tpi/n;
+ is=0;
+ nfm1=nf-1;
+ l1=1;
+
+ if (nfm1==0) return;
+
+ for (k1=0;k1<nfm1;k1++){
+ ip=ifac[k1+2];
+ ld=0;
+ l2=l1*ip;
+ ido=n/l2;
+ ipm=ip-1;
+
+ for (j=0;j<ipm;j++){
+ ld+=l1;
+ i=is;
+ argld=(float)ld*argh;
+ fi=0.;
+ for (ii=2;ii<ido;ii+=2){
+ fi+=1.;
+ arg=fi*argld;
+ wa[i++]=cos(arg);
+ wa[i++]=sin(arg);
+ }
+ is+=ido;
+ }
+ l1=l2;
+ }
+}
+
+void __ogg_fdrffti(int n, float *wsave, int *ifac){
+
+ if (n == 1) return;
+ drfti1(n, wsave+n, ifac);
+}
+
+void __ogg_fdcosqi(int n, float *wsave, int *ifac){
+ static float pih = 1.57079632679489661923132169163975;
+ static int k;
+ static float fk, dt;
+
+ dt=pih/n;
+ fk=0.;
+ for (k=0;k<n;k++){
+ fk+=1.;
+ wsave[k] = cos(fk*dt);
+ }
+
+ __ogg_fdrffti(n, wsave+n,ifac);
+}
+
+STIN void dradf2(int ido,int l1,float *cc,float *ch,float *wa1){
+ int i,k;
+ float ti2,tr2;
+ int t0,t1,t2,t3,t4,t5,t6;
+
+ t1=0;
+ t0=(t2=l1*ido);
+ t3=ido<<1;
+ for (k=0;k<l1;k++){
+ ch[t1<<1]=cc[t1]+cc[t2];
+ ch[(t1<<1)+t3-1]=cc[t1]-cc[t2];
+ t1+=ido;
+ t2+=ido;
+ }
+
+ if (ido<2) return;
+ if (ido==2) goto L105;
+
+ t1=0;
+ t2=t0;
+ for (k=0;k<l1;k++){
+ t3=t2;
+ t4=(t1<<1)+(ido<<1);
+ t5=t1;
+ t6=t1+t1;
+ for (i=2;i<ido;i+=2){
+ t3+=2;
+ t4-=2;
+ t5+=2;
+ t6+=2;
+ tr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+ ti2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+ ch[t6]=cc[t5]+ti2;
+ ch[t4]=ti2-cc[t5];
+ ch[t6-1]=cc[t5-1]+tr2;
+ ch[t4-1]=cc[t5-1]-tr2;
+ }
+ t1+=ido;
+ t2+=ido;
+ }
+
+ if (ido%2==1) return;
+
+ L105:
+ t3=(t2=(t1=ido)-1);
+ t2+=t0;
+ for (k=0;k<l1;k++){
+ ch[t1]=-cc[t2];
+ ch[t1-1]=cc[t3];
+ t1+=ido<<1;
+ t2+=ido;
+ t3+=ido;
+ }
+}
+
+STIN void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2,float *wa3){
+ static float hsqt2 = .70710678118654752440084436210485;
+ int i,k,t0,t1,t2,t3,t4,t5,t6;
+ float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+ t0=l1*ido;
+
+ t1=t0;
+ t4=t1<<1;
+ t2=t1+(t1<<1);
+ t3=0;
+
+ for (k=0;k<l1;k++){
+ tr1=cc[t1]+cc[t2];
+ tr2=cc[t3]+cc[t4];
+ ch[t5=t3<<2]=tr1+tr2;
+ ch[(ido<<2)+t5-1]=tr2-tr1;
+ ch[(t5+=(ido<<1))-1]=cc[t3]-cc[t4];
+ ch[t5]=cc[t2]-cc[t1];
+
+ t1+=ido;
+ t2+=ido;
+ t3+=ido;
+ t4+=ido;
+ }
+
+ if (ido<2) return;
+ if (ido==2) goto L105;
+
+ t1=0;
+ for (k=0;k<l1;k++){
+ t2=t1;
+ t4=t1<<2;
+ t5=(t6=ido<<1)+t4;
+ for (i=2;i<ido;i+=2){
+ t3=(t2+=2);
+ t4+=2;
+ t5-=2;
+
+ t3+=t0;
+ cr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+ ci2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+ t3+=t0;
+ cr3=wa2[i-2]*cc[t3-1]+wa2[i-1]*cc[t3];
+ ci3=wa2[i-2]*cc[t3]-wa2[i-1]*cc[t3-1];
+ t3+=t0;
+ cr4=wa3[i-2]*cc[t3-1]+wa3[i-1]*cc[t3];
+ ci4=wa3[i-2]*cc[t3]-wa3[i-1]*cc[t3-1];
+
+ tr1=cr2+cr4;
+ tr4=cr4-cr2;
+ ti1=ci2+ci4;
+ ti4=ci2-ci4;
+ ti2=cc[t2]+ci3;
+ ti3=cc[t2]-ci3;
+ tr2=cc[t2-1]+cr3;
+ tr3=cc[t2-1]-cr3;
+
+
+ ch[t4-1]=tr1+tr2;
+ ch[t4]=ti1+ti2;
+
+ ch[t5-1]=tr3-ti4;
+ ch[t5]=tr4-ti3;
+
+ ch[t4+t6-1]=ti4+tr3;
+ ch[t4+t6]=tr4+ti3;
+
+ ch[t5+t6-1]=tr2-tr1;
+ ch[t5+t6]=ti1-ti2;
+ }
+ t1+=ido;
+ }
+ if (ido%2==1) return;
+
+ L105:
+
+ t2=(t1=t0+ido-1)+(t0<<1);
+ t3=ido<<2;
+ t4=ido;
+ t5=ido<<1;
+ t6=ido;
+
+ for (k=0;k<l1;k++){
+ ti1=-hsqt2*(cc[t1]+cc[t2]);
+ tr1=hsqt2*(cc[t1]-cc[t2]);
+ ch[t4-1]=tr1+cc[t6-1];
+ ch[t4+t5-1]=cc[t6-1]-tr1;
+ ch[t4]=ti1-cc[t1+t0];
+ ch[t4+t5]=ti1+cc[t1+t0];
+ t1+=ido;
+ t2+=ido;
+ t4+=t3;
+ t6+=ido;
+ }
+}
+
+STIN void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+ float *c2,float *ch,float *ch2,float *wa){
+
+ static float tpi=6.28318530717958647692528676655900577;
+ int idij,ipph,i,j,k,l,ic,ik,is;
+ int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+ float dc2,ai1,ai2,ar1,ar2,ds2;
+ int nbd;
+ float dcp,arg,dsp,ar1h,ar2h;
+ int idp2,ipp2;
+
+ arg=tpi/(float)ip;
+ dcp=cos(arg);
+ dsp=sin(arg);
+ ipph=(ip+1)>>1;
+ ipp2=ip;
+ idp2=ido;
+ nbd=(ido-1)>>1;
+ t0=l1*ido;
+ t10=ip*ido;
+
+ if (ido==1) goto L119;
+ for (ik=0;ik<idl1;ik++)ch2[ik]=c2[ik];
+
+ t1=0;
+ for (j=1;j<ip;j++){
+ t1+=t0;
+ t2=t1;
+ for (k=0;k<l1;k++){
+ ch[t2]=c1[t2];
+ t2+=ido;
+ }
+ }
+
+ is=-ido;
+ t1=0;
+ if (nbd>l1){
+ for (j=1;j<ip;j++){
+ t1+=t0;
+ is+=ido;
+ t2= -ido+t1;
+ for (k=0;k<l1;k++){
+ idij=is-1;
+ t2+=ido;
+ t3=t2;
+ for (i=2;i<ido;i+=2){
+ idij+=2;
+ t3+=2;
+ ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+ ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+ }
+ }
+ }
+ }else{
+
+ for (j=1;j<ip;j++){
+ is+=ido;
+ idij=is-1;
+ t1+=t0;
+ t2=t1;
+ for (i=2;i<ido;i+=2){
+ idij+=2;
+ t2+=2;
+ t3=t2;
+ for (k=0;k<l1;k++){
+ ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+ ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+ t3+=ido;
+ }
+ }
+ }
+ }
+
+ t1=0;
+ t2=ipp2*t0;
+ if (nbd<l1){
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ for (i=2;i<ido;i+=2){
+ t3+=2;
+ t4+=2;
+ t5=t3-ido;
+ t6=t4-ido;
+ for (k=0;k<l1;k++){
+ t5+=ido;
+ t6+=ido;
+ c1[t5-1]=ch[t5-1]+ch[t6-1];
+ c1[t6-1]=ch[t5]-ch[t6];
+ c1[t5]=ch[t5]+ch[t6];
+ c1[t6]=ch[t6-1]-ch[t5-1];
+ }
+ }
+ }
+ }else{
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ for (k=0;k<l1;k++){
+ t5=t3;
+ t6=t4;
+ for (i=2;i<ido;i+=2){
+ t5+=2;
+ t6+=2;
+ c1[t5-1]=ch[t5-1]+ch[t6-1];
+ c1[t6-1]=ch[t5]-ch[t6];
+ c1[t5]=ch[t5]+ch[t6];
+ c1[t6]=ch[t6-1]-ch[t5-1];
+ }
+ t3+=ido;
+ t4+=ido;
+ }
+ }
+ }
+
+L119:
+ for (ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+ t1=0;
+ t2=ipp2*idl1;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1-ido;
+ t4=t2-ido;
+ for (k=0;k<l1;k++){
+ t3+=ido;
+ t4+=ido;
+ c1[t3]=ch[t3]+ch[t4];
+ c1[t4]=ch[t4]-ch[t3];
+ }
+ }
+
+ ar1=1.;
+ ai1=0.;
+ t1=0;
+ t2=ipp2*idl1;
+ t3=(ip-1)*idl1;
+ for (l=1;l<ipph;l++){
+ t1+=idl1;
+ t2-=idl1;
+ ar1h=dcp*ar1-dsp*ai1;
+ ai1=dcp*ai1+dsp*ar1;
+ ar1=ar1h;
+ t4=t1;
+ t5=t2;
+ t6=t3;
+ t7=idl1;
+
+ for (ik=0;ik<idl1;ik++){
+ ch2[t4++]=c2[ik]+ar1*c2[t7++];
+ ch2[t5++]=ai1*c2[t6++];
+ }
+
+ dc2=ar1;
+ ds2=ai1;
+ ar2=ar1;
+ ai2=ai1;
+
+ t4=idl1;
+ t5=(ipp2-1)*idl1;
+ for (j=2;j<ipph;j++){
+ t4+=idl1;
+ t5-=idl1;
+
+ ar2h=dc2*ar2-ds2*ai2;
+ ai2=dc2*ai2+ds2*ar2;
+ ar2=ar2h;
+
+ t6=t1;
+ t7=t2;
+ t8=t4;
+ t9=t5;
+ for (ik=0;ik<idl1;ik++){
+ ch2[t6++]+=ar2*c2[t8++];
+ ch2[t7++]+=ai2*c2[t9++];
+ }
+ }
+ }
+
+ t1=0;
+ for (j=1;j<ipph;j++){
+ t1+=idl1;
+ t2=t1;
+ for (ik=0;ik<idl1;ik++)ch2[ik]+=c2[t2++];
+ }
+
+ if (ido<l1) goto L132;
+
+ t1=0;
+ t2=0;
+ for (k=0;k<l1;k++){
+ t3=t1;
+ t4=t2;
+ for (i=0;i<ido;i++)cc[t4++]=ch[t3++];
+ t1+=ido;
+ t2+=t10;
+ }
+
+ goto L135;
+
+ L132:
+ for (i=0;i<ido;i++){
+ t1=i;
+ t2=i;
+ for (k=0;k<l1;k++){
+ cc[t2]=ch[t1];
+ t1+=ido;
+ t2+=t10;
+ }
+ }
+
+ L135:
+ t1=0;
+ t2=ido<<1;
+ t3=0;
+ t4=ipp2*t0;
+ for (j=1;j<ipph;j++){
+
+ t1+=t2;
+ t3+=t0;
+ t4-=t0;
+
+ t5=t1;
+ t6=t3;
+ t7=t4;
+
+ for (k=0;k<l1;k++){
+ cc[t5-1]=ch[t6];
+ cc[t5]=ch[t7];
+ t5+=t10;
+ t6+=ido;
+ t7+=ido;
+ }
+ }
+
+ if (ido==1) return;
+ if (nbd<l1) goto L141;
+
+ t1=-ido;
+ t3=0;
+ t4=0;
+ t5=ipp2*t0;
+ for (j=1;j<ipph;j++){
+ t1+=t2;
+ t3+=t2;
+ t4+=t0;
+ t5-=t0;
+ t6=t1;
+ t7=t3;
+ t8=t4;
+ t9=t5;
+ for (k=0;k<l1;k++){
+ for (i=2;i<ido;i+=2){
+ ic=idp2-i;
+ cc[i+t7-1]=ch[i+t8-1]+ch[i+t9-1];
+ cc[ic+t6-1]=ch[i+t8-1]-ch[i+t9-1];
+ cc[i+t7]=ch[i+t8]+ch[i+t9];
+ cc[ic+t6]=ch[i+t9]-ch[i+t8];
+ }
+ t6+=t10;
+ t7+=t10;
+ t8+=ido;
+ t9+=ido;
+ }
+ }
+ return;
+
+ L141:
+
+ t1=-ido;
+ t3=0;
+ t4=0;
+ t5=ipp2*t0;
+ for (j=1;j<ipph;j++){
+ t1+=t2;
+ t3+=t2;
+ t4+=t0;
+ t5-=t0;
+ for (i=2;i<ido;i+=2){
+ t6=idp2+t1-i;
+ t7=i+t3;
+ t8=i+t4;
+ t9=i+t5;
+ for (k=0;k<l1;k++){
+ cc[t7-1]=ch[t8-1]+ch[t9-1];
+ cc[t6-1]=ch[t8-1]-ch[t9-1];
+ cc[t7]=ch[t8]+ch[t9];
+ cc[t6]=ch[t9]-ch[t8];
+ t6+=t10;
+ t7+=t10;
+ t8+=ido;
+ t9+=ido;
+ }
+ }
+ }
+}
+
+STIN void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
+ int i,k1,l1,l2;
+ int na,kh,nf;
+ int ip,iw,ido,idl1,ix2,ix3;
+
+ nf=ifac[1];
+ na=1;
+ l2=n;
+ iw=n;
+
+ for (k1=0;k1<nf;k1++){
+ kh=nf-k1;
+ ip=ifac[kh+1];
+ l1=l2/ip;
+ ido=n/l2;
+ idl1=ido*l1;
+ iw-=(ip-1)*ido;
+ na=1-na;
+
+ if (ip!=4) goto L102;
+
+ ix2=iw+ido;
+ ix3=ix2+ido;
+ if (na!=0)
+ dradf4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+ else
+ dradf4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+ goto L110;
+
+ L102:
+ if (ip!=2) goto L104;
+ if (na!=0) goto L103;
+
+ dradf2(ido,l1,c,ch,wa+iw-1);
+ goto L110;
+
+ L103:
+ dradf2(ido,l1,ch,c,wa+iw-1);
+ goto L110;
+
+ L104:
+ if (ido==1)na=1-na;
+ if (na!=0) goto L109;
+
+ dradfg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+ na=1;
+ goto L110;
+
+ L109:
+ dradfg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+ na=0;
+
+ L110:
+ l2=l1;
+ }
+
+ if (na==1) return;
+
+ for (i=0;i<n;i++)c[i]=ch[i];
+}
+
+void __ogg_fdrfftf(int n,float *r,float *wsave,int *ifac){
+ if (n==1) return;
+ drftf1(n,r,wsave,wsave+n,ifac);
+}
+
+STIN void dcsqf1(int n,float *x,float *w,float *xh,int *ifac){
+ int modn,i,k,kc;
+ int np2,ns2;
+ float xim1;
+
+ ns2=(n+1)>>1;
+ np2=n;
+
+ kc=np2;
+ for (k=1;k<ns2;k++){
+ kc--;
+ xh[k]=x[k]+x[kc];
+ xh[kc]=x[k]-x[kc];
+ }
+
+ modn=n%2;
+ if (modn==0)xh[ns2]=x[ns2]+x[ns2];
+
+ for (k=1;k<ns2;k++){
+ kc=np2-k;
+ x[k]=w[k-1]*xh[kc]+w[kc-1]*xh[k];
+ x[kc]=w[k-1]*xh[k]-w[kc-1]*xh[kc];
+ }
+
+ if (modn==0)x[ns2]=w[ns2-1]*xh[ns2];
+
+ __ogg_fdrfftf(n,x,xh,ifac);
+
+ for (i=2;i<n;i+=2){
+ xim1=x[i-1]-x[i];
+ x[i]=x[i-1]+x[i];
+ x[i-1]=xim1;
+ }
+}
+
+void __ogg_fdcosqf(int n,float *x,float *wsave,int *ifac){
+ static float sqrt2=1.4142135623730950488016887242097;
+ float tsqx;
+
+ switch (n){
+ case 0:case 1:
+ return;
+ case 2:
+ tsqx=sqrt2*x[1];
+ x[1]=x[0]-tsqx;
+ x[0]+=tsqx;
+ return;
+ default:
+ dcsqf1(n,x,wsave,wsave+n,ifac);
+ return;
+ }
+}
+
+STIN void dradb2(int ido,int l1,float *cc,float *ch,float *wa1){
+ int i,k,t0,t1,t2,t3,t4,t5,t6;
+ float ti2,tr2;
+
+ t0=l1*ido;
+
+ t1=0;
+ t2=0;
+ t3=(ido<<1)-1;
+ for (k=0;k<l1;k++){
+ ch[t1]=cc[t2]+cc[t3+t2];
+ ch[t1+t0]=cc[t2]-cc[t3+t2];
+ t2=(t1+=ido)<<1;
+ }
+
+ if (ido<2) return;
+ if (ido==2) goto L105;
+
+ t1=0;
+ t2=0;
+ for (k=0;k<l1;k++){
+ t3=t1;
+ t5=(t4=t2)+(ido<<1);
+ t6=t0+t1;
+ for (i=2;i<ido;i+=2){
+ t3+=2;
+ t4+=2;
+ t5-=2;
+ t6+=2;
+ ch[t3-1]=cc[t4-1]+cc[t5-1];
+ tr2=cc[t4-1]-cc[t5-1];
+ ch[t3]=cc[t4]-cc[t5];
+ ti2=cc[t4]+cc[t5];
+ ch[t6-1]=wa1[i-2]*tr2-wa1[i-1]*ti2;
+ ch[t6]=wa1[i-2]*ti2+wa1[i-1]*tr2;
+ }
+ t2=(t1+=ido)<<1;
+ }
+
+ if (ido%2==1) return;
+
+L105:
+ t1=ido-1;
+ t2=ido-1;
+ for (k=0;k<l1;k++){
+ ch[t1]=cc[t2]+cc[t2];
+ ch[t1+t0]=-(cc[t2+1]+cc[t2+1]);
+ t1+=ido;
+ t2+=ido<<1;
+ }
+}
+
+STIN void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2){
+ static float taur = -.5;
+ static float taui = .86602540378443864676372317075293618;
+ int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+ float ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2;
+ t0=l1*ido;
+
+ t1=0;
+ t2=t0<<1;
+ t3=ido<<1;
+ t4=ido+(ido<<1);
+ t5=0;
+ for (k=0;k<l1;k++){
+ tr2=cc[t3-1]+cc[t3-1];
+ cr2=cc[t5]+(taur*tr2);
+ ch[t1]=cc[t5]+tr2;
+ ci3=taui*(cc[t3]+cc[t3]);
+ ch[t1+t0]=cr2-ci3;
+ ch[t1+t2]=cr2+ci3;
+ t1+=ido;
+ t3+=t4;
+ t5+=t4;
+ }
+
+ if (ido==1) return;
+
+ t1=0;
+ t3=ido<<1;
+ for (k=0;k<l1;k++){
+ t7=t1+(t1<<1);
+ t6=(t5=t7+t3);
+ t8=t1;
+ t10=(t9=t1+t0)+t0;
+
+ for (i=2;i<ido;i+=2){
+ t5+=2;
+ t6-=2;
+ t7+=2;
+ t8+=2;
+ t9+=2;
+ t10+=2;
+ tr2=cc[t5-1]+cc[t6-1];
+ cr2=cc[t7-1]+(taur*tr2);
+ ch[t8-1]=cc[t7-1]+tr2;
+ ti2=cc[t5]-cc[t6];
+ ci2=cc[t7]+(taur*ti2);
+ ch[t8]=cc[t7]+ti2;
+ cr3=taui*(cc[t5-1]-cc[t6-1]);
+ ci3=taui*(cc[t5]+cc[t6]);
+ dr2=cr2-ci3;
+ dr3=cr2+ci3;
+ di2=ci2+cr3;
+ di3=ci2-cr3;
+ ch[t9-1]=wa1[i-2]*dr2-wa1[i-1]*di2;
+ ch[t9]=wa1[i-2]*di2+wa1[i-1]*dr2;
+ ch[t10-1]=wa2[i-2]*dr3-wa2[i-1]*di3;
+ ch[t10]=wa2[i-2]*di3+wa2[i-1]*dr3;
+ }
+ t1+=ido;
+ }
+}
+
+STIN void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
+ float *wa2,float *wa3){
+ static float sqrt2=1.4142135623730950488016887242097;
+ int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+ float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+ t0=l1*ido;
+
+ t1=0;
+ t2=ido<<2;
+ t3=0;
+ t6=ido<<1;
+ for (k=0;k<l1;k++){
+ t4=t3+t6;
+ t5=t1;
+ tr3=cc[t4-1]+cc[t4-1];
+ tr4=cc[t4]+cc[t4];
+ tr1=cc[t3]-cc[(t4+=t6)-1];
+ tr2=cc[t3]+cc[t4-1];
+ ch[t5]=tr2+tr3;
+ ch[t5+=t0]=tr1-tr4;
+ ch[t5+=t0]=tr2-tr3;
+ ch[t5+=t0]=tr1+tr4;
+ t1+=ido;
+ t3+=t2;
+ }
+
+ if (ido<2) return;
+ if (ido==2) goto L105;
+
+ t1=0;
+ for (k=0;k<l1;k++){
+ t5=(t4=(t3=(t2=t1<<2)+t6))+t6;
+ t7=t1;
+ for (i=2;i<ido;i+=2){
+ t2+=2;
+ t3+=2;
+ t4-=2;
+ t5-=2;
+ t7+=2;
+ ti1=cc[t2]+cc[t5];
+ ti2=cc[t2]-cc[t5];
+ ti3=cc[t3]-cc[t4];
+ tr4=cc[t3]+cc[t4];
+ tr1=cc[t2-1]-cc[t5-1];
+ tr2=cc[t2-1]+cc[t5-1];
+ ti4=cc[t3-1]-cc[t4-1];
+ tr3=cc[t3-1]+cc[t4-1];
+ ch[t7-1]=tr2+tr3;
+ cr3=tr2-tr3;
+ ch[t7]=ti2+ti3;
+ ci3=ti2-ti3;
+ cr2=tr1-tr4;
+ cr4=tr1+tr4;
+ ci2=ti1+ti4;
+ ci4=ti1-ti4;
+
+ ch[(t8=t7+t0)-1]=wa1[i-2]*cr2-wa1[i-1]*ci2;
+ ch[t8]=wa1[i-2]*ci2+wa1[i-1]*cr2;
+ ch[(t8+=t0)-1]=wa2[i-2]*cr3-wa2[i-1]*ci3;
+ ch[t8]=wa2[i-2]*ci3+wa2[i-1]*cr3;
+ ch[(t8+=t0)-1]=wa3[i-2]*cr4-wa3[i-1]*ci4;
+ ch[t8]=wa3[i-2]*ci4+wa3[i-1]*cr4;
+ }
+ t1+=ido;
+ }
+
+ if (ido%2 == 1) return;
+
+ L105:
+
+ t1=ido;
+ t2=ido<<2;
+ t3=ido-1;
+ t4=ido+(ido<<1);
+ for (k=0;k<l1;k++){
+ t5=t3;
+ ti1=cc[t1]+cc[t4];
+ ti2=cc[t4]-cc[t1];
+ tr1=cc[t1-1]-cc[t4-1];
+ tr2=cc[t1-1]+cc[t4-1];
+ ch[t5]=tr2+tr2;
+ ch[t5+=t0]=sqrt2*(tr1-ti1);
+ ch[t5+=t0]=ti2+ti2;
+ ch[t5+=t0]=-sqrt2*(tr1+ti1);
+
+ t3+=ido;
+ t1+=t2;
+ t4+=t2;
+ }
+}
+
+STIN void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+ float *c2,float *ch,float *ch2,float *wa){
+ static float tpi=6.28318530717958647692528676655900577;
+ int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,
+ t11,t12;
+ float dc2,ai1,ai2,ar1,ar2,ds2;
+ int nbd;
+ float dcp,arg,dsp,ar1h,ar2h;
+ int ipp2;
+
+ t10=ip*ido;
+ t0=l1*ido;
+ arg=tpi/(float)ip;
+ dcp=cos(arg);
+ dsp=sin(arg);
+ nbd=(ido-1)>>1;
+ ipp2=ip;
+ ipph=(ip+1)>>1;
+ if (ido<l1) goto L103;
+
+ t1=0;
+ t2=0;
+ for (k=0;k<l1;k++){
+ t3=t1;
+ t4=t2;
+ for (i=0;i<ido;i++){
+ ch[t3]=cc[t4];
+ t3++;
+ t4++;
+ }
+ t1+=ido;
+ t2+=t10;
+ }
+ goto L106;
+
+ L103:
+ t1=0;
+ for (i=0;i<ido;i++){
+ t2=t1;
+ t3=t1;
+ for (k=0;k<l1;k++){
+ ch[t2]=cc[t3];
+ t2+=ido;
+ t3+=t10;
+ }
+ t1++;
+ }
+
+ L106:
+ t1=0;
+ t2=ipp2*t0;
+ t7=(t5=ido<<1);
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ t6=t5;
+ for (k=0;k<l1;k++){
+ ch[t3]=cc[t6-1]+cc[t6-1];
+ ch[t4]=cc[t6]+cc[t6];
+ t3+=ido;
+ t4+=ido;
+ t6+=t10;
+ }
+ t5+=t7;
+ }
+
+ if (ido == 1) goto L116;
+ if (nbd<l1) goto L112;
+
+ t1=0;
+ t2=ipp2*t0;
+ t7=0;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+
+ t7+=(ido<<1);
+ t8=t7;
+ for (k=0;k<l1;k++){
+ t5=t3;
+ t6=t4;
+ t9=t8;
+ t11=t8;
+ for (i=2;i<ido;i+=2){
+ t5+=2;
+ t6+=2;
+ t9+=2;
+ t11-=2;
+ ch[t5-1]=cc[t9-1]+cc[t11-1];
+ ch[t6-1]=cc[t9-1]-cc[t11-1];
+ ch[t5]=cc[t9]-cc[t11];
+ ch[t6]=cc[t9]+cc[t11];
+ }
+ t3+=ido;
+ t4+=ido;
+ t8+=t10;
+ }
+ }
+ goto L116;
+
+ L112:
+ t1=0;
+ t2=ipp2*t0;
+ t7=0;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ t7+=(ido<<1);
+ t8=t7;
+ t9=t7;
+ for (i=2;i<ido;i+=2){
+ t3+=2;
+ t4+=2;
+ t8+=2;
+ t9-=2;
+ t5=t3;
+ t6=t4;
+ t11=t8;
+ t12=t9;
+ for (k=0;k<l1;k++){
+ ch[t5-1]=cc[t11-1]+cc[t12-1];
+ ch[t6-1]=cc[t11-1]-cc[t12-1];
+ ch[t5]=cc[t11]-cc[t12];
+ ch[t6]=cc[t11]+cc[t12];
+ t5+=ido;
+ t6+=ido;
+ t11+=t10;
+ t12+=t10;
+ }
+ }
+ }
+
+L116:
+ ar1=1.;
+ ai1=0.;
+ t1=0;
+ t9=(t2=ipp2*idl1);
+ t3=(ip-1)*idl1;
+ for (l=1;l<ipph;l++){
+ t1+=idl1;
+ t2-=idl1;
+
+ ar1h=dcp*ar1-dsp*ai1;
+ ai1=dcp*ai1+dsp*ar1;
+ ar1=ar1h;
+ t4=t1;
+ t5=t2;
+ t6=0;
+ t7=idl1;
+ t8=t3;
+ for (ik=0;ik<idl1;ik++){
+ c2[t4++]=ch2[t6++]+ar1*ch2[t7++];
+ c2[t5++]=ai1*ch2[t8++];
+ }
+ dc2=ar1;
+ ds2=ai1;
+ ar2=ar1;
+ ai2=ai1;
+
+ t6=idl1;
+ t7=t9-idl1;
+ for (j=2;j<ipph;j++){
+ t6+=idl1;
+ t7-=idl1;
+ ar2h=dc2*ar2-ds2*ai2;
+ ai2=dc2*ai2+ds2*ar2;
+ ar2=ar2h;
+ t4=t1;
+ t5=t2;
+ t11=t6;
+ t12=t7;
+ for (ik=0;ik<idl1;ik++){
+ c2[t4++]+=ar2*ch2[t11++];
+ c2[t5++]+=ai2*ch2[t12++];
+ }
+ }
+ }
+
+ t1=0;
+ for (j=1;j<ipph;j++){
+ t1+=idl1;
+ t2=t1;
+ for (ik=0;ik<idl1;ik++)ch2[ik]+=ch2[t2++];
+ }
+
+ t1=0;
+ t2=ipp2*t0;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ for (k=0;k<l1;k++){
+ ch[t3]=c1[t3]-c1[t4];
+ ch[t4]=c1[t3]+c1[t4];
+ t3+=ido;
+ t4+=ido;
+ }
+ }
+
+ if (ido==1) goto L132;
+ if (nbd<l1) goto L128;
+
+ t1=0;
+ t2=ipp2*t0;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ for (k=0;k<l1;k++){
+ t5=t3;
+ t6=t4;
+ for (i=2;i<ido;i+=2){
+ t5+=2;
+ t6+=2;
+ ch[t5-1]=c1[t5-1]-c1[t6];
+ ch[t6-1]=c1[t5-1]+c1[t6];
+ ch[t5]=c1[t5]+c1[t6-1];
+ ch[t6]=c1[t5]-c1[t6-1];
+ }
+ t3+=ido;
+ t4+=ido;
+ }
+ }
+ goto L132;
+
+ L128:
+ t1=0;
+ t2=ipp2*t0;
+ for (j=1;j<ipph;j++){
+ t1+=t0;
+ t2-=t0;
+ t3=t1;
+ t4=t2;
+ for (i=2;i<ido;i+=2){
+ t3+=2;
+ t4+=2;
+ t5=t3;
+ t6=t4;
+ for (k=0;k<l1;k++){
+ ch[t5-1]=c1[t5-1]-c1[t6];
+ ch[t6-1]=c1[t5-1]+c1[t6];
+ ch[t5]=c1[t5]+c1[t6-1];
+ ch[t6]=c1[t5]-c1[t6-1];
+ t5+=ido;
+ t6+=ido;
+ }
+ }
+ }
+
+L132:
+ if (ido==1) return;
+
+ for (ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+ t1=0;
+ for (j=1;j<ip;j++){
+ t2=(t1+=t0);
+ for (k=0;k<l1;k++){
+ c1[t2]=ch[t2];
+ t2+=ido;
+ }
+ }
+
+ if (nbd>l1) goto L139;
+
+ is= -ido-1;
+ t1=0;
+ for (j=1;j<ip;j++){
+ is+=ido;
+ t1+=t0;
+ idij=is;
+ t2=t1;
+ for (i=2;i<ido;i+=2){
+ t2+=2;
+ idij+=2;
+ t3=t2;
+ for (k=0;k<l1;k++){
+ c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+ c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+ t3+=ido;
+ }
+ }
+ }
+ return;
+
+ L139:
+ is= -ido-1;
+ t1=0;
+ for (j=1;j<ip;j++){
+ is+=ido;
+ t1+=t0;
+ t2=t1;
+ for (k=0;k<l1;k++){
+ idij=is;
+ t3=t2;
+ for (i=2;i<ido;i+=2){
+ idij+=2;
+ t3+=2;
+ c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+ c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+ }
+ t2+=ido;
+ }
+ }
+}
+
+STIN void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
+ int i,k1,l1,l2;
+ int na;
+ int nf,ip,iw,ix2,ix3,ido,idl1;
+
+ nf=ifac[1];
+ na=0;
+ l1=1;
+ iw=1;
+
+ for (k1=0;k1<nf;k1++){
+ ip=ifac[k1 + 2];
+ l2=ip*l1;
+ ido=n/l2;
+ idl1=ido*l1;
+ if (ip!=4) goto L103;
+ ix2=iw+ido;
+ ix3=ix2+ido;
+
+ if (na!=0)
+ dradb4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+ else
+ dradb4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+ na=1-na;
+ goto L115;
+
+ L103:
+ if (ip!=2) goto L106;
+
+ if (na!=0)
+ dradb2(ido,l1,ch,c,wa+iw-1);
+ else
+ dradb2(ido,l1,c,ch,wa+iw-1);
+ na=1-na;
+ goto L115;
+
+ L106:
+ if (ip!=3) goto L109;
+
+ ix2=iw+ido;
+ if (na!=0)
+ dradb3(ido,l1,ch,c,wa+iw-1,wa+ix2-1);
+ else
+ dradb3(ido,l1,c,ch,wa+iw-1,wa+ix2-1);
+ na=1-na;
+ goto L115;
+
+ L109:
+/* The radix five case can be translated later..... */
+/* if (ip!=5) goto L112;
+
+ ix2=iw+ido;
+ ix3=ix2+ido;
+ ix4=ix3+ido;
+ if (na!=0)
+ dradb5(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+ else
+ dradb5(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+ na=1-na;
+ goto L115;
+
+ L112:*/
+ if (na!=0)
+ dradbg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+ else
+ dradbg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+ if (ido==1)na=1-na;
+
+ L115:
+ l1=l2;
+ iw+=(ip-1)*ido;
+ }
+
+ if (na==0) return;
+
+ for (i=0;i<n;i++)c[i]=ch[i];
+}
+
+void __ogg_fdrfftb(int n, float *r, float *wsave, int *ifac){
+ if (n == 1) return;
+ drftb1(n, r, wsave, wsave+n, ifac);
+}
+
+STIN void dcsqb1(int n,float *x,float *w,float *xh,int *ifac){
+ int modn,i,k,kc;
+ int np2,ns2;
+ float xim1;
+
+ ns2=(n+1)>>1;
+ np2=n;
+
+ for (i=2;i<n;i+=2){
+ xim1=x[i-1]+x[i];
+ x[i]-=x[i-1];
+ x[i-1]=xim1;
+ }
+
+ x[0]+=x[0];
+ modn=n%2;
+ if (modn==0)x[n-1]+=x[n-1];
+
+ __ogg_fdrfftb(n,x,xh,ifac);
+
+ kc=np2;
+ for (k=1;k<ns2;k++){
+ kc--;
+ xh[k]=w[k-1]*x[kc]+w[kc-1]*x[k];
+ xh[kc]=w[k-1]*x[k]-w[kc-1]*x[kc];
+ }
+
+ if (modn==0)x[ns2]=w[ns2-1]*(x[ns2]+x[ns2]);
+
+ kc=np2;
+ for (k=1;k<ns2;k++){
+ kc--;
+ x[k]=xh[k]+xh[kc];
+ x[kc]=xh[k]-xh[kc];
+ }
+ x[0]+=x[0];
+}
+
+void __ogg_fdcosqb(int n,float *x,float *wsave,int *ifac){
+ static float tsqrt2 = 2.8284271247461900976033774484194;
+ float x1;
+
+ if (n<2){
+ x[0]*=4;
+ return;
+ }
+ if (n==2){
+ x1=(x[0]+x[1])*4;
+ x[1]=tsqrt2*(x[0]-x[1]);
+ x[0]=x1;
+ return;
+ }
+
+ dcsqb1(n,x,wsave,wsave+n,ifac);
+}
+
+
+
diff --git a/demos/mobile/guitartuner/src/guitartuner.cpp b/demos/mobile/guitartuner/src/guitartuner.cpp
new file mode 100644
index 0000000000..1750e6a5d1
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartuner.cpp
@@ -0,0 +1,359 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "guitartuner.h"
+
+#ifdef Q_OS_SYMBIAN
+#include <SoundDevice.h>
+#endif // Q_OS_SYMBIAN
+
+#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
+#include <eikenv.h>
+#include <eikappui.h>
+#include <aknenv.h>
+#include <aknappui.h>
+#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
+
+GuitarTuner::GuitarTuner(QWidget *parent) :
+ QMainWindow(parent)
+{
+
+ // Set up the QML.
+ m_guitarTunerUI = new QDeclarativeView(QUrl("qrc:/src/application.qml"), this);
+ setCentralWidget(m_guitarTunerUI);
+ m_guitarTunerUI->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ qmlObject = m_guitarTunerUI->rootObject();
+
+ // Init audio output and input.
+ initAudioOutput();
+ initAudioInput();
+
+ // Connect the quit signal of m_guitarTunerUI
+ // into the close slot of this.
+ connect(m_guitarTunerUI->engine(), SIGNAL(quit()), SLOT(close()));
+
+ // Connect the signals from qmlObject into proper slots
+ // of this and m_voicegenerator.
+ connect(qmlObject, SIGNAL(muteStateChanged(bool)),
+ SLOT(muteStateChanged(bool)));
+ connect(qmlObject, SIGNAL(volumeChanged(qreal)),
+ m_voicegenerator, SLOT(setAmplitude(qreal)));
+ connect(qmlObject, SIGNAL(volumeChanged(qreal)),
+ SLOT(setMaxVolumeLevel(qreal)));
+
+ // Connect the modeChanged signal from qmlObject
+ // into modeChanged slot of this class.
+ connect(qmlObject, SIGNAL(modeChanged(bool)),
+ SLOT(modeChanged(bool)));
+
+ // Connect the microphoneSensitivityChanged signal from
+ // m_guitarTunerUI into setCutOffPercentage slot of m_analyzer class.
+ connect(qmlObject, SIGNAL(microphoneSensitivityChanged(qreal)),
+ m_analyzer, SLOT(setCutOffPercentage(qreal)));
+
+ // Connect the signals from m_analyzer into slots of qmlObject.
+ connect(m_analyzer, SIGNAL(lowVoice()),
+ qmlObject, SLOT(lowVoice()));
+ connect(m_analyzer, SIGNAL(correctFrequency()),
+ qmlObject, SLOT(correctFrequencyObtained()));
+ connect(m_analyzer, SIGNAL(voiceDifference(QVariant)),
+ qmlObject, SLOT(voiceDifferenceChanged(QVariant)));
+
+ // Initialise the MaximumVoiceDifference
+ // value of qmlObject with the value obtained from m_analyzer.
+ qmlObject->setProperty("maxVoiceDifference",
+ m_analyzer->getMaximumVoiceDifference());
+
+ // Connect the targetFrequencyChanged signal of qmlObject
+ // into targetFrequencyChanged slot of this class.
+ connect(qmlObject, SIGNAL(targetFrequencyChanged(qreal)),
+ SLOT(targetFrequencyChanged(qreal)));
+
+ // Start voice output or input by using the modeChanged function,
+ // depending of the current mode.
+ modeChanged(qmlObject->property("isInput").toBool());
+
+}
+
+/**
+ * Inits audio output.
+ */
+void GuitarTuner::initAudioOutput()
+{
+ // Set up the output format.
+ m_format_output.setFrequency(DataFrequencyHzOutput);
+ m_format_output.setCodec("audio/pcm");
+ m_format_output.setSampleSize(16);
+ m_format_output.setChannels(1);
+ m_format_output.setByteOrder(QAudioFormat::LittleEndian);
+ m_format_output.setSampleType(QAudioFormat::SignedInt);
+
+ // Obtain a default output device, and if the format is not
+ // supported, find the nearest format available.
+ QAudioDeviceInfo outputDeviceInfo(
+ QAudioDeviceInfo::defaultOutputDevice());
+ if (!outputDeviceInfo.isFormatSupported(m_format_output)) {
+ m_format_output = outputDeviceInfo.nearestFormat(m_format_output);
+ }
+
+ // Create new QAudioOutput and VoiceGenerator instances, and store
+ // them in m_audioOutput and m_voicegenerator, respectively.
+ m_audioOutput = new QAudioOutput(outputDeviceInfo,
+ m_format_output, this);
+ m_voicegenerator = new VoiceGenerator(m_format_output,
+ qmlObject->property("frequency").toReal(),
+ qmlObject->property("volume").toReal(),
+ this);
+
+ // Connect m_audioOutput stateChanged signal to outputStateChanged.
+ connect(m_audioOutput, SIGNAL(stateChanged(QAudio::State)),
+ SLOT(outputStateChanged(QAudio::State)));
+}
+
+/**
+ * Inits audio input.
+ */
+void GuitarTuner::initAudioInput()
+{
+ // Set up the input format.
+ m_format_input.setFrequency(DataFrequencyHzInput);
+ m_format_input.setCodec("audio/pcm");
+ m_format_input.setSampleSize(16);
+ m_format_input.setChannels(1);
+ m_format_input.setByteOrder(QAudioFormat::LittleEndian);
+ m_format_input.setSampleType(QAudioFormat::SignedInt);
+
+ // Obtain a default input device, and if the format is not
+ // supported, find the nearest format available.
+ QAudioDeviceInfo inputDeviceInfo(
+ QAudioDeviceInfo::defaultInputDevice());
+ if (!inputDeviceInfo.isFormatSupported(m_format_input)) {
+ m_format_input = inputDeviceInfo.nearestFormat(m_format_input);
+ }
+
+ // Create new QAudioInput and VoiceAnalyzer instances, and store
+ // them in m_audioInput and m_analyzer, respectively.
+ // Remember to set the cut-off percentage for voice analyzer.
+ m_audioInput = new QAudioInput(inputDeviceInfo, m_format_input, this);
+ m_analyzer = new VoiceAnalyzer(m_format_input, this);
+ m_analyzer->setCutOffPercentage(qmlObject->property("sensitivity").toReal());
+
+}
+
+/**
+ * Receives a mode changed signal.
+ */
+void GuitarTuner::modeChanged(bool isInput)
+{
+
+
+
+ // If the mode must be changed to input mode:
+ if (isInput) {
+
+ // Stop audio output and audio generator.
+ m_audioOutput->stop();
+ m_voicegenerator->stop();
+ // Start the audio analyzer and then the audio input.
+ m_analyzer->start(qmlObject->property("frequency").toReal());
+ m_audioInput->start(m_analyzer);
+
+ }
+ // Else:
+ else {
+
+ // Stop audio input and audio analyzer.
+ m_audioInput->stop();
+ m_analyzer->stop();
+
+ // Set up the audio output.
+
+ // If the current frequency of voice generator
+ // is not the same as the target frequency selected in the UI,
+ // update voice generator's frequency.
+ if (m_voicegenerator->frequency() != qmlObject->property("frequency").toReal()) {
+ m_voicegenerator->setFrequency(qmlObject->property("frequency").toReal());
+ }
+
+ // Start the voice generator and then the audio output.
+ m_voicegenerator->start();
+ m_audioOutput->start(m_voicegenerator);
+ // Call setMaxVolumeLevel(1) to set the maximum volume louder.
+ setMaxVolumeLevel(qmlObject->property("volume").toReal());
+
+ // If the voice is muted, the voice is suspended
+ // in the outputStateChanged slot.
+
+ }
+}
+
+/**
+ * Receives a output state changed signal.
+ * Suspends the audio output, if the state is ActiveState
+ * and the voice is muted.
+ */
+void GuitarTuner::outputStateChanged(QAudio::State state)
+{
+ if (QAudio::ActiveState == state && qmlObject->property("isMuted").toBool()) {
+ // If the voice is muted, suspend the voice.
+ m_audioOutput->suspend();
+ }
+}
+
+/**
+ * Receives a mute state changed signal.
+ * Suspends the audio output or resumes it, depending of the
+ * isMuted parameter.
+ */
+void GuitarTuner::muteStateChanged(bool isMuted)
+{
+ if (isMuted) {
+ m_audioOutput->suspend();
+ }
+ else {
+ m_audioOutput->resume();
+ }
+}
+
+/**
+ * Receives a target frequency signal.
+ */
+void GuitarTuner::targetFrequencyChanged(qreal targetFrequency)
+{
+ // If the output mode is active:
+ if (!qmlObject->property("isInput").toBool()) {
+ // Stop the audio output and voice generator.
+ m_audioOutput->stop();
+ m_voicegenerator->stop();
+ // Set the voice generator's frequency to the target frequency.
+ m_voicegenerator->setFrequency(targetFrequency);
+ // Start the voice generator and audio output.
+ m_voicegenerator->start();
+ m_audioOutput->start(m_voicegenerator);
+ // Call setMaxVolumeLevel(1) to set the maximum volume louder.
+ setMaxVolumeLevel(qmlObject->property("volume").toReal());
+
+ // If the voice is muted, the voice is suspended
+ // in the outputStateChanged slot.
+
+ }
+ // Else:
+ else {
+
+ // Stop the audio input and voice analyzer.
+ m_audioInput->stop();
+ m_analyzer->stop();
+ // Start the voice analyzer with new frequency and audio input.
+ m_analyzer->start(targetFrequency);
+ m_audioInput->start(m_analyzer);
+
+ }
+}
+
+/**
+ * This method provides a hack to set the maximum volume level in
+ * Symbian.
+ */
+void GuitarTuner::setMaxVolumeLevel(qreal percent)
+{
+ if (percent >= 1.0) {
+ percent = 1.0;
+ }
+ else if (percent <= 0.0) {
+ percent = 0.0;
+ }
+ percent = percent*0.5 + 0.5;
+ // Warning! This is a hack, which can break when the QtMobility
+ // changes. Use at your own risk.
+#ifdef Q_OS_SYMBIAN
+ unsigned int *pointer_to_abstract_audio
+ = (unsigned int*)( (unsigned char*)m_audioOutput + 8 );
+ unsigned int *dev_sound_wrapper
+ = (unsigned int*)(*pointer_to_abstract_audio) + 16;
+ unsigned int *temp
+ = ((unsigned int*)(*dev_sound_wrapper) + 6);
+ CMMFDevSound *dev_sound = (CMMFDevSound*)(*temp);
+ dev_sound->SetVolume((unsigned int)
+ (percent*(float)dev_sound->MaxVolume()));
+#endif
+}
+
+/**
+ * A function used to lock the orientation.
+ */
+void GuitarTuner::setOrientation(Orientation orientation)
+{
+#ifdef Q_OS_SYMBIAN
+ if (orientation != Auto) {
+#if defined(ORIENTATIONLOCK)
+ const CAknAppUiBase::TAppUiOrientation uiOrientation =
+ (orientation == LockPortrait)
+ ? CAknAppUi::EAppUiOrientationPortrait
+ : CAknAppUi::EAppUiOrientationLandscape;
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*>
+ (CEikonEnv::Static()->AppUi());
+ TRAPD(error,
+ if (appUi)
+ appUi->SetOrientationL(uiOrientation);
+ );
+#else // ORIENTATIONLOCK
+ qWarning(QString("'ORIENTATIONLOCK' needs to be defined on")
+ +QString(" Symbian when locking the orientation."));
+#endif // ORIENTATIONLOCK
+ }
+#elif defined(Q_WS_MAEMO_5)
+ Qt::WidgetAttribute attribute;
+ switch (orientation) {
+ case LockPortrait:
+ attribute = Qt::WA_Maemo5PortraitOrientation;
+ break;
+ case LockLandscape:
+ attribute = Qt::WA_Maemo5LandscapeOrientation;
+ break;
+ case Auto:
+ default:
+ attribute = Qt::WA_Maemo5AutoOrientation;
+ break;
+ }
+ setAttribute(attribute, true);
+#else // Q_OS_SYMBIAN
+ Q_UNUSED(orientation);
+#endif // Q_OS_SYMBIAN
+}
diff --git a/demos/mobile/guitartuner/src/guitartuner.h b/demos/mobile/guitartuner/src/guitartuner.h
new file mode 100644
index 0000000000..aa3e9f8009
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartuner.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QtDeclarative>
+#include <QAudioDeviceInfo>
+#include <QAudioOutput>
+#include <QAudioInput>
+#include "voicegenerator.h"
+#include "voiceanalyzer.h"
+
+const int DataFrequencyHzOutput = 44100;
+const int DataFrequencyHzInput = 48000;
+
+#define MAX_INPUT_VALUE 50
+#define MIN_INPUT_VALUE -50
+
+class GuitarTuner : public QMainWindow
+{
+ Q_OBJECT
+public:
+ enum Orientation {
+ LockPortrait,
+ LockLandscape,
+ Auto
+ };
+ explicit GuitarTuner(QWidget *parent = 0);
+ qreal getVolume();
+ qreal getMicrophoneSensitivity();
+ bool getMuteState();
+ void setOrientation(Orientation orientation);
+
+signals:
+
+public slots:
+ void modeChanged(bool isInput);
+ void muteStateChanged(bool isMuted);
+ void targetFrequencyChanged(qreal targetFrequency);
+ void outputStateChanged(QAudio::State state);
+ void setMaxVolumeLevel(qreal);
+
+private:
+ void initAudioOutput();
+ void initAudioInput();
+ VoiceGenerator *m_voicegenerator;
+ VoiceAnalyzer *m_analyzer;
+ QObject *qmlObject;
+ QAudioOutput *m_audioOutput;
+ QAudioInput *m_audioInput;
+ QAudioFormat m_format_output;
+ QAudioFormat m_format_input;
+ QDeclarativeView *m_guitarTunerUI;
+};
+
+#endif // MAINWINDOW_H
diff --git a/demos/mobile/guitartuner/src/guitartuner.rc b/demos/mobile/guitartuner/src/guitartuner.rc
new file mode 100644
index 0000000000..85cee0b93c
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartuner.rc
@@ -0,0 +1,23 @@
+IDI_ICON1 ICON DISCARDABLE "/../images/guitartuner_icon.ico"
+
+1 VERSIONINFO
+FILEVERSION 1,2,0,0
+PRODUCTVERSION 1,2,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation\0"
+ VALUE "FileDescription", "Qt Quick example application.\0"
+ VALUE "FileVersion", "1.2.0\0"
+ VALUE "LegalCopyright", "Copyright 2011 Nokia Corporation. All rights reserved.\0"
+ VALUE "ProductName", "Guitar Tuner\0"
+ VALUE "ProductVersion", "1.2.0\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END \ No newline at end of file
diff --git a/demos/mobile/guitartuner/src/guitartuner.ui b/demos/mobile/guitartuner/src/guitartuner.ui
new file mode 100644
index 0000000000..36ee1bd8e8
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartuner.ui
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>GuitarTuner</class>
+ <widget class="QWidget" name="GuitarTuner">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>187</width>
+ <height>279</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>GuitarTuner</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="tabulatorIcon">
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../guitartuner.qrc">:/images/guitartab.svg</pixmap>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="correctSoundSlider">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="minimum">
+ <number>-50</number>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ <property name="tickInterval">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QToolButton" name="buttonPrev">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="arrowType">
+ <enum>Qt::LeftArrow</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="noteLabel">
+ <property name="text">
+ <string>A</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonNext">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="autoRaise">
+ <bool>false</bool>
+ </property>
+ <property name="arrowType">
+ <enum>Qt::RightArrow</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="modeButton">
+ <property name="text">
+ <string>Change mode</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QSlider" name="soundSlider">
+ <property name="value">
+ <number>65</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="soundButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../guitartuner.qrc">
+ <normaloff>:/images/note.svg</normaloff>
+ <normalon>:/images/noteNo.svg</normalon>
+ <activeon>:/images/noteNo.svg</activeon>:/images/note.svg</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>30</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="micSensitivityLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>microphone
+sensitivity</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources>
+ <include location="../guitartuner.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/demos/mobile/guitartuner/src/guitartunerui.cpp b/demos/mobile/guitartuner/src/guitartunerui.cpp
new file mode 100644
index 0000000000..9d59d7cd55
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartunerui.cpp
@@ -0,0 +1,341 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <QTimer>
+
+#include "guitartunerui.h"
+#include "ui_guitartunerui.h"
+
+GuitarTunerUI::GuitarTunerUI(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::GuitarTunerUI),
+ m_maximumPrecision(0)
+{
+ ui->setupUi(this);
+
+ // Set up the class attributes to proper values.
+ m_outputActive = false;
+ m_muted = false;
+ m_outputVolumeLevel = getVolumeFromSoundSlider();
+ m_inputVolumeLevel = 1.0 - m_outputVolumeLevel;
+
+ // Set up the current tone, the frequency, and the name for it.
+ m_currentToneIndex = 5;
+ updateFrequencyByToneIndex(m_currentToneIndex);
+
+ // Connect the signals from UI into proper slots.
+ connect(ui->soundSlider, SIGNAL(valueChanged(int)),
+ SLOT(changeVolume()));
+ connect(ui->soundButton, SIGNAL(toggled(bool)),
+ SLOT(toggleSound(bool)));
+ connect(ui->modeButton, SIGNAL(clicked()),
+ SLOT(toggleInputOrOutput()));
+ connect(ui->buttonNext, SIGNAL(clicked()), SLOT(next()));
+ connect(ui->buttonPrev, SIGNAL(clicked()), SLOT(prev()));
+
+ // Initialise up the UI by calling toggleInputOrOutput
+ // for the first time.
+ toggleInputOrOutput();
+}
+
+GuitarTunerUI::~GuitarTunerUI()
+{
+ delete ui;
+}
+
+void GuitarTunerUI::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Returns a value from 0 to 1, representing the volume.
+ */
+qreal GuitarTunerUI::getVolumeFromSoundSlider() const
+{
+ qreal value = ui->soundSlider->value();
+ return value/ui->soundSlider->maximum();
+}
+
+/**
+ * Updates the m_currentToneFrequency and m_currentToneString,
+ * according to the given index. Also updates the UI.
+ */
+void GuitarTunerUI::updateFrequencyByToneIndex(int index)
+{
+
+ switch (index) {
+ case 0: {
+ m_currentToneFrequency = FrequencyE;
+ m_currentToneString = "E";
+ break;
+ }
+ case 1: {
+ m_currentToneFrequency = FrequencyA;
+ m_currentToneString = "A";
+ break;
+ }
+ case 2: {
+ m_currentToneFrequency = FrequencyD;
+ m_currentToneString = "D";
+ break;
+ }
+ case 3: {
+ m_currentToneFrequency = FrequencyG;
+ m_currentToneString = "G";
+ break;
+ }
+ case 4: {
+ m_currentToneFrequency = FrequencyB;
+ m_currentToneString = "B";
+ break;
+ }
+ case 5: {
+ m_currentToneFrequency = FrequencyE2;
+ m_currentToneString = "e";
+ break;
+ }
+ default: {
+ qDebug() << "invalid index!" << index;
+ }
+ }
+ // Set the noteLabel text according to the current tone.
+ ui->noteLabel->setText(m_currentToneString);
+}
+
+/**
+ * Returns the volume.
+ */
+qreal GuitarTunerUI::getVolume() const
+{
+ return m_outputVolumeLevel;
+}
+
+/**
+ * Returns true if the sound is muted.
+ */
+bool GuitarTunerUI::getMuteState() const
+{
+ return m_muted;
+}
+
+
+/**
+ * Returns the microphone sensitivity.
+ */
+qreal GuitarTunerUI::getMicrophoneSensitivity() const
+{
+ return m_inputVolumeLevel;
+}
+
+/**
+ * Returns whether the input mode is active.
+ */
+bool GuitarTunerUI::isInputModeActive() const
+{
+ return !m_outputActive;
+}
+
+/**
+ * Returns the current target frequency.
+ */
+qreal GuitarTunerUI::getFrequency() const
+{
+ return m_currentToneFrequency;
+}
+
+/**
+ * Toggles the sound according to the parameter.
+ * Has no effect if output is not active.
+ */
+void GuitarTunerUI::toggleSound(bool noSound)
+{
+ if (!m_outputActive) {
+ return;
+ }
+ m_muted = noSound;
+ emit muteChanged(m_muted);
+}
+
+/**
+ * Changes the volume or microphone sensitivity.
+ */
+void GuitarTunerUI::changeVolume()
+{
+ qreal resultingAmplitude = getVolumeFromSoundSlider();
+ qDebug() << "resultingAmplitude" << resultingAmplitude;
+ if (m_outputActive) {
+ m_outputVolumeLevel = resultingAmplitude;
+ emit volumeChanged(resultingAmplitude);
+ }
+ else {
+ m_inputVolumeLevel = resultingAmplitude;
+ emit microphoneSensitivityChanged(1.0-resultingAmplitude);
+ }
+}
+
+/**
+ * Toggles input or output, depending of the current state.
+ */
+void GuitarTunerUI::toggleInputOrOutput()
+{
+ // If output mode is active:
+ if (m_outputActive) {
+ // Change UI to correspond to the input mode.
+ m_outputActive = false;
+ ui->soundSlider->setValue(m_inputVolumeLevel*100);
+ ui->soundButton->setDisabled(true);
+ ui->soundButton->hide();
+ ui->micSensitivityLabel->show();
+ emit modeChanged(true);
+ ui->modeButton->setText("To tone mode");
+ }
+ // Else:
+ else {
+ // Change UI to correspond to the output mode.
+ m_outputActive = true;
+ ui->soundSlider->setValue(m_outputVolumeLevel*100);
+ ui->soundButton->setDisabled(false);
+ ui->micSensitivityLabel->hide();
+ ui->soundButton->show();
+ emit modeChanged(false);
+ ui->modeButton->setText("To listen mode");
+ }
+}
+
+/**
+ * Receives the low voice signal.
+ */
+void GuitarTunerUI::lowVoice()
+{
+ if (ui->noteLabel->font().bold()) {
+ QFont font;
+ font.setBold(false);
+ font.setUnderline(false);
+ ui->noteLabel->setFont(font);
+ }
+}
+
+/**
+ * Receives the voice difference signal.
+ * The difference is qreal, where increase of 1 corresponds
+ * to increase of 1 tone to the target frequency.
+ */
+void GuitarTunerUI::voiceDifference(qreal difference)
+{
+ if (ui->noteLabel->font().bold()) {
+ QFont font;
+ font.setBold(false);
+ font.setUnderline(false);
+ ui->noteLabel->setFont(font);
+ }
+ ui->correctSoundSlider->setValue(difference*m_maximumPrecision);
+}
+
+/**
+ * Receives the correct frequency signal.
+ * Makes the UI to visualize correct frequency event.
+ */
+void GuitarTunerUI::correctFrequencyObtained()
+{
+ qDebug() << "CORRECT FREQUENCY";
+ QFont font;
+ font.setBold(true);
+ font.setUnderline(true);
+ ui->noteLabel->setFont(font);
+}
+
+/**
+ * Sets up the maximum voice difference.
+ */
+void GuitarTunerUI::setMaximumVoiceDifference(int max)
+{
+ // Assert that the maximum precision is known.
+ Q_ASSERT(m_maximumPrecision != 0);
+ // Set the maximum and minimum values of the correctSoundSlider
+ // to the +- max*m_maximumPrecision, and set the tick interval
+ // to be m_maximumPrecision.
+ ui->correctSoundSlider->setMaximum(max*m_maximumPrecision);
+ ui->correctSoundSlider->setMinimum(-max*m_maximumPrecision);
+ ui->correctSoundSlider->setTickInterval(max*m_maximumPrecision);
+}
+
+/**
+ * Stores the maximum precision per note. Used to setup the
+ * correct sound slider.
+ */
+void GuitarTunerUI::setMaximumPrecisionPerNote(int max)
+{
+ m_maximumPrecision = max;
+}
+
+/**
+ * Changes the tone to the next value.
+ */
+void GuitarTunerUI::next()
+{
+ changeTone((m_currentToneIndex + 1) % 6);
+}
+
+/**
+ * Changes the tone to the previous value.
+ */
+void GuitarTunerUI::prev()
+{
+ changeTone((m_currentToneIndex + 5) % 6);
+}
+
+/**
+ * Changes the tone according to the new index.
+ */
+void GuitarTunerUI::changeTone(int newIndex)
+{
+ m_currentToneIndex = newIndex;
+ updateFrequencyByToneIndex(m_currentToneIndex);
+ qDebug() << "targetFrequencyChanged" << m_currentToneFrequency;
+ emit targetFrequencyChanged(m_currentToneFrequency);
+}
diff --git a/demos/mobile/guitartuner/src/guitartunerui.h b/demos/mobile/guitartuner/src/guitartunerui.h
new file mode 100644
index 0000000000..fa8e8f4010
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartunerui.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 GUITARTUNERUI_H
+#define GUITARTUNERUI_H
+
+#include <QWidget>
+#include <QDebug>
+
+namespace Ui {
+ class GuitarTunerUI;
+}
+
+const qreal FrequencyE = 82.407;
+const qreal FrequencyA = 110.00;
+const qreal FrequencyD = 146.83;
+const qreal FrequencyG = 196.00;
+const qreal FrequencyB = 246.94;
+const qreal FrequencyE2 = 329.63;
+
+class GuitarTunerUI : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit GuitarTunerUI(QWidget *parent = 0);
+ ~GuitarTunerUI();
+
+ qreal getVolume() const;
+ bool getMuteState() const;
+ qreal getMicrophoneSensitivity() const;
+ bool isInputModeActive() const;
+ qreal getFrequency() const;
+ int getScaleMaximumValue() const;
+ void setMaximumVoiceDifference(int max);
+ void setMaximumPrecisionPerNote(int max);
+
+public slots:
+ void toggleSound(bool off);
+ void next();
+ void prev();
+ void changeVolume();
+ void toggleInputOrOutput();
+
+ void lowVoice();
+ void voiceDifference(qreal difference);
+ void correctFrequencyObtained();
+
+signals:
+ void modeChanged(bool isInput);
+ void volumeChanged(qreal volume);
+ void microphoneSensitivityChanged(qreal sensitivity);
+ void muteChanged(bool isMuted);
+ void targetFrequencyChanged(qreal targetFrequency);
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::GuitarTunerUI *ui;
+ void changeTone(int newIndex);
+ qreal getVolumeFromSoundSlider() const;
+ int m_currentToneIndex;
+ QString m_currentToneString;
+ qreal m_currentToneFrequency;
+ void updateFrequencyByToneIndex(int index);
+ bool m_outputActive;
+ bool m_muted;
+ qreal m_outputVolumeLevel;
+ qreal m_inputVolumeLevel;
+ int m_maximumPrecision;
+};
+
+#endif // GUITARTUNERUI_H
diff --git a/demos/mobile/guitartuner/src/guitartunerui.ui b/demos/mobile/guitartuner/src/guitartunerui.ui
new file mode 100644
index 0000000000..af7b585b59
--- /dev/null
+++ b/demos/mobile/guitartuner/src/guitartunerui.ui
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>GuitarTunerUI</class>
+ <widget class="QWidget" name="GuitarTunerUI">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>187</width>
+ <height>279</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>GuitarTunerUI</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="tabulatorIcon">
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../GuitarTuner.qrc">:/images/guitartab.svg</pixmap>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="correctSoundSlider">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="minimum">
+ <number>-50</number>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ <property name="tickInterval">
+ <number>50</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QToolButton" name="buttonPrev">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="arrowType">
+ <enum>Qt::LeftArrow</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="noteLabel">
+ <property name="text">
+ <string>A</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="buttonNext">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="autoRaise">
+ <bool>false</bool>
+ </property>
+ <property name="arrowType">
+ <enum>Qt::RightArrow</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="modeButton">
+ <property name="text">
+ <string>Change mode</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QSlider" name="soundSlider">
+ <property name="value">
+ <number>65</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="soundButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../GuitarTuner.qrc">
+ <normaloff>:/images/note.svg</normaloff>
+ <normalon>:/images/noteNo.svg</normalon>
+ <activeon>:/images/noteNo.svg</activeon>:/images/note.svg</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>30</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="micSensitivityLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>microphone
+sensitivity</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources>
+ <include location="../GuitarTuner.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/demos/mobile/guitartuner/src/main.cpp b/demos/mobile/guitartuner/src/main.cpp
new file mode 100644
index 0000000000..33b11819ac
--- /dev/null
+++ b/demos/mobile/guitartuner/src/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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/QApplication>
+#include "guitartuner.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ GuitarTuner w;
+ w.setOrientation(GuitarTuner::LockPortrait);
+
+#ifdef Q_OS_SYMBIAN
+ w.showFullScreen();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ w.showMaximized();
+#else
+ w.show();
+#endif
+
+ return a.exec();
+}
+
diff --git a/demos/mobile/guitartuner/src/mycomponents/Adjuster.qml b/demos/mobile/guitartuner/src/mycomponents/Adjuster.qml
new file mode 100644
index 0000000000..342e6f75ae
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/Adjuster.qml
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import "adjustbars.js" as AdjustBars
+
+/* A barchart-like adjuster component. */
+Rectangle {
+ id: adjuster
+
+ property real max: 100
+ property real value: 0
+ property bool created: false
+
+ signal valueChanged(real value)
+ signal focusChangedByClick()
+ signal arrowPressedWhenValueOverLimits()
+
+ function setValue(pValue) {
+ value = pValue;
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ valueChanged(value);
+ }
+
+ height: 60; width: 300
+ color: "transparent"
+ Keys.onRightPressed: {
+ var val = value+max/AdjustBars.maxBars;
+ if (val <= max) {
+ value = val;
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ valueChanged(value);
+ }
+ else {
+ arrowPressedWhenValueOverLimits()
+ }
+ }
+ Keys.onLeftPressed: {
+ var val = value-max/AdjustBars.maxBars;
+ if (0 <= val) {
+ value = val;
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ valueChanged(value);
+ }
+ else {
+ arrowPressedWhenValueOverLimits()
+ }
+ }
+ Component.onCompleted: {
+ AdjustBars.createBars();
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ created = true;
+ }
+ Component.onDestruction: {
+ AdjustBars.destroyBars;
+ }
+ //Dynamic objects have to be recreated when the window size changes.
+ onWidthChanged: {
+ if (created) {
+ AdjustBars.destroyBars();
+ AdjustBars.createBars();
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ }
+ }
+ onHeightChanged: {
+ if (created) {
+ AdjustBars.destroyBars();
+ AdjustBars.createBars();
+ AdjustBars.fillBars(value/max*AdjustBars.maxBars);
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPositionChanged: {
+ focusChangedByClick();
+ var val = mouse.x/parent.width*parent.max;
+ if (0 < val && val < max) {
+ parent.value = val;
+ AdjustBars.fillBars(parent.value/parent.max*AdjustBars.maxBars);
+ valueChanged(parent.value);
+ }
+ }
+ onClicked: {
+ focusChangedByClick();
+ var val = mouse.x/parent.width*parent.max;
+ if (0 < val && val < max) {
+ parent.value = val;
+ AdjustBars.fillBars(parent.value/parent.max*AdjustBars.maxBars);
+ valueChanged(parent.value);
+ }
+ }
+ }
+}
diff --git a/doc/src/snippets/declarative/animation-groups.qml b/demos/mobile/guitartuner/src/mycomponents/Meter.qml
index f29ea486ba..8a64711cb8 100644
--- a/doc/src/snippets/declarative/animation-groups.qml
+++ b/demos/mobile/guitartuner/src/mycomponents/Meter.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,68 +37,76 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 1.0
-Row {
+import QtQuick 1.0
-//![0]
+/* A meter component. */
Rectangle {
- id: rect
- width: 120; height: 200
+ id: meter
- Image {
- id: img
- source: "pics/qt.png"
- anchors.horizontalCenter: parent.horizontalCenter
- y: 0
+ property real value: 0
+ property real minValue: -1
+ property real maxValue: 1
+ property alias imageSize: meterImage.sourceSize
- SequentialAnimation on y {
- loops: Animation.Infinite
- NumberAnimation { to: rect.height - img.height; easing.type: Easing.OutBounce; duration: 2000 }
- PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
- }
+ function valueChanged(pValue) {
+ value = pValue;
+ scaleValueToAngle();
+ }
+ function scaleValueToAngle() {
+ pointer.angle = (((value-minValue)/(maxValue-minValue))*
+ (pointer.angleMax-pointer.angleMin))+
+ pointer.angleMin;
}
-}
-//![0]
-//![1]
-Rectangle {
- id: redRect
- width: 100; height: 100
- color: "red"
+ color: "transparent"
- MouseArea { id: mouseArea; anchors.fill: parent }
+ Image {
+ id: meterImage
- states: State {
- name: "pressed"; when: mouseArea.pressed
- PropertyChanges { target: redRect; color: "blue"; y: mouseArea.mouseY; width: mouseArea.mouseX }
+ smooth: true
+ source: "./images/meterBG.png"
+ anchors.fill: parent
}
- transitions: Transition {
+ Image {
+ id:pointerShadow
- SequentialAnimation {
- ColorAnimation { duration: 200 }
- PauseAnimation { duration: 100 }
+ x: pointer.x - 2
+ y: pointer.y - 2
+ height: pointer.height
+ smooth: true
+ source: "./images/pointerShadow.png"
+ transform: Rotation {
+ origin.x: 2
+ origin.y: height
+ angle: -pointer.angle
+ }
+ }
+
+ Image {
+ id: pointer
- ParallelAnimation {
- NumberAnimation {
- duration: 500
- easing.type: Easing.OutBounce
- targets: redRect
- properties: "y"
- }
+ property real angle: 0
+ property real angleMax: -45
+ property real angleMin: 45
- NumberAnimation {
- duration: 800
- easing.type: Easing.InOutQuad
- targets: redRect
- properties: "width"
- }
+ height: parent.height*0.92
+ transformOrigin: "Bottom"
+ rotation: -angle
+ smooth: true
+ source: "./images/pointer.png"
+ anchors {
+ bottomMargin: 2
+ bottom: parent.bottom;
+ horizontalCenter: parent.horizontalCenter
+ }
+
+ Behavior on angle {
+ SpringAnimation {
+ spring: 1.4
+ damping: 0.15
}
}
}
}
-//![1]
-
-}
diff --git a/demos/mobile/guitartuner/src/mycomponents/NoteButtonView.qml b/demos/mobile/guitartuner/src/mycomponents/NoteButtonView.qml
new file mode 100644
index 0000000000..fc64fe5b2c
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/NoteButtonView.qml
@@ -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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+/* A view component for buttons for choosing notes. */
+ListView {
+ id: noteChooser
+
+ property real currentFrequency: 82.407
+
+ signal noteSelected(string note, real frequency, int index)
+
+ //Press down the button corresponding to the given note.
+ function pushButton(index) {
+ currentIndex = index;
+ }
+
+ width: 50*model.count + spacing*(model.count-1); height: 50
+ orientation: ListView.Horizontal
+ model: NotesModel {}
+ delegate: notesDelegate
+ keyNavigationWraps: true
+ boundsBehavior: Flickable.StopAtBounds
+
+ Component {
+ id: notesDelegate
+
+ ToggleButton {
+ id: noteButton
+
+ width: height; height: noteChooser.height
+ offImageSource: offSource
+ onImageSource: onSource
+ state: noteButton.ListView.isCurrentItem ? "pressed" : "unPressed"
+ onSelected: {
+ noteChooser.noteSelected(note, frequency, index)
+ if (note != "Auto") {
+ currentFrequency = frequency
+ }
+ }
+ onPushed: {
+ noteButton.ListView.view.currentIndex = index
+ }
+ }
+ }
+}
diff --git a/demos/mobile/guitartuner/src/mycomponents/NotesModel.qml b/demos/mobile/guitartuner/src/mycomponents/NotesModel.qml
new file mode 100644
index 0000000000..3d9c12a677
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/NotesModel.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+/* The model component for the NoteButtonView. */
+ListModel {
+ ListElement {
+ note: "E"
+ offSource: "./images/tuner_e.png"
+ onSource: "./images/tuner_e_on.png"
+ bigSource: "./mycomponents/images/big_e.png"
+ glowSource: "./mycomponents/images/glowing_e.png"
+ frequency: "82.407"
+ interval: "5"
+ }
+ ListElement {
+ note: "A"
+ offSource: "./images/tuner_a.png"
+ onSource: "./images/tuner_a_on.png"
+ bigSource: "./mycomponents/images/big_a.png"
+ glowSource: "./mycomponents/images/glowing_a.png"
+ frequency: "110.00"
+ interval: "5"
+ }
+ ListElement {
+ note: "D"
+ offSource: "./images/tuner_d.png"
+ onSource: "./images/tuner_d_on.png"
+ bigSource: "./mycomponents/images/big_d.png"
+ glowSource: "./mycomponents/images/glowing_d.png"
+ frequency: "146.83"
+ interval: "5"
+ }
+ ListElement {
+ note: "G"
+ offSource: "./images/tuner_g.png"
+ onSource: "./images/tuner_g_on.png"
+ bigSource: "./mycomponents/images/big_g.png"
+ glowSource: "./mycomponents/images/glowing_g.png"
+ frequency: "196.00"
+ interval: "4"
+ }
+ ListElement {
+ note: "B"
+ offSource: "./images/tuner_b.png"
+ onSource: "./images/tuner_b_on.png"
+ bigSource: "./mycomponents/images/big_b.png"
+ glowSource: "./mycomponents/images/glowing_b.png"
+ frequency: "246.94"
+ interval: "5"
+ }
+ ListElement {
+ note: "e"
+ offSource: "./images/tuner_e.png"
+ onSource: "./images/tuner_e_on.png"
+ bigSource: "./mycomponents/images/big_e.png"
+ glowSource: "./mycomponents/images/glowing_e.png"
+ frequency: "329.63"
+ interval: "9999" //Big enough that we can't move over this note
+ }
+ ListElement {
+ note: "Auto"
+ offSource: "./images/tuner_auto.png"
+ onSource: "./images/tuner_auto_on.png"
+ frequency: "82.407"
+ }
+}
diff --git a/demos/mobile/guitartuner/src/mycomponents/ToggleButton.qml b/demos/mobile/guitartuner/src/mycomponents/ToggleButton.qml
new file mode 100644
index 0000000000..cecf01558f
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/ToggleButton.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+/* A toggle button component. */
+Rectangle {
+ id: toggleButton
+
+ property url offImageSource: ""
+ property url onImageSource: ""
+ property alias imageSource: buttonImage.source
+
+ signal selected()
+ signal pushed()
+
+ color: "transparent"
+ state: "unPressed"
+ onStateChanged: {
+ if (state == "pressed") {
+ selected()
+ }
+ }
+
+ Image {
+ id: buttonImage
+
+ smooth: true
+ anchors.fill: parent
+ }
+ MouseArea {
+ id: mouseArea
+
+ anchors.fill: parent
+ onPressed: {
+ if (parent.state == "unPressed") {
+ pushed()
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "pressed"
+ PropertyChanges {
+ target: toggleButton
+ scale: 0.95
+ imageSource: onImageSource
+ }
+ },
+ State {
+ name: "unPressed"
+ PropertyChanges {
+ target: toggleButton
+ scale: 1/0.95
+ imageSource: offImageSource
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "unPressed"
+ to: "pressed"
+ reversible: true
+ PropertyAnimation {
+ target: toggleButton
+ properties: "scale"
+ duration: 100
+ }
+ }
+ ]
+}
diff --git a/demos/mobile/guitartuner/src/mycomponents/adjustbars.js b/demos/mobile/guitartuner/src/mycomponents/adjustbars.js
new file mode 100644
index 0000000000..a96292d905
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/adjustbars.js
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+/* JavaScript functions for creating, handling and
+ * destroying the bars of the adjuster component. */
+
+var maxBars = 10;
+var firstBarHeight = 5;
+var bars = new Array(maxBars);
+var colors = new Array(maxBars);
+var barWidthFactor = 2.3;
+
+function createBars() {
+ var barWidth = adjuster.width/maxBars/barWidthFactor;
+ for (var i = 1; i <= maxBars; i++) {
+ //Create, configure and store the bars.
+ var bar = Qt.createQmlObject('import QtQuick 1.0; Rectangle {smooth: true}', adjuster, "dynamicBar");
+ bar.width = barWidth;
+ bar.height = firstBarHeight+(i/maxBars)*(adjuster.height*0.8-firstBarHeight);
+ bar.radius = bar.width/2;
+ bar.x = (i-1)*(barWidthFactor*barWidth);
+ bar.y = adjuster.height/2 - bar.height/2;
+ bars[i-1] = bar;
+
+ //Calculate and store the colors
+ if (i < maxBars/2) {
+ colors[i-1] = Qt.rgba(1-i/(maxBars/2), 1, 1-i/(maxBars/2), i);
+ }
+ else {
+ colors[i-1] = Qt.rgba((i-(maxBars/2))/(maxBars/2), 1-((i-(maxBars/2))/(maxBars/2)), 0, i);
+ }
+ }
+}
+
+function destroyBars() {
+ for (var i = 0; i < maxBars; i++) {
+ bars[i].color = "transparent" //Colors must be set to transparent or otherwise the bars will stay appeared.
+ bars[i].destroy();
+ }
+}
+
+function fillBars(barNumber) {
+ //Set the color for the bars (transparent from the selected bar to the end).
+ for (var i = 0; i < maxBars; i++) {
+ if (i < barNumber) {
+ bars[i].color = colors[i];
+ }
+ else {
+ bars[i].color = "black";
+ }
+ }
+}
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/big_a.png b/demos/mobile/guitartuner/src/mycomponents/images/big_a.png
new file mode 100644
index 0000000000..3838e766b4
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/big_a.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/big_b.png b/demos/mobile/guitartuner/src/mycomponents/images/big_b.png
new file mode 100644
index 0000000000..114b32d382
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/big_b.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/big_d.png b/demos/mobile/guitartuner/src/mycomponents/images/big_d.png
new file mode 100644
index 0000000000..3ede9f0f2a
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/big_d.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/big_e.png b/demos/mobile/guitartuner/src/mycomponents/images/big_e.png
new file mode 100644
index 0000000000..cc1f488585
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/big_e.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/big_g.png b/demos/mobile/guitartuner/src/mycomponents/images/big_g.png
new file mode 100644
index 0000000000..804177b306
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/big_g.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/glowing_a.png b/demos/mobile/guitartuner/src/mycomponents/images/glowing_a.png
new file mode 100644
index 0000000000..b6fd0e2072
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/glowing_a.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/glowing_b.png b/demos/mobile/guitartuner/src/mycomponents/images/glowing_b.png
new file mode 100644
index 0000000000..b5fa016aec
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/glowing_b.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/glowing_d.png b/demos/mobile/guitartuner/src/mycomponents/images/glowing_d.png
new file mode 100644
index 0000000000..32f1a29151
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/glowing_d.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/glowing_e.png b/demos/mobile/guitartuner/src/mycomponents/images/glowing_e.png
new file mode 100644
index 0000000000..4be9f2a76e
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/glowing_e.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/glowing_g.png b/demos/mobile/guitartuner/src/mycomponents/images/glowing_g.png
new file mode 100644
index 0000000000..4216d828ed
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/glowing_g.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_malli.png b/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_malli.png
new file mode 100644
index 0000000000..dbe3fc79aa
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_malli.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_skin.png b/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_skin.png
new file mode 100644
index 0000000000..5d53df9bf2
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/guitartuner_skin.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/lcdFrame.png b/demos/mobile/guitartuner/src/mycomponents/images/lcdFrame.png
new file mode 100644
index 0000000000..ff8dffc6d3
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/lcdFrame.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/meterBG.png b/demos/mobile/guitartuner/src/mycomponents/images/meterBG.png
new file mode 100644
index 0000000000..4046355c80
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/meterBG.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/mute.png b/demos/mobile/guitartuner/src/mycomponents/images/mute.png
new file mode 100644
index 0000000000..382e6047ef
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/mute.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/pointer.png b/demos/mobile/guitartuner/src/mycomponents/images/pointer.png
new file mode 100644
index 0000000000..d0cb21b863
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/pointer.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/pointerShadow.png b/demos/mobile/guitartuner/src/mycomponents/images/pointerShadow.png
new file mode 100644
index 0000000000..a708639163
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/pointerShadow.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/power.png b/demos/mobile/guitartuner/src/mycomponents/images/power.png
new file mode 100644
index 0000000000..8ec0c5ce39
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/power.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/quit.png b/demos/mobile/guitartuner/src/mycomponents/images/quit.png
new file mode 100644
index 0000000000..2a9443ec78
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/quit.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/sensitivity.png b/demos/mobile/guitartuner/src/mycomponents/images/sensitivity.png
new file mode 100644
index 0000000000..c3d2ea31ce
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/sensitivity.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_a.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_a.png
new file mode 100644
index 0000000000..a1823e5928
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_a.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_a_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_a_on.png
new file mode 100644
index 0000000000..7c78cbd8ab
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_a_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto.png
new file mode 100644
index 0000000000..b9e494bd99
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto_on.png
new file mode 100644
index 0000000000..d5608d85a3
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_auto_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_b.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_b.png
new file mode 100644
index 0000000000..94977f87b2
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_b.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_b_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_b_on.png
new file mode 100644
index 0000000000..78841dc047
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_b_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_d.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_d.png
new file mode 100644
index 0000000000..293ee55a75
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_d.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_d_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_d_on.png
new file mode 100644
index 0000000000..705de41d5b
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_d_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_e.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_e.png
new file mode 100644
index 0000000000..569d2c6502
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_e.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_e_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_e_on.png
new file mode 100644
index 0000000000..1342a91466
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_e_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_g.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_g.png
new file mode 100644
index 0000000000..a8f0de575c
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_g.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/tuner_g_on.png b/demos/mobile/guitartuner/src/mycomponents/images/tuner_g_on.png
new file mode 100644
index 0000000000..6fdca41924
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/tuner_g_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/voicemode_off.png b/demos/mobile/guitartuner/src/mycomponents/images/voicemode_off.png
new file mode 100644
index 0000000000..0701dd3465
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/voicemode_off.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/voicemode_on.png b/demos/mobile/guitartuner/src/mycomponents/images/voicemode_on.png
new file mode 100644
index 0000000000..986d589ab7
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/voicemode_on.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/volume.png b/demos/mobile/guitartuner/src/mycomponents/images/volume.png
new file mode 100644
index 0000000000..46fdb7faf4
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/volume.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/mycomponents/images/volume_off.png b/demos/mobile/guitartuner/src/mycomponents/images/volume_off.png
new file mode 100644
index 0000000000..a97e42244e
--- /dev/null
+++ b/demos/mobile/guitartuner/src/mycomponents/images/volume_off.png
Binary files differ
diff --git a/demos/mobile/guitartuner/src/voiceanalyzer.cpp b/demos/mobile/guitartuner/src/voiceanalyzer.cpp
new file mode 100644
index 0000000000..9990e6de83
--- /dev/null
+++ b/demos/mobile/guitartuner/src/voiceanalyzer.cpp
@@ -0,0 +1,295 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "voiceanalyzer.h"
+
+/**
+ * Constant used to scale the cut-off density for the fft helper.
+ */
+const static float CutOffScaler = 0.05;
+
+/**
+ * Force the precision to be "1/PrecisionPerNote" notes
+ * near the target frequency.
+ */
+const static int PrecisionPerNote = 4;
+
+/**
+ * TargetFrequencyParameter is a constant which implies the index at
+ * which corresponds to the target frequency.
+ * 0.5 * N * 1/TargetFrequencyParameter is (about) the index which
+ * corresponds to the given target frequency.
+ * Effectively TargetFrequencyParameter = 2^z, and the z*TargetFrequency
+ * is the maximum frequency that can be noticed.
+ */
+const static int TargetFrequencyParameter = 4;
+
+
+VoiceAnalyzer::VoiceAnalyzer(const QAudioFormat &format, QObject *parent):
+ QIODevice(parent),
+ m_format(format),
+ m_frequency(0),
+ m_position(0),
+ m_fftHelper(new FastFourierTransformer(this))
+{
+ Q_ASSERT(qFuzzyCompare(M_SAMPLE_COUNT_MULTIPLIER,
+ float(2)/(M_TWELTH_ROOT_OF_2 -1.0)));
+ m_totalSampleCount = qRound(qreal(PrecisionPerNote)
+ *TargetFrequencyParameter
+ *M_SAMPLE_COUNT_MULTIPLIER);
+ m_samples.reserve(m_totalSampleCount);
+ int i = 2;
+ int j = 1;
+ for (; i < TargetFrequencyParameter; i *= 2) {
+ j++;
+ }
+ m_maximumVoiceDifference = j*12;
+
+ setCutOffPercentage(CutOffScaler);
+}
+
+/**
+ * Opens the parent QIODevice. Sets up the analysation parameters.
+ */
+void VoiceAnalyzer::start(qreal frequency)
+{
+ m_stepSize = (qreal) 1.0 * m_format.sampleRate()
+ / (TargetFrequencyParameter*2*frequency);
+ m_frequency = frequency;
+ open(QIODevice::WriteOnly);
+}
+
+/**
+ * Closes the parent QIODevice, thus the voice is not analysed anymore.
+ * Resets the m_samples QList.
+ */
+void VoiceAnalyzer::stop()
+{
+ m_samples.clear();
+ m_samples.reserve(m_totalSampleCount);
+ close();
+}
+
+/**
+ * Called when data is obtained. Stores each m_stepSize sample
+ * into a QList to be analysed.
+ */
+qint64 VoiceAnalyzer::writeData(const char *data, qint64 maxlen)
+{
+ const int channelBytes = m_format.sampleSize() / 8;
+ int sampleSize = m_format.channels() * channelBytes;
+ int m_stepSizeInBytes = m_stepSize*sampleSize;
+ // assert that each sample fits fully into the data
+ Q_ASSERT((m_position % sampleSize)==0);
+ const uchar *ptr = reinterpret_cast<const uchar *>(data);
+ while (m_position < maxlen) {
+ if (m_samples.size() < m_totalSampleCount) {
+ m_samples.append(getValueInt16(ptr+m_position));
+ }
+ else {
+ analyzeVoice();
+ m_samples.clear();
+ m_samples.reserve(m_totalSampleCount);
+ // fast forward position to the first position after maxlen or to the maxlen
+ m_position += ((m_stepSizeInBytes - 1 + maxlen - m_position) /
+ m_stepSizeInBytes) * m_stepSizeInBytes;
+ break;
+ }
+ m_position += m_stepSizeInBytes;
+ }
+ m_position -= maxlen;
+ return maxlen;
+}
+
+/**
+ * Interprets ptr as a pointer to int value and returns it.
+ */
+qint16 VoiceAnalyzer::getValueInt16(const uchar *ptr)
+{
+ qint16 realValue = 0;
+ if (m_format.sampleSize() == 8)
+ {
+ const qint16 value = *reinterpret_cast<const quint8*>(ptr);
+ if (m_format.sampleType() == QAudioFormat::UnSignedInt) {
+ realValue = value - M_MAX_AMPLITUDE_8BIT_SIGNED - 1;
+ } else if (m_format.sampleType() == QAudioFormat::SignedInt) {
+ realValue = value;
+ }
+ } else if (m_format.sampleSize() == 16) {
+ qint16 value = 0;
+ if (m_format.byteOrder() == QAudioFormat::LittleEndian)
+ value = qFromLittleEndian<quint16>(ptr);
+ else
+ value = qFromBigEndian<quint16>(ptr);
+
+ if (m_format.sampleType() == QAudioFormat::UnSignedInt) {
+ realValue = value - M_MAX_AMPLITUDE_16BIT_SIGNED;
+ } else if (m_format.sampleType() == QAudioFormat::SignedInt) {
+ realValue = value;
+ }
+ }
+ return realValue;
+}
+
+/**
+ * Takes a number between 0 and 1, scales it with CutOffScaler,
+ * multiplies it with maximum density, and then gives it
+ * to the fft helper.
+ */
+void VoiceAnalyzer::setCutOffPercentage(qreal cutoff)
+{
+ cutoff = CutOffScaler*cutoff;
+ if (m_format.sampleSize() == 8) {
+ float t = cutoff*m_totalSampleCount*M_MAX_AMPLITUDE_8BIT_SIGNED;
+ m_fftHelper->setCutOffForDensity(t);
+ }
+ else if (m_format.sampleSize() == 16) {
+ float t = cutoff*m_totalSampleCount*M_MAX_AMPLITUDE_16BIT_SIGNED;
+ m_fftHelper->setCutOffForDensity(t);
+ }
+}
+
+/**
+ * Returns the current target frequency.
+ */
+qreal VoiceAnalyzer::frequency()
+{
+ return m_frequency;
+}
+
+/**
+ * Returns the maximum absolute value sent by
+ * the voiceDifference() signal.
+ */
+int VoiceAnalyzer::getMaximumVoiceDifference()
+{
+ return m_maximumVoiceDifference;
+}
+
+/**
+ * Returns the maximum precision per note
+ * near the target frequency.
+ */
+int VoiceAnalyzer::getMaximumPrecisionPerNote()
+{
+ return PrecisionPerNote;
+}
+
+/**
+ * Analyzes the voice frequency and emits appropriate signals.
+ */
+void VoiceAnalyzer::analyzeVoice()
+{
+ m_fftHelper->calculateFFT(m_samples);
+ int index = m_fftHelper->getMaximumDensityIndex();
+
+ // If index == -1
+ if (index == -1) {
+ // The voice is to be filtered away.
+ // Emit the lowVoice signal and return.
+ emit lowVoice();
+ qDebug() << "low voice";
+ return;
+ }
+ // Else, continue
+
+ // Let the correctIndex to be
+ // the nearest index corresponding to the correct frequency.
+ qreal stepSizeInFrequency = (qreal)m_format.sampleRate()
+ / (m_totalSampleCount * m_stepSize);
+ qreal newFrequency = qreal(index) * stepSizeInFrequency;
+ // Calculate the nearest index corresponding to the correct frequency.
+ int correctIndex = qRound(m_frequency / stepSizeInFrequency);
+ qreal value = 0;
+
+ // If the obtained frequency is more than
+ // log_2(TargetFrequencyParameter) octaves less than the m_frequency:
+
+ // Note:
+ // Instead of m_frequency/TargetFrequencyParameter > newFrequency,
+ // the comparison is done without a div instructions by
+ // m_frequency > newFrequency * TargetFrequencyParameter.
+
+ if (m_frequency > newFrequency * TargetFrequencyParameter) {
+ // Set the difference value to be -m_maximumVoiceDifference.
+ qDebug() << "compare" << "low" << newFrequency << m_frequency - stepSizeInFrequency * correctIndex << (m_frequency - stepSizeInFrequency * correctIndex) / stepSizeInFrequency;
+ value = -m_maximumVoiceDifference;
+ }
+ // Else, if the obtained frequency is more than
+ // log_2(TargetFrequencyParameter) octaves more than the m_frequency:
+ else if (m_frequency*TargetFrequencyParameter < newFrequency) {
+ // Set the difference value to be m_maximumVoiceDifference.
+ qDebug() << "compare" << "high" << newFrequency << m_frequency - stepSizeInFrequency * correctIndex << (m_frequency - stepSizeInFrequency * correctIndex) / stepSizeInFrequency;
+ value = m_maximumVoiceDifference;
+ }
+ // Else:
+ else {
+ // Calculate the difference between the obtained and the correct
+ // frequency in tones.
+ // Use stepSizeInFrequency * correctIndex instead of
+ // m_frequency so that the value is zero when there is correct
+ // voice obtained. Set the difference value to be
+ // log(frequency / target frequency) * 12 / log(2).
+ value = log(newFrequency / (stepSizeInFrequency * correctIndex))
+ * 12 / M_LN2;
+ qDebug() << "compare" << value << newFrequency << m_frequency - stepSizeInFrequency * correctIndex << (m_frequency - stepSizeInFrequency * correctIndex) / stepSizeInFrequency;
+ }
+
+ // Emit voiceDifference signal.
+ QVariant valueVar(value); //Has to be QVariant for QML
+ emit voiceDifference(valueVar);
+
+ // If the correctIndex is index, emit the correctFrequency signal.
+ if (correctIndex == index) {
+ emit(correctFrequency());
+ }
+}
+
+/**
+ * Empty implementation for readData, since no data is provided
+ * by the VoiceAnalyzer class.
+ */
+qint64 VoiceAnalyzer::readData(char *data, qint64 maxlen)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(maxlen);
+
+ return 0;
+}
diff --git a/demos/mobile/guitartuner/src/voiceanalyzer.h b/demos/mobile/guitartuner/src/voiceanalyzer.h
new file mode 100644
index 0000000000..147a0d6a8c
--- /dev/null
+++ b/demos/mobile/guitartuner/src/voiceanalyzer.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 VOICEANALYZER_H
+#define VOICEANALYZER_H
+
+#include <QObject>
+#include <QAudioFormat>
+#include <QDebug>
+#include <QtCore/qmath.h>
+#include <QtCore/qendian.h>
+#include <QVariant>
+
+#include "constants.h"
+#include "fastfouriertransformer.h"
+#include "math.h"
+
+class VoiceAnalyzer : public QIODevice
+{
+ Q_OBJECT
+public:
+ VoiceAnalyzer(const QAudioFormat &format, QObject *parent = 0);
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 maxlen);
+ void start(qreal frequency);
+ void stop();
+ qreal frequency();
+ int getMaximumVoiceDifference();
+ int getMaximumPrecisionPerNote();
+
+public slots:
+ void setCutOffPercentage(qreal cutoff);
+
+private:
+ const QAudioFormat m_format;
+ QList<qint16> m_samples;
+ int m_totalSampleCount;
+ int m_maximumVoiceDifference;
+
+ qint16 getValueInt16(const uchar *ptr);
+ int m_stepSize;
+ qreal m_frequency;
+ qint64 m_position;
+ FastFourierTransformer *m_fftHelper;
+ void analyzeVoice();
+signals:
+ void voiceDifference(QVariant frequency);
+ void correctFrequency();
+ void lowVoice();
+
+public slots:
+
+};
+
+
+#endif // VOICEANALYZER_H
diff --git a/demos/mobile/guitartuner/src/voicegenerator.cpp b/demos/mobile/guitartuner/src/voicegenerator.cpp
new file mode 100644
index 0000000000..ce25b6ebb2
--- /dev/null
+++ b/demos/mobile/guitartuner/src/voicegenerator.cpp
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "voicegenerator.h"
+
+const int BufferSizeMilliseconds = 100;
+
+VoiceGenerator::VoiceGenerator(const QAudioFormat &format,
+ qreal frequency, qreal amplitude,
+ QObject *parent) :
+ QIODevice(parent),
+ m_format(format),
+ m_amplitude(0.5)
+{
+ Q_ASSERT(m_format.sampleSize() % 8 == 0);
+ int sampleBytes = m_format.channels() * (m_format.sampleSize() / 8);
+ // + 1 to round up, just to be sure that all samples fit.
+ qint64 samplesInBuffer = m_format.sampleRate()
+ * BufferSizeMilliseconds / 1000 + 1;
+ qint64 length = samplesInBuffer * sampleBytes;
+ m_buffer.resize(length);
+ m_max_position = 0;
+ m_position = 0;
+ m_amplitude = amplitude;
+ setFrequency(frequency);
+}
+
+VoiceGenerator::~VoiceGenerator()
+{
+}
+
+/**
+ * Opens the parent QIODevice.
+ */
+void VoiceGenerator::start()
+{
+ open(QIODevice::ReadOnly);
+}
+
+/**
+ * Closes the parent QIODevice. Resets the m_position to zero.
+ */
+void VoiceGenerator::stop()
+{
+ close();
+ m_position = 0;
+}
+
+/**
+ * Sets the frequency to new frequency.
+ */
+void VoiceGenerator::setFrequency(qreal frequency)
+{
+ Q_ASSERT(1 / frequency < BufferSizeMilliseconds);
+ this->m_frequency = frequency;
+ refreshData();
+}
+
+/**
+ * Sets the amplitude for the voice.
+ */
+void VoiceGenerator::setAmplitude(qreal amplitude)
+{
+ Q_ASSERT(amplitude >= 0);
+ m_amplitude = amplitude;
+ refreshData();
+}
+
+/**
+ * Returns the current frequency.
+ */
+qreal VoiceGenerator::frequency()
+{
+ return m_frequency;
+}
+
+/**
+ * Generates voice data corresponding a sine voice with target frequency.
+ * The number of data generated is calculated
+ * and stored to m_max_position.
+ */
+void VoiceGenerator::refreshData()
+{
+ const int channelBytes = m_format.sampleSize() / 8;
+ const int sampleSize = m_format.channels() * channelBytes;
+ const qint64 voiceOscillationsInBuffer = BufferSizeMilliseconds
+ * m_frequency / 1000;
+ const qint64 voiceSamplesInBuffer = voiceOscillationsInBuffer
+ * m_format.sampleRate() / m_frequency;
+ m_max_position = voiceSamplesInBuffer * sampleSize;
+ qint64 dataGenerationLength = m_buffer.size();
+
+
+ Q_ASSERT(m_max_position % (sampleSize) == 0);
+ Q_ASSERT(dataGenerationLength <= m_buffer.size());
+
+ short *t = (short*)m_buffer.data();
+
+
+/*
+ int te ;
+ static float fpos = 0.0f;
+ //dataGenerationLength>>=1; // in words
+ for (int f=0; f<dataGenerationLength; f++) {
+ te = (short)((sinf(fpos))* (65536.0f/2.0f));
+ fpos += m_frequency/2000.0f;
+ t[f]= te;
+ };
+
+ m_amplitude = 1.0f; */
+ uchar *ptr = reinterpret_cast<uchar *>(m_buffer.data());
+ int sampleIndex = 0;
+ while (dataGenerationLength > 0) {
+ qreal realValue = 0;
+ if (sampleIndex < voiceSamplesInBuffer) {
+ realValue = m_amplitude
+ *qSin(2.0f * M_PI * m_frequency
+ * qreal(sampleIndex % m_format.sampleRate())
+ / m_format.sampleRate());
+ }
+ for (int i=0; i<m_format.channels(); ++i) {
+ setValue(ptr, realValue);
+ ptr += channelBytes;
+ dataGenerationLength -= channelBytes;
+ }
+ ++sampleIndex;
+ }
+}
+
+/**
+ * Stores the realValue into bytes pointed by ptr as an int value.
+ * Align-safe.
+ */
+void VoiceGenerator::setValue(uchar *ptr, qreal realValue) {
+ if (m_format.sampleSize() == 8)
+ {
+ quint8 value = 0;
+ if (m_format.sampleType() == QAudioFormat::UnSignedInt) {
+ value = static_cast<quint8>(
+ qRound((1.0 + realValue) / 2
+ * M_MAX_AMPLITUDE_8BIT_UNSIGNED));
+ } else if (m_format.sampleType() == QAudioFormat::SignedInt) {
+ value = static_cast<qint8>(
+ qRound(realValue
+ * M_MAX_AMPLITUDE_8BIT_SIGNED));
+ }
+ *reinterpret_cast<quint8*>(ptr) = value;
+ } else if (m_format.sampleSize() == 16) {
+ quint16 value = 0;
+ if (m_format.sampleType() == QAudioFormat::UnSignedInt) {
+ value = static_cast<quint16>(
+ qRound((1.0 + realValue) / 2
+ * M_MAX_AMPLITUDE_16BIT_UNSIGNED));
+ } else if (m_format.sampleType() == QAudioFormat::SignedInt) {
+ value = static_cast<qint16>(
+ qRound(realValue
+ * M_MAX_AMPLITUDE_16BIT_SIGNED));
+ }
+ if (m_format.byteOrder() == QAudioFormat::LittleEndian)
+ qToLittleEndian<qint16>(value, ptr);
+ else
+ qToBigEndian<qint16>(value, ptr);
+ }
+}
+
+qint64 VoiceGenerator::bytesAvailable() const
+{
+ return m_max_position + QIODevice::bytesAvailable();
+}
+
+/**
+ * Called by the QIODevice. Puts maxlen amount of voice
+ * samples into the data array.
+ */
+qint64 VoiceGenerator::readData(char *data, qint64 maxlen)
+{
+ qint64 total = 0;
+ qint64 chunk = 0;
+ while (total < maxlen) {
+ if (maxlen - total >= m_max_position - m_position) {
+ // the needed buffer is longer than the currently
+ // available buffer from m_position to the m_max_position
+ chunk = m_max_position - m_position;
+ memcpy(data, m_buffer.constData() + m_position, chunk);
+ m_position = 0;
+ }
+ else {
+ // we can copy the needed data directly, and the loop will end
+ chunk = maxlen - total;
+ memcpy(data, m_buffer.constData() + m_position, chunk);
+ m_position = (m_position + chunk) % m_max_position;
+ }
+ data += chunk;
+ total += chunk;
+ }
+ return total;
+}
+
+/**
+ * Empty implementation for writeData, since no data is provided
+ * for the VoiceGenerator class.
+ */
+qint64 VoiceGenerator::writeData(const char *data, qint64 maxlen)
+{
+ Q_UNUSED(data);
+ Q_UNUSED(maxlen);
+
+ return 0;
+}
diff --git a/demos/mobile/guitartuner/src/voicegenerator.h b/demos/mobile/guitartuner/src/voicegenerator.h
new file mode 100644
index 0000000000..e4abd90a73
--- /dev/null
+++ b/demos/mobile/guitartuner/src/voicegenerator.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 VOICEGENERATOR_H
+#define VOICEGENERATOR_H
+
+#include <QIODevice>
+#include <QByteArray>
+#include <QAudioFormat>
+#include <QtCore/qmath.h>
+#include <QtCore/qendian.h>
+#include <QDebug>
+
+#include "constants.h"
+
+
+class VoiceGenerator : public QIODevice
+{
+ Q_OBJECT
+public:
+ VoiceGenerator(const QAudioFormat &format, qreal frequency, qreal amplitude, QObject *parent = 0);
+ ~VoiceGenerator();
+ void setFrequency(qreal frequency);
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 maxlen);
+ qint64 bytesAvailable() const;
+ qreal frequency();
+signals:
+
+public slots:
+ void setAmplitude(qreal amplitude);
+ void start();
+ void stop();
+
+private:
+ void setValue(uchar *ptr, qreal realValue);
+ void refreshData();
+ const QAudioFormat m_format;
+ // buffer to store the data
+ QByteArray m_buffer;
+ // current position in buffer
+ qint64 m_position;
+ // max position depends on the sample rate of format and the frequency of voice
+ qint64 m_max_position;
+ qreal m_amplitude;
+ qreal m_frequency;
+};
+
+#endif // VOICEGENERATOR_H
diff --git a/demos/mobile/qcamera/businesscardhandling.cpp b/demos/mobile/qcamera/businesscardhandling.cpp
new file mode 100755
index 0000000000..f7467c43f2
--- /dev/null
+++ b/demos/mobile/qcamera/businesscardhandling.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "businesscardhandling.h"
+#include <QFile>
+
+BusinessCardHandling::BusinessCardHandling(QObject *parent) :
+ QObject(parent)
+{
+}
+
+BusinessCardHandling::~BusinessCardHandling()
+{
+ delete m_contactManager;
+}
+
+void BusinessCardHandling::createContactManager()
+{
+#if defined Q_WS_MAEMO_5
+ m_contactManager = new QContactManager("maemo5");
+#elif defined Q_OS_SYMBIAN
+ m_contactManager = new QContactManager("symbian");
+#endif
+
+ // Use default
+ if (!m_contactManager) {
+ m_contactManager = new QContactManager();
+ }
+}
+
+void BusinessCardHandling::storeAvatarToContact(QString phoneNumber, QString filename,
+ QPixmap pixmap)
+{
+ // Create QContactManager
+ if (!m_contactManager) {
+ createContactManager();
+ }
+
+ // Search contacts and save avatar
+ QContact contact;
+ if (findContact(phoneNumber, contact)) {
+ saveAvatar(filename, pixmap, contact);
+ }
+}
+
+bool BusinessCardHandling::findContact(const QString phoneNumber, QContact& c)
+{
+ // Create QContactManager
+ if (!m_contactManager) {
+ createContactManager();
+ }
+
+ QContact contact;
+ QContactDetailFilter phoneFilter;
+ phoneFilter.setDetailDefinitionName(QContactPhoneNumber::DefinitionName,
+ QContactPhoneNumber::FieldNumber);
+
+#if defined Q_WS_MAEMO_5
+ // Workaround for Maemo bug http://bugreports.qt.nokia.com/browse/QTMOBILITY-437
+ phoneFilter.setValue(phoneNumber.right(7));
+ phoneFilter.setMatchFlags(QContactFilter::MatchContains);
+#else
+ phoneFilter.setValue(phoneNumber);
+ phoneFilter.setMatchFlags(QContactFilter::MatchPhoneNumber);
+#endif
+
+ // Find contacts
+ QList<QContact> matchingContacts = m_contactManager->contacts(phoneFilter);
+ if (matchingContacts.size() > 0) {
+ contact = matchingContacts.at(0);
+ c = contact;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+void BusinessCardHandling::saveAvatar(const QString filename, QPixmap p, QContact& contact)
+{
+
+ // Path to store avatar picture
+ QString path;
+#ifdef Q_OS_SYMBIAN
+ path.append("c:/System/");
+#endif
+ path.append(filename);
+
+ // Remove same file if exists
+ QFile file;
+ if (file.exists(path))
+ file.remove(path);
+
+ // Save pixmap into file
+ bool saveRet = p.save(path);
+
+ if (saveRet) {
+ // Create avatar
+ QContactAvatar contactAvatar;
+ contactAvatar.setImageUrl(QUrl(path));
+ bool saveAvatar = contact.saveDetail(&contactAvatar);
+
+ // Save contact
+ if (saveAvatar)
+ m_contactManager->saveContact(&contact);
+
+ // NOTE: Do not remove picture, system needs it for showing avatar
+ // Remove picture file
+ //bool removeRet = file.remove(path);
+ }
+}
+
diff --git a/demos/mobile/qcamera/businesscardhandling.h b/demos/mobile/qcamera/businesscardhandling.h
new file mode 100755
index 0000000000..f67dd366fb
--- /dev/null
+++ b/demos/mobile/qcamera/businesscardhandling.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 BUSINESSCARDHANDLING_H
+#define BUSINESSCARDHANDLING_H
+
+#include <QObject>
+#include <QPointer>
+#include <QPixmap>
+
+// QtMobility API headers
+// Contacts
+#include <QContactDetailFilter>
+#include <QContactManager>
+#include <QContactPhoneNumber>
+#include <QContactSortOrder>
+#include <QContact>
+#include <QContactName>
+#include <QContactAvatar>
+
+
+// QtMobility namespace
+QTM_USE_NAMESPACE
+
+class BusinessCardHandling: public QObject
+{
+Q_OBJECT
+
+public:
+ BusinessCardHandling(QObject *parent = 0);
+ ~BusinessCardHandling();
+
+ bool findContact(const QString phoneNumber, QContact& contact);
+
+public slots:
+ void storeAvatarToContact(QString, QString, QPixmap);
+
+private:
+ void createContactManager();
+ void saveAvatar(const QString filename, QPixmap p, QContact& contact);
+
+private:
+ QPointer<QContactManager> m_contactManager;
+};
+
+#endif // BUSINESSCARDHANDLING_H
diff --git a/demos/mobile/qcamera/button.cpp b/demos/mobile/qcamera/button.cpp
new file mode 100755
index 0000000000..2a54cd8401
--- /dev/null
+++ b/demos/mobile/qcamera/button.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "button.h"
+#include <QMouseEvent>
+#include <QPainter>
+#include <QTimer>
+
+Button::Button(QWidget *parent, Qt::WindowFlags f) :
+ QLabel(parent, f)
+{
+ m_downPixmap = 0;
+ m_disabled = false;
+}
+
+Button::~Button()
+{
+}
+
+void Button::disableBtn(bool b)
+{
+ m_disabled = b;
+ if (m_disabled) {
+ setPixmap(m_downPixmap);
+ } else {
+ setPixmap(m_upPixmap);
+ }
+}
+
+void Button::mousePressEvent(QMouseEvent *event)
+{
+ if (!m_disabled) {
+ event->accept();
+ setPixmap(m_downPixmap);
+ repaint();
+ // Lift button back to up after 300ms
+ QTimer::singleShot(300, this, SLOT(backToUp()));
+ }
+}
+
+void Button::backToUp()
+{
+ setPixmap(m_upPixmap);
+ repaint();
+ emit pressed();
+}
+
+void Button::setPixmap(const QPixmap& p)
+{
+ // Set up and down picture for the button
+ // Set pixmap
+ if (!p.isNull())
+ QLabel::setPixmap(p);
+
+ // Make down pixmap if it does not exists
+ if (m_downPixmap.isNull()) {
+ // Store up pixmap
+ m_upPixmap = *pixmap();
+
+ // Create down pixmap
+ // Make m_downPixmap as a transparent m_upPixmap
+ QPixmap transparent(m_upPixmap.size());
+ transparent.fill(Qt::transparent);
+ QPainter painter(&transparent);
+ painter.setCompositionMode(QPainter::CompositionMode_Source);
+ painter.drawPixmap(0, 0, m_upPixmap);
+ painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ painter.fillRect(transparent.rect(), QColor(0, 0, 0, 150));
+ painter.end();
+ m_downPixmap = transparent;
+ }
+
+}
diff --git a/demos/mobile/qcamera/button.h b/demos/mobile/qcamera/button.h
new file mode 100755
index 0000000000..f988713c51
--- /dev/null
+++ b/demos/mobile/qcamera/button.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 BUTTON_H
+#define BUTTON_H
+
+#include <QLabel>
+#include <QPixmap>
+
+class Button: public QLabel
+{
+Q_OBJECT
+
+public:
+ Button(QWidget *parent = 0, Qt::WindowFlags f = 0);
+ ~Button();
+
+ void mousePressEvent(QMouseEvent *);
+ void disableBtn(bool);
+
+public Q_SLOTS:
+ void setPixmap(const QPixmap &);
+ void backToUp();
+
+ signals:
+ void pressed();
+
+private:
+ QPixmap m_upPixmap;
+ QPixmap m_downPixmap;
+ bool m_disabled;
+
+};
+
+#endif // BUTTON_H
diff --git a/demos/mobile/qcamera/cameraexample.cpp b/demos/mobile/qcamera/cameraexample.cpp
new file mode 100755
index 0000000000..1c6a4f088e
--- /dev/null
+++ b/demos/mobile/qcamera/cameraexample.cpp
@@ -0,0 +1,517 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "cameraexample.h"
+#include "messagehandling.h"
+#include "contactsdlg.h"
+#include "button.h"
+#include "businesscardhandling.h"
+#include <QDebug>
+
+/*****************************************************************************
+* MyVideoSurface
+*/
+MyVideoSurface::MyVideoSurface(QWidget* widget, VideoIF* target, QObject* parent)
+ : QAbstractVideoSurface(parent)
+{
+ m_targetWidget = widget;
+ m_target = target;
+ m_imageFormat = QImage::Format_Invalid;
+}
+
+MyVideoSurface::~MyVideoSurface()
+{
+}
+
+bool MyVideoSurface::start(const QVideoSurfaceFormat &format)
+{
+ m_videoFormat = format;
+ const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
+ const QSize size = format.frameSize();
+
+ if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) {
+ m_imageFormat = imageFormat;
+ QAbstractVideoSurface::start(format);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool MyVideoSurface::present(const QVideoFrame &frame)
+{
+ m_frame = frame;
+ if (surfaceFormat().pixelFormat() != m_frame.pixelFormat() ||
+ surfaceFormat().frameSize() != m_frame.size()) {
+ stop();
+ return false;
+ } else {
+ m_target->updateVideo();
+ return true;
+ }
+}
+
+void MyVideoSurface::paint(QPainter *painter)
+ {
+ if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
+ QImage image(
+ m_frame.bits(),
+ m_frame.width(),
+ m_frame.height(),
+ m_frame.bytesPerLine(),
+ m_imageFormat);
+
+ QRect r = m_targetWidget->rect();
+ QPoint centerPic((qAbs(r.size().width() - image.size().width())) / 2, (qAbs(
+ r.size().height() - image.size().height())) / 2);
+
+ if (!image.isNull()) {
+ painter->drawImage(centerPic,image);
+ }
+
+ m_frame.unmap();
+ }
+ }
+
+QList<QVideoFrame::PixelFormat> MyVideoSurface::supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const
+{
+ if (handleType == QAbstractVideoBuffer::NoHandle) {
+ return QList<QVideoFrame::PixelFormat>()
+ << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_ARGB32
+ << QVideoFrame::Format_ARGB32_Premultiplied
+ << QVideoFrame::Format_RGB565
+ << QVideoFrame::Format_RGB555;
+ } else {
+ return QList<QVideoFrame::PixelFormat>();
+ }
+}
+
+
+/*****************************************************************************
+* CameraExample
+*/
+CameraExample::CameraExample(QWidget *parent) :
+ QMainWindow(parent)
+{
+ setWindowTitle("QCameraExample");
+
+ // Opitimizations for screen update and drawing qwidget
+ setAutoFillBackground(false);
+
+ // Prevent to screensaver to activate
+ m_systemScreenSaver = new QSystemScreenSaver(this);
+ m_systemScreenSaver->setScreenSaverInhibit();
+
+ m_myVideoSurface = 0;
+ pictureCaptured = false;
+ showViewFinder = false;
+ m_focusing = false;
+
+ // MMS handling
+ m_message = new Message(this);
+ QObject::connect(m_message, SIGNAL(messageStateChanged(int)), this, SLOT(messageStateChanged(int)));
+ QObject::connect(m_message, SIGNAL(messageReceived(QString,QString,QPixmap)), this, SLOT(messageReceived(QString,QString,QPixmap)));
+
+ // Business card handling (Contact's avatar picture)
+ m_businessCardHandling = new BusinessCardHandling(this);
+
+ // Black background
+ QPalette palette = this->palette();
+ palette.setColor(QPalette::Background, Qt::black);
+ setPalette(palette);
+
+ // Main widget & layout
+ QWidget* mainWidget = new QWidget(this);
+ mainWidget->setPalette(palette);
+
+ QHBoxLayout* hboxl = new QHBoxLayout;
+ hboxl->setSpacing(0);
+ hboxl->setMargin(0);
+
+ // UI stack
+ m_stackedWidget = new QStackedWidget();
+ m_stackedWidget->setPalette(palette);
+
+ // First widget to stack
+ m_videoWidget = new QWidget();
+ m_videoWidget->setPalette(palette);
+ m_stackedWidget->addWidget(m_videoWidget);
+
+ // Second widget to stack
+ QWidget* secondWidget = new QWidget(this);
+ secondWidget->setPalette(palette);
+ m_stackedWidget->addWidget(secondWidget);
+ m_stackedWidget->setCurrentIndex(0);
+
+ hboxl->addWidget(m_stackedWidget);
+
+ // Buttons
+ QSize iconSize(80, 80);
+ QVBoxLayout* vboxl = new QVBoxLayout;
+ vboxl->setSpacing(0);
+ vboxl->setMargin(0);
+
+ // Exit button
+ m_exit = new Button(this);
+ QObject::connect(m_exit, SIGNAL(pressed()), qApp, SLOT(quit()));
+ QPixmap p = QPixmap(":/icons/exit.png");
+ m_exit->setPixmap(p.scaled(iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ vboxl->addWidget(m_exit);
+ vboxl->setAlignment(m_exit, Qt::AlignHCenter | Qt::AlignTop);
+
+ // Camera button
+ m_cameraBtn = new Button(this);
+ QObject::connect(m_cameraBtn, SIGNAL(pressed()), this, SLOT(searchAndLock()));
+ p = QPixmap(":/icons/camera.png");
+ m_cameraBtn->setPixmap(p.scaled(iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ vboxl->addWidget(m_cameraBtn);
+ vboxl->setAlignment(m_cameraBtn, Qt::AlignCenter);
+
+ // Send MMS button
+ m_mms = new Button(this);
+ QObject::connect(m_mms, SIGNAL(pressed()), this, SLOT(openContactsDlg()));
+ p = QPixmap(":/icons/mms.png");
+ m_mms->setPixmap(p.scaled(iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ vboxl->addWidget(m_mms);
+ vboxl->setAlignment(m_mms, Qt::AlignHCenter | Qt::AlignBottom);
+#ifndef MESSAGING_ENABLED
+ m_mms->disableBtn(true);
+ m_mms->setEnabled(false);
+#endif
+
+ hboxl->addLayout(vboxl);
+ mainWidget->setLayout(hboxl);
+
+ setCentralWidget(mainWidget);
+
+ // Enable camera after 1s, so that the application is started
+ // and widget is created to landscape orientation
+ QTimer::singleShot(1000,this,SLOT(enableCamera()));
+}
+
+CameraExample::~CameraExample()
+{
+if (m_myVideoSurface)
+ m_myVideoSurface->stop();
+ m_camera->stop();
+ delete m_stackedWidget;
+ delete m_stillImageCapture;
+ delete m_camera;
+}
+
+
+void CameraExample::enableCamera()
+{
+ m_camera = new QCamera();
+ m_camera->setCaptureMode(QCamera::CaptureStillImage);
+ connect(m_camera, SIGNAL(error(QCamera::Error)), this, SLOT(error(QCamera::Error)));
+ connect(m_camera, SIGNAL(lockStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)), this, SLOT(lockStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)));
+
+ // Own video output drawing that shows camera view finder pictures
+ //! [0]
+ QMediaService* ms = m_camera->service();
+ QVideoRendererControl* vrc = ms->requestControl<QVideoRendererControl*>();
+ m_myVideoSurface = new MyVideoSurface(this,this,this);
+ vrc->setSurface(m_myVideoSurface);
+//! [0]
+ // Image capturer
+ m_stillImageCapture = new QCameraImageCapture(m_camera);
+ connect(m_stillImageCapture, SIGNAL(imageCaptured(int,QImage)), this, SLOT(imageCaptured(int,QImage)));
+
+ // Start camera
+ if (m_camera->state() == QCamera::ActiveState) {
+ m_camera->stop();
+ }
+ m_videoWidget->show();
+ m_camera->start();
+ showViewFinder = true;
+}
+
+void CameraExample::mousePressEvent(QMouseEvent *event)
+{
+ QMainWindow::mousePressEvent(event);
+
+ if (pictureCaptured) {
+ // Starting view finder
+ pictureCaptured = false;
+ m_stackedWidget->setCurrentIndex(0);
+ if (m_myVideoSurface) {
+ showViewFinder = true;
+ }
+ }
+}
+
+void CameraExample::searchAndLock()
+{
+ m_focusing = false;
+ m_focusMessage.clear();
+
+ if (pictureCaptured) {
+ // Starting view finder again
+ pictureCaptured = false;
+ m_stackedWidget->setCurrentIndex(0);
+ if (m_myVideoSurface) {
+ showViewFinder = true;
+ }
+ }
+ else {
+ // Search and lock picture (=focus)
+ if (m_camera->supportedLocks() & QCamera::LockFocus) {
+ m_focusing = true;
+ m_focusMessage = "Focusing...";
+ m_camera->searchAndLock(QCamera::LockFocus);
+ } else {
+ // No focus functionality, take picture right away
+ captureImage();
+ }
+ }
+}
+
+void CameraExample::lockStatusChanged(QCamera::LockStatus status, QCamera::LockChangeReason reason)
+{
+ if (status == QCamera::Locked) {
+ if (reason == QCamera::LockAcquired) {
+ // Focus locked
+ m_focusMessage.clear();
+ m_focusing = false;
+ // Capture new image
+ captureImage();
+ // Unlock camera
+ m_camera->unlock();
+ } else {
+ if (m_focusing)
+ m_focusMessage = "No focus, try again";
+ }
+ } else if (status == QCamera::Unlocked && m_focusing) {
+ m_focusMessage = "No focus, try again";
+ }
+}
+
+void CameraExample::captureImage()
+{
+ if (pictureCaptured) {
+ // Starting view finder again
+ pictureCaptured = false;
+ m_stackedWidget->setCurrentIndex(0);
+ showViewFinder = true;
+ }
+ else {
+ // Capturing image
+ showViewFinder = false;
+ // Get picture location where to store captured images
+ QString path(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
+ QDir dir(path);
+
+ // Get next filename
+ QStringList files = dir.entryList(QStringList() << "camera_*.jpg");
+ int lastImage = 0;
+ foreach ( QString fileName, files ) {
+ int imgNumber = fileName.mid(7, fileName.size() - 11).toInt();
+ lastImage = qMax(lastImage, imgNumber);
+ }
+ // Capture image
+ if (m_stillImageCapture->isReadyForCapture()) {
+ m_imageName = QString("camera_%1.jpg").arg(lastImage+1);
+ m_stillImageCapture->capture(m_imageName);
+ }
+ }
+}
+
+void CameraExample::imageCaptured(int id, const QImage &preview)
+{
+ showViewFinder = false;
+ m_focusing = false;
+
+ // Image captured, show it to the user
+ m_stackedWidget->setCurrentIndex(1);
+
+ // Get picture location
+ QString path(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
+ m_imageName.prepend(path + "/");
+
+ m_capturedImage = preview;
+
+ // Set suitable size to the image
+ QSize s = m_videoWidget->size();
+ s = s - QSize(20, 20);
+ m_capturedImage = m_capturedImage.scaled(s, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+
+ pictureCaptured = true;
+ update();
+}
+
+void CameraExample::error(QCamera::Error e)
+{
+ switch (e) {
+ case QCamera::NoError:
+ {
+ break;
+ }
+ case QCamera::CameraError:
+ {
+ QMessageBox::warning(this, "QCameraExample", "General Camera error");
+ break;
+ }
+ case QCamera::InvalidRequestError:
+ {
+ QMessageBox::warning(this, "QCameraExample", "Camera invalid request error");
+ break;
+ }
+ case QCamera::ServiceMissingError:
+ {
+ QMessageBox::warning(this, "QCameraExample", "Camera service missing error");
+ break;
+ }
+ case QCamera::NotSupportedFeatureError :
+ {
+ QMessageBox::warning(this, "QCameraExample", "Camera not supported error");
+ break;
+ }
+ };
+}
+
+void CameraExample::openContactsDlg()
+{
+ // Open dialog for showing contacts
+ if (!m_contactsDialog) {
+
+ if (m_capturedImage.isNull()) {
+ QMessageBox::information(this, "QCameraExample", "Take picture first");
+ return;
+ }
+
+ // Show dialog
+ m_contactsDialog = new ContactsDialog(this);
+ QObject::connect(m_contactsDialog, SIGNAL(contactSelected(QString)),
+ this, SLOT(contactSelected(QString)));
+ m_contactsDialog->exec();
+ QObject::disconnect(m_contactsDialog, SIGNAL(contactSelected(QString)),
+ this, SLOT(contactSelected(QString)));
+
+ delete m_contactsDialog;
+ m_contactsDialog = 0;
+ }
+}
+
+void CameraExample::contactSelected(QString phoneNumber)
+{
+ m_phoneNumber = phoneNumber;
+ QTimer::singleShot(1000,this,SLOT(sendMMS()));
+}
+
+void CameraExample::sendMMS()
+{
+#ifdef MESSAGING_ENABLED
+ m_message->sendMMS(m_imageName, m_phoneNumber);
+#endif
+}
+
+void CameraExample::messageStateChanged(int /*error*/)
+{
+}
+
+void CameraExample::updateVideo()
+{
+ if (showViewFinder) {
+ repaint();
+ }
+}
+
+void CameraExample::paintEvent(QPaintEvent *event)
+{
+ //QMainWindow::paintEvent(event);
+
+ QPainter painter(this);
+ QRect r = this->rect();
+
+ QFont font = painter.font();
+ font.setPixelSize(20);
+ painter.setFont(font);
+ painter.setPen(Qt::white);
+
+ if (showViewFinder && m_myVideoSurface && m_myVideoSurface->isActive()) {
+ // Show view finder
+ m_myVideoSurface->paint(&painter);
+
+ // Paint focus message
+ if (!m_focusMessage.isEmpty())
+ painter.drawText(r, Qt::AlignCenter, m_focusMessage);
+
+ } else {
+ // Draw black
+ painter.fillRect(event->rect(), palette().background());
+ // Show captured image
+ if (pictureCaptured) {
+ // Paint captured image
+ QPoint centerPic((qAbs(r.size().width() - m_capturedImage.size().width())) / 2, (qAbs(
+ r.size().height() - m_capturedImage.size().height())) / 2);
+
+ painter.drawImage(centerPic, m_capturedImage);
+
+ // Paint filename
+ painter.drawText(r, Qt::AlignBottom | Qt::AlignCenter, m_imageName);
+ }
+ }
+
+}
+
+void CameraExample::messageReceived(QString phoneNumber, QString filename, QPixmap pixmap)
+{
+#ifdef MESSAGING_ENABLED
+ // MMS message received
+ // Check that is came from some of our contact
+ QContact contact;
+ if (m_businessCardHandling->findContact(phoneNumber, contact)) {
+ // Ask from user to store it as sender avatar picture into contacts
+ if (QMessageBox::question(
+ this,
+ "QCameraExample",
+ QString(
+ "MMS picture message received from %1. Do you want to store it as sender avatar picture?").arg(
+ contact.displayLabel()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+
+ m_businessCardHandling->storeAvatarToContact(phoneNumber, filename, pixmap);
+ }
+ }
+#endif
+}
+
diff --git a/demos/mobile/qcamera/cameraexample.h b/demos/mobile/qcamera/cameraexample.h
new file mode 100755
index 0000000000..8098ff4307
--- /dev/null
+++ b/demos/mobile/qcamera/cameraexample.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 QCAMERAEXAMPLE_H
+#define QCAMERAEXAMPLE_H
+
+#include <QtGui>
+
+// Multimedia API in QtMobility API
+// Unlike the other APIs in Qt Mobility,
+// the Multimedia API is not in the QtMobility namespace "QTM_USE_NAMESPACE"
+#include <QCamera>
+#include <QCameraImageCapture>
+
+// QtMobility API
+#include <QSystemScreenSaver>
+QTM_USE_NAMESPACE
+
+
+#include <QAbstractVideoSurface>
+#include <QVideoRendererControl>
+#include <QVideoSurfaceFormat>
+
+/*****************************************************************************
+* MyVideoSurface
+*/
+class VideoIF
+{
+public:
+ virtual void updateVideo() = 0;
+};
+class MyVideoSurface: public QAbstractVideoSurface
+{
+Q_OBJECT
+
+public:
+ MyVideoSurface(QWidget* widget, VideoIF* target, QObject * parent = 0);
+ ~MyVideoSurface();
+
+ bool start(const QVideoSurfaceFormat &format);
+
+ bool present(const QVideoFrame &frame);
+
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
+
+ void paint(QPainter*);
+
+private:
+ QWidget* m_targetWidget;
+ VideoIF* m_target;
+ QVideoFrame m_frame;
+ QImage::Format m_imageFormat;
+ QVideoSurfaceFormat m_videoFormat;
+};
+
+
+
+/*****************************************************************************
+* CameraExample
+*/
+class Message;
+class ContactsDialog;
+class Button;
+class BusinessCardHandling;
+class CameraExample: public QMainWindow, public VideoIF
+{
+Q_OBJECT
+
+public:
+ CameraExample(QWidget *parent = 0);
+ ~CameraExample();
+
+ void paintEvent(QPaintEvent*);
+ void mousePressEvent(QMouseEvent *);
+
+ void updateVideo();
+
+
+public slots:
+ void enableCamera();
+ void lockStatusChanged(QCamera::LockStatus status, QCamera::LockChangeReason reason);
+ void searchAndLock();
+ void captureImage();
+ void imageCaptured(int id, const QImage &preview);
+ void error(QCamera::Error);
+
+ void openContactsDlg();
+ void contactSelected(QString phoneNumber);
+
+ void messageStateChanged(int error);
+ void messageReceived(QString phoneNumber, QString filename, QPixmap pixmap);
+
+ void sendMMS();
+
+private:
+ QWidget* m_videoWidget;
+ QCamera* m_camera;
+ QCameraImageCapture* m_stillImageCapture;
+
+ QStackedWidget* m_stackedWidget;
+ Button* m_exit;
+ Button* m_cameraBtn;
+ Button* m_mms;
+ QImage m_capturedImage;
+ QString m_imageName;
+ QString m_focusMessage;
+ bool m_focusing;
+ QString m_phoneNumber;
+
+ Message* m_message;
+ QPointer<ContactsDialog> m_contactsDialog;
+ BusinessCardHandling* m_businessCardHandling;
+ bool pictureCaptured;
+ bool showViewFinder;
+ MyVideoSurface* m_myVideoSurface;
+ QSystemScreenSaver* m_systemScreenSaver;
+};
+
+#endif // QCAMERA_H
diff --git a/demos/mobile/qcamera/contactsdlg.cpp b/demos/mobile/qcamera/contactsdlg.cpp
new file mode 100755
index 0000000000..defd34c190
--- /dev/null
+++ b/demos/mobile/qcamera/contactsdlg.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "contactsdlg.h"
+#include <QHBoxLayout>
+#include <QApplication>
+#include <QAction>
+#include <QTimer>
+#include <QPushButton>
+
+ContactsDialog::ContactsDialog(QWidget *parent) :
+ QDialog(parent)
+{
+ QHBoxLayout* l = new QHBoxLayout;
+ m_listWidget = new QListWidget(this);
+ l->addWidget(m_listWidget);
+
+ QVBoxLayout* lv = new QVBoxLayout;
+
+ QPushButton* backBtn = new QPushButton("Back",this);
+ QObject::connect(backBtn, SIGNAL(pressed()), this, SLOT(close()));
+ backBtn->setFixedWidth(100);
+ lv->addWidget(backBtn);
+ lv->setAlignment(backBtn,Qt::AlignTop);
+
+ QPushButton* okBtn = new QPushButton("Ok",this);
+ QObject::connect(okBtn, SIGNAL(pressed()), this, SLOT(selectContact()));
+ okBtn->setFixedWidth(100);
+ lv->addWidget(okBtn);
+ lv->setAlignment(okBtn,Qt::AlignBottom);
+
+ l->addLayout(lv);
+
+ setLayout(l);
+
+ // Remove context menu from the all widgets
+#ifdef Q_OS_SYMBIAN
+ QWidgetList widgets = QApplication::allWidgets();
+ QWidget* w = 0;
+ foreach (w,widgets)
+ {
+ w->setContextMenuPolicy(Qt::NoContextMenu);
+ }
+#endif
+
+ // Create QContactManager and search contacts
+ createContactManager();
+ searchContact();
+
+ showFullScreen();
+}
+
+ContactsDialog::~ContactsDialog()
+{
+ delete m_contactManager;
+}
+
+void ContactsDialog::createContactManager()
+{
+#if defined Q_WS_MAEMO_5
+ m_contactManager = new QContactManager("maemo5");
+#elif defined Q_OS_SYMBIAN
+ m_contactManager = new QContactManager("symbian");
+#endif
+
+ // Use default
+ if (!m_contactManager) {
+ m_contactManager = new QContactManager();
+ }
+
+}
+
+void ContactsDialog::searchContact()
+{
+ m_listWidget->clear();
+
+ // Sort contacts by lastname
+ QContactSortOrder sort;
+ sort.setDirection(Qt::AscendingOrder);
+ sort.setDetailDefinitionName(QContactName::DefinitionName, QContactName::FieldLastName);
+
+ // Build QListWidget from the contact list
+ QList<QContactLocalId> contactIds = m_contactManager->contactIds(sort);
+ QContact currContact;
+ foreach (const QContactLocalId& id, contactIds)
+ {
+ QListWidgetItem *currItem = new QListWidgetItem;
+ currContact = m_contactManager->contact(id);
+ QContactDisplayLabel dl = currContact.detail(QContactDisplayLabel::DefinitionName);
+ currItem->setData(Qt::DisplayRole, dl.label());
+ currItem->setData(Qt::UserRole, currContact.localId()); // also store the id of the contact
+ m_listWidget->addItem(currItem);
+ }
+
+ if (m_listWidget->count()>0) {
+ m_listWidget->setCurrentRow(0);
+ }
+}
+
+void ContactsDialog::selectContact()
+{
+ QList<QListWidgetItem*> items = m_listWidget->selectedItems();
+ if (!items.isEmpty()) {
+ itemClicked(items.first());
+ }
+}
+
+void ContactsDialog::itemClicked(QListWidgetItem *item)
+{
+ QVariant data = item->data(Qt::UserRole);
+ QContactLocalId id = data.toInt();
+ QContact contact = m_contactManager->contact(id);
+ QContactPhoneNumber cpn = contact.detail<QContactPhoneNumber> ();
+
+ // Emit contact phonenumber
+ if (!cpn.isEmpty()) {
+ emit contactSelected(cpn.number());
+ // Close dialog
+ close();
+ }
+}
+
diff --git a/demos/mobile/qcamera/contactsdlg.h b/demos/mobile/qcamera/contactsdlg.h
new file mode 100755
index 0000000000..4397110426
--- /dev/null
+++ b/demos/mobile/qcamera/contactsdlg.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 CONTACTSDIALOG_H
+#define CONTACTSDIALOG_H
+
+#include <QtGui/QDialog>
+#include <QListWidget>
+#include <QPointer>
+
+// QtMobility API headers
+// Contacts
+#include <QContactManager>
+#include <QContactPhoneNumber>
+#include <QContactSortOrder>
+#include <QContact>
+#include <QContactName>
+
+// QtMobility namespace
+QTM_USE_NAMESPACE
+
+class ContactsDialog: public QDialog
+{
+Q_OBJECT
+
+public:
+ ContactsDialog(QWidget *parent = 0);
+ ~ContactsDialog();
+
+public slots:
+ void itemClicked(QListWidgetItem *item);
+ void selectContact();
+
+signals:
+ void contactSelected(QString phoneNumber);
+
+private:
+ void createContactManager();
+ void searchContact();
+
+private:
+ QPointer<QContactManager> m_contactManager;
+ QListWidget* m_listWidget;
+};
+
+#endif // CONTACTSDIALOG_H
diff --git a/demos/mobile/qcamera/icons/camera.png b/demos/mobile/qcamera/icons/camera.png
new file mode 100755
index 0000000000..dc4ecbf74f
--- /dev/null
+++ b/demos/mobile/qcamera/icons/camera.png
Binary files differ
diff --git a/demos/mobile/qcamera/icons/cameramms_icon.svg b/demos/mobile/qcamera/icons/cameramms_icon.svg
new file mode 100755
index 0000000000..ae6f354337
--- /dev/null
+++ b/demos/mobile/qcamera/icons/cameramms_icon.svg
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="128"
+ height="128"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="camera.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="474.09541"
+ inkscape:cy="161.58756"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1098"
+ inkscape:window-height="864"
+ inkscape:window-x="565"
+ inkscape:window-y="18"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-924.36218)">
+ <image
+ y="923.7124"
+ x="-0.36037713"
+ id="image3004"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAIABJREFU
+eJztfXuYHVWV72/V49R59jPpTnfSSXceEAgvmYtE4bsBBnT8ooI4AR8QBhBhlMHvfiGAysAIfCZw
+B4SBBBkixBlQBCYjIChXHPhQbq48DQYIJIE0aciLkPQr3edU1V73j6pdvU+dqtPn9DkRvbdXf9VV
+Z79q7bXXXq+9qwqYhEmYhEmYhEmYhEmYhEmYhEmYhEmYhEmYhEmYhEmYhP/HgT6qG7/wwgtwHAeJ
+RGIMGSIwM4g8tJg5SJcQlV+uTBSE2wjfN6p8+B7jta3WKXePRCIBIQSOOuqocdv+i4ctW7Z81Cj8
+2cOePXv+pPc76BLgrbfewiGHHBL8fvHFF9vb29tPJ6L/ZprmDGZOlsODmaFp2sFG86CAEGJcqUFE
+o47jfMjMLw4ODv7qsMMOe0PmjYyM4I477sDy5csPGo4HjQF6e3sxa9YsAMCLL77Y2d7e/h1d18/W
+dX2KLCNFoiRSFLEqEbt/zqCqqXAaM5eoBdd1XSHEfwwPD9986KGHPg8Au3fvRltb20HBr+7U/djH
+Pobly5fjK1/5Ch599NHMMcccc28ikViiFGG/w6QOPBGxis9f+sCHIcQIzMykMoKfBig0cBxnw759
++5YceeSRm9944w3asmULf+5zn6srXnWn8rZt27Tu7m7x5ptvLslmsw/64lv2nuRg+6PPQaJPlIgm
+ixgjJj1ov0I0w21OpL5avhIcA5DMzmNcIa9JCBHUJSISQmB0dHTl7Nmzv83MGhGJcHu1QN2U66JF
+i8DM6O7uFps3b74tl8s9SESOL+Ykt7N/gD0AM0MIwa7ryrQwIHQO6oWuo/IrabOSsuO1H5UfxjkA
+13UhhCiqJ2kiSSOEgM8MTjKZvGrbtm2/l4P/5JNP1mvY6icB2Ndlmzdvvj+TyXyFmQURETNThJ4v
+mRl+56uRAH8JENsnKtVxUip4P8bsA/bPVCgUtnZ3d88FgDPPPBPr1q2rGcG6EHbTpk2YP38+3njj
+jRW5XO4qjHVcivhAzIfEvSpKOeIcxjMs9sMqoFyfxmtXTSvHdLXgFddHCqkFkhJErUtENDo6+vs5
+c+YslBOuVqjbzHr++ef/uqOj4ym1I+y7cCoDyE7JwIjSyTBe4Yw4hkFMWcTkRZWrpEy5+5QMaEzZ
+kvuoklEZ1IB+0pVUbCbq7+9fsWDBgu8sW7YMN998cxnUx4eaGWDXrl16e3u7+/bbb4+apmlJJKX4
+kqIuxK0lM6ZGFVCtmogqX482Ki2jqoAiqSCZQFEFLNWoLC+EoJdffrnnjDPO2FarFKjJCHziiSfQ
+3t7ubtiw4UbTNK0IAynKyCr3Oy4tzuCqtF5Uuai2qm2jEryq6r8/5uXqExHh8MMPf5CIcM0119TE
+ADWxT6FQwLXXXpu56KKL9uu6rhGRBkXMlQvwlAOOVgtxECdug+aqunl0+3FtRYr12IYmSAfJAGp9
+IQRt2bLl2FNPPfWVqhoNgTHRivPnz0cikcBzzz13jq7rhuRQP5t8McaapsmOqGI+TmdWYgSGy4ch
+nFZOz1eSF06LY4Jwf8LtVtV/35aSriCF6atpGlpbW68B8IUwc1QDNdsAr7322tZsNtvNXpBCyjAi
+ImiaxhI5P21cAkgiSfdH5ivuI0JtwJeLAaPFrPQV3dNPi7XWWdG7ajvwI5mhe8UygNp/KF5QXP/l
+vWUeEUEIQUofZFu2EMKcPXu2DmDCwaGabIATTzyxwTTN2bZtu0IIsBfwGbNWxmZ+YAuO12ZAUa+d
+sLtc1L5Sp2TwZbqST0obAX4hdUOhc4nolfVjZhxF9DFIi/D9I9tQrH5S8ZP0ZWa4rqs7joNf/vKX
+iypoMxYmrAIAYPny5Uc4jgPDMHQfQfbdPpWDA6MmwhMIX5eIYsUwUmdvrI8uGSHqPnG2hZLOEekU
+la8yUcS91NnNMfeN7b8sr0od2aYfISQpFSzLOhLA05EdqwBqYgAimsfMcByHdF2HrutF8W1/8Itc
+GGB8HRiaKWFdX24WVWITjGe0VdJ+XBvlYhVAlf1XVA6xHxMQQpAfSiYAEEJ8bJz+lIWaGMA0zRY/
+UCERV1f2JAeHvYKo2T7m/5TmRZatoFwlFnpUfpxBOF7ZinEM0UG9DtMB8reUokIIFkLAXzshIuqM
+wKtiqIkBbNvOuq4bRKqEENLwI994YU3TVH1ajRcQVEPxzIu7Bkpnb1xgKZwfVz+urShrf7zr4HeI
+DkBM/5UJpBqV5EsCyRQJ1AA1MYCCRInlijFrWXJ8WQmg6LqiPNX6VfLKERgxaWUhfB/FZhmvrdiZ
+H4F7UCaiT8E5IEbI9lBcQfKNbijLxxOCmrwA1YpWpZaiCmpesKjHgke4vXJHOp0G89gaRq33qgQi
+vJEiXMPXIc+gJhzrwgAKE0QZa9INksGM8LnIRQvXCf1Wy4Svw+WK0nxDigzDINM0i/AnIhiGgZ07
+d9Kq1asJAOmaVrKUXab9ctdRfSnqfzgtrv+hsrGMUw3UpAJCoIr6EoNQLRc6R6XV3QhkZpimiXvu
+uQd/3LgR3/j7v8e8efNYCIFdu3Zhz+49+NWTv+If3HorfvzjH+Piiy/GWUuWQNd1EBFpmlY3I7BM
+mbIqMEzPekjHmhlAmSHScGFmJmUrWNVuUEyd8a6BmNnpui6y2Szee+89XHfd9ZzOpPGb3/wGnZ2d
+1Nv7LlzHYRCQME3MnTuPEokEVq1ajR/eeSdWrFiBRYv+O2zbIWV3cqwRyMzsui4lk0kA4NHRUfKZ
+aEL99yeTGglUDULUCnWTAGH3D2NuYRSx1PN4afI60vCLCsQoBIPjONzX14dvfetb2Lr1bUyZOgXN
+zS1IpVIYGRnBtGnTAAJ0TYdhGEin05xKpyGEwNDgAP7HsmX09a9dhIsv/jps22bDGCOZHwNBMpmU
+NgMTEd5//31ce+0/saZruOD887m7uxuhQay4/2ogSNKTPEA9oJ4qAFDcF0TP5vAgRs2AuLJqWtxK
+Y1G+67owTZOWLbsc27b1oqWlBelMBk3NTZxKptDY2AjHcbzyGkHTdDK8gBYA76mdbK4B9//kJ9i8
+ZTNWrlwRuLryHoODg7jrrrvQ++676N+/nz78cB927tyBvXv3km6Y/MQTT9DLL70kcaq6/+qAKzZC
+3aDWSGDYSi3a8i3TFOMl3MkoKCJOOHws2yJvsQmyYfJWHdkPk0IIAV3X8bOf/Qyvvvoqps/o5Obm
+VspkM5xIWNA0DToAM3g0jUDk++k+DoZhQNN1zJo1Cxs3voZzz12KO1ev5oaGBgDAvn378NennoqR
+AyNIpVNIJBJsGCY0TafpM2ZA100ce+wx0h0kqR6r6b8KmqZJqVoyESYKdWOAuPRaXUGV41XXbNu2
+bejr68PevXvxwQcfoL+/Hx2dnThs/nxMnz4dbW1t6OvrwzXXXIu29nY0NbWgsbGRDd8DKNXiDOnM
+BPcGQAQkrATa2tvRv38fvvyVr+KHd65GT08P/vXuuzE4MIDpM7qQy+WQSCSg6Tp0TYNuGEiYJjZv
+2YJ3t29HT3d3QI9q+x+mZ9R5olBPG6BI/8v0iIWUiqxgRYSjt7eXX331VTz//PPYsOFVvPnWm2wX
+bJCm6EMiaKSByNsylUgkYJoJpLMZzmazSGey0HTdx0fBKVKiyj4wwCDAcxObmlt4YGAA5y5dim9+
+85t4+KGHMK2jk1taW5HLZVk3DBAIJGsRIZPJYPXqO3HF8mU8ZcpUCCFY9/CYqBcU5VlNGGqWAPIs
+B0LVWb7ICq+mxVrBUkYCINu2kUgkcOONN/Kdd95JjuMimUpyOpOmluYWGKbBhmHKRShoug4NIMEC
+juPAtm24rouklaJcYw5WwixZm4Ay/zVNQ6FQQKFQIG+AADNhwgiYBtB0nRobGpAwTb7llh8gk80h
+l8tRJpNhwzClZPbEPHsXhm7S1q1bcdZZX8LS85by3523lFzXZcMwihbOImgT0CyKtqEJN2GolwRQ
+B7kEI1VlhbNQHOaEZVkEAI7jYNnll+NnD/wMndM7kbSSSKZSlEgkYBgGdMMgXdehaTo0CoyOIDwq
+hAALAU3TYZoG4K1NqPckiQKzINdx+JOf/ATNP+QQdHR0QDDjkUcexcbXXkPCNL0pzQLQNCSTSeqZ
+PZvtQgGmaULXdQKgtl/Uw0w2C8MwsGrVatr4x424+eZ/VjekhGdz2OiJy6uLG1CvOIDkTNUIjHID
+Y908IQQKhQLfd999eO655+iVV17hvR/uxYwZM9DY1MSZbIYSCYt1XYNGGoEil4190P2p6KUTRYZM
+fSYQME2Tr/3Hf8TMmTPVVTdcdeUV+IfLLqP9+/uhe+4fgxmkESwrAcs3IImI/eXZkr4yM2tEsCyL
+5sydw//n97/H4088gS+ccQZLDwSlor+IVsoCWxF9UQcmqGscACGxHhOpCGaglPjMTJlMhr/73e/S
+Pffcw1OmTkUymUJn53Rkcw3IZbNkJhKQGkc2FOMSlUgZxbgrmXGuK3DM0Yejp6cHvosX4GdZFpqb
+mtH33ntoyDWANG/GFgluFBkS0UwAz81MJCxMnTqVCvl8wDARHlIpp0aH2GsOAwN18gJojC1VWwDK
+7qCgirxgZti2TZlMBs8++yzuuOMO/O53z6G7p4ey2RzS6RQlEhbMRIINXZdWepwIrGQmlMQSJAwO
+DpIQrpQYwaYL13XxwosvAExIpzMwyACi3bhyuBTlGYYB23ZK6BaHp1xNDdOWiKgeC1b1kgCRRp2M
+fEVxqhCCt2zZguVXXIFXXnkF6VQa0zqmcWNjI7K5HEwzAW/CFa2JR4nI8fRouWlCBMKGV//I6/7z
+5zj5pJMAeP79jh078D//+Z/Rt72PpnfNALOAL67C9xkPp5JQ5dCB4SJjNMJTCkMcfT96FaBwZAmH
+Sj2lcqm0lDdt2kSnnnYaNzc1obOzk9LpNGcyWUqlUjANE2N6u2hDRNnZFYdiRNpYm8RIWkmsXrUa
+//qvd9Pw0BB2796NwaFBTGltRVNzE6yEBfKNRWWI4gYeofSS6T08NBTo9HJl5X0UulKI3jFdrhxq
+Wg4uY93LfIpDcufOnTDNBDU2NVFr6xS0tE5BNpeFaZrwDG6G/0fBVfEfxVxX8jdW3mMyampu9hDV
+CFOmTsHcuXMxta0NLS2tSKVSHk5c9f1L0k3TxLPP/ha2bQc7n8cjc7n0PwsVQOMEJqKQHBwcZEPX
+kc3lkM16QRpCSMpWZuPUogKCwrquI5fLIZVKQYChgfz4gv/AEwOiVJdFGm1lgRnC39sHlNAmygCM
+HeTY2VUF1EUFSGQU10+9jqw3ODgI0rwIG3ny3remY/sUpWNrJYCnj/x2NV1DQksU5/paqAxuURZ8
+LGMwGK5cgKpQjKtrCSH1+tGvBZTLRjERAsNF0zTu6+sj0zDZTyQOdH2JwSfrVoxWzO9YNysALsKb
+IuZjNTM+sv/gijeFTrT/VUFNDBBh3Y8njqFpGt577z388Ic/RPu0aV47YBATQoF5deBi26tTXrXt
+xDHBuP0HextUqsChmv5XDTUxgPryhzKegFqFdF3Hzp07wQBM0ySNdM/gU3Y6hW5Tie9f6+BWS9SJ
+4AjAC5m7yksfIqRoSR35gG2YtsBHrAJUCVBNVIqIyDAMmGYCpPmPP/HBE3MTBgbk4pLjOHBdAWYR
+BLm8PphVu2Su45QUlhtQpdGnGn9h2srfH3kkcMJAxJqmkXxmRN329JHgE4CHAmmEoaEhZDIZzJ0z
+BwsWLMD8Qw/FlClT0NDQgJGREXy4bx+2bt2KP776R2zeugV79uxBLpfzWmEGxXSFEXgA4QIcZoI/
+BdQ7Ehh5LTlVBobgzXiMPedQFNEKE6ds28o1UBkDRRlXDAY0XcfQ0BB1dHTgaxdeiBM++UlMnToV
+RATbtmFZFogIo6OjPNNx8ImFCyl5YRK7d+/mZ3/7W3rooYfxzjvvcC6XI++Jqai+ECk2QBHeRCVP
+AlXa/wnDn0QCRHEzBxwg4MWjahdnEwdCoVCAYIFLLrkYXzjjDJimCdu2YRgG8vk8tm7dip8/8gg2
+/OEP2L+/HwW7gFQyhc7ODixcuBCnn346Prt4MR77xS9w6623wjRNcIzTwMyRhmBY7P8ppEC9GSBq
+FKNnpx8Q8YRD5ONN48XFJ5IXCaOjI5g1axZWrliB9vZ2lg+8moaB22+/HT/5yU+wceNGZLJZpJIp
+Ngzd249IGra+vRVPPvm/sGLlSpx91ll85ZVX4tBDDsGFX7sIyWQKRN5y9Bhe8Q90hHT+RPpfNRyM
+XcEVTWU58N4iS9kAS1R6uftXgR9hZOQATjjhk7jue9+DpmkQQpBlWbxu3Tp85zvfwZ4P9iKbyWD6
+9OlIJCyYpkmGYbCmj0XRm5uaUbBt/Md/rKOHHn6Yc7kciAiGbsAwDYTHWm4njwLFCJxI/6uGgykB
+ynEwpPoXgkEUkCiufqW6L0raxOJUKBTw8Y8fhxtXrkShUAAAuK7LF37ta3jowQe5qakJbVOnUCqd
+hmVZMA2TNV0uwZK/YAWAGJabRDqd4nw+j4K3U4gFu2AuWW6ReyC4KKE+/a8aDpYNUE4VBL+E4DgJ
+MH79sbQJEcN1XbS1tWHlihVwHW99Pp/PY/HixdiwYQOmdXQgmUwinUrDTCSg6xq8l6CN3VoIeIYe
+EzSNoGkJGIaJdNqL82ua93yBH/ZXBlzAdYslgBJSBzD2mN04/a8ZDhYDFImvKIPGMwIFmAEiLhGT
+47WppFUNuq5hcHAY37v2DmiaBtfbCYTFixdj8+bNmNbRgWw2i2QyCW+fv3ebqEex5ZYH27aRz+eh
+6wZ0XSdNI7ZtL34ghItUKg3dVxtEGt59tw8dHZ0oFApQAj1+m4HXNF7/a4Z6rQUEgSk1G/4MjeRm
+ZhIMVQLEzWY1vWyULQ7NcMLQ0DDOWrIEC45YIL9bRF/96ld506Y3qbmlGblsDslUMnhCyJ/B4bYY
+8DavjoyM0Ny5c/HpT51GRxxxJNqntSOTTtPw8DBv395Hr766Aev+8+cYHBxEKpVCJpPhS/7+Elp1
++x34+PEfVx8AjYrulfR/LAhYuyaoeyRwvOigtIAZMijCqOM293FB0zSkUkksXboUtm1D0zT8+7//
+Ox5//HG0T5uGTCYTPOsXeoagBIaHh7FgwQJcfPHFWHj88UqOJ9Gam5vR1dWFT3xiIc4//3zcc++9
+WLt2LdLpNKxkEhdceCEeffQRdHV1QX3mMAriaF1rNLBe7wdg/zfLE3sAAKwealkWwT+1ThgQka+m
+gUvrxqXz6GieTznlFG5vb2cAGBoawpVXXslt7e1IpVJsWRaTRrFtCR/dAwcO4NJLL8Xae+/FwuOP
+L/regeO4KNg2Z9Jp6LrOtm2zpmn8rcsu49tuvZWHhw+AiDiby/I3v3kpk7eruIRWKi0DmkX0vxao
++YMRIQKpRI/Ml2nwZ1dM/dg2K0iLPwTjwIFhfOGMMzAyMgJd1/HjH/8Yo/k8TMNAwrKgaXrZ+swC
+AwMDWPH972Ppueci7+3wDeL3Eq8f3HILZnZ34/LLL8fOnTuRSqUwODiI448/Hv949Xfx4d69SCQS
+6H23F4899lg5Wso8DmiHaOk6EahZAoSvfaRJuQ7S5LWu62CQT1CFuGMHhX5XkxZ7CBaYMWMGpk+f
+HuC9Zs2P0NDQAMuyYOg6gPj6IKC/fwArV6zAokWL4DiOfDVeeMDouuuuwx233467774bxx+/ED/6
+0Y/IsizYto3PfvazOPmkkzAwMIDGhkasvvNO6LoO+d4fLn57SElaeHLVAgftFTEc8yhzUIYFKYMf
++dqYCq6jmCycH6QJV1BHRweam5thmib+8Ic/4N13e5FOp2EY/mtjinEpamtgYIAuueTrdOqpp8Z9
+Eo4Az87o7++n0047DatXr4ZlJfDdq6/GY489BiIix3Fw8SWXUD5fgGEY2LFjJ7304kvymYSitiIY
+IorhJgz1VgFViGTfA/BnZsTBVaaPlwfbsXnmzJkgAKZp4sknn4SVTMI0jMDoi2vDFS4OPfRQnP93
+57Nt22GRX9J/GVf48pe/jL/6q79Ca2sr/umfvodCoQBmxtFHHYWuGdNRKBRgGDp+97+fG8PBkwRF
+tFRozSrda4V6MwApYkx2huQz+8Ud8phAsIgiZNxsrkQCxOa5jktTp0yB4z/08frrr8PyH+lW+lJ6
+X8EYHBjEFcuXg8fegRh1kPrbZwI699xzaWhwCAODA3jmmWcC5jjllFOwb/8+EBE2v7UZjuOU0G28
+PtYKdbEBwmd5XfaAjAFUKjFqP1zhwrIsuK6LfD6P3Xv2wFBmf9xhOzaOOPIIHH744ZX1LXTMmTMH
+uq7BNE1s3PgaAG8tYP78+RgeHgYA7N6zW24VH/eIo/lEoOY4gFw5U15cWKSvpKj0YSyPGYKVp4rH
++nFQt4SNjo4SszcAB4aHZbjWwyOGlnbBxiknnxIsEXNp7DoWL2bGlClTwAA0Itqx430A3rsPWltb
+yXEcsGAMDQ0FtAy3HZ79ypvZa35RZF0DQeU4VS3jWc7wQ8EB4Q/64rdGhF07d0G1tUgjwLdHEING
+Pp/HySefBNu2q7qf7Hs+n4dj29A1HbphBIPnugKuHyr230sI5uKweSXSoBaomQHUgVb0V9CJ6Pg5
+M8DEDN+9YnCdV7miQNN1bH17K1zXwy+Xa8COHTt8VaT5fBhasxICjU2N6OjogHwvcrXQ29uLAyMj
+AICuGV1wXZeJiN57rw9EBMd1kclmg8fdwzQ7mExQsw0gLVbFyGMAcZYsSw73Jj5L8AJD3sGI/13u
+Olyv9ACjr+89/vDDD1nXde7qmgHHdeGjHdmG47qY1t4e3CKfz2NkZITDX/4sd/3rX//aexiENF6w
+4PDgBVYvv/wyW1aSXddFZ2en3I9QRDO1vah7/lm8K1gioSIVQjRIH5MOaicjuTyoF0eQavPAwPbt
+2/H+jh1wHAdHHXUU7IKNCGN0jOiugGkmwOzZDTt37uQ1a9bAsqxwP0vuL4TAwMAAr1mzhltaWtCQ
+y+KYY46BEAKGYeDpp59GOp2CEAJzZs8uiSYyF02s2D5+5AygXpdBlP2y7LtR/phI/50hmMNnxPwu
+d4yVFQIF2+aR0VEeGhrC4NAQEwFr7r4biUQCixcvRqGQhysN2FIcGGCMjo5IJufGxkb84Ac/wNNP
+Px3HBEF/DcPA0qVLAQDDBw7wueeei1QyycyMDRs2cF9fnxcVFYKPO+44uK7LKq0qYexaoeb9AJLT
+1deXS4T9N24UlRdCoKmpybfCD0CjDAzDqGShu6QIeULH872ZwT4erv9BBSuRwMyZM9E5fTpmzZyJ
+rq4uzOjqwsyuLgwPD6OlpYU///nP46mnfoOmpkZvBobuoek6tm/fHhA8m81i7ty5WLp0KVauXImz
+zz6bC4VCkW1ARLx3715ccMEF2LBhAxobGzFt2jScc845KPgvv7rvvvu85w1cF10zurBggbc0XbJv
+Yoy+HEPrygcrAuriBbDyBnCZLvOidFRjYyO/9NJL9NBDD2H9+vXY9OabSFpWpBEY7h4LAdu2YTsO
+FQoF5HI5TGtvp7b2dnRMm4aumV3o6e7BnDlz0NnZGbxJQzKixMt1Xe9FVMuW4ddPPYWQuxoAARgY
+HMLmzZtxyCGHkGVZ+PSnP4133nkHV111Fe6991764he/iDlz5sCyLNq9ezeeffZZPPjggzBNE42N
+jWBm/Mvtt3vvEdQ0vPvuu/xv//Zv1NTcjPzoKM459xzYth18Lj6KzuEZr9K6FqjJ6v7pT3969axZ
+s64HwKZpkmmaMAwjCK6Q/wBIuB6zF04zTZNt28ayyy+np//rv5j9R8ckdwNAMpnkbDZLmUwG2WwW
+09rbMXfePMydO5fnzplDLc3NsJJJtiwLiUQi8I397+rEPbXD8P1rXdfx5JNP8lVXXYXGhobInQmj
++TzOWrIEy5cvRz6fBzPzokWLwADlR0fR399fYsHncjkYhsHMTHfddRcWLlyI0dFRJJNJ/O3f/i2/
+8sor1Nrayul0Go8//gsyzUQsrWRsRT6hZNs2bNtmZqY9e/Y8c/rpp5880TGsixuoGC9SV8mvRYFj
+WFQIwYVCAY7jYOWKFfz2229j165dPDA4iJRlIZPNIpPJwLIsZDMZTmcylM1mOZVKwXEc8h7VcpmZ
+Sdd1uK6L0dHR4C1awNj+uhgUGPDeR3jKKadg7dq1uPQf/oEL+TysZNL3GgAAZBoGHn/8cXzjG99g
+wHuH8F133YWlS5eCiHhae7u0I5jZe/fRgZERnjNjBm695RaeO28eRkZG0NjYiJU33ogXXngBTU1N
+PDg4iG9/+9swDJPjEFXoSiH6Bvm1QN0igf61GvMn+c2gqH5BWTljZvT09HBPTw+pYVlZVnkokkZH
+RwGMPV/oQ7n4eKyUk9JBCEGHH344Hn7oIVx22WXYtOlNNDY2eMzt4zg4OIjvf//7dMMNN2BkZASH
+HXYYHn30Udx88820fv16Xx+DmAXmzZuHJUuW0Oc+9zmWq3+pVApr1vwIt916K3K5HDMzLVq0CJ/5
+zGfkJJJvDivCTw6+jP7FLRlPFOoVCGIFIRZCBBFNMbahLtgjqNQP8tR38fsDHjUbgvrqNYpNhfEe
+GhnjrLGQLgsh0NjYiPvuu49WrVrFa9asocbGRs92YIZlWXj00Ucxc+ZMvvDCC1EoFNDe3k633HIL
+hoaG+J133iHXdTFjxgxua2sjuepHRKzrOm644Qa6++67OZvNEhFh6tSpuPHGG9m2bZimqer+AM+w
+xe8bggGdJUPUAnWLBIYDP0IIlk/RhriUQ+e4tHCdSvfFh/Oj7lMEqo3gOA5feumlOPHEE/mGG25A
+b28vZTIZAEA2m+WbbroJO3bswHJvZRD5fB6WZcmFImZmjI6OQgjB2WwWL7/8Mq6++mq8/vrr3qtw
+NI0bGxuxdu1aTvgvmpR0C+MnVav/qbiiCabaSbVAvQJBUZso4tImWjZLSLv6AAAKL0lEQVQuDaG8
+cumR9RXVRUREtm3TkUceSQ888AB97aKLYNs28oUCSNNo6tSpdN/999Opp56Kxx57DDt37oTjOGSa
+JhKJBLmuSzt37sTzzz9PZ599Ns4880zatGkT+a+Yp7a2Nrr//vvR2toaLJOXoV+Al0yLqFMTA9TL
+BmCFiGEVUFQF8bMzrkxcXlRblXg1qrQJqxCWasF1Xdi2jQsvuACf+Zu/wW233YZnnnkGmqahtaWF
+bdvGVVddhYaGBjQ3N3M6nSZN0zA0NMT79u2j/v5+JBIJNDQ0QAiBfD6Pk046ia+//npKJpNyXaFs
+/+Xg/kWoACnGJENI8Y8IVz50jkqLqxN1HcVQ4zFZubwgzTAMOI5Dra2tuOmmm/DGG2/wAw88gF/+
+8pcAvG3fAHjfvn3Yu3cv+zofADibzcJxHOTzeZ45cyYuv/xynHDCCXAcJ/hyqDJ7Y/svI5DqWouk
+80cuAaS/LR+qVBYrpI5SH3FSjcCwQVYuT+YjpnwY4tbqoyhVSR7kq+Rnz55N1157LZ933nn46U9/
+iqeffhoffPABGYYh4wosv+uby+Vwwgkn8GmnnYaTTz4ZjuOoXpGUNOP2P0xPRfzL6wjUK4e6MIDk
+fBlxk+5VOAz8ZwCVPF5VtkyhUMD06dNxxRVXYNmyZejt7cU777yDgYEBSE+ip6cHXV1dME0TmqZB
+3UNYLSjiP6C3jGIyR79noBqoiQEkMpIBdF0P9sQpDztWu3Mn/BhYJS5eJflqu3EjEfUIWkkZVQx3
+d3djzpw5XoYfD5FRSCkNFFFddf/Ve0k7S7b/kUsA13WF7CSR94k2XwqQpmnsLwZxDPdPxA2M0vFR
+bVZqA5TDSUJkW7I/oUEI7i8VPMdP+7L9V5eGXddl4b3BnP0IKHkPnYqPVgIUCoUh//k69hddSDIB
+EZGu60UeAaqzAcJ1oJSNg0psgkpUwHh5JYyg5JezUyruv+LGMjMHr6+Xgy9VwMjIyPA4/SkLNTHA
+/v37d7e1tclgDyu6P6CK8qkzmVRvLyCuXCX6vqwXUEFbleA1IS9IjWU4jsNS79u2zf5iEDEzhoeH
+t0XgVTHUxAB9fX1vdHd3Q9d1AUD3B5o1TZOxe4ZvBkjXB7VJgHLXQOnsjZrN43kXcVDO3awER/V3
+xRJACMGu65JcAbRtm2zbRqFQYGamwcHBV8rgPC7UxABr1qzZcNxxxwnTNAX770KR1r+MBQBg1TNA
+fSRAOQIjJq0SqNgGKINb+LpqCSANP2lQOo4jZz0KhQLn83mybVsIIfTXX3/9+fJdKg817wjasWPH
+U11dXZ/yt0yz6gpKYOaitInsrP3/BVTRL4RQ1//lZ+3kJ/H4wIEDIw8//PAfa7lfzQzw5ptv3tbW
+1vYpIrkFYOyV5oC3sifftKGoBLmBohYVAFQm8sdTA+OVjcqPszVqMgJ5bM2f5OA7jsOFQoHy+Tzy
++byc/SAi4+233/6XcfAdF/RaG9i4cePmE0888RLTNLNqaFKd7aH9ckUx7oMIlRiBH0VbRRAO9EjX
+Tlr6hUIB/uBDvoHMdV0eHR2ltWvXnt3f3z9Qy/1rYoCjjz4au3btQjKZ7Ovp6Vkigx7wCCYDGeSH
+PYNNI6HwZtFqnJJX6Spi+NGpqPzxVgorXT2Mu18l1+qKXsnmGRlPkX5+oVAgZeZTPp8nKf4BaG+9
+9daap5566r6ZM2eiv79/wmNYszK+4IIL6J577uErrrji9x0dHR8nIjZNkxKJBFuWBX+ZNHjBoq7r
+qqEYZw9EbQgpJ16jyiImL6pcJWXK3SfOqh+ryNEvfgzrfMXXZ6nz/ZlP8nO4Q0NDw9dcc00LM9sx
+K4oVQz2tsc7rr7/+vUwmA8kEpmmyZVnB516VDaPSVazkS5iVpFfixoXrquXrUb9q3BVrXy4kBQEf
+OdsLhQLLwZfBn3Xr1n1+/fr1j1WIa1mox3sCZQfff/jhhz/7pS996ReGYagxa3YcJ5AAhmGQpmmQ
+kiBCCoRnUzhPvWdU/nh55WZMnCEahUO5vDjXtKjdmNnPjuOQEvAJrH5N0+jZZ5+9bv369Y91dHTQ
+jh07xsNnXJioBAh0vA9aOp2mAwcO2Mcee+z5X/ziF++RM13X9eADy5IBdF1nuV4gPQbVQ0DpQEXN
+1DgVUM3AlVMBlbRTTgVElWVFFRQtn7uuKyUASxUgRb6/eYSee+65VY888silmUwmOTw8LPx2hHKv
+uNhDLFTDABRxaPAMSR2Aoeu67rpuvrOz8/Tzzjvv7paWlqTruqzruhx0BJ97Dy0d1xAbiJrVEw0E
+xbUf19aEvYOQ4Vm0gijtAH9DLRUKBTzxxBM3rV+//kbDMBKO96ZpF4A8u/AYgUNHFM6xnRuvjFzc
+1/000782/SMBwAKQ8pHpPuecc1YeccQRhxMRXNcV3itUg4EnuWagxASC2IFKK5TOtKjrSvtTTrJU
+20ZVoWD2XCQ13MsAijZ4SGkAALquU29v7+5Vq1ZdC2A9EenMPAIgD6DgHw4A2z8LeMwgJYO8VywT
+VBr40PxrOfiGf8jBTypHGkDGNM2kbdtWZ2fnpxYvXnxmT09Ps/cRBQ72w6kDPwEjsNoy45WvRxuV
+lpEMAGBs4UdOEMdxsHv37sKvfvWrx19//fV1uq4Puq47CmAEwDAAeV2AxwySAVQmAMaYIHbTQKUM
+IMW9POTgJzDGAHL2p+AzgX9OAGhoamo6+uijjz523rx5c2bNmpWRW6JLblhDmPhPGWKeaBArqp40
+At9///3C1q1bt23cuHHD9u3bnwewF94gDwM44B/D8AZdHqokUNWBVAlADRJALSMHX1fOKhNY/lky
+gQWPAVLwmEGqiAYAbclkctrUqVObLMtKaZpmMLPB3oKSAUDzr6XE0WQwycdFDwWcVEYNziFilwsh
+q1BCtAjGknlFBpjikwsAwv8tlN+uPBORw8x2Pp/PDwwMDOzfv/99ALsA7Ic3w+UhB17O+hF4M95G
+qQpQbQGEriOhmikjGUDWM1CsDnSMMYN6lpLB8n8nQtfh36bfXkJpWx6q0alFHGEDNZY5YkAd/PC1
+anGrZ/VwlUM11ByMDZacsXl4g2r7ZzXdhjfQ4VmuDrhsW95XnfVhBo2FamWmygDyd5RkkMwhbQRN
+uVYNRwtjjKPaFeq1HnOo95SDrTKpmhbub5T+D1+HCakygcoALoqNLzlAAmOD76JYT6szWKaHZ3Pc
+QLvKvVRdf9DdwLh6YabQld9RgyOZQ0oPlYGkoamm6aH6OqJneTgPoXO4r/JTZWFihWdNmAnCM00e
+cjAcJV9ljrCUiJIc4fYFSgda4hQe7AkZJfW2mqRVH94PHta/YeMyXEYLXUe1F64nLe6wXRBuG0r5
+qLwwIcvNrHB6nC8u88Jlw21EDWqtcYyy8Kczm+sH4YGtJoo3ERhvAFQGPKiDNQmTMAmTMAmTMAmT
+MAmTMAmTMAmTMAmTMAmTMAmTMAmTMAmTMAmTMAmTUDn8X7Er4pbsPLYtAAAAAElFTkSuQmCC
+"
+ height="128"
+ width="128" />
+ </g>
+</svg>
diff --git a/demos/mobile/qcamera/icons/exit.png b/demos/mobile/qcamera/icons/exit.png
new file mode 100755
index 0000000000..dbe586a934
--- /dev/null
+++ b/demos/mobile/qcamera/icons/exit.png
Binary files differ
diff --git a/demos/mobile/qcamera/icons/mms.png b/demos/mobile/qcamera/icons/mms.png
new file mode 100755
index 0000000000..46a1a73d65
--- /dev/null
+++ b/demos/mobile/qcamera/icons/mms.png
Binary files differ
diff --git a/demos/mobile/qcamera/main.cpp b/demos/mobile/qcamera/main.cpp
new file mode 100755
index 0000000000..6157c2d456
--- /dev/null
+++ b/demos/mobile/qcamera/main.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "cameraexample.h"
+
+#include <QtGui>
+#include <QApplication>
+#include <QDebug>
+
+// Lock Symbian orientation
+#ifdef Q_OS_SYMBIAN
+#include <eikenv.h>
+#include <eikappui.h>
+#include <aknenv.h>
+#include <aknappui.h>
+#endif
+
+
+#ifdef Q_OS_SYMBIAN
+#include <QSymbianEvent>
+#include <w32std.h>
+
+#endif
+
+static const int KGoomMemoryLowEvent = 0x10282DBF;
+static const int KGoomMemoryGoodEvent = 0x20026790;
+
+class MyApplication : public QApplication
+{
+public:
+ MyApplication( int argc, char** argv ) : QApplication( argc, argv ) {}
+
+#ifdef Q_OS_SYMBIAN
+protected:
+//! [0]
+ bool symbianEventFilter( const QSymbianEvent* symbianEvent )
+ {
+ const TWsEvent *event = symbianEvent->windowServerEvent();
+ if ( !event ) {
+ return false;
+ }
+ switch ( event->Type() ) {
+ // GOOM handling enabled
+ // http://wiki.forum.nokia.com/index.php/Graphics_memory_handling
+ case EEventUser: {
+ TApaSystemEvent* eventData = reinterpret_cast<TApaSystemEvent*>(event->EventData());
+ if ((*eventData) == EApaSystemEventShutdown) {
+ eventData++;
+ if ((*eventData) == KGoomMemoryLowEvent) {
+ return true;
+ }
+ }
+ break;
+ }
+ default:
+ break;
+ };
+
+ // Always return false so we don't stop
+ // the event from being processed
+ return false;
+ }
+//! [0]
+#endif
+};
+
+
+int main(int argc, char *argv[])
+{
+ // NOTE: set this value before creating MyApplication instance
+ // http://doc.trolltech.com/qapplication.html#setGraphicsSystem
+ QApplication::setGraphicsSystem("raster"); // NOTE: Seems that raster have to be enabled with Nokia N8
+
+ MyApplication a(argc, argv);
+
+ // Lock Symbian orientation
+#ifdef Q_OS_SYMBIAN
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
+ TRAP_IGNORE(
+ if (appUi) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
+ }
+ );
+#endif
+
+ CameraExample w;
+ w.showFullScreen();
+
+ return a.exec();
+}
diff --git a/demos/mobile/qcamera/messagehandling.cpp b/demos/mobile/qcamera/messagehandling.cpp
new file mode 100755
index 0000000000..bf7bfcb8d0
--- /dev/null
+++ b/demos/mobile/qcamera/messagehandling.cpp
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 "messagehandling.h"
+#include <QMessageBox>
+#include <QDebug>
+#include <QTimerEvent>
+#include <QTimer>
+#include <QFile>
+#include <QPixmap>
+#include <QImageReader>
+
+Message::Message(QObject *parent) :
+ QObject(parent)
+{
+ // QMessageService class provides the interface for requesting messaging service operations
+ m_service = new QMessageService(this);
+ //QObject::connect(m_service, SIGNAL(stateChanged(QMessageService::State)), this, SLOT(stateChanged(QMessageService::State)));
+ QObject::connect(m_service, SIGNAL(messagesFound(const QMessageIdList&)), this, SLOT(messagesFound(const QMessageIdList&)));
+
+ // QMessageManager class represents the main interface for storage and
+ // retrieval of messages, folders and accounts in the system message store
+ m_manager = new QMessageManager(this);
+
+ QObject::connect(m_manager, SIGNAL(messageAdded(const QMessageId&,const QMessageManager::NotificationFilterIdSet&)),
+ this, SLOT(messageAdded(const QMessageId&,const QMessageManager::NotificationFilterIdSet&)));
+
+ // Register MMS in inbox (draft in emulator) folder notificationfilter
+#ifdef Q_OS_SYMBIAN
+#ifdef __WINS__
+ m_notifFilterSet.insert(m_manager->registerNotificationFilter(QMessageFilter::byStandardFolder(
+ QMessage::DraftsFolder)));
+#else
+ m_notifFilterSet.insert(m_manager->registerNotificationFilter(QMessageFilter::byStandardFolder(
+ QMessage::InboxFolder)));
+#endif
+#else
+ m_notifFilterSet.insert(m_manager->registerNotificationFilter(QMessageFilter::byStandardFolder(
+ QMessage::InboxFolder)));
+#endif
+
+}
+
+Message::~Message()
+{
+}
+
+void Message::messageAdded(const QMessageId& id,
+ const QMessageManager::NotificationFilterIdSet& matchingFilterIds)
+{
+ if (matchingFilterIds.contains(m_notifFilterSet)) {
+ processIncomingMMS(id);
+ }
+}
+
+
+void Message::checkMessages()
+{
+#ifdef Q_OS_SYMBIAN
+#ifdef __WINS__
+ QMessageFilter folderFilter(QMessageFilter::byStandardFolder(QMessage::DraftsFolder));
+#else
+ QMessageFilter folderFilter(QMessageFilter::byStandardFolder(QMessage::InboxFolder));
+#endif
+#else
+ QMessageFilter folderFilter(QMessageFilter::byStandardFolder(QMessage::InboxFolder));
+#endif
+
+ m_service->queryMessages(folderFilter);
+ // Message::messagesFound() is called if MMS messages found
+
+}
+
+void Message::messagesFound(const QMessageIdList &ids)
+{
+ foreach (const QMessageId& id, ids) {
+ processIncomingMMS(id);
+ }
+}
+
+void Message::processIncomingMMS(const QMessageId& id)
+{
+ QMessage message = m_manager->message(id);
+
+ // Handle only MMS messages
+ if (message.type()!=QMessage::Mms)
+ return;
+
+
+ QMessageContentContainerIdList attachments = message.attachmentIds();
+ if (!attachments.isEmpty()) {
+ QMessageContentContainer messageContent = message.find(attachments[0]);
+ if (messageContent.isContentAvailable() && messageContent.contentType() == "image") {
+
+ // Create QPixmap from the message image attachment
+ QPixmap pixmap;
+ pixmap.loadFromData(messageContent.content());
+
+ QString from = message.from().addressee();
+ QString filename = messageContent.suggestedFileName();
+
+ // Emit received MMS message info
+ emit messageReceived(from, filename, pixmap);
+ }
+ }
+}
+
+bool Message::sendMMS(QString picturePath, QString phoneNumber)
+{
+ QString tmpFileName = "c:/System/qcamera_mms.jpg";
+
+ // Create temp image for MMS
+ // Delete previous temp image
+ QFile previousFile(tmpFileName);
+ if (previousFile.exists()) {
+ previousFile.remove();
+ }
+ // Create new temp image
+ QImageReader reader;
+ reader.setFileName(picturePath);
+ QSize imageSize = reader.size();
+ imageSize.scale(QSize(300,300), Qt::KeepAspectRatio);
+ reader.setScaledSize(imageSize);
+ QImage image = reader.read();
+ image.save(tmpFileName);
+
+ // Use temp mms image
+ picturePath = tmpFileName;
+
+ // Send MMS
+ QMessage message;
+ message.setType(QMessage::Mms);
+ message.setParentAccountId(QMessageAccount::defaultAccount(QMessage::Mms));
+ message.setTo(QMessageAddress(QMessageAddress::Phone, phoneNumber));
+
+ QStringList paths;
+ paths << picturePath;
+ message.appendAttachments(paths);
+
+ return m_service->send(message);
+}
+
+void Message::stateChanged(QMessageService::State s)
+{
+ emit messageStateChanged(s);
+}
diff --git a/demos/mobile/qcamera/messagehandling.h b/demos/mobile/qcamera/messagehandling.h
new file mode 100755
index 0000000000..86a90712ec
--- /dev/null
+++ b/demos/mobile/qcamera/messagehandling.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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 demonstration applications 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 MESSAGE_H
+#define MESSAGE_H
+
+#include <QObject>
+#include <QPixmap>
+
+// QtMobility API headers
+// Messaging
+#include <QMessage>
+#include <QMessageManager>
+#include <QMessageService>
+
+// Location
+#include <QGeoPositionInfo>
+
+// QtMobility namespace
+QTM_USE_NAMESPACE
+
+class Message: public QObject
+{
+Q_OBJECT
+
+public:
+ Message(QObject *parent = 0);
+ ~Message();
+
+ void checkMessages();
+ bool sendMMS(QString picturePath, QString phoneNumber);
+
+private:
+ void processIncomingMMS(const QMessageId& id);
+
+public slots:
+ // QMessageService
+ void stateChanged(QMessageService::State s);
+ void messagesFound(const QMessageIdList &ids);
+
+ // QMessageManager
+ void messageAdded(const QMessageId &id, const QMessageManager::NotificationFilterIdSet &matchingFilterIds);
+
+signals:
+ void messageStateChanged(int);
+ void messageReceived(QString from, QString filename, QPixmap pixmap);
+
+private:
+ QMessageService* m_service;
+ QMessageManager* m_manager;
+ QMessageManager::NotificationFilterIdSet m_notifFilterSet;
+ QMessageId m_messageId;
+};
+
+#endif // MESSAGE_H
diff --git a/demos/mobile/qcamera/qcamera.pro b/demos/mobile/qcamera/qcamera.pro
new file mode 100755
index 0000000000..17b9513946
--- /dev/null
+++ b/demos/mobile/qcamera/qcamera.pro
@@ -0,0 +1,62 @@
+
+# Copyright (c) 2011 Nokia Corporation.
+
+TEMPLATE = app
+TARGET = qcamera
+
+VERSION = 1.1.0
+
+QT += network
+
+HEADERS += contactsdlg.h \
+ cameraexample.h \
+ messagehandling.h \
+ button.h \
+ businesscardhandling.h
+
+SOURCES += contactsdlg.cpp \
+ main.cpp \
+ cameraexample.cpp \
+ messagehandling.cpp \
+ button.cpp \
+ businesscardhandling.cpp
+
+CONFIG += mobility
+MOBILITY = contacts \
+ messaging \
+ multimedia \
+ systeminfo \
+ location
+
+RESOURCES += resources.qrc
+
+ICON = icons/cameramms_icon.svg
+
+symbian: {
+ # Because landscape orientation lock
+ LIBS += -lcone -leikcore -lavkon
+ TARGET.UID3 = 0xEF642F0E
+ TARGET = QCamera
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x20000 0x8000000
+
+ # Self-signing capabilities
+ TARGET.CAPABILITY += NetworkServices \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+ # QtMobility Messaging module needs these
+ #DEFINES += MESSAGING_ENABLED
+
+ contains(DEFINES,MESSAGING_ENABLED) {
+ # Additional capabilities that needs Open Signed Online signing
+ TARGET.CAPABILITY += ReadDeviceData WriteDeviceData
+ }
+}
+
+!contains(DEFINES,MESSAGING_ENABLED) {
+ warning(Qt Mobility Messaging disabled!)
+}
+
diff --git a/demos/mobile/qcamera/qcamera.pro.user b/demos/mobile/qcamera/qcamera.pro.user
new file mode 100644
index 0000000000..6ac56bcd85
--- /dev/null
+++ b/demos/mobile/qcamera/qcamera.pro.user
@@ -0,0 +1,582 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">Default</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">2</value>
+ <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt in PATH Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt in PATH Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.2" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop Qt for GCC (Qt SDK) Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.3" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop Qt for GCC (Qt SDK) Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">4</value>
+ <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qcamera</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">qcamera.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+ <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+ <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt Simulator</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">3</value>
+ <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.2" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Simulator Qt for GCC (Qt SDK) Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.3" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ <value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Simulator Qt for GCC (Qt SDK) Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">4</value>
+ <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qcamera</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">qcamera.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+ <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+ <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.2</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Remote Compiler</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Remote Compiler</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.WccCompilerTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccBuildStep</value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyFile" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.CertKeyPass" type="QString"></value>
+ <value key="Qt4ProjectManager.WccBuildStep.PkgOpt" type="int">1</value>
+ <value key="Qt4ProjectManager.WccBuildStep.PostOp" type="int">1</value>
+ <value key="Qt4ProjectManager.WccBuildStep.QtVersion" type="QString">4_7_0_m1_0_2</value>
+ <value key="Qt4ProjectManager.WccBuildStep.SisOpt" type="int">1</value>
+ <value key="Qt4ProjectManager.WccBuildStep.Target" type="QString">maemo5</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Remote Compiler</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jpasion/gitorious/qt-contributor-team/demos/qcamera-build-remote</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">7</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value>
+ <valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
+ <value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Remote Compiler - Empty Run Configuration</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.WccRunConfiguration</value>
+ <value key="Qt4ProjectManager.WccRunConfiguration.ProFile" type="QString">qcamera.pro</value>
+ <value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
+ <value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
+ <value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">3</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
+ <value type="QString">{7d0e1b67-5eac-4464-8506-ed03165c2662}</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">8</value>
+ </data>
+</qtcreator>
diff --git a/demos/mobile/qcamera/resources.qrc b/demos/mobile/qcamera/resources.qrc
new file mode 100755
index 0000000000..833fa99031
--- /dev/null
+++ b/demos/mobile/qcamera/resources.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>icons/camera.png</file>
+ <file>icons/exit.png</file>
+ <file>icons/mms.png</file>
+</qresource>
+</RCC>
diff --git a/demos/mobile/qtbubblelevel/accelerometerfilter.cpp b/demos/mobile/qtbubblelevel/accelerometerfilter.cpp
new file mode 100644
index 0000000000..2d3a48a91e
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/accelerometerfilter.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <math.h>
+#include "accelerometerfilter.h"
+
+#define RADIANS_TO_DEGREES 57.2957795
+
+AccelerometerFilter::AccelerometerFilter()
+ : x(0), y(0), z(0)
+{
+}
+
+//! [0]
+bool AccelerometerFilter::filter(QAccelerometerReading *reading)
+{
+ qreal rx = reading->x();
+ qreal ry = reading->y();
+ qreal rz = reading->z();
+
+ qreal divider = sqrt(rx * rx + ry * ry + rz * rz);
+
+ // Lowpass factor
+#ifdef Q_OS_SYMBIAN
+ float lowPassFactor = 0.10;
+#else
+ float lowPassFactor = 0.05;
+#endif
+
+ // Calculate the axis angles in degrees and reduce the noise in sensor
+ // readings.
+ x += (acos(rx / divider) * RADIANS_TO_DEGREES - 90 - x) * lowPassFactor;
+ y += (acos(ry / divider) * RADIANS_TO_DEGREES - 90 - y) * lowPassFactor;
+ z += (acos(rz / divider) * RADIANS_TO_DEGREES - 90 - z) * lowPassFactor;
+
+ // The orientations of the accelerometers are different between
+ // Symbian and Maemo devices so we use the different axes
+ // depending on the platform.
+#if defined(Q_OS_SYMBIAN)
+ emit rotationChanged(-y);
+#else
+ emit rotationChanged(x);
+#endif
+
+ // Don't store the reading in the sensor.
+ return false;
+}
+//! [0]
diff --git a/demos/mobile/qtbubblelevel/accelerometerfilter.h b/demos/mobile/qtbubblelevel/accelerometerfilter.h
new file mode 100644
index 0000000000..0eeffa3951
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/accelerometerfilter.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 ACCELEROMETERFILTER_H
+#define ACCELEROMETERFILTER_H
+
+//! [0]
+#include <QAccelerometerFilter>
+#include <QVariant>
+
+QTM_USE_NAMESPACE
+
+class AccelerometerFilter
+ : public QObject, public QAccelerometerFilter
+{
+ Q_OBJECT
+
+protected:
+ qreal x;
+ qreal y;
+ qreal z;
+
+public:
+ AccelerometerFilter();
+ bool filter(QAccelerometerReading *reading);
+
+signals:
+ void rotationChanged(const QVariant &deg);
+};
+//! [0]
+
+#endif // ACCELEROMETERFILTER_H
diff --git a/demos/mobile/qtbubblelevel/debian/changelog b/demos/mobile/qtbubblelevel/debian/changelog
new file mode 100644
index 0000000000..0413145ad1
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/changelog
@@ -0,0 +1,19 @@
+qtbubblelevel (1.2.0) stable; urgency=low
+
+ * Improved the usability of the calibration dialog.
+
+ -- Forum Nokia <FN.Documentation@nokia.com> Wed, 16 Feb 2011 12:59:30 +0100
+
+qtbubblelevel (1.1.0) stable; urgency=low
+
+ * QtMobility Rotation sensor support
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 15 Jun 2010 9:03:02 +0100
+
+
+qtbubblelevel (1.0.0) unstable; urgency=low
+
+ * Initial release
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 15 Jun 2010 9:03:02 +0100
+
diff --git a/demos/mobile/qtbubblelevel/debian/compat b/demos/mobile/qtbubblelevel/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/demos/mobile/qtbubblelevel/debian/control b/demos/mobile/qtbubblelevel/debian/control
new file mode 100644
index 0000000000..5980327076
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/control
@@ -0,0 +1,12 @@
+Source: qtbubblelevel
+Section: user/games
+Priority: extra
+Maintainer: Forum Nokia <FN.Documentation@nokia.com>
+Build-Depends: debhelper (>= 5), libqt4-dev, libqtm-sensors
+Standards-Version: 3.7.3
+
+Package: qtbubblelevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Qt Bubble Level example
+ QtQuick example
diff --git a/demos/mobile/qtbubblelevel/debian/copyright b/demos/mobile/qtbubblelevel/debian/copyright
new file mode 100644
index 0000000000..e8dea63de4
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/copyright
@@ -0,0 +1,36 @@
+This package was debianized by unknown <anonymous@digia.com> on
+Tue, 15 Jun 2010 9:03:02 +0100.
+
+It was downloaded from <fill in http/ftp site>
+
+Upstream Author: <put author(s) name and email here>
+
+Copyright: <put the year(s) of the copyright, and the names of the
+ copyright holder(s) here>
+
+License:
+
+ This package is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2010, unknown <anonymous@digia.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff --git a/demos/mobile/qtbubblelevel/debian/dirs b/demos/mobile/qtbubblelevel/debian/dirs
new file mode 100644
index 0000000000..80507f1030
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/demos/mobile/qtbubblelevel/debian/files b/demos/mobile/qtbubblelevel/debian/files
new file mode 100644
index 0000000000..3d432422e2
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/files
@@ -0,0 +1 @@
+qtbubblelevel_1.2.0_armel.deb user/games extra
diff --git a/demos/mobile/qtbubblelevel/debian/postinst b/demos/mobile/qtbubblelevel/debian/postinst
new file mode 100644
index 0000000000..79fb6ddd0d
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/demos/mobile/qtbubblelevel/debian/rules b/demos/mobile/qtbubblelevel/debian/rules
new file mode 100644
index 0000000000..f18b9cd846
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/qtbubblelevel.sgml > qtbubblelevel.1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/qtbubblelevel.
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/qtbubblelevel install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+# dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/demos/mobile/qtbubblelevel/icons/26x26/qtbubblelevel.png b/demos/mobile/qtbubblelevel/icons/26x26/qtbubblelevel.png
new file mode 100644
index 0000000000..ae34ccf509
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/26x26/qtbubblelevel.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/icons/40x40/qtbubblelevel.png b/demos/mobile/qtbubblelevel/icons/40x40/qtbubblelevel.png
new file mode 100644
index 0000000000..6230f55e74
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/40x40/qtbubblelevel.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/icons/64x64/qtbubblelevel.png b/demos/mobile/qtbubblelevel/icons/64x64/qtbubblelevel.png
new file mode 100644
index 0000000000..375326c02c
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/64x64/qtbubblelevel.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/icons/bubblelevel.svg b/demos/mobile/qtbubblelevel/icons/bubblelevel.svg
new file mode 100644
index 0000000000..a3c30dfa4d
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/bubblelevel.svg
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="128"
+ height="128"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="bubblelevel.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.98994949"
+ inkscape:cx="599.30983"
+ inkscape:cy="93.17066"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1680"
+ inkscape:window-height="1003"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-924.36218)">
+ <image
+ y="923.61945"
+ x="0.05510572"
+ id="image2993"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACBCAYAAAAIYrJuAAAABHNCSVQICAgIfAhkiAAAIABJREFU
+eJztvU2SJEmu3/mDqpq5R2ZWP3b3UPhEuBiZWcysZnZzBS5IEV6D5+OCPAIPwPXshiJk83V3VX5E
+hLuZKsAFoGoWEe5RFZHZ8/hEHCVeHunuZqYfUOAPKACFG93oRje60Y1udKMb3ehGN7rRjW50oxvd
+6EY3utGNbnSjG93oRje60Y1udKMb3ehGN7rRjW50oxvd6EY3utGNbnSjG93oRje60Y1udKMb3ehG
+N7rRjW50oxvd6EY3utGNbnSjG93oRje60Y1udKMb3ehGN7rRPzLJf/p//8O/M7N//ZaLkkDJgBmm
+App4eFz473/6C8tSubv7wO//8Ed++ukDpitNG5IgiQF29b6KXnoaWPL3C1eYsrunIAApAfryWXF7
+w1C79CxIkvpdfgi99qwskJPF7wAV1Hx8cyqIZCDxyy+/8Kd/+DOocrg78Id/8QeOHw4Xn4Vy9XnP
+SUT+Y1nq+n+L2b99S6dEQJv6MFnCNLEsZx4fH1mWFZHE+fRAycZ5eaTWhZQSkpwB5ML4ml1hDBN8
+8l8ywPNrJG4s4wF28fdmdvF5IrK79sfRpecJzqdJOlcK208EkUQpMyVPnE5nltPJ75GEZTmTp5ft
+NOI519fYM5L/r9zff37DBb15RkJJIogUtMHnz/f8w1/+G6fHhd/99He0dubzl4lffvkrD4/3lJJ9
+YcILBvCOX2MA8MmXeD1ry27S+t/+etri7ffXGeD5/X4EvfasJF0q+u9UYVu8wt3dB/7ud/+Mb9/u
++ctf/oKZcffpA/PHRGN58/NekAhlXR+5LF5fuQ7dGIBMa8K6nqjriXU983jK8LmBGJ9/+Sun0yNl
+yqQkb+U1J7s8+YiQU0JSQkRcfMcEpt3nPp/+Lp2R5FJLLjHP95FZlzwXJI4ZQsPUUMPf1d/N4HQ+
+o2qcTwvLumBqlCWzrmfWelki/ubJ9ysoZg2jvalTCYNkGKCqmAkijTIJeQW1hfuHhXVdOZ0eUF0R
+LSiJaxJKkItz3L+9/Knjg0RCSIiYy1VJkCGXvDHEXjokZ5aL95T0N2CAyzrZtGFtDQZQtIGooWq0
+pqx15dv9N1p1DCWSkAQqDbX14sPM7LcvMjPKspy9w2/otGBoUsTATDBN1HamtYVaz7RWMVNqqzRd
+8SmvmCX0iig34RXRe+VzMUzi2gQkQZKRkjneSAoxoZL2DABXVY7Ym8biV8mAa+oGi8YbNAFRTAwT
+xVCqGo/nR7Qpa22kJFTN1Hqm1guPUuM3T7+BiFHW9vgK6r228gxNLRggYSos64m1LjhDyQZIMNf9
+0TGurLyUXhO9drEtIoYk9dWRgByTK7iCDUvAXGYFo7saej5MMv6vV/v9Vur4/tq0CApiqBmG+n8W
+0sAUVWit0apSWyPnzKSZWhfW9eUdX5M2l/tkFGvtovHVL0oX5sswaC1ETkKrUOuKWuvfevfFSLE6
+JcC8q3N7wnSus11vX6Zrq9XnWcSZAWko6qoBSOTAjoolQUXDzOvj0cEj4/11VfQ2ElxCSoDcp1jX
+fLXHxLfBAM4EzVowgzNBrQ1JLi1UG61dkKK/ggH2+Kar4qJoNOryCjO7NCnebLHtof3BKQtCiu66
+OE3JX5qCoWQbfx9wIec0QNzzZ71qpqSAsGLBCADNH5itz+oQ7ZZ0ZzXsB2ZnTVx/2puoy62OAaXr
+5yfv/mVnhZ0sGPKrf05yVbZJ16dP83m43JZt4vcmslH8y2uASK6sCEEsQBcbAs+pkFIbA2moi2mx
+WOWbT0eiVS7602CAS8/iFRnVOydpm9RuY7vk6VLIVdF+lfd2yY4hd28/hlwuj8nui0ZwnU1i4xQB
+ki/NPhRiQsrici05t180Vc0ZQy5aN71XezUrjgES5WqXhWs2sU+KBPomCSkVcsrkXEiS6bxL6Lkk
+giXFijsz0jDV+t/ZO/jicfbs/XI76YMSE5xiYtMAgPhnqf8mXh1AAhe7+h3kq98wNaQvzZ0ziozz
+dmcCY4MgqTNmIgEZQXKXVAkhv3hYQq9KAKL/2wC77ClIhisw0Afkgllk26qU5EyQcnYmyEpOxR9g
+Gkzg4tmyQmkutlMi5zykR7oqAYYgvdivDR5uNrxLrhQT7MAwpc0c3J7x1HH0N3ACYiobBNxrsz7Z
+KdphIIpzrDlGEvPxzSHeJXdGz+Em3j3H7FUH1uYL6dLZh6HIVSfQc5Gx/yqNAYZMIpGkkFImp0Ip
+E2ag2n0MuoHA5B3pDDCYIKUrILCPzAUGGDp0J636hOIu6v29n+t6YDzzb+EC9gcQIDCYWGKCRWjp
+WZ9EAstIgFpvu2VIasOHccluF+mu5Gs2ztO57IujpJReAQ7XVEAIDxwDWNhhkooDvjwBhqiE+tsU
+c8ruzEg5kUPsp5QcPA7utK2VsGO2Cy0xG52T/TK27gRKQzX01/h3PGNggvdaAHZNhvrGTJIUK3Qb
+vY4DNr+Do2Pvq+uB1D2dCDQji0vJxEuwbLaXYC/bcm0uS0qZ1zcDroDArsAs0KoIJgVSJqUZk0ZK
+Z5p22y+RxEhSYmewm37B1Qn3LgoDO5i4oyQzxcBcGGR59ukezdme88Med2Q1Vv74jL0UeWU4npMF
+g1pmE67xlVnMr20Mai751UKypQaWIXb+uq0otiDAlIqD6aRMOTNJvjiZIVh+RQ3s+hZgtED7dd/R
+c0nFhpzcuUN43QJw5URKhlqiVUObkiV888k2YJYCQ2TCc8cm7kWHhPH5u6Aehrh/Q+NxNWTppcPH
+sCs45BVypBc+kf0zLWS/YaoIMpgPU8waJtXHTbujJBg2AHYSJXeRn5Mvmo70L6D917SY2/36bDiE
+Uuv54s1+vddpNMQM1BrNFpqCkUlJEVNaW2itOYObYKqo+Ho2xCdaQj9aWL5Jx+A53GyX56SDuje3
+PmFXsI9P1dvuKYhjnd6PHdJTUVR2ey1mNFOaNcwaakozC6dPRq3vrywu81Jyc1EU1UpVid/9tj3/
+aMbOV7Oba4HycP7yps6OK7veTR4U8vi4cv/4jbqCysKBAiw8nL+wnFfm6YjUhK1KKm7b5pLIkwS6
+NbeBRZFkm8dYhKSuAi61I71VZMc9L+l7B0ZvlADgtro9v6ibe4q2TcqaGk0b2vxlK2jL6JppNaHV
+Yy3MKvOUKOUOU+N0PmNNmHSm3FWalN/eQHMsYvqUAQyhfPn285sR8MDd4vvZqvBwv/LL5y+sK5zX
+D3z8dCClxtdvP/Pw8Mg03SFFsOJWQC6JMifSlEg5NEpyJpDwHHZ9LlaQFwMcOju9B7Vdtm46Mn6r
+PSjR9EukqphqAD8wbbTmG2VWFVvAggFqFbT6biBU7g6FlH+HVuXb1wdME/NxRuY7DvoWBrCx4/jk
+Y4Hy9dtfQtC+4X7RbR8r37q8/3rmz3/9zLLAp9MHqn6iTPDzlz/z7es3cpphcpNGipBLZpqzS4OQ
+CCkD2cbmjoSXEJXLzsDfhAGu0JXr3rMd3ANkttW1SSs1Q9uGEVpr4duv6KrYGaz66q9VsGZYa4go
+Hz8eSbmxLpXPf/0MVjjeHWG641jfwACAql3cKCr3p4f3O0DEvRnajIfTmYfHL5wXQ6Ry+ACzJJb1
+gcfzN0wzVgTbif9SMnnKpCmRC+7pSoYUds6b1KHBy8dfNVN/Q9OvmHzvMQU9QKaxuXzSaK9vlxMR
+P0YNBmi1oWeXAK0mF/8raGtgyjQlytxY1iOn08rX+69ghWor82NF0/SGFl7fJyjG6ibJm0mCq5tv
+W1qlWUVVaVYxIhC0AMmo9YyuAR410VRomiiWyJZpJqSGT74SaiENXDU8fnt73d65+ndd+I0fvkoe
+HaUIIeo1fB8WQBdBWwR6VFcBramL+0XRmmgNWgVrvqM6Hw+USSArSmVtK6aNtAprS0ztbUE8F2fY
+jFJ1fZ/zgxSu3hZWQKXaSjVDqSgNUmY6FKY5c14WmgpSO3DsDqKMifmuQg4smN2BJMk9iMPb50r6
+3br65QB83+XbbdzlLdhu70d8JzV8Ea0abccA2oxWFW3+agP8GSULZc5MB9/Obtao2kbEb9NG/QFt
+N4XStJtcbyFflkbYswbVGk3VX+YvE2M6TMx3M+nxTKsG2iNXBROjDf6TzeurAtp3DyV8Dbbp+yQR
+htbb8o9JbsJJsEG3Zs1igVgChdaM1oxaPZRC1dBVgwlA1T/LSShTZjpM7lInrAZVUDcTmyntDVbg
+NRKgVOpFhP3rlwrQ3K43c9GvbUS0tPi8TIXj8cB8XLDHhVZtuEIxcV+BEZDUMQCRa0BgAhN1hwmx
+6tUn3/5W/vu3Utj2hM/femy+JUyV1gRtwQTVBjO0qmhtqMqIBs6lcDzOzPNEzsmDQ5pRm3sVnVFi
+zH4AFWsemfJ26hzeMBOaKarqjgxzrm2tIZKY5pm7uzusCqfl7NwsoMmc+SzeNSHZfaWioBrewuzi
+z8S2ECBkSK7vRALfSVtAjLiAG6DVlAjrMhfxatQ1Jl8NrW5BEapCRJimwuF4JOeMSUy26gCRTc0X
+1w+QAEaPCHrHzdyr5LrPNLkYC3vTzNDWqK15YE4qfPz4iXaG5X6lNfVVbWxBopLcCdR9FdoQDdMQ
+G7F+ogzzs2OAp8Hm38MM71xWZh7NG23fI38Hd/HeoFWlNTcNa3OpmQAR3xmd5gOHwxFJQtWKWA7P
+4KYmusT9XhKgaHtfEKR1tANgQlIhqzc2NYEGNI9xM4xchPmYKYdCtUqrimnseDV3zZqCZCM1yBmS
+RuqXiasDie2CzgybMeAd2r2/y7BBMKu8ZITN8+m/2Y0B7gmU8FXYbuX3VavV0Kqu+1s4ZZpirWHa
+UDHmSbg7FI5zpmQQU3T1QBJrDawhtkYQLqg+Cwh5B5lAaQojaO0tF5tEYkM48DQFAwTSryDNUFsx
+UyRlykE4fiqsJiwR+55ip1At+X5SU3ICilsKohGX2CKgYziIGGFTPfjUhl9gQ+NvY+4exNJjrvcb
+NOGUoqP8za72Tb0w+yKu3z1vIQkC/WsNY9YjPV3KWSMnYy4TH+4yhwmS1ZDKfj9aJVlFcVWpmi4G
+hb6NfJyKqj0Tob9hmGyTAAlDAumiFp4sl1cOEJUmzSVEThzuJpY6U1ulPkTiqDSf6AQpb0a/BgNg
+ikW8QM4gHRsMdcDYaXsS+fpmKRmWzYvx8AYNhTNMPcJyMay588cnv3vefMV30KfN76Pjew+VOxwO
+3N0dOQTw615D17Ku/yMNxxm0W1LfRf6AolrfDqJstwoC7ag2F3d90jVs3KSoBKoDSkkcjxOtztS1
+sa5Ka9V3vSJB0jIjS9ahQnMxK4JqjyHYh4TvxH8ETXo7w4v0ho71+Ny42/YyojG7IJcYA1FBq0IE
+wDgWIjJ8jFr319mQEgTo+3B3x93dHaW4e1ctcJkFU1nsJxhjUf0IDABQrF1Oyv7VoQrV0bNbOqDR
+PvHqTNFoqDU09clQ5jlhHw+oKg/3C+taPXZOErHzuSWKeIqhxwyIkHJCxSdfd6ogdSw5cMD7RORT
+CWBs2ckhlp44ekISNkFqhtD5+0TPIS0i78/HxttZ5sLxWDgej0zz7BauefwAKiMOwmI8TfGt43Y5
+L+DNJOIq4A3ZZNtAPWGALgF0mC3aui9AaaKkCBBVbWHuJI53s1sEtlADHXdnTxPouXDJQIpbAtqM
+lMSZIG3SYEs46RIhOONtveLJaDz5YwfyLLyT3emjQO3eTdsm22xjmI7gI7Yv58zx4DZ/mYpHTZti
+6nsBPRqYuI9FzIC1TdJ+H3UM8HZFudN/6uHOoZd0cGoXUx7cYaaR3NBQq322mOeM3k0+aKfV/eIK
+fTPFU78ElcAa4u5hC8aweG1qYIsjGKbiK92/BBBf5C4aw58flu9OAtj2WWUwwF7HbzrbrxMRSikc
+7+64uyscDgWRtG0bBwOk7vY2HX4GG4wQHsbvIutWQHuX+eu+nNhIDi/gE0ni7j5vMIZoRPsMi8N3
+BedDBmb/zFZqOEdMPTJWcGuiB1WmiB900GhYqJY9FpAuPXq42gu6jnps/97t+vh0OPsC7XdJYI0A
+voS9bkNva0ygWzCZaZo4Hg98uDsyzx4iZ6a07kEKqeEL09GthleVwFyqSnvjZtA1Cj/AG8k2Bkji
+HjvVLd7sCcdqgKrketQGMPNXysJ8LPTo3vPJzcba76cCrVsGMpxNKaJpVTwTeBP9/ofIlgL2nLZt
+5Eucb+P/m6TbofI+6TsQaArWdFMBO5VoEeE7TYVpyhyPE3d3M/OhkJKrSt/cNCRciEJf6SDhTjb1
+BvSQMdXvxwDuCNLrA3WNNhs71oZupslzUdVC+EvorGG9yBhmRIT5MO3i9xewSm2+1ZxIYQVYmH46
+UsJFXBqEj2ZTBSPI8kLHX40j8DZtzh58FXYm0P556Hc2068zhGr1PX+t5JyYZ5/w43HmeJyZpoRI
+SMzdyobIYx73dkeQBlP1mMq3F4K41lOjmNqV4ky/crF2xO0OId8X6C7LvgI8I1fHj30Xbz/5njTi
+6L6QOFqPdBFYKnX1Choufl1De0rZc5EPTxNEZbvPM+oq4tqwdFXVHUn9XZttUsBkqAmjSwjdJJ4o
+OQvzXDgeJw7HifmQPfAlxsRj9BjgtTOCoFvu5VhQrhYtTMAfogFEKFV7+PUbKAbAvW8GKgPhttYb
+GKageASsT0oOFRDid3P8Aw3Mt0KPMnnW0GnhdFpZF/ehq3aJYeReC2Cn//fu4W3erzHAZRd4xyhj
+y9p2en+ogR0A7BhBOsZRck6UMjHPhcNx5nCYwlpx6dCNCg91F8amlmngKn9Q94P4guqqxYYp+d1k
+RrEAKW8jGfrI2y+jqIGLwM1Z0ZWAJ0WkQK8W/pU++dEG8XSTlBJlShyZSJJYS6IuxrqutFZdujTf
+gOlSYewnPZn9K/16JZx8rOq9CQd49FHA3k1yx4o1JDtT5jwxzRPTVJjnQimJHFHPFnrCWa8HjOQh
+ETcGCP7oYj/UQI+l6MUjfgQVImL1TWR95vtA9MIGvcxBRa162Bf+uUfyKO5UCeN5mGkhNi3sfzJe
+Ji2RUuEwT9TZOJ/PLIvXHvJt6BCPMSMS6mXAuxDdL0gM7aHhTzsW1+0m37oN0LNywzEUJp1HJuOb
+XXNhniemuTBNJYprmPe/g4S9hRnSpIuSwUwYIwzePOeiF99o5qV2tjz/95NJ7AW8bwfVkbAGUGlp
+peWVapWajVWEglHVV+xWKLKNDZy9s952q7ZnFCNCSgYpR/pYJpVMWY2mgmplXdvmfbO26VXzpOpL
+dD2aTPBMqc4Atv0d3ydJngSbswe35kSZhDJbrHbIWZG0bvy37+cTcFnZ9uK79dGfpGjkC66yUtMa
+foRGs0z5bj+AP9IdQe8AlBKeq06aFDkoKSvMFc0r1ZL7B8xIFtaAbODp2R29TW5W7D6PVSeJXBRJ
+HlKuKrTm8QKttcAdggepdlS+WQK2zWJ8dokDtk2X6ORQKZHFHVVShTwJJRdKyZQJptlGIcwn6XbP
++2kbE8TIXRtiiHx/TQ2ZY8EUz0L6IdvBhBn4rot3veg1fo7HCdXMNHkCY2tt/E5VPdX5rXhj2OBp
+jFwpAhTMMvM8uSOlh1sPZoC2yjChust7yya+nIreCzellMjJ6x6IyPjbTdWtoIVnNhvIunNyPZ/k
+95OZY4u7u0P8nWJT7AcEhLgn8O3bwb1hWwMzInA4TMPrdamRHiL2Vn0jXo94QGd2Ct7zCyx2CFNO
+5JZjwkGnpxE0HaDKKyDQQ9ENkT65kZLdfRSp+xAkdiNdYmh4On809fGc56d5AD+CAczeux3MUwnQ
+V3fO+YUzCHgy6e+yOEgOGcb120re5+QlEaREEaLolUfm6GCA7lK+XhfJNpOSnnq2pZiPhrD3Bbgl
+c2kYv8dhsx+/kc7+bGy/i8x8O/i90bWjoINtu1P7v/u/9799x1PAGj3d6jljmaV43wbEJ9knq+vl
+rSZv9xVcAb+y/7gzQweCtoHM7SfRFrsoAL5noi6N7/O+fi8VR/Hvv8FzUf9EzL5H5z+jzeFySeSF
+Z3Ho3d3qEA1nT5+h3Zu4tr/Gk/sWW2QfdZPwspiPRJZnN/xRE/WcAfbv33vfMsKtv+Mm1/597e+3
+U/favbTbfX/9wvMja+kivdqUS97Bp++Xb3jNq/j9dOk+P+re5Xtu9tp1P0xPwW7CnjPb0/en1J1N
+r9z24nXvWVmbqP6R9LeceMD3At4TEPL/O72rz9fE9W+57vvF6z8FErcC/gkwwLsmJBjgzTzwHc/6
+J0YCvh38npjA//npvX0SeKuffWxq/dMi8aDQ1/XkPz69d3W9s1NXkf5vuOZ/6nF8SWZGaaYvsoO7
+Y+g1yXC1r782drLd/7fS+yDAb9DlL42Kdz6x+yXeetV7pdRlZnsNH/ZqpfvLDKNo9W+30iiy2cpj
+q/LZza63YThMLjbi1VCsq01HrBdf+e0DZsNdfOWuV9txOVDk1+hpEMq1H+zInr3/5gdFMOxlr9PF
+fgvi9RZ0K13Tm+PZwbGDLrsLfo07RxGvFw188fytfUQR5GdXvvaszQFzheR9kvdH455RWv/SM646
+nN6xBzMWwjOTeHxymTF6sd1Nuvv/ixdh7B/2H7EB6Mu7plz76tUv5PpA9QicS4+6NkzdNfQDYiO+
+j17p13V6HwuObe1nfXYYcv2ePWztqeAzSmo9uqXvhMUmiOw55RkpHsJ8ZWVeW7DXVcArEucqF/Z7
+Xv66h6RfvuhH47Vf6ddVh9P7wK0l41KJkJ6scu1pz7e/xKD8r3/3L7edrwiV6UxwlYzYZrv8ZY+X
+e9GI1O97SSFe596tLS+ve0V5XM0OHqljP5ReEZUXqX/31nYYli65uPeRzC/psro2yr/5f/7VdrFu
+++Z+kVw8U1KQ3Ybrs2aYJztcncwLUqBvdlzl3ivbtz3Q49pzUrosHrYDqn4EE7w+8K/Re0CxRczl
+C+YyH48rMvnZOwOsl//r7/83DzsakTM6ypW5bgM6dBtbkV67/mLjdZ/I8KS3o8MvhZ+NxFLPU9jE
+9/5ED3gqWcb+/rOubqlY6eX1EAEeW2DH1sfrNGTUM5Tdda/u4gf3z3yKyuWZGWy7zy4/tIfs2W4S
+vTRflwJ7q+1S0qjscNIzc9WgfGq9GQKSsZQ9lLuvSGM3mClSwJRsu/r9FzqpljB2eXG9XHxngN01
+BmHaeA5B0xa5cls+oMRo9gm2MfrEvbcNme7cErMtgzhSvHtfk24qL7Exw2tiu6/0HoXc2+ITtV3q
+eCoqopttUmqAxfhRt3CkK8annGBm1NqTbrqpbnhEdGAw6ecj+dZ7U/P08njewCe7+EaJbnpE0OMv
+Xoc+5xCz22psIQl6HBrIOL+GmKBuplnoXI/+TSOB0XpsQMTT9cSNsZMXq6ZPnFfS1sH5IoLXjHEG
+6ImSvZP9GNjUjwTb7UIaQE5IymwPjsFPya0eGdVYxmq55tERkciG7nUAtgyfJ2yzb0OXDOxx1u6e
+7CRjP910ME6PZNKt3RgWkdb9I4v+C8706K5dvbBEN7/3w4BQzt/+7AcTlTzO0+2i1Y+ABct5iLnB
+wSMf8GnWio+tF4uq1XPkBCGVfi5gn/iNSQcT7bFAXxm7c3634M9IqxJGzN4mdp+K1xH/JxvnS9oG
+7Pl6l3RFFcjWjj4xqm2UcBsGtOA1gSI4dfSjy+kdf/UjbXpN5M4ASWSXXr6Jlq6CtVUssrF72FpO
+HrxqbNnDtVZardQWBScsPfF0mxnl4cHLxeeSSQhNdYjULt6qeAh42wVUph4po1uhSFUdDepl4lS9
+kugW0+aOp7TrcH897XCINvYrWz0LNwZXkpDS5CtGt0qdfSKTJK9KsPOQxXxszNEHvzPPE337nAd6
+G3clcHbgtWOOPrgd0/SJQniCSzoeeILph4B4jhc6X7sK7irAOsPE2U/9LILWGsu6sC5RgaUJoiWk
+grdXBcr6eI/kDK3QRGhxKrGHPbvY0Fh5IywJIe9E1d6C6HpuGwANJmJTHV0Xjlfo8A56grpuE3kq
+IboaEECat7dX0dhWXAxMqIsnRtfu2eP8QpGoU3Q5kGXT29GO1pyxhipKYzL6BEpM2HByCVEK5wKi
+fUYD1+xEpsbky2AC/1plCxrV1qJYZYN1RZeFtqzYKkhdvVhVj98Uo+hqJPWSriklFoxWvfJ3mgoI
+1LXuKn+4jllt4MutH7vBl2AeMT+4maYMH4BBP8DAF2aNy22sMPpEIU+/YycaQyVZWB5+SR8MG0wh
+/fOcKSn7mUbiE6E8A2ZXaK9K+oQmA69ZnMhRvHBvvfjvU5hutvU5mLj3r1sMKZIbXRD5YumJNDYw
+VVScjBrNsJ27nHL2/AU8ucwP1PYqKw1zKbBPLDWj9PM/MSGRmdKECNRWWU+LYwG8zl+eCll6urTX
+Z5EQU8NE6jghBtWLHLtY36azi8hNIXUc4Ay1T37suXU2BkLpzONFGTQYKpYOvexq6ucO9cmPcwo9
+vj89kVLx5JFMtMX+x6TjK82/8wKFuYt1yWSZAs9s5lp/N4uETmnQIm/IiArpaTCLpDQOt+7qrGOk
+Pk8OWIPJesh6H9UBypVaG3VdqdUzpVIS0uxzti0gKOvqjSvVM9FyKpAMpXFeq5cyLZk8JcphJpXs
+qJpp0529497Svs4xNWqtmOrADS/V6/ZBH7s90nekXcfAbhaKm0IyANOmnjyJg1EyrkuF/sphMfT7
+dGvFJ/kp+BzFJ8VVoevy+CxURyKTmHfJJptPxcxrBXi7NkkGfkJZyeWpKgpwOtRcX0iWUPEkmWHM
+Sh/p2OUTl7Z1VdbWWGujhlOuFGGat763ODW+/Nc//4XDfOCP/ywjHwpFZNS2ncrMIScke+VuC44s
+SRDxE0G7JZC6WJTdYYfJw45ba3FytpteHTNvEbyb2TZWS2CO4VTi6WQ65ZGMss9L6ODOjZc9g70M
+r+5/m8hwb3fJYrIx1Qss1lcnkKUwJ9uBwD0D9NpJ/hqp82Zgnj4/nk/IiiNaAAAMGElEQVQ/SVa2
+BRX/dgnhBaQtjo21sF+9v37uoKpRiqulaZrdGlhbFF5Mnmgr+CJWo/zDP3zhcDwgzJhmjtOE1YbW
+xjx7Nm4vUy5iXrNOVpK5aPaat45InRcFS2kcVGym0PP1LGHkJ0Lg6QS5+HKQtdUbiFMlnzBAzs4E
+Oe/PztnuldLTFbc3MTuT7D2Gg8F2OKM7cCxYNnVTa6iqDu6Uhqdv7xmgqWcMhQAZz9LADrsk6MCX
+3ZTe8in2Lu0xVlJ8MYk7XpJkSvHUsVq9IoNId5P34pUCMmHJx1+pIEo5nWFtFbPPLGfj9z99IqNY
+XTg/emZNynD4cODDxyM09Yfsjj7rel4Aa0qrXhGkpM35g0bSdz+9W2QbdGfkJ5SyBN4QPM17S8zc
+//hlsuZ235QgZ18t3S7uvonXwtbdB9LVgg9iTr6ius6W0eiYHM07E7D7CFpIoq6SuszYTFqtOvBP
+B8BdtW1q6xkDpIleB8mP3/Vzm70U7UqrC8uy8vj4yLo2UsqU+QPT4Rjq2xCZMJTyuIJU5bw8sJ6V
+uijHIoiuWFvIyTjezWB+qM10nEilICkjJZNTF/9ewKmlhlEJ459UiuudWCk9CWWLAehW92ao7adY
+JCzHEMeqT1e1GeScyLnsPJbbhs+6roMBhnNkl0W8lwI5u1g0bQGewhOaEi0l2lp3DCDjlFEzobY0
+mG6zVNSLWmp26TtqPuy8dG3DO60D0ujTMMV30tQLb2/99+8SIhlTZVkqy7KyBgBsTVlX5bSekDUx
+TQdySV7Cx5TyeDagkbRRz5V6rnw8uE6jLcyTMJfMGeV8PvFJP3D36RMyTV7BowOiENu5RSeiitGU
+s3upwN2U7MrI7F59MnumsnWbG/DNDxnX9oHq146j6NOGiPvq6UBv77DZp5L3QSylUEoJ9eeSYjBY
+gLOeAbzfQ3ALQWiWNo9qL3NLT0SN85CGP6M7zRzQP3X7ehvdWsmbG2CoR1cpqi1K5hhmLgl878Bd
++CJenQyEx8dH7pczCyeOdx+ZD1NIC6V8e3hEMIoYWhvSFOqEzZk5+3pc10ouE/M0YQqPDw/U9Zsf
+ay7Jz7e18Bf4gTiODYbjCIhyb5nC3vO25+TU0XekaAOjIATxDAQmctjQ/lF3GO29es4A+cXASkfA
+zz4br8A0e7zQ1cL+mv6dI/dMi82uvFMRFgwPNuoXjXI6zU1bsW0MtmJQNiyZPU4eB1HhOKGUmVIk
+MECvONrPJ3IGf3g48fnzF+5XoeUjp6WOotSYUE6PD+7VmzINqCvULFhJSPGBXmvjwMQ0HWjaWB8f
+WJcFslGSr3DMnjDAEG+7XcVkE4kDJU9+bGxfFiGybRwUOao90R1Hjpa8471YQ47iDZ0R+mSC2+Y9
+x38/YV06qOrmE+hM0RplmmJSoiKXPq2E7sy6VSUpZSLlgo3aAbAdPuk7nL0UXl+5ao2WrNfHcqUw
+9lGeqreNNkvCDPyEkVBdOxwgYQksy8r9cs+6VD+XAT+McTmdedRHv06Eous5TvCeyKSwTRMlZ7Q1
+1tUo04G1Kt8eTs59BT4eP3I4zsyTF3gMqDl2CfvK75ZBkoRZRs3NlXHk65gYGV6PXnDaiy02lvPJ
+fWlPzMG+0nv5Nt98WtdKrSsO3KaxsvqEdTOwq42uKvr38+SVyfpGStM2VuC2rxEWBEKZilsiqZds
+0YFHcumFL8OCwrdyexXRfgj4JqU6E0OtUVpnB3p7eVgJ5jb13/UXJuRcBiA2g3k+8Pf/4u+pVnhc
+4edfPvN4Prv7XxLl7//570lJuJsmDvPEMWeOU2Hu7lKU03mhiXKXoMwTRQpaM3qCZVHM3NkjsUEk
+5k6OHngRhVdoVJqtkUNjY2Vb1/XqJ2sOy8LhEk0amjZ1sm2mSFTZdj95q43afOK8juFzF7MNzLCX
+Fv3vvqXsFeIltqFj1alvvGzeQrfdvXx7xc9x05g0rxCaW9/H6PZeZ/YAeuHFG5XWbetj6w6cnZQS
+sThHIVReDjd0LpTsm2y5TExlIqUyVKtI4vHUOJ8fkbpCXRDLgFD+z//jfyeLg7UiQjJlPZ/RuvDh
+7gOqjf/+5z9xbpl8PDDPMzkXHh9PfDs/UNfKspxptYbv3/uak5DFQYypUptbB5a3otIS7J76RlBs
+IVuohGmamQ8z6VDIs4MiF/19ZaUhAcCQ4zycIjJc1ZsHcL8Tt/9s/7nBOGdi1DoMSfRENAfT+sGP
+4Q+xbjZur9ZcIvU+O04psdGGe0fFJ0vbFg+Ri6vWMjk4TWG+eb2CiZz8XMFpmiilkPNEyf7uEk35
++vWeb9/u+fbtG/dfP/P15y+084lsldzB7x9++uCDXTK0xun+gVM9Y9r49NMfKVPh68NXvtzf85ef
+P5MPBz7+8ROfPnxAtFHXSl1XX3Wx/dl9Al28+05hA1ZI6xgowT1SKckwg7biEjlq7h1Ih5kyz2Mw
+uu7vk7enbR8iYbqtnv1vn249P6UmMVXdCrFtU2kDje4UyqE6Wq3oWsfWr5t8Dgib+gLxVd6dReGm
+Doy430J+AopDTXVV5c9OJGZEQvXSd14Jk+8UPoAT377d8/DwyPl0YjmfmDMcP92NeyJCcRcmFDHW
+trKc72nriXma+fjhjuOHO3763e/4fP/AL7985e7DJ/7w+9/z4fcfOMyTm22Gl4yvEQGEr+Zu4xL6
+EluABe2OGDb36dg63nc8fA2W3feQSw4uL8M+7lVI9n59N+/E9RzdTHN07D6pOL+3r+7Wxm6i9tCy
+wRLe9v3pM0mEMk2Ukl1UN8Pq5uMvqTBPMx8+3IFArQtN6zDjnAli3Nreb+BYqEvGHh301PGUEJnA
+fJWfzgun05nT45n1vLCsKw/39zzcP7gkNyWnzFwKH3+680M8p9mtlSSUuwRYYz2faKczhcrvf/eB
+n373Ex/uZswaRYRjKdRcOH995E//5U/88tc/+7Gw88SUy/BY5bRxbEJ23g9DNaMtud4M0NMPfkqS
+46Rpt7tLLtQ4Ot4AWsXOK71IY/fPC7DWlfN54fHxkdPpxHI+4/sEB99D23yxgNCaUgPZt4jeIRw7
+7tPY1MHQ/3tpsPNbNK3hCu/RP3A4Tvz06RN//F/+wNGPAaMUoRRH6yI+6W72EsEblfPpzLrWceBm
+fw23mHl71wa1GWttLMvCcq60dUVrxVrFaoVWyQKHnDlMhcOxcLwrTJOQkh9PLyQK50ea+une1iqH
+krj7cOAwF+6/feb+4cS3r1+gKcc8YWvjy1+/sP5ckSJMpXh5tuQFkqdSfHVMLqpTD1ZsjaZrhJnt
+RW/shfeYPrUIcUpjFaTsnsReZk4iyNPdrJlaG+u68PD4yOnxkfP5jCqkNNH3d12sxy6geQCJInGC
+mwa2KORA5l0k06VZOHC6N9EnqrrHbW3D1CV5ubyffveJf/7lxN3dgZTgeNdLxZfALVH4ymBdK6fT
+ifv7e5azH6zpSD4/ZYIwstaItmpxKJWZ1xnOZpQEx2nmeDdzkMachcOUmA6JMqedOxqESvn5559B
+3NlSpsw0FdZ15cuf/sRff/7Cl6/fWGslpcLh8JHDlMllAsksrfLt8cz5fPJTQqOMasrCVKbhh6+t
+siyLmyr4d9PsIhRkB7R27xGaVkphPhxi1dumUpJ7uj5+/MA8Hyj5wKHMlA8/MU9LTIx79GqIe6NB
+ctQsKXtou4IlC4dWIVnz84xbG0ywOa0kzEDzg69scpv7rCxL8nORTVnOynp+5Pz4V3LxyfaS8cEA
+klwNmfm27bKwLAvn8wKkkKLTYACXet6+PEDwRMqJacq+A4tSMhyK8HEW7grMqVKkkbtbJW3xBx3M
+lNN5+c85y78nzczJV3NbKqeHRz5//oVfvnxDRDgePjLPPvDSo06ssa6Nx8czy7r6nneEMnWwBrCu
+rqdqM4TM8XDgcNBR/LC1xlrX4aevq6+ylHOUXK9MUwlg11BTkmQOd0qWg8cxHDJ5yhEEkjFNHjjT
+Xc9xFmPK7meaxDeYLEEyRSKAQMQi7UroNYs3f7tilraQb3VQhoHV2EYPHCA0hDMkR/bn08ThbmUu
+k593pMpijaUqy3KKBaJkSZT5SM5GlpACWSkpM01CKYmDQZqCIVKmhNdwKsphShwPmbtZKSQmqrc7
+etPd2niP/vP/AAyBfHNJXSmFAAAAAElFTkSuQmCC
+"
+ height="129"
+ width="128" />
+ </g>
+</svg>
diff --git a/demos/mobile/qtbubblelevel/icons/qtbl_icon.png b/demos/mobile/qtbubblelevel/icons/qtbl_icon.png
new file mode 100644
index 0000000000..780fbb413d
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/qtbl_icon.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/icons/xpm/qtbubblelevel.xpm b/demos/mobile/qtbubblelevel/icons/xpm/qtbubblelevel.xpm
new file mode 100644
index 0000000000..19f3c2f3d2
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/icons/xpm/qtbubblelevel.xpm
@@ -0,0 +1,1783 @@
+/* XPM */
+static char * qtbubblelevel_xpm[] = {
+"64 64 1716 2",
+" c None",
+". c #BBD2A8",
+"+ c #BBD1A8",
+"@ c #BFD3A5",
+"# c #C0D2AA",
+"$ c #A4B594",
+"% c #94A488",
+"& c #B2C3A5",
+"* c #A5B694",
+"= c #A6B893",
+"- c #A7B993",
+"; c #A8BA93",
+"> c #A6B891",
+", c #A7B992",
+"' c #A7B792",
+") c #A7B896",
+"! c #A8B997",
+"~ c #A9BA98",
+"{ c #ABBC99",
+"] c #AABB99",
+"^ c #AABB98",
+"/ c #A8B996",
+"( c #A9BA97",
+"_ c #ADBC94",
+": c #ACBA95",
+"< c #ABB895",
+"[ c #ADBC9A",
+"} c #B6C3A5",
+"| c #95A285",
+"1 c #A9BA99",
+"2 c #BDD4AA",
+"3 c #AFC897",
+"4 c #AFC898",
+"5 c #AFC797",
+"6 c #B4C994",
+"7 c #B4C799",
+"8 c #97A981",
+"9 c #839570",
+"0 c #8C9E7A",
+"a c #7B8C65",
+"b c #7E9167",
+"c c #7D9268",
+"d c #7E9268",
+"e c #7E926A",
+"f c #82966E",
+"g c #859972",
+"h c #889B74",
+"i c #8CA07A",
+"j c #8FA37D",
+"k c #91A47E",
+"l c #93A680",
+"m c #94A881",
+"n c #93A781",
+"o c #95A983",
+"p c #96AA83",
+"q c #94A882",
+"r c #94A880",
+"s c #94A780",
+"t c #93A47A",
+"u c #90A079",
+"v c #8D9C77",
+"w c #8B9A78",
+"x c #98A787",
+"y c #879576",
+"z c #9CAE89",
+"A c #B1CA9A",
+"B c #B1C999",
+"C c #A7BF8A",
+"D c #A8C18A",
+"E c #A8C18B",
+"F c #A8C08A",
+"G c #ACC286",
+"H c #ACC08A",
+"I c #93A677",
+"J c #7A8C63",
+"K c #7A8D62",
+"L c #778A5D",
+"M c #7C905F",
+"N c #799162",
+"O c #7A9163",
+"P c #799063",
+"Q c #7B9363",
+"R c #7C9464",
+"S c #7C9465",
+"T c #819869",
+"U c #849C6D",
+"V c #89A071",
+"W c #8DA478",
+"X c #90A77C",
+"Y c #94AB80",
+"Z c #96AD82",
+"` c #97AE83",
+" . c #96AE83",
+".. c #98AD82",
+"+. c #99AF84",
+"@. c #9AB085",
+"#. c #99B085",
+"$. c #98AE83",
+"%. c #97AD81",
+"&. c #96A97D",
+"*. c #91A378",
+"=. c #8C9F76",
+"-. c #879973",
+";. c #879875",
+">. c #819271",
+",. c #96AA80",
+"'. c #AAC38C",
+"). c #A9C28C",
+"!. c #A7C189",
+"~. c #A8C189",
+"{. c #A2BB80",
+"]. c #A2BB82",
+"^. c #A1BA81",
+"/. c #A4BD83",
+"(. c #A3BD82",
+"_. c #A5BC7D",
+":. c #A4B980",
+"<. c #8CA06F",
+"[. c #798B5F",
+"}. c #788B5E",
+"|. c #7A8D5D",
+"1. c #7D935F",
+"2. c #7A9661",
+"3. c #7C9762",
+"4. c #7C9763",
+"5. c #819B66",
+"6. c #829D68",
+"7. c #829D66",
+"8. c #819C65",
+"9. c #849F68",
+"0. c #86A16A",
+"a. c #87A26C",
+"b. c #8CA674",
+"c. c #8FA979",
+"d. c #92AD7D",
+"e. c #95AF7F",
+"f. c #96B080",
+"g. c #97B180",
+"h. c #98B282",
+"i. c #9AB383",
+"j. c #9AB483",
+"k. c #99B282",
+"l. c #97B080",
+"m. c #96AF7F",
+"n. c #93A879",
+"o. c #8DA375",
+"p. c #889D72",
+"q. c #81966D",
+"r. c #7E926B",
+"s. c #7B8E6A",
+"t. c #94A97C",
+"u. c #A4BD84",
+"v. c #A3BC82",
+"w. c #A1BA82",
+"x. c #A2BB83",
+"y. c #A3BB84",
+"z. c #A5BD86",
+"A. c #A5BD85",
+"B. c #A6BC7F",
+"C. c #A5BA83",
+"D. c #90A274",
+"E. c #7D9165",
+"F. c #7E9266",
+"G. c #7E9262",
+"H. c #809662",
+"I. c #7E9C61",
+"J. c #819E64",
+"K. c #83A166",
+"L. c #88A56B",
+"M. c #89A76C",
+"N. c #89A769",
+"O. c #8BA96B",
+"P. c #8CAB6B",
+"Q. c #8FAD74",
+"R. c #92AF79",
+"S. c #95B27C",
+"T. c #97B57E",
+"U. c #98B67E",
+"V. c #9AB880",
+"W. c #9CB982",
+"X. c #9CBA83",
+"Y. c #9DBA83",
+"Z. c #9BB881",
+"`. c #99B67F",
+" + c #98B57E",
+".+ c #96B27D",
+"++ c #93AB79",
+"@+ c #8CA574",
+"#+ c #879F70",
+"$+ c #829A6D",
+"%+ c #80976D",
+"&+ c #7D946C",
+"*+ c #95AC7D",
+"=+ c #A4BC85",
+"-+ c #A3BA84",
+";+ c #A3BC84",
+">+ c #A4BC88",
+",+ c #A4BC89",
+"'+ c #A6BE8B",
+")+ c #A5BE8A",
+"!+ c #A7BC83",
+"~+ c #A8BC88",
+"{+ c #94A77B",
+"]+ c #85976F",
+"^+ c #869870",
+"/+ c #83966B",
+"(+ c #859A69",
+"_+ c #84A365",
+":+ c #88A869",
+"<+ c #8CAC6D",
+"[+ c #90B071",
+"}+ c #91B172",
+"|+ c #91B170",
+"1+ c #91B26D",
+"2+ c #91B26E",
+"3+ c #91B16E",
+"4+ c #90B16C",
+"5+ c #93B370",
+"6+ c #95B376",
+"7+ c #96B47A",
+"8+ c #99B87E",
+"9+ c #9CBA80",
+"0+ c #9BBA80",
+"a+ c #9EBD82",
+"b+ c #9FBE83",
+"c+ c #A0BF84",
+"d+ c #9DBB81",
+"e+ c #9BBA7F",
+"f+ c #9AB97E",
+"g+ c #98B67D",
+"h+ c #93AD79",
+"i+ c #8DA874",
+"j+ c #87A271",
+"k+ c #849E6F",
+"l+ c #849E72",
+"m+ c #80996F",
+"n+ c #96AE80",
+"o+ c #A5BD8A",
+"p+ c #A3BB88",
+"q+ c #A7BF8C",
+"r+ c #A6BE8C",
+"s+ c #A8C08E",
+"t+ c #A8C08D",
+"u+ c #A8C08B",
+"v+ c #A8BE8B",
+"w+ c #95AA80",
+"x+ c #899C7A",
+"y+ c #8B9F78",
+"z+ c #879C71",
+"A+ c #879E71",
+"B+ c #8AA86E",
+"C+ c #8EAD70",
+"D+ c #92B274",
+"E+ c #94B776",
+"F+ c #94B875",
+"G+ c #93B872",
+"H+ c #93B973",
+"I+ c #97B976",
+"J+ c #96B976",
+"K+ c #98B976",
+"L+ c #98BB77",
+"M+ c #97B97A",
+"N+ c #99BA7D",
+"O+ c #9ABB7E",
+"P+ c #9BBD80",
+"Q+ c #9EBF82",
+"R+ c #9FC082",
+"S+ c #9FC183",
+"T+ c #A1C284",
+"U+ c #A0C184",
+"V+ c #A3BF88",
+"W+ c #A3C086",
+"X+ c #A3C087",
+"Y+ c #9FBC82",
+"Z+ c #9EBC80",
+"`+ c #9EBB80",
+" @ c #9AB77C",
+".@ c #92AF78",
+"+@ c #8DA87A",
+"@@ c #89A279",
+"#@ c #869F74",
+"$@ c #8CA378",
+"%@ c #889D73",
+"&@ c #9AB084",
+"*@ c #A7BF8D",
+"=@ c #A5BD8B",
+"-@ c #A6BE87",
+";@ c #A6BF87",
+">@ c #A5BF87",
+",@ c #A7BF89",
+"'@ c #A6C087",
+")@ c #93AB7E",
+"!@ c #8A9E7D",
+"~@ c #8FA67B",
+"{@ c #849D6D",
+"]@ c #88A072",
+"^@ c #8BA971",
+"/@ c #8FAF73",
+"(@ c #92B675",
+"_@ c #94BA74",
+":@ c #92BC71",
+"<@ c #91BE6D",
+"[@ c #94BE71",
+"}@ c #96BC78",
+"|@ c #97BD78",
+"1@ c #96BD78",
+"2@ c #98BF7A",
+"3@ c #99BF7A",
+"4@ c #9CC27E",
+"5@ c #9BC17D",
+"6@ c #9DC380",
+"7@ c #9EC480",
+"8@ c #9EC380",
+"9@ c #A1C185",
+"0@ c #A1C282",
+"a@ c #9DBE7E",
+"b@ c #9DBE7D",
+"c@ c #9CBD7B",
+"d@ c #97B875",
+"e@ c #92B273",
+"f@ c #8CA97B",
+"g@ c #88A17C",
+"h@ c #879E74",
+"i@ c #8DA074",
+"j@ c #9BB081",
+"k@ c #A7C089",
+"l@ c #A5BE88",
+"m@ c #A6BF86",
+"n@ c #93AF6E",
+"o@ c #94B06E",
+"p@ c #93B06E",
+"q@ c #93B070",
+"r@ c #95B16F",
+"s@ c #809B63",
+"t@ c #758F61",
+"u@ c #86A16B",
+"v@ c #6F8A50",
+"w@ c #728F58",
+"x@ c #729757",
+"y@ c #789E5B",
+"z@ c #7DA75D",
+"A@ c #7EAC5C",
+"B@ c #7EAE5A",
+"C@ c #81B259",
+"D@ c #81B25D",
+"E@ c #83B061",
+"F@ c #83B161",
+"G@ c #85B363",
+"H@ c #84B363",
+"I@ c #86B465",
+"J@ c #86B565",
+"K@ c #86B464",
+"L@ c #88B666",
+"M@ c #88B767",
+"N@ c #8BB468",
+"O@ c #8BB568",
+"P@ c #8BB567",
+"Q@ c #89B263",
+"R@ c #87B163",
+"S@ c #84AD5F",
+"T@ c #7EA759",
+"U@ c #7C9E59",
+"V@ c #78955F",
+"W@ c #728E5E",
+"X@ c #748F5A",
+"Y@ c #889F68",
+"Z@ c #7A905E",
+"`@ c #88A06A",
+" # c #97B472",
+".# c #97B372",
+"+# c #94B06F",
+"@# c #94B06D",
+"## c #7A994D",
+"$# c #7A9A4E",
+"%# c #799A4E",
+"&# c #799A4B",
+"*# c #607E3B",
+"=# c #537038",
+"-# c #6F8E4D",
+";# c #52712B",
+"># c #4D6D2C",
+",# c #4C752E",
+"'# c #537D32",
+")# c #598737",
+"!# c #5D8E38",
+"~# c #5E9337",
+"{# c #619838",
+"]# c #62993B",
+"^# c #62963B",
+"/# c #62973B",
+"(# c #64993D",
+"_# c #63993C",
+":# c #65993E",
+"<# c #659A3E",
+"[# c #649A3D",
+"}# c #669A40",
+"|# c #679B40",
+"1# c #679B3F",
+"2# c #6A9B3B",
+"3# c #6A9B3C",
+"4# c #6A9B3D",
+"5# c #67983C",
+"6# c #65953B",
+"7# c #5F9036",
+"8# c #59882F",
+"9# c #577B30",
+"0# c #517334",
+"a# c #4D6D30",
+"b# c #557533",
+"c# c #708C4B",
+"d# c #587037",
+"e# c #6B8647",
+"f# c #7C9C50",
+"g# c #719440",
+"h# c #719540",
+"i# c #71953F",
+"j# c #709441",
+"k# c #6F933D",
+"l# c #56792E",
+"m# c #496929",
+"n# c #6B8D45",
+"o# c #527528",
+"p# c #40631C",
+"q# c #406920",
+"r# c #436E21",
+"s# c #4A7826",
+"t# c #4F8129",
+"u# c #518729",
+"v# c #558C2A",
+"w# c #568E2B",
+"x# c #568D2B",
+"y# c #578F2B",
+"z# c #57902C",
+"A# c #59912D",
+"B# c #59912C",
+"C# c #59912E",
+"D# c #59902D",
+"E# c #5D9228",
+"F# c #5C9027",
+"G# c #5A8E2A",
+"H# c #5A8D2C",
+"I# c #56892B",
+"J# c #508226",
+"K# c #4A7B23",
+"L# c #476E21",
+"M# c #416721",
+"N# c #3F631E",
+"O# c #577A2F",
+"P# c #6A8A42",
+"Q# c #4A6529",
+"R# c #5D7C38",
+"S# c #709440",
+"T# c #6A913A",
+"U# c #6B923A",
+"V# c #6A923B",
+"W# c #699037",
+"X# c #507528",
+"Y# c #436724",
+"Z# c #678C41",
+"`# c #5E8533",
+" $ c #42671D",
+".$ c #3E631D",
+"+$ c #3F671D",
+"@$ c #456E20",
+"#$ c #4A7823",
+"$$ c #4C7D23",
+"%$ c #518325",
+"&$ c #528625",
+"*$ c #528923",
+"=$ c #548A24",
+"-$ c #558C26",
+";$ c #568D27",
+">$ c #568C25",
+",$ c #588B23",
+"'$ c #578924",
+")$ c #558626",
+"!$ c #538328",
+"~$ c #4E7D28",
+"{$ c #487625",
+"]$ c #437020",
+"^$ c #3D671B",
+"/$ c #3B621B",
+"($ c #436920",
+"_$ c #618538",
+":$ c #66883E",
+"<$ c #446126",
+"[$ c #597935",
+"}$ c #668E36",
+"|$ c #668E35",
+"1$ c #658D36",
+"2$ c #648C33",
+"3$ c #4B7225",
+"4$ c #416522",
+"5$ c #61873B",
+"6$ c #658B3B",
+"7$ c #52762D",
+"8$ c #3E5D1B",
+"9$ c #3D5E19",
+"0$ c #40641B",
+"a$ c #466E1E",
+"b$ c #48731E",
+"c$ c #4D7921",
+"d$ c #4F7F21",
+"e$ c #4F821F",
+"f$ c #518421",
+"g$ c #538622",
+"h$ c #538723",
+"i$ c #548722",
+"j$ c #548724",
+"k$ c #548723",
+"l$ c #558320",
+"m$ c #538122",
+"n$ c #517E24",
+"o$ c #4D7926",
+"p$ c #477326",
+"q$ c #416B22",
+"r$ c #3B661D",
+"s$ c #376117",
+"t$ c #39611C",
+"u$ c #50772D",
+"v$ c #63893A",
+"w$ c #60833A",
+"x$ c #405E25",
+"y$ c #547633",
+"z$ c #628A33",
+"A$ c #628A32",
+"B$ c #608833",
+"C$ c #638832",
+"D$ c #4E6E28",
+"E$ c #436023",
+"F$ c #608038",
+"G$ c #638835",
+"H$ c #5C8334",
+"I$ c #446720",
+"J$ c #375A16",
+"K$ c #3B5F1C",
+"L$ c #3F6420",
+"M$ c #42681E",
+"N$ c #486F1E",
+"O$ c #49761E",
+"P$ c #497A21",
+"Q$ c #4C7D21",
+"R$ c #4E8022",
+"S$ c #508122",
+"T$ c #518222",
+"U$ c #528423",
+"V$ c #518322",
+"W$ c #518324",
+"X$ c #518323",
+"Y$ c #4F811C",
+"Z$ c #50821B",
+"`$ c #50821D",
+" % c #50821F",
+".% c #508221",
+"+% c #4F811F",
+"@% c #4F8020",
+"#% c #517B21",
+"$% c #4F7921",
+"%% c #4C7522",
+"&% c #497122",
+"*% c #41691F",
+"=% c #3E651E",
+"-% c #385F19",
+";% c #355D11",
+">% c #436A1E",
+",% c #5C8132",
+"'% c #618535",
+")% c #5D7C33",
+"!% c #405C1F",
+"~% c #52732C",
+"{% c #618A33",
+"]% c #5D8630",
+"^% c #5E8630",
+"/% c #5E8530",
+"(% c #5C832F",
+"_% c #608330",
+":% c #4E6A28",
+"<% c #425B22",
+"[% c #5F7C35",
+"}% c #5E832E",
+"|% c #5D8432",
+"1% c #517829",
+"2% c #3B6016",
+"3% c #355917",
+"4% c #385C1C",
+"5% c #3D611B",
+"6% c #40661C",
+"7% c #426C1C",
+"8% c #42711E",
+"9% c #45751F",
+"0% c #487820",
+"a% c #4A7A20",
+"b% c #4C7C1F",
+"c% c #4D7E21",
+"d% c #4D7E22",
+"e% c #4B7E18",
+"f% c #4B7E17",
+"g% c #4B7E19",
+"h% c #4B7D1B",
+"i% c #4B7C1D",
+"j% c #497A1E",
+"k% c #49781D",
+"l% c #4B721F",
+"m% c #49701F",
+"n% c #466C1E",
+"o% c #3C611B",
+"p% c #3B601B",
+"q% c #365B16",
+"r% c #3E6516",
+"s% c #537929",
+"t% c #5E8230",
+"u% c #608031",
+"v% c #5A792F",
+"w% c #415B1A",
+"x% c #507027",
+"y% c #59812B",
+"z% c #577E2A",
+"A% c #5A7E2B",
+"B% c #496523",
+"C% c #3E561E",
+"D% c #5A7731",
+"E% c #597F29",
+"F% c #59812C",
+"G% c #577E29",
+"H% c #4C7322",
+"I% c #395D15",
+"J% c #335815",
+"K% c #355915",
+"L% c #375C17",
+"M% c #386018",
+"N% c #3B6717",
+"O% c #3E6B1A",
+"P% c #416E1A",
+"Q% c #43711C",
+"R% c #46731B",
+"S% c #47751A",
+"T% c #48761C",
+"U% c #48771D",
+"V% c #467716",
+"W% c #467614",
+"X% c #467617",
+"Y% c #467518",
+"Z% c #457318",
+"`% c #43711A",
+" & c #416E19",
+".& c #42681D",
+"+& c #3F651B",
+"@& c #3C611A",
+"#& c #3A5F1A",
+"$& c #385C19",
+"%& c #345817",
+"&& c #395E1A",
+"*& c #4D7425",
+"=& c #5A8031",
+"-& c #5A7E2C",
+";& c #5C7D2D",
+">& c #57752C",
+",& c #3D5817",
+"'& c #4C6C24",
+")& c #59812A",
+"!& c #567E28",
+"~& c #557D28",
+"{& c #537B27",
+"]& c #567A27",
+"^& c #466120",
+"/& c #3B541B",
+"(& c #57742E",
+"_& c #567C26",
+":& c #567D28",
+"<& c #537C22",
+"[& c #537A24",
+"}& c #486E1E",
+"|& c #375D14",
+"1& c #315612",
+"2& c #305415",
+"3& c #325916",
+"4& c #355E14",
+"5& c #386217",
+"6& c #3A6417",
+"7& c #3E6819",
+"8& c #3F6A18",
+"9& c #416C17",
+"0& c #436E1A",
+"a& c #446F1B",
+"b& c #436F1B",
+"c& c #456F1C",
+"d& c #456F1D",
+"e& c #426F16",
+"f& c #436F16",
+"g& c #426D16",
+"h& c #416D19",
+"i& c #406A18",
+"j& c #3C6619",
+"k& c #395D1A",
+"l& c #355A17",
+"m& c #325714",
+"n& c #325614",
+"o& c #385D1B",
+"p& c #496E29",
+"q& c #557C2D",
+"r& c #567C2D",
+"s& c #557927",
+"t& c #58792A",
+"u& c #547128",
+"v& c #3B5615",
+"w& c #496920",
+"x& c #557E28",
+"y& c #517923",
+"z& c #527A24",
+"A& c #517924",
+"B& c #507623",
+"C& c #547724",
+"D& c #435F1D",
+"E& c #3A531A",
+"F& c #55722C",
+"G& c #537923",
+"H& c #537A25",
+"I& c #517822",
+"J& c #527A22",
+"K& c #507822",
+"L& c #486E1F",
+"M& c #395E15",
+"N& c #2F5311",
+"O& c #2F5412",
+"P& c #315813",
+"Q& c #335A15",
+"R& c #365D16",
+"S& c #375F15",
+"T& c #396015",
+"U& c #3B6214",
+"V& c #3C6416",
+"W& c #3D6517",
+"X& c #3F6719",
+"Y& c #3F6716",
+"Z& c #3D6616",
+"`& c #3C6415",
+" * c #3A6217",
+".* c #395F17",
+"+* c #385E17",
+"@* c #345818",
+"#* c #325615",
+"$* c #2D510F",
+"%* c #2E530F",
+"&* c #395E18",
+"** c #486D26",
+"=* c #51762E",
+"-* c #52782A",
+";* c #527828",
+">* c #547726",
+",* c #547626",
+"'* c #516F25",
+")* c #395313",
+"!* c #45661E",
+"~* c #527A23",
+"{* c #4D751F",
+"]* c #4D751E",
+"^* c #4C7320",
+"/* c #517421",
+"(* c #405C1A",
+"_* c #375017",
+":* c #516E28",
+"<* c #4F741F",
+"[* c #4E7523",
+"}* c #4C7424",
+"|* c #4D7521",
+"1* c #4D751D",
+"2* c #486F1F",
+"3* c #3B6017",
+"4* c #2F5411",
+"5* c #2C5011",
+"6* c #2C500F",
+"7* c #305511",
+"8* c #315611",
+"9* c #335810",
+"0* c #345A0F",
+"a* c #355B11",
+"b* c #355B12",
+"c* c #375D13",
+"d* c #375D12",
+"e* c #355B10",
+"f* c #345A12",
+"g* c #335812",
+"h* c #315512",
+"i* c #2F5413",
+"j* c #2E5212",
+"k* c #2D5210",
+"l* c #2C510D",
+"m* c #30550F",
+"n* c #3C6219",
+"o* c #466D20",
+"p* c #4C7324",
+"q* c #4D7325",
+"r* c #4C7325",
+"s* c #4E7324",
+"t* c #4F7321",
+"u* c #517224",
+"v* c #4E6C22",
+"w* c #36500F",
+"x* c #42631A",
+"y* c #4A721C",
+"z* c #4A711B",
+"A* c #4A701D",
+"B* c #4D711E",
+"C* c #3C5A16",
+"D* c #334D12",
+"E* c #4D6B23",
+"F* c #4A6F1A",
+"G* c #4A701E",
+"H* c #4A7024",
+"I* c #4A701F",
+"J* c #4A7119",
+"K* c #487017",
+"L* c #4B721C",
+"M* c #476E1E",
+"N* c #40661F",
+"O* c #385A1D",
+"P* c #2E5112",
+"Q* c #2D500F",
+"R* c #2B500B",
+"S* c #2C500B",
+"T* c #2E530B",
+"U* c #2E520B",
+"V* c #2E520C",
+"W* c #2D520B",
+"X* c #2F540D",
+"Y* c #30540E",
+"Z* c #30540D",
+"`* c #2F530D",
+" = c #2E510B",
+".= c #2C4F0B",
+"+= c #2C500D",
+"@= c #2D5010",
+"#= c #2C4E11",
+"$= c #2B4F10",
+"%= c #305510",
+"&= c #395E17",
+"*= c #43691F",
+"== c #476E20",
+"-= c #476E1D",
+";= c #49701B",
+">= c #4A711D",
+",= c #4A6F22",
+"'= c #497020",
+")= c #4B701D",
+"!= c #4E701F",
+"~= c #4B6920",
+"{= c #324E0C",
+"]= c #3F6116",
+"^= c #49721B",
+"/= c #476F19",
+"(= c #466E18",
+"_= c #476F1A",
+":= c #476E19",
+"<= c #385E0E",
+"[= c #2E5406",
+"}= c #446B18",
+"|= c #436B15",
+"1= c #456D18",
+"2= c #476D1B",
+"3= c #476F18",
+"4= c #476E1F",
+"5= c #446A21",
+"6= c #3D621A",
+"7= c #385D14",
+"8= c #30550C",
+"9= c #2D5109",
+"0= c #2A4F05",
+"a= c #284D09",
+"b= c #294D0C",
+"c= c #294D0A",
+"d= c #294D0B",
+"e= c #2B4F0D",
+"f= c #294F08",
+"g= c #294D08",
+"h= c #294E07",
+"i= c #284D07",
+"j= c #325612",
+"k= c #416816",
+"l= c #446C19",
+"m= c #476E1A",
+"n= c #476D19",
+"o= c #466F18",
+"p= c #486F19",
+"q= c #436917",
+"r= c #2E5304",
+"s= c #3A600E",
+"t= c #416913",
+"u= c #406812",
+"v= c #3C640E",
+"w= c #426A14",
+"x= c #436B14",
+"y= c #426A17",
+"z= c #42681B",
+"A= c #41671A",
+"B= c #3D6316",
+"C= c #385E10",
+"D= c #2C520C",
+"E= c #2B500A",
+"F= c #2E530D",
+"G= c #2E5409",
+"H= c #31560C",
+"I= c #3A5F14",
+"J= c #3D6317",
+"K= c #40661A",
+"L= c #42691C",
+"M= c #3B630E",
+"N= c #3E6610",
+"O= c #3F6710",
+"P= c #3F6711",
+"Q= c #3E6714",
+"R= c #3F6617",
+"S= c #3D6415",
+"T= c #406718",
+"U= c #406618",
+"V= c #3E6616",
+"W= c #3E6515",
+"X= c #3B6212",
+"Y= c #3B6111",
+"Z= c #3D6314",
+"`= c #3D6214",
+" - c #3D6412",
+".- c #3E6413",
+"+- c #406715",
+"@- c #3E6713",
+"#- c #3F6714",
+"$- c #406614",
+"%- c #406811",
+"&- c #3D650F",
+"*- c #3B630D",
+"=- c #3B630F",
+"-- c #3B6211",
+";- c #3D6414",
+">- c #3E6514",
+",- c #3C6312",
+"'- c #3D650C",
+")- c #3D650D",
+"!- c #3D640C",
+"~- c #3D650E",
+"{- c #3E660E",
+"]- c #3E660D",
+"^- c #3E660F",
+"/- c #3A620C",
+"(- c #3B620D",
+"_- c #3B620F",
+":- c #3B610B",
+"<- c #3B630A",
+"[- c #3B630B",
+"}- c #375F09",
+"|- c #375F0A",
+"1- c #375F08",
+"2- c #375F07",
+"3- c #375F0B",
+"4- c #345C06",
+"5- c #345C07",
+"6- c #335C07",
+"7- c #355C07",
+"8- c #355C05",
+"9- c #355C04",
+"0- c #355C06",
+"a- c #355A09",
+"b- c #355B0A",
+"c- c #355B09",
+"d- c #355B06",
+"e- c #355D06",
+"f- c #335C06",
+"g- c #2E5704",
+"h- c #305804",
+"i- c #305806",
+"j- c #305906",
+"k- c #305704",
+"l- c #305805",
+"m- c #325605",
+"n- c #335705",
+"o- c #335605",
+"p- c #325604",
+"q- c #345806",
+"r- c #355807",
+"s- c #335706",
+"t- c #335704",
+"u- c #335505",
+"v- c #325606",
+"w- c #345906",
+"x- c #335805",
+"y- c #325903",
+"z- c #325B01",
+"A- c #325B02",
+"B- c #315A02",
+"C- c #2F5800",
+"D- c #305901",
+"E- c #305900",
+"F- c #335503",
+"G- c #355305",
+"H- c #355404",
+"I- c #2D5601",
+"J- c #2E5702",
+"K- c #2F5703",
+"L- c #305904",
+"M- c #2F5804",
+"N- c #315502",
+"O- c #325603",
+"P- c #315503",
+"Q- c #315602",
+"R- c #305503",
+"S- c #315504",
+"T- c #305404",
+"U- c #325704",
+"V- c #315704",
+"W- c #325502",
+"X- c #305602",
+"Y- c #315900",
+"Z- c #315901",
+"`- c #305701",
+" ; c #2E5700",
+".; c #2F5700",
+"+; c #2E5600",
+"@; c #315500",
+"#; c #335501",
+"$; c #335500",
+"%; c #737E40",
+"&; c #737D40",
+"*; c #717D3E",
+"=; c #727C3F",
+"-; c #727D40",
+";; c #747B3F",
+">; c #757C40",
+",; c #73793D",
+"'; c #71793D",
+"); c #72793D",
+"!; c #71793C",
+"~; c #737A3E",
+"{; c #71783C",
+"]; c #70773B",
+"^; c #71773C",
+"/; c #757C3F",
+"(; c #747B3E",
+"_; c #737C3C",
+":; c #737D39",
+"<; c #737D3A",
+"[; c #727B39",
+"}; c #707B38",
+"|; c #717B38",
+"1; c #717B37",
+"2; c #717A36",
+"3; c #CAAE84",
+"4; c #C9AE83",
+"5; c #C7AB80",
+"6; c #C3A77D",
+"7; c #C4A97D",
+"8; c #C6AA80",
+"9; c #C5A97E",
+"0; c #C9AA80",
+"a; c #CAAA81",
+"b; c #C9A980",
+"c; c #C6A67D",
+"d; c #C6A57C",
+"e; c #C8A87F",
+"f; c #C9AA81",
+"g; c #C7A77E",
+"h; c #C3A37A",
+"i; c #BF9F76",
+"j; c #C1A178",
+"k; c #C3A379",
+"l; c #C2A179",
+"m; c #C0A077",
+"n; c #C2A279",
+"o; c #C09F77",
+"p; c #C0A177",
+"q; c #C4A47B",
+"r; c #C6A67C",
+"s; c #C5A67C",
+"t; c #CBAB82",
+"u; c #CCAB81",
+"v; c #CCAB82",
+"w; c #CAAB81",
+"x; c #C8A77E",
+"y; c #C5A57C",
+"z; c #C7A67D",
+"A; c #C7A87F",
+"B; c #C9A97F",
+"C; c #C9A87F",
+"D; c #C4A37B",
+"E; c #C4A478",
+"F; c #C2A273",
+"G; c #C3A375",
+"H; c #C4A475",
+"I; c #C0A172",
+"J; c #C1A171",
+"K; c #C1A173",
+"L; c #C1A373",
+"M; c #C2A374",
+"N; c #C2A373",
+"O; c #CC9F6B",
+"P; c #D0A370",
+"Q; c #D0A36F",
+"R; c #CB9E6B",
+"S; c #CDA06C",
+"T; c #CCA06C",
+"U; c #CE9C69",
+"V; c #CC9A67",
+"W; c #C99765",
+"X; c #CB9966",
+"Y; c #C79664",
+"Z; c #C49260",
+"`; c #C89764",
+" > c #CA9965",
+".> c #C89765",
+"+> c #C79563",
+"@> c #C2915E",
+"#> c #C08F5C",
+"$> c #C3925F",
+"%> c #BF8F5B",
+"&> c #BD8B59",
+"*> c #C3915F",
+"=> c #C69462",
+"-> c #C89664",
+";> c #CB9A67",
+">> c #CB9968",
+",> c #CB9B67",
+"'> c #CD9C69",
+")> c #CD9B68",
+"!> c #CE9D6A",
+"~> c #CE9C6A",
+"{> c #CA9866",
+"]> c #C69562",
+"^> c #C1905D",
+"/> c #C2905E",
+"(> c #C69461",
+"_> c #CA9966",
+":> c #C59461",
+"<> c #C5935F",
+"[> c #C28F59",
+"}> c #C3915A",
+"|> c #C7945E",
+"1> c #C5935D",
+"2> c #C08E58",
+"3> c #BC8853",
+"4> c #BB8654",
+"5> c #BB8655",
+"6> c #BA8655",
+"7> c #BC8A4B",
+"8> c #C1904F",
+"9> c #BF8D4D",
+"0> c #C19050",
+"a> c #C29050",
+"b> c #BE8C4C",
+"c> c #C28D4E",
+"d> c #C18A4C",
+"e> c #BD8649",
+"f> c #BD8749",
+"g> c #BB8547",
+"h> c #B78142",
+"i> c #B88244",
+"j> c #B68042",
+"k> c #B98244",
+"l> c #BB8447",
+"m> c #BC8648",
+"n> c #BA8446",
+"o> c #BE874A",
+"p> c #BD8648",
+"q> c #B68041",
+"r> c #B98445",
+"s> c #BA8445",
+"t> c #B88245",
+"u> c #B98344",
+"v> c #BE8749",
+"w> c #C08A4C",
+"x> c #BF894B",
+"y> c #BE894B",
+"z> c #C0894B",
+"A> c #BF884A",
+"B> c #BA8546",
+"C> c #B78143",
+"D> c #B88345",
+"E> c #BA8346",
+"F> c #B78144",
+"G> c #BA8345",
+"H> c #BB8546",
+"I> c #BB8446",
+"J> c #BE884A",
+"K> c #BD8546",
+"L> c #BC8342",
+"M> c #BD8443",
+"N> c #C08646",
+"O> c #BB8342",
+"P> c #B67C3B",
+"Q> c #AA702F",
+"R> c #A76830",
+"S> c #A4622F",
+"T> c #A3622F",
+"U> c #B78145",
+"V> c #C58E52",
+"W> c #BF874B",
+"X> c #BC8347",
+"Y> c #B98345",
+"Z> c #B88344",
+"`> c #B88146",
+" , c #B98146",
+"., c #B98045",
+"+, c #B98046",
+"@, c #BB8348",
+"#, c #BA8046",
+"$, c #B97E44",
+"%, c #BB7F45",
+"&, c #B87D43",
+"*, c #B87C42",
+"=, c #B67B41",
+"-, c #B5793E",
+";, c #B3783E",
+">, c #B2773C",
+",, c #B07539",
+"', c #AD7236",
+"), c #AD7136",
+"!, c #AA6E33",
+"~, c #AD7237",
+"{, c #AE7336",
+"], c #AD7135",
+"^, c #B67B3F",
+"/, c #B87E41",
+"(, c #B67C3F",
+"_, c #B77C40",
+":, c #B77D3F",
+"<, c #B67D41",
+"[, c #B87F42",
+"}, c #B98043",
+"|, c #BA8144",
+"1, c #BF8449",
+"2, c #BD8248",
+"3, c #BF8349",
+"4, c #BE8348",
+"5, c #BB8145",
+"6, c #B67C40",
+"7, c #B4793C",
+"8, c #B77B3F",
+"9, c #BA7E42",
+"0, c #BC8044",
+"a, c #BB7F43",
+"b, c #BC8145",
+"c, c #B97D41",
+"d, c #B6783A",
+"e, c #B67636",
+"f, c #B67738",
+"g, c #B97A3B",
+"h, c #BD7D3F",
+"i, c #B9783B",
+"j, c #AE6E31",
+"k, c #AB6330",
+"l, c #A95E2F",
+"m, c #A95C2D",
+"n, c #A6733B",
+"o, c #BD874F",
+"p, c #C48852",
+"q, c #B98044",
+"r, c #BD8A4B",
+"s, c #C39252",
+"t, c #C59557",
+"u, c #C59457",
+"v, c #C49255",
+"w, c #C79256",
+"x, c #C99257",
+"y, c #C38B51",
+"z, c #C58A51",
+"A, c #C48853",
+"B, c #C48851",
+"C, c #C38752",
+"D, c #C18650",
+"E, c #BD814B",
+"F, c #BA7F48",
+"G, c #B97E46",
+"H, c #B87D45",
+"I, c #B47941",
+"J, c #B57A42",
+"K, c #B2773F",
+"L, c #B37840",
+"M, c #B87D41",
+"N, c #BB8044",
+"O, c #BE8347",
+"P, c #BF8448",
+"Q, c #BA7F43",
+"R, c #B27C3E",
+"S, c #B47E40",
+"T, c #B58042",
+"U, c #B68142",
+"V, c #B68143",
+"W, c #B98346",
+"X, c #C18551",
+"Y, c #C28651",
+"Z, c #C0844E",
+"`, c #BD8149",
+" ' c #BC8147",
+".' c #B57A3E",
+"+' c #BB7E43",
+"@' c #BF8045",
+"#' c #C28449",
+"$' c #BF8247",
+"%' c #C08348",
+"&' c #BD7F40",
+"*' c #BD803A",
+"=' c #BC7F3D",
+"-' c #BE8140",
+";' c #BB7E3F",
+">' c #B4763A",
+",' c #AE6F34",
+"'' c #B06E35",
+")' c #B67239",
+"!' c #B26F36",
+"~' c #7F5123",
+"{' c #9C6A3D",
+"]' c #B2794B",
+"^' c #B27541",
+"/' c #B87B44",
+"(' c #BE864A",
+"_' c #C28D4D",
+":' c #C18C49",
+"<' c #BC8643",
+"[' c #BC8441",
+"}' c #BE8141",
+"|' c #C08243",
+"1' c #C18343",
+"2' c #BF8041",
+"3' c #BC8144",
+"4' c #BD8244",
+"5' c #BD8144",
+"6' c #BC8143",
+"7' c #BB8042",
+"8' c #B97E42",
+"9' c #BA7F47",
+"0' c #BD8249",
+"a' c #C0854D",
+"b' c #C2874F",
+"c' c #C38850",
+"d' c #C78C51",
+"e' c #C88D51",
+"f' c #C4894D",
+"g' c #C08549",
+"h' c #BD8246",
+"i' c #BB8144",
+"j' c #B77D41",
+"k' c #BE8448",
+"l' c #BE8446",
+"m' c #BD8348",
+"n' c #C0844F",
+"o' c #C18550",
+"p' c #BE824B",
+"q' c #BF844A",
+"r' c #C1874B",
+"s' c #C18749",
+"t' c #C08546",
+"u' c #BF8145",
+"v' c #C08246",
+"w' c #C08245",
+"x' c #C48649",
+"y' c #C4864A",
+"z' c #C48646",
+"A' c #C38742",
+"B' c #C58946",
+"C' c #CA8D4C",
+"D' c #C18447",
+"E' c #B7793D",
+"F' c #B07237",
+"G' c #B27641",
+"H' c #B67A48",
+"I' c #B27644",
+"J' c #6C4321",
+"K' c #744522",
+"L' c #8F5933",
+"M' c #96592D",
+"N' c #A0612F",
+"O' c #AF7137",
+"P' c #BD8245",
+"Q' c #BF8C4D",
+"R' c #BF8A4B",
+"S' c #BA8043",
+"T' c #C18649",
+"U' c #C38549",
+"V' c #C38647",
+"W' c #C08444",
+"X' c #BD8141",
+"Y' c #BC803F",
+"Z' c #BD7F3F",
+"`' c #BE8142",
+" ) c #BC8142",
+".) c #BB8045",
+"+) c #B87D42",
+"@) c #C2874B",
+"#) c #C1864A",
+"$) c #B2773B",
+"%) c #B6783D",
+"&) c #B07136",
+"*) c #B07036",
+"=) c #B3743A",
+"-) c #B5763B",
+";) c #B7783D",
+">) c #B7793F",
+",) c #B47742",
+"') c #B77C45",
+")) c #B77C43",
+"!) c #BA7F44",
+"~) c #BD8345",
+"{) c #BD8344",
+"]) c #BA8040",
+"^) c #BA7D3E",
+"/) c #B67A3A",
+"() c #B47638",
+"_) c #B87B3C",
+":) c #BB7D3F",
+"<) c #BA7C3F",
+"[) c #B97C3B",
+"}) c #B67937",
+"|) c #B37636",
+"1) c #B5773A",
+"2) c #AD6F34",
+"3) c #A96B32",
+"4) c #A4662E",
+"5) c #986132",
+"6) c #A16E42",
+"7) c #A06C41",
+"8) c #583012",
+"9) c #633515",
+"0) c #76401E",
+"a) c #8C4E26",
+"b) c #9A5A2A",
+"c) c #AE6F37",
+"d) c #B3763A",
+"e) c #AC7C34",
+"f) c #B18038",
+"g) c #B17D37",
+"h) c #AD7630",
+"i) c #AA722C",
+"j) c #A8702A",
+"k) c #A96D2B",
+"l) c #AF6E35",
+"m) c #B37339",
+"n) c #B6753C",
+"o) c #B9793E",
+"p) c #BB7A42",
+"q) c #BD7F44",
+"r) c #BD8445",
+"s) c #C3884A",
+"t) c #C48A4B",
+"u) c #C58B4C",
+"v) c #C78C4E",
+"w) c #CA8F53",
+"x) c #C98E52",
+"y) c #C78C50",
+"z) c #C68B4F",
+"A) c #C58A4E",
+"B) c #C8884D",
+"C) c #C5854A",
+"D) c #C28248",
+"E) c #C07E45",
+"F) c #BE7D43",
+"G) c #BB7A40",
+"H) c #BE7E45",
+"I) c #C0854C",
+"J) c #C2874C",
+"K) c #C08648",
+"L) c #C28849",
+"M) c #C18745",
+"N) c #BC823F",
+"O) c #BD803F",
+"P) c #BB7E3D",
+"Q) c #B77A3A",
+"R) c #B87B3B",
+"S) c #B67939",
+"T) c #B57837",
+"U) c #B47739",
+"V) c #BA7C40",
+"W) c #B97A42",
+"X) c #B0723B",
+"Y) c #955621",
+"Z) c #824C21",
+"`) c #814F27",
+" ! c #835129",
+".! c #5F3210",
+"+! c #6E3D19",
+"@! c #804722",
+"#! c #905128",
+"$! c #945626",
+"%! c #A16530",
+"&! c #A76E36",
+"*! c #B57B3D",
+"=! c #BD8243",
+"-! c #BD8042",
+";! c #BE7D40",
+">! c #C07E41",
+",! c #C47F43",
+"'! c #C57F45",
+")! c #C17D47",
+"!! c #C17F48",
+"~! c #C07D46",
+"{! c #BF7D46",
+"]! c #BC7943",
+"^! c #B8753F",
+"/! c #AE7535",
+"(! c #AF7535",
+"_! c #B17737",
+":! c #B37939",
+"<! c #AF7635",
+"[! c #A76D2D",
+"}! c #A66C2E",
+"|! c #A66B2F",
+"1! c #A3682C",
+"2! c #A06529",
+"3! c #A4692D",
+"4! c #A96E32",
+"5! c #A76C30",
+"6! c #A86C31",
+"7! c #A3672B",
+"8! c #A2662A",
+"9! c #A16528",
+"0! c #A16529",
+"a! c #A66A2E",
+"b! c #A76C31",
+"c! c #AD7335",
+"d! c #B07636",
+"e! c #B07734",
+"f! c #AE7530",
+"g! c #AD732E",
+"h! c #AF722E",
+"i! c #AA6E2A",
+"j! c #A76A27",
+"k! c #AA6D2A",
+"l! c #A86B2A",
+"m! c #AB6D2F",
+"n! c #A6682D",
+"o! c #A06229",
+"p! c #A66731",
+"q! c #A96A35",
+"r! c #A96A37",
+"s! c #9D6237",
+"t! c #7F451D",
+"u! c #7F451C",
+"v! c #9B693F",
+"w! c #A36E43",
+"x! c #9C6136",
+"y! c #9F6234",
+"z! c #9C5F2F",
+"A! c #8C5521",
+"B! c #AA7640",
+"C! c #AF743F",
+"D! c #A86A36",
+"E! c #A2632E",
+"F! c #A2602D",
+"G! c #A6612E",
+"H! c #A6602D",
+"I! c #A25B27",
+"J! c #A15E20",
+"K! c #A05D1E",
+"L! c #A36121",
+"M! c #A25F20",
+"N! c #9D5B1C",
+"O! c #A26021",
+"P! c #AC6D2D",
+"Q! c #B17836",
+"R! c #B87F3C",
+"S! c #BB823F",
+"T! c #BE8543",
+"U! c #BE8542",
+"V! c #C08744",
+"W! c #C28749",
+"X! c #C3884D",
+"Y! c #CB9054",
+"Z! c #CC9155",
+"`! c #CE9357",
+" ~ c #CB9457",
+".~ c #CA9356",
+"+~ c #C89153",
+"@~ c #C48D4F",
+"#~ c #C48D50",
+"$~ c #C1894C",
+"%~ c #BC8244",
+"&~ c #BF8545",
+"*~ c #BA803E",
+"=~ c #B57C37",
+"-~ c #B67D36",
+";~ c #B87F38",
+">~ c #BA7E38",
+",~ c #B97D37",
+"'~ c #B57933",
+")~ c #B67A34",
+"!~ c #BD813B",
+"~~ c #C1853F",
+"{~ c #C18443",
+"]~ c #C6884D",
+"^~ c #CB8D52",
+"/~ c #CD8E56",
+"(~ c #CD8E58",
+"_~ c #C0814D",
+":~ c #AA6B39",
+"<~ c #925222",
+"[~ c #8A481A",
+"}~ c #8E4C1D",
+"|~ c #AE7243",
+"1~ c #AC6F3F",
+"2~ c #9C5D2B",
+"3~ c #B27341",
+"4~ c #B37745",
+"5~ c #7F4717",
+"6~ c #996333",
+"7~ c #B48046",
+"8~ c #BC864C",
+"9~ c #BE864C",
+"0~ c #C0874D",
+"a~ c #C1874E",
+"b~ c #BF864D",
+"c~ c #C0844A",
+"d~ c #BD813F",
+"e~ c #BA7D3C",
+"f~ c #BB7F3D",
+"g~ c #BC803E",
+"h~ c #C38644",
+"i~ c #C38A49",
+"j~ c #C48F4D",
+"k~ c #C99353",
+"l~ c #CD9656",
+"m~ c #CD9756",
+"n~ c #C48E4E",
+"o~ c #B98342",
+"p~ c #B78045",
+"q~ c #BA8149",
+"r~ c #B9834B",
+"s~ c #B37D47",
+"t~ c #AE7942",
+"u~ c #AC7741",
+"v~ c #AB7943",
+"w~ c #AC7A44",
+"x~ c #AC7942",
+"y~ c #AA7842",
+"z~ c #A97641",
+"A~ c #AC7944",
+"B~ c #A97640",
+"C~ c #A7713B",
+"D~ c #A9733C",
+"E~ c #BF884F",
+"F~ c #C99356",
+"G~ c #C99553",
+"H~ c #CB9653",
+"I~ c #CB9751",
+"J~ c #CC9351",
+"K~ c #C48D4B",
+"L~ c #C08746",
+"M~ c #C08848",
+"N~ c #C28A4B",
+"O~ c #C38A4C",
+"P~ c #C1884D",
+"Q~ c #BC844E",
+"R~ c #AF7844",
+"S~ c #A46A38",
+"T~ c #9C602E",
+"U~ c #945320",
+"V~ c #97531F",
+"W~ c #A35F26",
+"X~ c #B16B31",
+"Y~ c #B56F34",
+"Z~ c #A86332",
+"`~ c #A6632F",
+" { c #AC6933",
+".{ c #A96933",
+"+{ c #91521F",
+"@{ c #854718",
+"#{ c #8D4F25",
+"${ c #875221",
+"%{ c #85511F",
+"&{ c #84501E",
+"*{ c #8B5625",
+"={ c #925E2D",
+"-{ c #94602E",
+";{ c #8C5826",
+">{ c #895623",
+",{ c #8F5B28",
+"'{ c #8F5C29",
+"){ c #8E5B28",
+"!{ c #8C5725",
+"~{ c #925E2C",
+"{{ c #94612F",
+"]{ c #93602D",
+"^{ c #966331",
+"/{ c #A06E3B",
+"({ c #9E6A38",
+"_{ c #8B5727",
+":{ c #885325",
+"<{ c #845225",
+"[{ c #855428",
+"}{ c #84562B",
+"|{ c #7F532A",
+"1{ c #82562F",
+"2{ c #86562E",
+"3{ c #85542C",
+"4{ c #84532B",
+"5{ c #825129",
+"6{ c #7D4C24",
+"7{ c #77461E",
+"8{ c #6B3912",
+"9{ c #633110",
+"0{ c #653310",
+"a{ c #7B4A22",
+"b{ c #89582C",
+"c{ c #956634",
+"d{ c #9F6F3C",
+"e{ c #9E6F39",
+"f{ c #986A36",
+"g{ c #8A5B28",
+"h{ c #825322",
+"i{ c #865728",
+"j{ c #89592D",
+"k{ c #8C5C30",
+"l{ c #8C5D33",
+"m{ c #8A5D32",
+"n{ c #8A5D34",
+"o{ c #8E5D31",
+"p{ c #9A6232",
+"q{ c #AB6A31",
+"r{ c #B56E2F",
+"s{ c #BC7631",
+"t{ c #BF7B34",
+"u{ c #BF7B35",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+". . . . . . + @ # $ % & * = - ; ; > , , ' ) ) ) ) ! ~ { { ] ^ / ( / ^ { { { { { { { { { ( ( ( ( _ : < [ } | 1 2 2 2 . . . . . . ",
+"3 4 4 4 4 4 5 6 7 8 9 0 a b c d d d d d d e e e f g h i j k l m m n o p p p p p p p p p q r m s t u v w x y z A A B 5 4 4 4 4 5 ",
+"C D D D E E F G H I J K L M N O P Q R R R S S S T U V W X Y Z ` ...+.@.@.@.@.@.@.@.@.#.$. .` %.&.*.=.-.;.>.,.'.'.).!.D ~.E E F ",
+"{.].].^././.(._.:.<.[.}.|.1.2.3.4.5.6.6.7.7.7.8.9.0.a.b.c.d.e.f.g.h.i.j.j.j.j.j.j.j.j.j.k.g.l.m.n.o.p.q.r.s.t.u.u.v.w.].].]./.].",
+"x.y.y.y.z.z.A.B.C.D.E.F.G.H.I.J.K.L.M.M.N.N.N.N.N.O.P.Q.R.S.T.U.V.W.X.Y.Y.Y.Y.Y.Y.Y.Y.X.Z.`. +.+++@+#+$+%+&+*+z.z.=+-+y.-+;+z.u.",
+">+,+,+,+'+'+)+!+~+{+]+^+/+(+_+:+<+[+}+}+|+1+2+3+4+3+5+6+7+8+9+0+a+b+c+c+c+c+c+c+c+c+c+c+d+e+f+g+h+i+j+k+l+m+n+'+'+o+p+,+p+o+'+'+",
+"q+q+q+r+s+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+I+I+J+K+L+M+N+O+P+Q+R+S+T+T+T+T+T+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@t+t+*@=@r+=@*@s+*@",
+"-@;@;@;@;@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@3@3@3@3@3@4@4@5@6@7@7@7@7@7@8@9@T+0@a@b@c@d@e@f@g@h@n.i@j@!.!.!.!.!.k@l@m@;@",
+"n@o@o@o@o@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@E@G@G@G@G@G@G@H@I@J@K@L@M@M@M@M@M@L@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@ # # # # #.#+#@#p@",
+"##$#$#$#$#$#%#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#/#(#(#(#(#(#(#_#:#<#[#}#|#|#|#|#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#f#f#f#f#f#$#$#$#",
+"g#h#h#h#h#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#A#A#A#A#A#A#A#A#B#C#C#C#C#C#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#h#h#h#h#h#h#h#h#S#",
+"T#U#U#U#U#U#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$U#U#U#U#U#U#U#U#U#",
+"}$}$}$}$}$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$j$j$j$j$j$j$k$k$k$k$k$k$k$g$l$m$n$o$p$q$r$s$t$u$v$w$x$y$}$}$}$}$}$}$}$}$}$",
+"z$A$z$z$z$z$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$W$W$W$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%z$z$z$z$z$z$z$A${%",
+"]%^%^%^%^%^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%c%d%d%d%d%d%c%e%f%g%h%i%j%k%l%m%n%6%o%p%q%r%s%t%u%v%w%x%^%^%^%^%^%^%^%^%^%",
+"y%y%y%y%y%y%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%R%S%T%U%U%U%U%U%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&=&-&;&>&,&'&y%y%y%y%y%y%y%)&F%",
+"!&!&!&!&!&!&~&{&]&^&/&(&_&:&<&[&}&|&1&2&3&4&5&6&7&8&9&0&a&a&b&c&d&c&e&f&g&h&i&7&j&K$k&l&m&n&o&p&q&r&s&t&u&v&w&!&!&!&!&!&!&!&!&x&",
+"y&z&z&z&z&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&W&W&X&X&X&Y&Z&`& *.*+*R&@*#*$*%*&***=*-*;*>*,*'*)*!*z&z&z&z&z&z&z&z&~*",
+"{*{*{*{*{*{*]*^*/*(*_*:*<*[*}*|*1*{*2*3*4*5*6*7*8*9*0*a*b*b*a*c*|&|&d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*{*{*{*{*{*{*{*{*{*",
+"y*y*y*y*y*y*z*A*B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*V*V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=,='=)=!=~={=]=y*y*y*y*y*y*y*y*^=",
+"/=/=/=/=/=/=(=_=:=<=[=}=|=1=2=/=3=3=3=/=4=5=6=7=8=9=0=a=b=c=d=e=e=e=f=g=h=i=S*j=+*k=l=m=:=n=/=3=_=_=o=p=q=r=s=/=/=/=/=/=/=/=/=/=",
+"|=|=|=|=|=|=|=t=|=u=v=t=w=w=|=|=|=|=|=x=y=z=z=z=A=B=C=9*m*D=E=F=F=V*G=H=e*I=J=K=L=|=|=|=|=|=|=|=|=|=|=|=t=M=N=|=|=|=|=|=|=|=|=|=",
+"O=P=P=P=P=P=P=P=P=w=u=P=N=P=P=P=P=P=P=O=Q=R=r%S=T=U=V=R=W=X=Y=Z=Z=`= -.-+-+-@-#-$-%-u=u=N=P=P=P=P=P=P=P=P=u=P=P=P=P=P=P=P=P=P=P=",
+"v=&-&-&-&-&-&-&-N=N=*-&-*-&-&-&-&-&-&-&-=-Y=X=--;->-,-v='-)-!-~-{-{-{-]-^-~-~-~-)-&-N=&-&-&-&-&-&-&-&-&-&-/-v=&-&-&-&-&-&-&-&-v=",
+"*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-(-_-_-_-_-_-_-:-<-<-<-<-<-<-<-[-[-[-[-[-[-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-",
+"}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-|-|-|-|-|-|-1-1-1-1-1-1-2-|-3-3-3-3-3-|-1-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-}-",
+"4-5-5-5-5-5-6-7-7-7-7-7-7-7-7-7-7-7-7-7-8-8-8-8-8-8-9-0-0-0-0-0-0-8-a-b-b-b-b-b-c-d-7-7-7-7-7-7-7-7-7-7-7-7-d-e-e-4-4-4-f-0-7-0-",
+"g-h-i-j-k-l-l-m-n-n-o-o-o-p-q-r-q-q-q-q-s-t-n-n-n-n-n-u-o-o-u-n-n-n-n-s-s-s-s-s-v-q-r-q-q-w-w-x-o-n-n-n-n-o-y-z-A-B-C-D-E-F-G-H-",
+"I-J-K-L-L-L-M-N-O-O-P-P-P-N-t-n-t-Q-O-O-R-S-S-T-p-U-U-N-P-P-R-O-O-O-O-O-O-O-O-O-N-t-n-t-V-U-U-W-O-O-O-O-O-O-X-Y-Z-`- ;.;+;@;#;$;",
+"%;&;*;=;%;%;-;;;>;>;,;';);!;~;;;~;{;!;!;{;~;~;);];{;^;!;);););/;>;>;>;>;>;>;>;>;(;;;;;;;;;;;;;~;>;>;>;>;>;>;_;:;<;[;};|;|;1;1;2;",
+"3;4;5;6;7;8;9;0;a;a;b;c;d;e;a;f;0;g;h;i;j;k;l;j;m;n;o;p;q;r;s;e;a;t;u;v;v;w;0;b;x;s;y;e;g;z;A;e;A;B;b;C;y;D;E;F;G;H;I;J;K;L;M;N;",
+"O;P;Q;O;R;S;T;U;V;W;X;Y;Z;`; >.>W;+>@>#>$>Z;%>&>%>*>$>@>=>->->;>>>,>'>'>)>!>~>{>]>=>]>*>^>/>$>$>(>`;_>W;:>(><>[>}>|>1>2>3>4>5>6>",
+"7>8>9>0>a>b>b>c>d>e>f>g>h>i>j>k>l>m>n>g>o>p>i>q>g>r>i>g>s>t>u>n>v>w>x>x>y>z>A>B>C>D>g>E>C>F>G>H>g>g>I>p>J>f>K>L>M>N>O>P>Q>R>S>T>",
+"U>V>W>X>I>Y>Z>`> ,.,+,@,#,$,%,&,*,=,-,;,;,>,,,',),!,~,{,],,,^,/,(,_,:,<,[,},|,|,|,1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,",
+"n,o,p,%,q,r,s,t,u,v,w,x,y,z,A,A,B,C,D,E,F,G,H,I,J,K,L,*,M,N,O,P,Q,_,R,S,T,U,V,F>W,X,Y,Z,`, '/,.'+'@'#'$'%'$'&'*'='-';'>',''')'!'",
+"~'{']'^'/'('_':'<'['}'|'1'2'3'4'5'4'6'7'8'9'0'0'a'b'c'd'e'f'g'P,O,h'i'j'6,Q,k'l'm'n'o'p'q'r's't'u'v'w'v'x'y'z'A'B'C'D'E'F'G'H'I'",
+"J'K'L'M'N'O'P'b>Q'R'E>S'T'U'V'W'X'Y'Z'`' )b,.)+)_,h'O,@)#)h'M,$),,^,%)&)*)=)-);)>),)')))!)~){)])^)/)()_):)<)[)})|)1)2)3)4)5)6)7)",
+"8)9)0)a)b)c)d)e)f)g)h)i)j)k)l)m)m)n)o)p)q)r)t's)t)u)v)w)x)y)y)f'z)A)B)C)D)E)F)G)H)`,I)J)K)L)M)N)O)P)Q)R)R)S)T)|)U)V)W)X)Y)Z)`) !",
+".!+!@!#!$!%!&!*!=!-!;!>!,!'!)!!!~!{!]!^!=)/!(!_!:!<![!}!|!1!2!3!4!5!',6!7!8!9!0!a!b!5!c!d!e!f!g!h!i!i!j!k!k!l!m!n!o!p!q!r!s!t!u!",
+"v!w!x!y!z!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!e'x)Y!Z!`! ~.~+~@~c>#~$~h'%~&~*~=~-~;~>~,~'~)~!~~~{~]~^~/~(~_~:~<~[~}~",
+"|~1~2~3~4~5~6~7~8~9~0~a~b~c~d~e~f~='g~h~i~j~k~l~m~n~o~p~q~r~r~s~t~u~v~w~x~y~z~A~B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~",
+"Z~`~ {.{+{@{#{${%{&{*{={-{;{>{,{'{){!{;{~{{{]{^{/{({~{_{:{<{[{}{|{1{2{3{4{5{6{7{8{9{0{a{b{c{d{e{f{g{h{i{j{k{l{m{n{o{p{q{r{s{t{u{"};
diff --git a/demos/mobile/qtbubblelevel/main.cpp b/demos/mobile/qtbubblelevel/main.cpp
new file mode 100644
index 0000000000..eb66e2575a
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/main.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <QtDeclarative>
+#include <QtGui>
+#include <QAccelerometer>
+
+#include "accelerometerfilter.h"
+#include "settings.h"
+#include "taskswitcher.h"
+
+// Lock orientation in Symbian
+#ifdef Q_OS_SYMBIAN
+ #include <eikenv.h>
+ #include <eikappui.h>
+ #include <aknenv.h>
+ #include <aknappui.h>
+#endif
+
+QTM_USE_NAMESPACE
+
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+#ifdef Q_OS_SYMBIAN
+ // Lock orientation to landscape in Symbian
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
+ TRAP_IGNORE(
+ if (appUi)
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
+ )
+#endif
+
+ //! [0]
+ QDeclarativeView view;
+ view.setSource(QUrl("qrc:/qml/BubbleLevel.qml"));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ //! [0]
+
+ // ![1]
+ Settings settings;
+
+ QAccelerometer sensor;
+ AccelerometerFilter filter;
+ sensor.addFilter(&filter);
+ //! [1]
+
+ //! [2]
+ QObject *rootObject = dynamic_cast<QObject*>(view.rootObject());
+
+ // Associate Qt / QML signals and slots
+ QObject::connect(rootObject, SIGNAL(saveCorrectionAngle(const QVariant&)),
+ &settings, SLOT(saveCorrectionAngle(const QVariant&)));
+
+ QObject::connect(&filter, SIGNAL(rotationChanged(const QVariant&)),
+ rootObject, SLOT(handleRotation(const QVariant&)));
+
+ QObject::connect(&settings, SIGNAL(correctionAngle(const QVariant&)),
+ rootObject, SLOT(setCorrectionAngle(const QVariant&)));
+
+ QObject::connect((QObject*)view.engine(), SIGNAL(quit()),
+ &app, SLOT(quit()));
+ //! [2]
+
+ //! [3]
+#ifdef Q_WS_MAEMO_5
+ TaskSwitcher taskSwitcher;
+
+ QObject::connect(rootObject, SIGNAL(minimizeApplication()),
+ &taskSwitcher, SLOT(minimizeApplication()));
+
+ // Show the task switcher button
+ rootObject->setProperty("taskSwitcherVisible", true);
+#endif
+ //! [3]
+
+ //! [4]
+ // Read correction factor from permanent storage and emit it to QML side
+ settings.loadAndEmitCorrectionAngle();
+
+ // Begin measuring of the accelerometer sensor
+ sensor.start();
+ //! [4]
+
+ //! [5]
+#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+ view.setGeometry(QApplication::desktop()->screenGeometry());
+ view.showFullScreen();
+#else
+ view.setGeometry((QRect(100, 100, 800, 480)));
+ view.show();
+#endif
+ //! [5]
+
+ return app.exec();
+}
diff --git a/demos/mobile/qtbubblelevel/qml/BubbleLevel.qml b/demos/mobile/qtbubblelevel/qml/BubbleLevel.qml
new file mode 100644
index 0000000000..237b66253b
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/BubbleLevel.qml
@@ -0,0 +1,225 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Image {
+ id: bubbleLevel
+
+ //! [0]
+ // Signaled when task switcher button is pressed
+ signal minimizeApplication()
+
+ // Signaled when correction angle is saved
+ signal saveCorrectionAngle(variant angle)
+
+ // These functions are used as Qt slots
+ function handleRotation(deg) {
+ horTube.rawangle = deg
+ }
+
+ function setCorrectionAngle(deg) {
+ horTube.angleconstant = deg
+ }
+
+ // Used to show the task switcher button in Maemo targets
+ property alias taskSwitcherVisible: taskSwitcher.visible
+ //! [0]
+
+ anchors.fill: parent
+ source: "images/board.png"
+ smooth: true
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: sign.frontSide = true
+ }
+
+ Button {
+ id: taskSwitcher
+
+ anchors {
+ left: parent.left
+ right: horTube.left
+ verticalCenter: horTube.verticalCenter
+ margins: (parent.width - (horTube.x + horTube.width)) / 4
+ }
+
+ height: width
+ source: "images/taskswitcher.png"
+ mouseAreaScale: 2
+ onClicked: bubbleLevel.minimizeApplication()
+ visible: false
+ }
+
+ Button {
+ id: exitButton
+
+ anchors {
+ left: horTube.right
+ right: parent.right
+ verticalCenter: horTube.verticalCenter
+ margins: (parent.width - (horTube.x + horTube.width)) / 4
+ }
+
+ height: width
+ source: "images/exit.png"
+ mouseAreaScale: 2
+ onClicked: Qt.quit()
+ }
+
+ //! [1]
+ Tube {
+ id: horTube
+
+ property real rawangle: 0
+ property real angleconstant: 0
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width * 0.775; height: parent.height * 0.15625
+ deg: rawangle - angleconstant
+ }
+ //! [1]
+
+ Flipable {
+ id: sign
+
+ property bool frontSide: true
+
+ x: parent.width * 0.185; y: parent.height * 0.669
+ width: parent.width * 0.63; height: parent.height * 0.258
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: sign.frontSide = !sign.frontSide
+ z: -1
+ }
+
+ transform: Rotation {
+
+ origin.x: sign.width / 2; origin.y: sign.height / 2
+ axis.x: 1; axis.y: 0; axis.z: 0
+ angle: sign.frontSide ? 0 : 180
+
+ Behavior on angle {
+ RotationAnimation {
+ direction: RotationAnimation.Clockwise
+ easing.type: Easing.InOutCubic; duration: 300
+ }
+ }
+ }
+
+ front: Image {
+ anchors.fill: parent
+ source: "images/signwithtext.png"
+ smooth: true
+ }
+
+ back: Image {
+ anchors.fill: parent
+ source: "images/signblank.png"
+ smooth: true
+
+ Text {
+ id: oldValue
+
+ anchors {
+ left: parent.left; leftMargin: parent.width * 0.10
+ right: saveButton.left; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+
+ text: "Place the device on a level surface and tap Calibrate."
+ color: "#302020"
+ wrapMode: Text.WordWrap
+ font { bold: false; pixelSize: Math.min(parent.width, parent.height) * 0.19 }
+ }
+
+ Button {
+ id: saveButton
+
+ anchors {
+ right: parent.right; rightMargin: parent.width * 0.09
+ verticalCenter: parent.verticalCenter
+ }
+
+ width: parent.width * 0.25; height: parent.height * 0.65
+ border { width: 2; color: "#555555" }
+ radius: 10
+
+ onClicked: {
+ horTube.angleconstant = horTube.rawangle
+ saveCorrectionAngle(horTube.angleconstant)
+ }
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#999999" }
+ GradientStop { position: 0.2; color: "#BBBBBB" }
+ GradientStop { position: 0.8; color: "#BBBBBB" }
+ GradientStop { position: 1.0; color: "#999999" }
+ }
+
+ Text {
+ anchors.centerIn: parent
+ color: "#302020"
+ text: "Calibrate"
+ font { bold: true; pixelSize: parent.width * 0.15 }
+ smooth: true
+ }
+ }
+ }
+ }
+
+ Button {
+ anchors {
+ left: sign.right
+ right: parent.right
+ verticalCenter: sign.verticalCenter
+ margins: (parent.width - (sign.x + sign.width)) / 4
+ }
+
+ height: width
+ source: "images/calibbutton.png"
+ mouseAreaScale: 2
+ smooth: true
+
+ onClicked: sign.frontSide = !sign.frontSide
+ }
+}
diff --git a/doc/src/snippets/declarative/animation-standalone.qml b/demos/mobile/qtbubblelevel/qml/Button.qml
index 0bf302008e..213ee1b161 100644
--- a/doc/src/snippets/declarative/animation-standalone.qml
+++ b/demos/mobile/qtbubblelevel/qml/Button.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,27 +37,35 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+
import QtQuick 1.0
Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- PropertyAnimation {
- id: animation
- target: rect
- properties: "x,y"
- duration: 1000
+ id: button
+
+ property alias source: image.source
+ property alias mouseAreaScale: mouseArea.scale
+
+ signal clicked
+
+ width: 50; height: 50
+ color: "transparent"
+
+ Behavior on scale { NumberAnimation { duration: 50 } }
+
+ Image {
+ id: image
+
+ anchors.fill: parent
+ smooth: true
}
-
+
MouseArea {
+ id: mouseArea
+
anchors.fill: parent
- onClicked: {
- animation.to = 50;
- animation.running = true;
- }
- }
+ onClicked: { button.clicked() }
+ onEntered: { button.scale = 0.9 }
+ onExited: { button.scale = 1.0 }
+ }
}
-//![0]
diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/demos/mobile/qtbubblelevel/qml/Tube.qml
index 7c8b0f8538..f39c9d6e47 100644
--- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml
+++ b/demos/mobile/qtbubblelevel/qml/Tube.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -40,18 +40,47 @@
import QtQuick 1.0
-Rectangle {
- width: 112; height: 112
- color: "#303030"
+//! [0]
+Item {
+ id: tube
- Grid {
+ property real deg
+
+ Image {
+ id: bubble
+
+ property real center: tube.width / 2
+ property real bubbleCenter: bubble.width / 2
+
+ function calX() {
+ var newX = center + tube.deg / -20 * center
+
+ if((newX - bubbleCenter) < 0) {
+ return 0
+ }
+ else if((newX + bubbleCenter) > tube.width) {
+ return tube.width - 2 * bubbleCenter
+ }
+
+ return newX - bubbleCenter;
+ }
+
+ x: calX()
+ width: 0.16129032 * parent.width; height: 0.66666667 * parent.height
+ source: "images/bubble.png"
+ smooth: true
+ }
+
+ Image {
anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- columns: 2
+ width: 0.36451613 * parent.width; height: 0.66666667 * parent.height
+ source: "images/scale.png"
+ }
- Rectangle { color: "#aa6666"; width: 50; height: 50 }
- Rectangle { color: "#aaaa66"; width: 50; height: 50 }
- Rectangle { color: "#9999aa"; width: 50; height: 50 }
- Rectangle { color: "#6666aa"; width: 50; height: 50 }
+ Image {
+ width: parent.width; height: 0.32 * parent.height
+ opacity: 0.8
+ source: "images/reflection.png"
}
}
+//! [0]
diff --git a/demos/mobile/qtbubblelevel/qml/images/board.png b/demos/mobile/qtbubblelevel/qml/images/board.png
new file mode 100644
index 0000000000..aaed8d01bb
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/board.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/bubble.png b/demos/mobile/qtbubblelevel/qml/images/bubble.png
new file mode 100644
index 0000000000..e73be9e554
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/bubble.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/calibbutton.png b/demos/mobile/qtbubblelevel/qml/images/calibbutton.png
new file mode 100644
index 0000000000..5f84dad744
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/calibbutton.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/exit.png b/demos/mobile/qtbubblelevel/qml/images/exit.png
new file mode 100644
index 0000000000..64a61634d8
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/exit.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/reflection.png b/demos/mobile/qtbubblelevel/qml/images/reflection.png
new file mode 100644
index 0000000000..093781ec93
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/reflection.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/scale.png b/demos/mobile/qtbubblelevel/qml/images/scale.png
new file mode 100644
index 0000000000..c75b21e2db
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/scale.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/signblank.png b/demos/mobile/qtbubblelevel/qml/images/signblank.png
new file mode 100644
index 0000000000..03b53cc0f3
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/signblank.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/signwithtext.png b/demos/mobile/qtbubblelevel/qml/images/signwithtext.png
new file mode 100644
index 0000000000..be9c050fe2
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/signwithtext.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qml/images/taskswitcher.png b/demos/mobile/qtbubblelevel/qml/images/taskswitcher.png
new file mode 100644
index 0000000000..89ff7a1517
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qml/images/taskswitcher.png
Binary files differ
diff --git a/demos/mobile/qtbubblelevel/qtbubblelevel.pro b/demos/mobile/qtbubblelevel/qtbubblelevel.pro
new file mode 100644
index 0000000000..8646308272
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/qtbubblelevel.pro
@@ -0,0 +1,61 @@
+# Copyright (c) 2011 Nokia Corporation.
+
+QT += core gui declarative
+CONFIG += mobility
+MOBILITY += sensors
+
+TARGET = qtbubblelevel
+TEMPLATE = app
+
+VERSION = 1.2.0
+
+HEADERS += taskswitcher.h \
+ accelerometerfilter.h \
+ settings.h
+
+SOURCES += main.cpp \
+ taskswitcher.cpp \
+ accelerometerfilter.cpp
+
+OTHER_FILES += qml/*.qml \
+ qml/images/*.png
+
+RESOURCES = resources.qrc
+
+maemo5 {
+ BINDIR = /opt/usr/bin
+ DATADIR = /usr/share
+ DEFINES += DATADIR=\\\"$$DATADIR\\\" \
+ PKGDATADIR=\\\"$$PKGDATADIR\\\"
+ INSTALLS += target \
+ desktop \
+ iconxpm \
+ icon26 \
+ icon40 \
+ icon64
+
+ target.path = $$BINDIR
+ desktop.path = $$DATADIR/applications/hildon
+ desktop.files += $${TARGET}.desktop
+
+ iconxpm.path = $$DATADIR/pixmap
+ iconxpm.files += icons/xpm/qtbubblelevel.xpm
+
+ icon26.path = $$DATADIR/icons/hicolor/26x26/apps
+ icon26.files += icons/26x26/qtbubblelevel.png
+
+ icon40.path = $$DATADIR/icons/hicolor/40x40/apps
+ icon40.files += icons/40x40/qtbubblelevel.png
+
+ icon64.path = $$DATADIR/icons/hicolor/64x64/apps
+ icon64.files += icons/64x64/qtbubblelevel.png
+}
+
+symbian {
+ TARGET = QtBubbleLevel
+
+ # To lock the application to landscape orientation
+ LIBS += -lcone -leikcore -lavkon
+
+ ICON = icons/bubblelevel.svg
+}
diff --git a/demos/mobile/qtbubblelevel/resources.qrc b/demos/mobile/qtbubblelevel/resources.qrc
new file mode 100644
index 0000000000..8f57e82536
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/resources.qrc
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/BubbleLevel.qml</file>
+ <file>qml/Tube.qml</file>
+ <file>qml/Button.qml</file>
+ <file>qml/images/taskswitcher.png</file>
+ <file>qml/images/exit.png</file>
+ <file>qml/images/board.png</file>
+ <file>qml/images/bubble.png</file>
+ <file>qml/images/scale.png</file>
+ <file>qml/images/reflection.png</file>
+ <file>qml/images/signwithtext.png</file>
+ <file>qml/images/calibbutton.png</file>
+ <file>qml/images/signblank.png</file>
+ </qresource>
+</RCC>
diff --git a/demos/mobile/qtbubblelevel/settings.h b/demos/mobile/qtbubblelevel/settings.h
new file mode 100644
index 0000000000..20966370d0
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/settings.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 SETTINGS_H
+#define SETTINGS_H
+
+#include <QtCore>
+
+class Settings : public QObject
+{
+ Q_OBJECT
+
+public:
+ void loadAndEmitCorrectionAngle() {
+ QSettings settings("Nokia corp", "QtBubbleLevel");
+ emit correctionAngle(settings.value("CorrectionAngle", "0.0f"));
+ }
+
+signals:
+ void correctionAngle(const QVariant &angle);
+
+public slots:
+ void saveCorrectionAngle(const QVariant &angle) {
+ QSettings settings("Nokia corp", "QtBubbleLevel");
+ settings.setValue("CorrectionAngle", angle);
+ }
+};
+
+#endif // SETTINGS_H
diff --git a/demos/mobile/qtbubblelevel/taskswitcher.cpp b/demos/mobile/qtbubblelevel/taskswitcher.cpp
new file mode 100644
index 0000000000..5a3a9fbdcc
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/taskswitcher.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "taskswitcher.h"
+
+// Task Switcher for maemo
+#ifdef Q_WS_MAEMO_5
+ #include <QtDBus/QtDBus>
+#endif
+
+
+void TaskSwitcher::minimizeApplication()
+{
+ //! [0]
+ #ifdef Q_WS_MAEMO_5
+ // Uses DBus to minimize application in Maemo
+ QDBusConnection connection = QDBusConnection::sessionBus();
+ QDBusMessage message =
+ QDBusMessage::createSignal("/","com.nokia.hildon_desktop",
+ "exit_app_view");
+ connection.send(message);
+ #endif
+ //! [0]
+}
diff --git a/demos/mobile/qtbubblelevel/taskswitcher.h b/demos/mobile/qtbubblelevel/taskswitcher.h
new file mode 100644
index 0000000000..f7966d3c0c
--- /dev/null
+++ b/demos/mobile/qtbubblelevel/taskswitcher.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 TASKSWITCHER_H
+#define TASKSWITCHER_H
+
+#include <QObject>
+
+class TaskSwitcher : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void minimizeApplication();
+};
+
+#endif // TASKSWITCHER_H
diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/demos/mobile/quickhit/Button.qml
index 7be79c879c..05ad78d15d 100644
--- a/doc/src/snippets/declarative/qml-intro/transformations1.qml
+++ b/demos/mobile/quickhit/Button.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -38,43 +38,49 @@
**
****************************************************************************/
-//! [document]
import QtQuick 1.0
-Rectangle {
- id: myWin
- width: 500
- height: 400
+Item {
+ width: 30
+ height: 30
+ smooth: true
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
+ property string buttonPath // for example "qrc:/gfx/exit.png"
+ property int buttonId: 0
- transform: Rotation {
- origin.x: 75; origin.y: 75
- axis{ x: 0; y: 0; z:1 } angle: -90
- }
+ signal btnClicked(int buttonId)
+ property bool animationEnabled: true
+
+ Image {
+ id: image
+ anchors.fill: parent
+ source: buttonPath
+ fillMode: Image.PreserveAspectFit
+ smooth: true
}
- Text {
- text: "<h2>The Qt Logo -- taking it easy</h2>"
- anchors.bottom: image1.top
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 15
+ SequentialAnimation {
+ id:anim
+ PropertyAction { target: image; property: "scale"; value:"0.7"}
+ PauseAnimation { duration: 200 }
+ PropertyAction { target: image; property: "scale"; value:"1.0"}
+ }
- transform: [
- Scale { xScale: 1.5; yScale: 1.2 } ,
+ Timer {
+ id: buttonPressedTimer
+ interval: 300; running: false; repeat: false
+ onTriggered: btnClicked(buttonId)
+ }
- Rotation {
- origin.x: 75; origin.y: 75
- axis{ x: 0; y: 0; z:1 } angle: -45
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ if (animationEnabled && !anim.running) {
+ anim.restart()
}
- ]
+ buttonPressedTimer.restart()
+ }
}
+
}
-//! [document]
diff --git a/demos/mobile/quickhit/Game.js b/demos/mobile/quickhit/Game.js
new file mode 100644
index 0000000000..40db422e67
--- /dev/null
+++ b/demos/mobile/quickhit/Game.js
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+var levelPlugin = null
+
+// ---------------------------------------------------------------------------
+// hideMissiles
+function hideMissiles() {
+ missile_1.stop()
+ missile_1.opacity = 0;
+
+ missile_2.stop()
+ missile_2.opacity = 0;
+
+ missile_3.stop()
+ missile_3.opacity = 0;
+
+ missile_4.stop()
+ missile_4.opacity = 0;
+
+ missile_5.stop()
+ missile_5.opacity = 0;
+
+ enemy_missile_1.opacity = 0;
+ enemy_missile_2.opacity = 0;
+}
+
+// ---------------------------------------------------------------------------
+// GameOver
+function gameOver() {
+
+ // Stop GameEngine timers
+ GameEngine.enableEngineTimer(false)
+
+ // Delete loaded plugin level
+ deleteLevel()
+
+ // Hiding
+ myShip.opacity = 0
+ btnPause.opacity = 0
+}
+
+// ---------------------------------------------------------------------------
+// Pause game
+function pauseGame(doPause) {
+ missile_1.pause(doPause)
+ missile_2.pause(doPause)
+ missile_3.pause(doPause)
+ missile_4.pause(doPause)
+ missile_5.pause(doPause)
+ enemy_missile_1.pause(doPause)
+ enemy_missile_2.pause(doPause)
+
+ if (doPause) {
+ btnPause.opacity = 0
+ } else {
+ btnPause.opacity = 1
+ }
+
+ GameEngine.pauseLevel(doPause)
+}
+
+// ---------------------------------------------------------------------------
+// Fire your missile
+function fireMissile(aXpox, aFromYpos, aToYpos) {
+ if (missile_1.opacity<1) {
+ missile_1.fire(aXpox,aFromYpos,aToYpos)
+ }
+ else if (missile_2.opacity<1) {
+ missile_2.fire(aXpox,aFromYpos,aToYpos)
+ }
+ else if (missile_3.opacity<1) {
+ missile_3.fire(aXpox,aFromYpos,aToYpos)
+ }
+ else if (missile_4.opacity<1) {
+ missile_4.fire(aXpox,aFromYpos,aToYpos)
+ }
+ else if (missile_5.opacity<1) {
+ missile_5.fire(aXpox,aFromYpos,aToYpos)
+ }
+}
+
+// ---------------------------------------------------------------------------
+// Fire enemy missile
+function fireEnemyMissile(aXpox, aFromYpos, aToYpos) {
+ if (enemy_missile_1.opacity==0) {
+ enemy_missile_1.enemyFire(aXpox,aFromYpos,aToYpos)
+ }
+ else if (enemy_missile_2.opacity==0) {
+ enemy_missile_2.enemyFire(aXpox,aFromYpos,aToYpos)
+ }
+}
+
+// ---------------------------------------------------------------------------
+// Create level QML component
+function createLevel() {
+ console.log("Creating level "+LevelPlugin.qmlRootPath()+"Level.qml")
+ var levelComponent = Qt.createComponent("file:/"+LevelPlugin.qmlRootPath()+"Level.qml");
+ if (levelComponent.status == Component.Ready) {
+ if (levelPlugin) {
+ deleteLevel()
+ }
+ levelPlugin = levelComponent.createObject(levelId);
+ if (levelPlugin != null) {
+ console.log("Level created")
+ } else {
+ console.log("Can not create level")
+ messageBox.showErrorMessage("ERROR: Can not create level!",6000)
+ return 1
+ }
+ } else {
+ console.log("Can not find level, error:"+levelComponent.errorString())
+ messageBox.showErrorMessage("ERROR: Can not find level!",6000)
+ return 1
+ }
+
+ missile_1.createGraphicsForLevel()
+ missile_1.setToDefaultPos()
+ missile_2.createGraphicsForLevel()
+ missile_2.setToDefaultPos()
+ missile_3.createGraphicsForLevel()
+ missile_3.setToDefaultPos()
+ missile_4.createGraphicsForLevel()
+ missile_4.setToDefaultPos()
+ missile_5.createGraphicsForLevel()
+ missile_5.setToDefaultPos()
+ enemy_missile_1.createGraphicsForLevel()
+ enemy_missile_2.createGraphicsForLevel()
+ myShip.createGraphicsForLevel()
+
+ return 0
+}
+
+// ---------------------------------------------------------------------------
+// Delete level
+function deleteLevel() {
+ if (levelPlugin) {
+ GameEngine.clearQmlObjects()
+ levelPlugin.destroy()
+
+ }
+ levelPlugin = null;
+}
diff --git a/demos/mobile/quickhit/Game.qml b/demos/mobile/quickhit/Game.qml
new file mode 100644
index 0000000000..ab62a725a9
--- /dev/null
+++ b/demos/mobile/quickhit/Game.qml
@@ -0,0 +1,439 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import "Game.js" as GameScript
+
+Item {
+ id: gameArea
+ width: 360; height: 640 // NOTE: have to exists some default sizes
+ anchors.fill: parent
+ objectName: "gameArea"
+
+
+ // Who win, you or computer
+ property bool gameOverProperty: false
+
+ // for info message to user
+ property variant messageBox
+
+ // Level activated signal for Qt side to load activated level
+ signal levelActivated(int index)
+
+ // Pause whole game, if level is loaded
+ function pauseGame() {
+ if (GameScript.levelPlugin) {
+ GameScript.pauseGame(true)
+ myShip.focus = false
+ btnPause.opacity = 0
+ menu.showPauseMenu()
+ }
+ }
+
+ // Qt side call this for QML take new level into use
+ function levelReadyForCreation() {
+ // Hide menu
+ menu.hideMenu()
+ // Show message
+ message.showMessage("Loading Level...",2000)
+ // Wait before create level
+ levelCreationTimer.restart()
+ }
+
+ // Fires ememy missile. Function is called from Qt side
+ function fireEnemyMissile(aXpox, aFromYpos, aToYpos) {
+ GameScript.fireEnemyMissile(aXpox, aFromYpos, aToYpos)
+ }
+
+ // Game Over handling. Function is called from Qt side
+ function gameOver(youWin) {
+ // Stop GameEngine timers
+ GameEngine.enableEngineTimer(false)
+ gameOverProperty = youWin
+ GameScript.hideMissiles()
+ gameOverTimer.restart()
+ //GameEngine.vibra()
+ }
+
+ // End game and show menu
+ function endGame(showMessage) {
+ backgroundPic.opacity = 1
+ // Stop GameEngine timers
+ GameEngine.enableEngineTimer(false)
+ // Do game over
+ GameScript.gameOver()
+ GameScript.hideMissiles()
+ // Clear GameEngine QML objects
+ GameEngine.clearQmlObjects()
+ myShip.opacity = 0
+ myShip.focus = false
+ btnPause.opacity = 0
+ idMainLogo.opacity = 1
+ menu.showLevelMenu()
+ if (showMessage) {
+ message.showMessage("Game End",2000)
+ }
+ }
+
+ // Timer for level creationing
+ Timer {
+ id: levelCreationTimer
+ interval: 1000; running: false; repeat: false
+ onTriggered: {
+ btnPause.opacity = 1
+ myShip.opacity = 1
+ myShip.focus = true
+ // Create new level
+ var ret = GameScript.createLevel()
+ if (ret==0) {
+ backgroundPic.opacity = 0
+ // Find QML object for GameEngine
+ GameEngine.findQmlObjects()
+ // Enable GameEngine timer
+ GameEngine.enableEngineTimer(true)
+ } else {
+ // Level cannot be created!
+ endGame(false)
+ }
+ }
+ }
+
+ // Timer for game over
+ Timer {
+ id: gameOverTimer
+ interval: 1500; running: false; repeat: false
+ onTriggered: {
+ backgroundPic.opacity = 1
+ idMainLogo.opacity = 1
+ // Do game over
+ GameScript.gameOver()
+ // Clear GameEngine QML objects
+ GameEngine.clearQmlObjects()
+ menu.showLevelMenu()
+ if (gameOverProperty) {
+ GameEngine.playInternalSound(4)
+ message.showMessage("Game Over, You win!",2000)
+ } else {
+ GameEngine.playInternalSounds(3,3)
+ message.showMessage("Game Over, You lose",2000)
+ }
+ }
+ }
+
+ // Menu signal to slot connections
+ Connections {
+ target: menu
+ // Level selected
+ onLevelSelected: {
+ // Stop bigship animation
+ bigShipAnim.stop()
+ bigShip.opacity = 0
+ // Hide logo
+ idMainLogo.opacity = 0
+ // Signal level activated
+ gameArea.levelActivated(levelIndex)
+ }
+ // Level resumed selected
+ onResumeSelected: {
+ menu.hideMenu()
+ GameScript.pauseGame(false)
+ myShip.focus = true
+ }
+ }
+
+ // This component creation completed
+ Component.onCompleted: {
+ // Show main Level selection menu
+ menu.showLevelMenu()
+
+ // Start big ship animation
+ bigShipAnim.restart()
+
+ // Set variable
+ messageBox = message
+
+ // Play game start sound
+ GameEngine.gameStartSound()
+
+ // Fade splash screen
+ fadeAnim.restart()
+ // Rotate splash logo
+ rotAnim.restart()
+ }
+
+
+ // Background image for the game
+ Image {
+ id: backgroundPic
+ z:1
+ source: "qrc:/gfx/background2.png"
+ fillMode: Image.PreserveAspectCrop
+ smooth: true
+ anchors.fill: parent
+ }
+
+ Image {
+ id: bigShip
+ source: "qrc:/gfx/bigship.png"
+ z:1.5
+ smooth: true
+ x: width * -1
+ y: parent.height * 0.55
+ }
+ SequentialAnimation {
+ id: bigShipAnim;
+ NumberAnimation {target:bigShip; property:"x"; to:gameArea.width; easing.type: Easing.Linear; duration: 80000 }
+ PropertyAction {target:bigShip; properties: "opacity"; value: 0}
+ }
+
+
+ // Enemies grid
+ Item {
+ // This is general level QML plaseholder
+ // Into this is level QML created in createLevel()
+ id:levelId
+ anchors.fill: parent
+ z:2
+ }
+
+ Image {
+ id: idMainLogo
+ z:19
+ source: "qrc:/gfx/quickhit_logo.png"
+ smooth: true
+ anchors.horizontalCenter: gameArea.horizontalCenter
+ y:gameArea.height / 10 * 1
+ }
+
+ // Game menu
+ Menu {
+ z:20
+ id:menu
+ width: gameArea.width / 5 * 4
+ height: gameArea.height / 10 * 4
+ anchors.verticalCenter: gameArea.verticalCenter
+ anchors.horizontalCenter: gameArea.horizontalCenter
+ }
+
+ // My ship
+ MyShip {
+ z:10
+ id: myShip
+ opacity: 0
+ }
+
+ // Mouse area of your ship
+ MouseArea {
+ //anchors.fill: parent
+ width: parent.width
+ height: myShip.height
+ x:0
+ y:gameArea.height - myShip.height
+
+ drag.target: myShip
+ drag.axis: Drag.XAxis
+ drag.minimumX: 0
+ drag.maximumX: gameArea.width - myShip.width
+
+ property int startPos: 0
+ property int dragCount: 0
+
+ onPressed: {
+ startPos = mouseX
+ dragCount = 0
+ }
+ onPositionChanged: {
+ //dragCount = Math.abs(mouseX-startPos)
+ }
+ onReleased: {
+ //if (dragCount<20) {
+ myShip.fire()
+ //}
+ }
+ }
+
+ // Pause button
+ Button {
+ id: btnSound
+ z:12
+ //animationEnabled: false
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ buttonPath: "qrc:/gfx/soundOn.png"
+ buttonId: 4
+ width: gameArea.width / 10
+ height: gameArea.width / 10
+ x: gameArea.width - width - 15
+ opacity: 1
+ Connections {
+ target: btnSound
+ onBtnClicked: {
+ if (btnSound.buttonId==4) {
+ // Sound off
+ btnSound.buttonPath = "qrc:/gfx/soundOff.png"
+ btnSound.buttonId = 5
+ GameEngine.enableSounds(false)
+ } else {
+ // Sound on
+ btnSound.buttonPath = "qrc:/gfx/soundOn.png"
+ btnSound.buttonId = 4
+ GameEngine.enableSounds(true)
+ }
+ }
+ }
+ }
+
+ // Pause button
+ Button {
+ id: btnPause
+ z:13
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ buttonPath: "qrc:/gfx/pause.png"
+ buttonId: 3
+ width: gameArea.width / 10
+ height: gameArea.width / 10
+ x: gameArea.width - width - btnPause.width - 15*2
+ opacity: 0
+ Connections {
+ target: btnPause
+ onBtnClicked: {
+ GameScript.pauseGame(true)
+ myShip.focus = false
+ btnPause.opacity = 0
+ menu.showPauseMenu()
+ }
+ }
+ }
+
+
+ // Hidden missiles ready for to be launched
+ Missile {
+ z:3
+ id: missile_1
+ x:0
+ y:10
+ }
+ Missile {
+ z:4
+ id: missile_2
+ x: 20
+ y:10
+ }
+ Missile {
+ z:5
+ id: missile_3
+ x: 40
+ y:10
+ }
+ Missile {
+ z:6
+ id: missile_4
+ x: 60
+ y:10
+ }
+ Missile {
+ z:7
+ id: missile_5
+ x: 80
+ y:10
+ }
+ Missile {
+ z:8
+ objectName: "enemy_missile"
+ id: enemy_missile_1
+ enemyMissile: true
+ }
+ Missile {
+ z:9
+ objectName: "enemy_missile"
+ id: enemy_missile_2
+ enemyMissile: true
+ }
+
+ // Messages to the user
+ Message {
+ id: message
+ z:21
+ }
+
+
+ // Splach screen
+ Rectangle {
+ id: blackFace
+ x:-2
+ y:0
+ width: parent.width + 2
+ height: parent.height
+ z:100
+ color: "black"
+ opacity: 1
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ mouse.accepted = true
+ fadeAnim.stop()
+ blackFace.opacity = 0
+ }
+ }
+
+ Image {
+ id: idLogo
+ source: "qrc:/gfx/quickhit_logo.png"
+ smooth: true
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ opacity: 0
+ }
+ NumberAnimation { id: rotAnim; target: idLogo; property: "rotation"; to: 20; duration: 9000 }
+
+ }
+ // Splach screen animation
+ SequentialAnimation {
+ id: fadeAnim
+ PauseAnimation {duration: 1000 }
+ NumberAnimation {target: idLogo; property: "opacity"; from: 0; to: 1; duration: 2000 }
+ PauseAnimation {duration: 2000 }
+ NumberAnimation {target: idLogo; property: "opacity"; from: 1; to: 0; duration: 2000 }
+ NumberAnimation {target: blackFace; property: "opacity"; from: 1; to: 0; duration: 2000 }
+ }
+
+}
diff --git a/demos/mobile/quickhit/InvSounds.cpp b/demos/mobile/quickhit/InvSounds.cpp
new file mode 100644
index 0000000000..7342ba20f1
--- /dev/null
+++ b/demos/mobile/quickhit/InvSounds.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "InvSounds.h"
+#include <QDir>
+#include <QDebug>
+
+using namespace GE;
+
+CInvSounds::CInvSounds(QObject *parent) : QObject( parent )
+{
+ m_musicInstance = 0;
+ m_sounds = 0;
+ m_internalSounds = 0;
+ m_soundCount = 0;
+ m_internalSoundCount = 0;
+
+ enableSounds(true);
+
+ m_audioOut = new AudioOut( this, &m_mixer );
+
+ enableInternalSounds();
+}
+
+void CInvSounds::enableSounds(bool enable)
+{
+ if (enable)
+ m_mixer.setGeneralVolume(0.2f);
+ else
+ m_mixer.setGeneralVolume(0);
+}
+
+void CInvSounds::enableInternalSounds()
+{
+ disableInternalSounds();
+
+ // Application internal sounda
+ m_internalSoundPaths.append(":/sound/menu1.wav");
+ m_internalSoundPaths.append(":/sound/menu2.wav");
+ m_internalSoundPaths.append(":/sound/gamestart.wav");
+ m_internalSoundPaths.append(":/sound/gameover.wav");
+ m_internalSoundPaths.append(":/sound/youwin.wav");
+
+ m_internalSoundCount = m_internalSoundPaths.count();
+ m_internalSounds = new CAudioBuffer*[m_internalSoundCount];
+
+ // Load general application sounds
+ for (int ff=0; ff<m_internalSoundPaths.count(); ff++) {
+ m_internalSounds[ff] = CAudioBuffer::loadWav(m_internalSoundPaths[ff]);
+ }
+}
+
+void CInvSounds::enableSounds(QStringList sounds)
+{
+ disableSounds();
+
+ // Sounds from the level
+ m_soundPaths = sounds;
+ m_soundCount = sounds.count();
+ m_sounds = new CAudioBuffer*[m_soundCount];
+ // Load level sounds
+ for (int f=0; f<m_soundPaths.count(); f++) {
+ m_sounds[f] = CAudioBuffer::loadWav(m_soundPaths[f]);
+ }
+
+}
+
+void CInvSounds::disableInternalSounds()
+{
+ for (int f=0; f<m_internalSoundCount; f++) {
+ if (m_internalSounds[f]) {
+ delete m_internalSounds[f];
+ }
+ }
+ delete [] m_internalSounds;
+ m_internalSoundCount = 0;
+ m_internalSoundPaths.clear();
+
+ m_musicInstance = 0;
+}
+
+void CInvSounds::disableSounds()
+{
+ for (int f=0; f<m_soundCount; f++) {
+ if (m_sounds[f]) {
+ delete m_sounds[f];
+ }
+ }
+ delete [] m_sounds;
+ m_sounds = 0;
+ m_soundCount = 0;
+ m_soundPaths.clear();
+
+ m_musicInstance = 0;
+}
+
+CInvSounds::~CInvSounds() {
+ if (m_audioOut) {
+ delete m_audioOut;
+ m_audioOut = 0;
+ }
+
+ disableSounds();
+ disableInternalSounds();
+}
+
+
+void CInvSounds::beginMusicOn() {
+ m_musicInstance = (GE::CAudioBufferPlayInstance*)m_mixer.addAudioSource( new GE::CAudioBufferPlayInstance( m_sounds[0] ) );
+ m_musicInstance->setLoopTimes(-1);
+}
+
+
+void CInvSounds::beginMusicOff() {
+ if (!m_musicInstance) return;
+ m_musicInstance->setLoopTimes(0); // stop when finished
+ m_musicInstance = 0;
+};
+
+
+void CInvSounds::playSound(int index) {
+ if (index < m_soundCount && index > -1) {
+ m_sounds[index]->playWithMixer( m_mixer );
+ }
+}
+
+void CInvSounds::playSounds(int index, int count)
+{
+ if (index < m_soundCount && index > -1) {
+ CAudioBufferPlayInstance* i = m_sounds[index]->playWithMixer( m_mixer );
+ i->setLoopTimes(count);
+ }
+}
+
+void CInvSounds::playInternalSound(int index) {
+ if (index < m_internalSoundCount && index > -1) {
+ m_internalSounds[index]->playWithMixer( m_mixer );
+ }
+}
+
+void CInvSounds::playInternalSounds(int index, int count)
+{
+ if (index < m_internalSoundCount && index > -1) {
+ CAudioBufferPlayInstance* i = m_internalSounds[index]->playWithMixer( m_mixer );
+ i->setLoopTimes(count);
+ }
+}
+
+void CInvSounds::gameStartSound() {
+ CAudioBufferPlayInstance* i = m_internalSounds[2]->playWithMixer( m_mixer );
+ i->setLoopTimes(2);
+};
diff --git a/demos/mobile/quickhit/InvSounds.h b/demos/mobile/quickhit/InvSounds.h
new file mode 100644
index 0000000000..65422f2000
--- /dev/null
+++ b/demos/mobile/quickhit/InvSounds.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 __CINVSOUNDS__
+#define __CINVSOUNDS__
+
+#include <QObject>
+#include <QStringList>
+
+#include "ga_src/GEAudioBuffer.h"
+#include "ga_src/GEAudioOut.h"
+
+class CInvSounds : public QObject
+{
+ Q_OBJECT
+
+public:
+ CInvSounds(QObject *parent);
+ ~CInvSounds();
+
+ void enableInternalSounds();
+ void enableSounds(QStringList sounds);
+ void disableInternalSounds();
+ void disableSounds();
+
+ void beginMusicOn();
+ void beginMusicOff();
+
+ void enableSounds(bool enable);
+
+
+ void gameStartSound();
+
+public slots:
+ void playSound(int index);
+ void playSounds(int index, int count);
+ void playInternalSound(int index);
+ void playInternalSounds(int index, int count);
+
+protected:
+ QStringList m_soundPaths;
+ QStringList m_internalSoundPaths;
+ GE::CAudioBufferPlayInstance *m_musicInstance;
+ GE::CAudioMixer m_mixer;
+ GE::AudioOut *m_audioOut;
+
+ GE::CAudioBuffer **m_sounds;
+ int m_soundCount;
+
+ GE::CAudioBuffer **m_internalSounds;
+ int m_internalSoundCount;
+};
+
+#endif
diff --git a/demos/mobile/quickhit/Menu.qml b/demos/mobile/quickhit/Menu.qml
new file mode 100644
index 0000000000..cf2351ecd1
--- /dev/null
+++ b/demos/mobile/quickhit/Menu.qml
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import "Game.js" as GameScript
+
+
+Rectangle {
+ id: menu
+
+ Text {
+ id: title
+ smooth: true
+ anchors.bottom: menu.top
+ anchors.horizontalCenter: menu.horizontalCenter
+ color: "red"
+ font.pixelSize: gameArea.width / 12
+ font.bold: true
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ border.color: "black"
+ border.width: 2
+ radius: 8
+ smooth: true
+ opacity: 0 // transparent by default
+
+ color: "black"
+// gradient: Gradient {
+// GradientStop { position: 0.0; color: "white" }
+// GradientStop { position: 1.0; color: "black" }
+// }
+
+ // Signals
+ signal levelSelected(int levelIndex)
+ signal resumeSelected()
+
+ // Show level menu
+ function showLevelMenu() {
+ menuData.clear()
+ title.text = "Select Your Level"
+ var plugins = GameEngine.pluginList()
+ for (var i = 0; i < plugins.length; i++) {
+ menuData.append({"name": plugins[i],"type":"0"})
+ }
+ menuData.append({"name": "About","type":"4"})
+ menuData.append({"name": "Exit","type":"1"})
+ menu.opacity = 0.8
+ listView.focus = true
+ }
+
+ function showPauseMenu() {
+ menuData.clear()
+ title.text = "Resume level?"
+ menuData.append({"name": "Resume","type":"2"})
+ menuData.append({"name": "End Game","type":"3"})
+ menu.opacity = 0.8
+ listView.focus = true
+ }
+
+ // Hide menu
+ function hideMenu() {
+ menu.opacity = 0
+ listView.focus = false
+ }
+
+ function menuItemSelected(index, type) {
+ switch (type) {
+ case "0": {
+ // Level selection
+ menu.levelSelected(index)
+ break;
+ }
+ case "1": {
+ // Exit
+ Qt.quit()
+ break;
+ }
+ case "2": {
+ // Resume
+ menu.resumeSelected()
+ break;
+ }
+ case "3": {
+ // End Game
+ gameArea.endGame()
+ break;
+ }
+ case "4": {
+ // Show about
+ gameArea.messageBox.showInfoMessage()
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ }
+
+ ListModel {
+ id: menuData
+ }
+
+ ListView {
+ id: listView
+ clip: true
+ anchors.fill: parent
+ keyNavigationWraps: true
+
+ function doSelect() {
+ menu.menuItemSelected(listView.currentIndex,menuData.get(listView.currentIndex).type)
+ }
+
+ model: menuData
+
+ delegate: MenuItem {
+ id: menuItem
+ selectedItem: menuItem.ListView.isCurrentItem ? true : false
+ onItemSelected: {
+ listView.currentIndex = model.index
+ listView.doSelect()
+ }
+
+ }
+ }
+}
diff --git a/demos/mobile/quickhit/MenuItem.qml b/demos/mobile/quickhit/MenuItem.qml
new file mode 100644
index 0000000000..58557ac6f5
--- /dev/null
+++ b/demos/mobile/quickhit/MenuItem.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Text {
+ id: menuItem
+ text: name
+ color: "white"
+ opacity: 1
+ font.family: "Calibri"
+ font.pixelSize: menu.width / 8
+ x: (parent.width - width )/ 2
+
+ property bool selectedItem: false
+ property int type
+
+ signal itemSelected()
+
+ transform: Rotation { id:rotationId; origin.x:width/2; origin.y:height/2; axis { x: 1; y: 0; z: 0 } angle: 0 }
+ SequentialAnimation {
+ id: toRotateRightAndCenterAnim
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 0; to: 180; duration: 300 }
+ PropertyAction { target: menuItem; property: "color"; value:"red"}
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 180; to: 360; duration: 300 }
+ PropertyAction { target: menuItem; property: "color"; value:"white"}
+ }
+
+ function selectItem(doSelect) {
+ if (!toRotateRightAndCenterAnim.running) {
+ GameEngine.playInternalSound(0)
+ toRotateRightAndCenterAnim.restart()
+ if (doSelect) {
+ GameEngine.playInternalSound(1)
+ selectionTimer.restart()
+ }
+ }
+ }
+
+ Timer {
+ id: selectionTimer
+ interval: 1000; running: false; repeat: false
+ onTriggered: menuItem.itemSelected()
+ }
+
+ MouseArea {
+ id: mouseArea;
+ anchors.fill: parent
+ onClicked: {
+ selectItem(true)
+ }
+ }
+
+ Keys.onSpacePressed: { selectItem(true) }
+ Keys.onSelectPressed: { selectItem(true) }
+ Keys.onEnterPressed: { selectItem(true) }
+ Keys.onReleased: {
+ if (event.key == Qt.Key_Down || event.key == Qt.Key_Up) {
+ selectItem(false)
+ }
+ event.accepted = false
+ }
+}
+
diff --git a/demos/mobile/quickhit/Message.qml b/demos/mobile/quickhit/Message.qml
new file mode 100644
index 0000000000..1498203bf7
--- /dev/null
+++ b/demos/mobile/quickhit/Message.qml
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Rectangle {
+ id: message
+ border.color: "black"
+ border.width: 1
+ radius: 8
+ smooth: true
+ opacity: 0 // transparent = 0 by default
+ color: "black"
+
+ property string txt
+ property int animSpeed
+
+ function showMessage(text,speed) {
+ message.border.color = "black"
+ message.y = 50
+ message.width = gameArea.width / 5 * 4
+ message.height = gameArea.height / 8 * 1
+ txt = text
+ animSpeed = speed
+ message.opacity = 1
+ messageText.font.pixelSize = parent.width / 14
+ messageAnim.restart()
+ }
+
+ function showErrorMessage(text,speed) {
+ message.border.color = "red"
+ message.y = 50
+ message.width = gameArea.width / 5 * 4
+ message.height = gameArea.height / 8 * 1
+ txt = text
+ animSpeed = speed
+ message.opacity = 1
+ messageText.font.pixelSize = parent.width / 14
+ messageAnim.restart()
+ }
+
+ function showInfoMessage() {
+ message.border.color = "white"
+ txt = "<a href=\"https://projects.forum.nokia.com/quickhit\">QuickHit</a>" +
+ "<p>" +
+ "Forum Nokia <br>" +
+ "Qt Quick Game Example <br>" +
+ "</p>" +
+ "<p>" +
+ "Sounds were loaded from freesound.org under Creative Commons Sampling Plus 1.0 license.<br>" +
+ "</p>" +
+ "<p>" +
+ "Sounds were created by these nicknames:<br>" +
+ "HardPCM<br>" +
+ "Matt_G<br>" +
+ "klankbeeld<br>" +
+ "steveygos93<br>" +
+ "joe93barlow<br>" +
+ "ljudman<br>" +
+ "Jovica<br>" +
+ "patchen<br>" +
+ "nthompson<br>" +
+ "</p>"
+
+ animSpeed = 9000
+ message.opacity = 1
+ message.y = 10
+ message.height = gameArea.height - message.y - 10
+ message.width = gameArea.width - 20
+
+ messageText.font.pixelSize = parent.width / 16
+ messageAnim.restart()
+ }
+
+ //gradient: Gradient {
+ // GradientStop { position: 0.0; color: "white" }
+ // GradientStop { position: 1.0; color: "black" }
+ //}
+
+ SequentialAnimation {
+ id: messageAnim
+ PropertyAnimation {
+ target: message; properties: "x";
+ from: message.width*-1; to: gameArea.width; duration: animSpeed; easing.type: Easing.OutInExpo}
+ PropertyAction { target: message; properties: "opacity"; value: 0 }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ messageAnim.stop()
+ message.opacity = 0
+ }
+ }
+
+ Text {
+ id: messageText
+ anchors.fill: parent
+ anchors.margins: 10
+ text: txt
+ wrapMode: Text.WordWrap
+ color: "white"
+ font.family: "Calibri"
+ font.pixelSize: parent.width / 14
+ font.bold: true
+ onLinkActivated: {
+ GameEngine.openLink(link)
+ }
+ }
+}
diff --git a/demos/mobile/quickhit/Missile.qml b/demos/mobile/quickhit/Missile.qml
new file mode 100644
index 0000000000..80efa6e2de
--- /dev/null
+++ b/demos/mobile/quickhit/Missile.qml
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Item {
+ id: missile
+ objectName: "missile"
+ opacity: 0 // transparent by default
+
+ property int fromYpos
+ property int toYpos
+ property variant myMissileSize
+ property bool enemyMissile: false
+ property int defaultX: 0
+ property int defaultY: 0
+
+ function storeDefaultPos() {
+ defaultX = missile.x
+ defaultY = missile.y
+ }
+
+ function setToDefaultPos() {
+ missile.x = defaultX
+ missile.y = defaultY
+ opacity = 0.5
+ }
+
+ function createGraphicsForLevel() {
+ missile.myMissileSize = LevelPlugin.graphSize(LevelPlugin.pathToMissilePic())
+ missile.height = myMissileSize.height;
+ missile.width = myMissileSize.width;
+ if (missile.enemyMissile) {
+ missileImage.source = "file:/"+LevelPlugin.pathToEnemyMissilePic()
+ } else {
+ missileImage.source = "file:/"+LevelPlugin.pathToMissilePic()
+ }
+ }
+
+ // Execute fire!
+ function fire(aXpox, aFromYpos, aToYpos) {
+ missile.x = aXpox - missile.width / 2
+ missile.y = aFromYpos
+ missile.fromYpos = aFromYpos
+ missile.toYpos = aToYpos
+ missile.opacity = 1
+ GameEngine.playSound(2) // NOTE: 3 for your missile sound
+ flying.restart()
+ }
+
+ // Enemy fires!
+ function enemyFire(aXpox, aFromYpos, aToYpos) {
+ missile.x = aXpox - missile.width / 2
+ missile.y = aFromYpos
+ missile.fromYpos = aFromYpos
+ missile.toYpos = aToYpos
+ missile.opacity = 1
+ GameEngine.playSound(3) // NOTE: 3 for enemy missile sound
+ flyingEnemy.restart()
+ }
+
+ // Stop missile
+ function stop() {
+ flying.stop()
+ }
+
+ // Pause missile
+ function pause(doPause) {
+ if (doPause) {
+ flying.pause()
+ flyingEnemy.pause()
+ } else {
+ flying.resume()
+ flyingEnemy.resume()
+ }
+ }
+
+ Component.onCompleted: {
+ if (!enemyMissile) {
+ storeDefaultPos()
+ setToDefaultPos()
+ }
+ }
+
+ // Animates missile flying to the target
+ SequentialAnimation {
+ id: flying
+ PropertyAnimation {target: missile; properties: "y";
+ from: fromYpos; to: toYpos; duration: 2000; easing.type: Easing.InCubic }
+ //PropertyAction {target: missile; properties: "opacity"; value: 0}
+ ScriptAction { script: setToDefaultPos() }
+ }
+
+ SequentialAnimation {
+ id: flyingEnemy
+ PropertyAnimation {target: missile; properties: "y";
+ from: fromYpos; to: toYpos; duration: 2000; easing.type: Easing.InCubic }
+ PropertyAction {target: missile; properties: "opacity"; value: 0}
+ }
+
+ Image {
+ id: missileImage
+ smooth: true
+ }
+}
+
diff --git a/demos/mobile/quickhit/MyShip.qml b/demos/mobile/quickhit/MyShip.qml
new file mode 100644
index 0000000000..3bcc822585
--- /dev/null
+++ b/demos/mobile/quickhit/MyShip.qml
@@ -0,0 +1,184 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import "Game.js" as GameScript
+
+Item {
+ id: myShip
+ objectName: "myShip"
+
+ property variant myShipSize
+ property int originalY
+
+ // Fires missile if exists
+ function fire() {
+ if (myShip.opacity==1) {
+ GameScript.fireMissile(myShip.x+myShip.width/2,myShip.y,myShip.height*-1)
+ if (myShip.y+myShip.height < gameArea.height+5) {
+ goDownAnim.restart()
+ }
+ }
+ }
+
+ function createGraphicsForLevel() {
+ myShip.myShipSize = LevelPlugin.graphSize(LevelPlugin.pathToMyShipPic())
+ myShip.height = myShipSize.height
+ myShip.width = myShipSize.width
+ image.source = "file:/"+LevelPlugin.pathToMyShipPic()
+ myShip.y = gameArea.height - myShip.height - 10
+ originalY = myShip.y
+ myShip.x = (gameArea.width - myShip.width)/ 2
+ }
+
+ Image {
+ id: image
+ smooth: true
+ }
+
+ Keys.onSpacePressed: { fire() }
+ Keys.onSelectPressed: { fire() }
+ Keys.onRightPressed: {
+ if (myShip.x < (gameArea.width - myShip.width - 20)) {
+ toRightAnim.restart()
+ }
+ }
+ Keys.onLeftPressed: {
+ if (myShip.x > 20) {
+ toLeftAnim.restart()
+ }
+ }
+
+ // To right animation
+ PropertyAnimation { id: toRightAnim; target: myShip; easing.type: Easing.OutQuint;
+ properties: "x"; from: myShip.x; to: myShip.x + 20; duration: 500 }
+
+ // To left animation
+ PropertyAnimation { id: toLeftAnim; target: myShip; easing.type: Easing.OutQuint;
+ properties: "x"; from: myShip.x; to: myShip.x - 20; duration: 500 }
+
+ // Go down on fire animation
+ SequentialAnimation {
+ id: goDownAnim
+ NumberAnimation { target: myShip; property:"y"; from: myShip.y; to: myShip.y+5;
+ easing.type: Easing.Linear; duration: 200 }
+ NumberAnimation { target: myShip; property:"y"; from: myShip.y; to: originalY;
+ easing.type: Easing.Linear; duration: 200 }
+ }
+
+
+ /*
+ MouseArea {
+ anchors.fill: parent
+ drag.target: myShip
+ drag.axis: Drag.XAxis
+ drag.minimumX: 0
+ drag.maximumX: gameArea.width - myShip.width
+ onReleased: {
+ fire()
+ }
+ }
+ */
+
+
+ /*
+ property bool isAutoRepeat: false
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Right) {
+ if (event.isAutoRepeat) {
+ isAutoRepeat = true
+ toRightAnim.restart()
+ } else {
+ isAutoRepeat = false
+ toRotateRightAndCenterAnim.restart()
+ }
+ event.accepted = true
+ }
+ else if (event.key == Qt.Key_Left) {
+ if (event.isAutoRepeat) {
+ isAutoRepeat = true
+ toLeftAnim.restart()
+ } else {
+ isAutoRepeat = false
+ toRotateLeftAndCenterAnim.restart()
+ }
+ event.accepted = true
+ }
+ }
+
+ Keys.onReleased: {
+ if (isAutoRepeat) {
+ toRotateRightAndCenterAnim.stop()
+ toRotateLeftAndCenterAnim.stop()
+ } else {
+ toRotateCenter.restart()
+ }
+ event.accepted = true
+ }
+
+ // Rotation on movement animation
+ transform: Rotation { id:rotationId; origin.x: width/2; origin.y: height/2; axis { x: 0; y: 1; z: 0 } angle: 0 }
+ SequentialAnimation {
+ id: toRotateRightAndCenterAnim
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 0; to: 30; duration: 100 }
+ PropertyAnimation { target: myShip; easing.type: Easing.OutQuint;
+ properties: "x"; from: myShip.x; to: myShip.x + 20; duration: 500 }
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; to: 0; duration: 100 }
+ }
+ SequentialAnimation {
+ id: toRotateLeftAndCenterAnim
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 0; to: -30; duration: 100 }
+ PropertyAnimation { target: myShip; easing.type: Easing.OutQuint;
+ properties: "x"; from: myShip.x; to: myShip.x - 20; duration: 500 }
+ PropertyAnimation { target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; to: 0; duration: 100 }
+ }
+ PropertyAnimation { id: toRotateRight; target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 0; to: 30; duration: 100 }
+ PropertyAnimation { id: toRotateCenter; target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; to: 0; duration: 100 }
+ PropertyAnimation { id: toRotateLeft; target: rotationId; easing.type: Easing.Linear;
+ properties: "angle"; from: 0; to: -30; duration: 100 }
+*/
+
+}
diff --git a/demos/mobile/quickhit/debian/changelog b/demos/mobile/quickhit/debian/changelog
new file mode 100644
index 0000000000..226e172d43
--- /dev/null
+++ b/demos/mobile/quickhit/debian/changelog
@@ -0,0 +1,11 @@
+quickhit (1.1.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Wed, 5 Jan 2011 10:05:04 +0200
+
+quickhit (1.0.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 19 Oct 2010 10:05:04 +0200
diff --git a/demos/mobile/quickhit/debian/compat b/demos/mobile/quickhit/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/demos/mobile/quickhit/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/demos/mobile/quickhit/debian/control b/demos/mobile/quickhit/debian/control
new file mode 100644
index 0000000000..7253285e44
--- /dev/null
+++ b/demos/mobile/quickhit/debian/control
@@ -0,0 +1,11 @@
+Source: quickhit
+Section: user/games
+Priority: extra
+Maintainer: Antonio Aloisio <antonio.aloisio@nokia.com>
+Standards-Version: 3.7.2
+
+Package: quickhit
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: QuickHit
+ Qt Quick Game example
diff --git a/demos/mobile/quickhit/debian/copyright b/demos/mobile/quickhit/debian/copyright
new file mode 100644
index 0000000000..b0aadafec0
--- /dev/null
+++ b/demos/mobile/quickhit/debian/copyright
@@ -0,0 +1,8 @@
+This is quickhit, written and maintained by Forum Nokia Antonio Aloisio <antonio.aloisio@nokia.com>
+on Tue, 19 Oct 2010 10:05:04 +0200
+
+
+Copyright Holder: Nokia (c) 2010
+
+License:
+
diff --git a/demos/mobile/quickhit/debian/dirs b/demos/mobile/quickhit/debian/dirs
new file mode 100644
index 0000000000..80507f1030
--- /dev/null
+++ b/demos/mobile/quickhit/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/demos/mobile/quickhit/debian/postinst b/demos/mobile/quickhit/debian/postinst
new file mode 100644
index 0000000000..79fb6ddd0d
--- /dev/null
+++ b/demos/mobile/quickhit/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/demos/mobile/quickhit/debian/rules b/demos/mobile/quickhit/debian/rules
new file mode 100644
index 0000000000..b485428fa2
--- /dev/null
+++ b/demos/mobile/quickhit/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+APPNAME := quickhit
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/$(APPNAME).
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/$(APPNAME) install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ # dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/demos/mobile/quickhit/freesound.org.licence.txt b/demos/mobile/quickhit/freesound.org.licence.txt
new file mode 100644
index 0000000000..8714ea04a4
--- /dev/null
+++ b/demos/mobile/quickhit/freesound.org.licence.txt
@@ -0,0 +1,24 @@
+
+Sounds were loaded from www.freesound.org under Creative Commons Sampling Plus 1.0 license.
+
+Sounds were created by these nicknames: HardPCM, Matt_G, klankbeeld, steveygos93, joe93barlow, ljudman, Jovica, patchen, nthompson
+
+78677__joe93barlow__strike2.wav
+47251__nthompson__rocket.wav
+3378__patchen__Rhino_03.wav
+3258__Jovica__Dronetail_02.wav
+30351__Matt_G__Space_Fighter_Pass.wav
+32954__HardPCM__Chip054.wav
+32985__HardPCM__Alarm001.wav
+33245__ljudman__grenade.wav
+78678__joe93barlow__swing0.wav
+80401__steveygos93__Explosion2.wav
+109438__klankbeeld__intro_brass_01.wav
+
+
+
+
+
+
+
+
diff --git a/demos/mobile/quickhit/ga_src/GEAudioBuffer.cpp b/demos/mobile/quickhit/ga_src/GEAudioBuffer.cpp
new file mode 100644
index 0000000000..7da9219115
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEAudioBuffer.cpp
@@ -0,0 +1,391 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <QDebug>
+#include <math.h>
+#include "GEAudioBuffer.h"
+
+using namespace GE;
+
+
+struct SWavHeader {
+ char chunkID[4];
+ unsigned int chunkSize;
+ char format[4];
+
+ unsigned char subchunk1id[4];
+ unsigned int subchunk1size;
+ unsigned short audioFormat;
+ unsigned short nofChannels;
+ unsigned int sampleRate;
+ unsigned int byteRate;
+
+ unsigned short blockAlign;
+ unsigned short bitsPerSample;
+
+ unsigned char subchunk2id[4];
+ unsigned int subchunk2size;
+
+};
+
+CAudioBuffer::CAudioBuffer() {
+ m_data = 0;
+ m_dataLength = 0;
+ m_sampleFunction = 0;
+};
+
+
+CAudioBuffer::~CAudioBuffer() {
+ reallocate(0);
+}
+
+void CAudioBuffer::reallocate( int length ) {
+ if (m_data) delete [] ((char*)m_data);
+ m_dataLength = length;
+ if (m_dataLength>0) {
+ m_data = new char[ m_dataLength ];
+ } else m_data = 0;
+};
+
+
+CAudioBuffer* CAudioBuffer::loadWav( QString fileName ) {
+ QFile *wavFile = new QFile( fileName );
+
+
+ if (wavFile->open(QIODevice::ReadOnly)) {
+ SWavHeader header;
+
+ wavFile->read( header.chunkID, 4 );
+ if (header.chunkID[0]!='R' || header.chunkID[1]!='I' || header.chunkID[2]!='F' || header.chunkID[3]!='F') return 0; // incorrect header
+
+ wavFile->read( (char*)&header.chunkSize,4 );
+ wavFile->read( (char*)&header.format,4 );
+
+ if (header.format[0]!='W' || header.format[1]!='A' || header.format[2]!='V' || header.format[3]!='E') return 0; // incorrect header
+
+ wavFile->read( (char*)&header.subchunk1id,4 );
+ if (header.subchunk1id[0]!='f' || header.subchunk1id[1]!='m' || header.subchunk1id[2]!='t' || header.subchunk1id[3]!=' ') return 0; // incorrect header
+
+ wavFile->read( (char*)&header.subchunk1size,4 );
+ wavFile->read( (char*)&header.audioFormat,2 );
+ wavFile->read( (char*)&header.nofChannels,2 );
+ wavFile->read( (char*)&header.sampleRate,4 );
+ wavFile->read( (char*)&header.byteRate,4 );
+ wavFile->read( (char*)&header.blockAlign,2 );
+ wavFile->read( (char*)&header.bitsPerSample,2 );
+
+ qDebug() << fileName << " opened";
+
+ while (1) {
+ if (wavFile->read( (char*)&header.subchunk2id,4 ) != 4) return 0;
+ if (wavFile->read( (char*)&header.subchunk2size,4 ) != 4) return 0;
+ //int deb_size = header.subchunk2size;
+ //char tes[4];
+ //memcpy(tes, header.subchunk2id, 4 );
+ //if (header.subchunk2id[0]!='d' || header.subchunk2id[1]!='a' || header.subchunk2id[2]!='t' || header.subchunk2id[3]!='a') return 0; // incorrect header
+ if (header.subchunk2id[0]=='d' && header.subchunk2id[1]=='a' && header.subchunk2id[2]=='t' && header.subchunk2id[3]=='a') break; // found the data, chunk
+ // this was not the data-chunk. skip it
+ if (header.subchunk2size<1) return 0; // error in file
+ char *unused = new char[header.subchunk2size];
+ wavFile->read( unused, header.subchunk2size );
+ delete [] unused;
+ }
+
+
+
+ // the data follows.
+ if (header.subchunk2size<1) return 0;
+
+ CAudioBuffer *rval = new CAudioBuffer;
+ rval->m_nofChannels = header.nofChannels;
+ rval->m_bitsPerSample = header.bitsPerSample;
+ rval->m_samplesPerSec = header.sampleRate;
+ rval->m_signedData = 0; // where to know this?
+ rval->reallocate( header.subchunk2size );
+
+ wavFile->read( (char*)rval->m_data, header.subchunk2size );
+
+ // choose a good sampling function.
+ rval->m_sampleFunction = 0;
+ if (rval->m_nofChannels==1) {
+ if (rval->m_bitsPerSample == 8) rval->m_sampleFunction = sampleFunction8bitMono;
+ if (rval->m_bitsPerSample == 16) rval->m_sampleFunction = sampleFunction16bitMono;
+ } else {
+ if (rval->m_bitsPerSample == 8) rval->m_sampleFunction = sampleFunction8bitStereo;
+ if (rval->m_bitsPerSample == 16) rval->m_sampleFunction = sampleFunction16bitStereo;
+ }
+
+ return rval;
+
+
+ } else {
+ qDebug() << fileName << " NOT opened";
+ return 0;
+ }
+
+ delete wavFile;
+};
+
+
+CAudioBuffer* CAudioBuffer::loadWav( FILE *wavFile ) {
+ // read the header.
+ SWavHeader header;
+ fread( header.chunkID, 4, 1, wavFile );
+ if (header.chunkID[0]!='R' || header.chunkID[1]!='I' || header.chunkID[2]!='F' || header.chunkID[3]!='F') return 0; // incorrect header
+
+ fread( &header.chunkSize, 4, 1, wavFile );
+ fread( header.format, 4, 1, wavFile );
+ if (header.format[0]!='W' || header.format[1]!='A' || header.format[2]!='V' || header.format[3]!='E') return 0; // incorrect header
+
+ fread( header.subchunk1id, 4, 1, wavFile );
+ if (header.subchunk1id[0]!='f' || header.subchunk1id[1]!='m' || header.subchunk1id[2]!='t' || header.subchunk1id[3]!=' ') return 0; // incorrect header
+
+ fread( &header.subchunk1size, 4, 1, wavFile );
+ fread( &header.audioFormat, 2, 1, wavFile );
+ fread( &header.nofChannels, 2, 1, wavFile );
+ fread( &header.sampleRate, 4, 1, wavFile );
+ fread( &header.byteRate, 4, 1, wavFile );
+
+ fread( &header.blockAlign, 2, 1, wavFile );
+ fread( &header.bitsPerSample, 2, 1, wavFile );
+
+ fread( header.subchunk2id, 4, 1, wavFile );
+ if (header.subchunk2id[0]!='d' || header.subchunk2id[1]!='a' || header.subchunk2id[2]!='t' || header.subchunk2id[3]!='a') return 0; // incorrect header
+ fread( &header.subchunk2size, 4, 1, wavFile );
+
+
+ // the data follows.
+ if (header.subchunk2size<1) return 0;
+
+ CAudioBuffer *rval = new CAudioBuffer;
+ rval->m_nofChannels = header.nofChannels;
+ rval->m_bitsPerSample = header.bitsPerSample;
+ rval->m_samplesPerSec = header.sampleRate;
+ rval->m_signedData = 0; // where to know this?
+ rval->reallocate( header.subchunk2size );
+
+ fread( rval->m_data, 1, header.subchunk2size, wavFile );
+
+
+
+ // choose a good sampling function.
+ rval->m_sampleFunction = 0;
+ if (rval->m_nofChannels==1) {
+ if (rval->m_bitsPerSample == 8) rval->m_sampleFunction = sampleFunction8bitMono;
+ if (rval->m_bitsPerSample == 16) rval->m_sampleFunction = sampleFunction16bitMono;
+ } else {
+ if (rval->m_bitsPerSample == 8) rval->m_sampleFunction = sampleFunction8bitStereo;
+ if (rval->m_bitsPerSample == 16) rval->m_sampleFunction = sampleFunction16bitStereo;
+ }
+
+ return rval;
+};
+
+
+
+AUDIO_SAMPLE_TYPE CAudioBuffer::sampleFunction8bitMono( CAudioBuffer *abuffer, int pos, int channel ) {
+ return (AUDIO_SAMPLE_TYPE)(((unsigned char*)(abuffer->m_data))[pos]-128)<<8;
+};
+
+AUDIO_SAMPLE_TYPE CAudioBuffer::sampleFunction16bitMono( CAudioBuffer *abuffer, int pos, int channel ) {
+ return (AUDIO_SAMPLE_TYPE)(((short*)(abuffer->m_data))[pos]);
+};
+
+AUDIO_SAMPLE_TYPE CAudioBuffer::sampleFunction8bitStereo( CAudioBuffer *abuffer, int pos, int channel ) {
+ return ((AUDIO_SAMPLE_TYPE)(((char*)(abuffer->m_data))[pos*abuffer->m_nofChannels + channel])<<8);
+};
+
+
+AUDIO_SAMPLE_TYPE CAudioBuffer::sampleFunction16bitStereo( CAudioBuffer *abuffer, int pos, int channel ) {
+ return (AUDIO_SAMPLE_TYPE)(((short*)(abuffer->m_data))[pos*abuffer->m_nofChannels + channel]);
+};
+
+CAudioBufferPlayInstance *CAudioBuffer::playWithMixer( CAudioMixer &mixer ) {
+ CAudioBufferPlayInstance *i = (CAudioBufferPlayInstance*)mixer.addAudioSource( new CAudioBufferPlayInstance( this ));
+ return i;
+};
+
+
+CAudioBufferPlayInstance::CAudioBufferPlayInstance() {
+ m_fixedPos = 0;
+ m_fixedInc = 0;
+ m_buffer = 0;
+ m_fixedLeftVolume = 4096;
+ m_fixedRightVolume = 4096;
+ m_destroyWhenFinished = true;
+ m_finished = false;
+};
+
+CAudioBufferPlayInstance::CAudioBufferPlayInstance( CAudioBuffer *startPlaying ) {
+ m_fixedPos = 0;
+ m_fixedInc = 0;
+ m_fixedLeftVolume = 4096;
+ m_fixedRightVolume = 4096;
+ m_destroyWhenFinished = true;
+ m_finished = false;
+ playBuffer( startPlaying, 1.0f, 1.0f );
+};
+
+void CAudioBufferPlayInstance::playBuffer( CAudioBuffer *startPlaying, float volume, float speed, int loopTimes ) {
+ m_buffer = startPlaying;
+ m_fixedLeftVolume = (int)(4096.0f*volume);
+ m_fixedRightVolume = m_fixedLeftVolume;
+ m_fixedPos = 0;
+ //m_fixedInc = ( startPlaying->getSamplesPerSec() * (int)(4096.0f*speed)) / AUDIO_FREQUENCY;
+ setSpeed( speed );
+ m_loopTimes = loopTimes;
+
+};
+
+CAudioBufferPlayInstance::~CAudioBufferPlayInstance() {
+
+};
+
+
+void CAudioBufferPlayInstance::stop() {
+ m_buffer = 0;
+ m_finished = true;
+};
+
+void CAudioBufferPlayInstance::setSpeed( float speed ) {
+ if (!m_buffer) return;
+ m_fixedInc = (int)( ((float)m_buffer->getSamplesPerSec() * 4096.0f*speed) / (float)AUDIO_FREQUENCY );
+};
+
+void CAudioBufferPlayInstance::setLeftVolume( float vol ) {
+ m_fixedLeftVolume = (int)(4096.0f*vol);
+};
+
+void CAudioBufferPlayInstance::setRightVolume( float vol ) {
+ m_fixedRightVolume = (int)(4096.0f*vol);
+};
+
+bool CAudioBufferPlayInstance::canBeDestroyed() {
+ if (m_finished==true &&
+ m_destroyWhenFinished==true) return true; else return false;
+};
+
+
+
+// Does not do any bound-checking. Must be checked before called.
+int CAudioBufferPlayInstance::mixBlock( AUDIO_SAMPLE_TYPE *target, int samplesToMix ) {
+ SAMPLE_FUNCTION_TYPE sampleFunction = m_buffer->getSampleFunction();
+ if (!sampleFunction) return 0; // unsupported sampletype
+ AUDIO_SAMPLE_TYPE *t_target = target+samplesToMix*2;
+ int sourcepos;
+ //int tempCounter = 0;
+
+ if (m_buffer->getNofChannels() == 2) { // stereo
+ while (target!=t_target) {
+ sourcepos = m_fixedPos>>12;
+ target[0] = (((((sampleFunction)( m_buffer, sourcepos, 0) * (4096-(m_fixedPos&4095)) + (sampleFunction)( m_buffer, sourcepos+1, 0) * (m_fixedPos&4095) ) >> 12) * m_fixedLeftVolume) >> 12);
+ target[1] = (((((sampleFunction)( m_buffer, sourcepos, 1) * (4096-(m_fixedPos&4095)) + (sampleFunction)( m_buffer, sourcepos+1, 1) * (m_fixedPos&4095) ) >> 12) * m_fixedRightVolume) >> 12);
+ m_fixedPos+=m_fixedInc;
+ target+=2;
+ //tempCounter++;
+ };
+ } else { // mono
+ int temp;
+ while (target!=t_target) {
+ sourcepos = m_fixedPos>>12;
+ temp = (((sampleFunction)( m_buffer, sourcepos, 0 ) * (4096-(m_fixedPos&4095)) + (sampleFunction)( m_buffer, sourcepos+1, 0 ) * (m_fixedPos&4095) ) >> 12);
+ target[0] = ((temp*m_fixedLeftVolume)>>12);
+ target[1] = ((temp*m_fixedRightVolume)>>12);
+ m_fixedPos+=m_fixedInc;
+ target+=2;
+ //tempCounter++;
+ };
+
+ };
+
+ return samplesToMix;
+};
+
+
+
+int CAudioBufferPlayInstance::pullAudio( AUDIO_SAMPLE_TYPE *target, int bufferLength ) {
+ if (!m_buffer) return 0; // no sample associated to mix..
+
+ int channelLength = ((m_buffer->getDataLength()) / (m_buffer->getNofChannels()*m_buffer->getBytesPerSample()))-2;
+
+ int samplesToWrite = bufferLength/2;
+ int amount;
+ int totalMixed = 0;
+
+
+ while (samplesToWrite>0) {
+ int samplesLeft = channelLength - (m_fixedPos>>12);
+ int maxMixAmount = (int)(((long long int)(samplesLeft)<<12) / m_fixedInc ); // This is how much we can mix at least
+ //int maxMixAmount = (int)((float)samplesLeft / ((float)m_fixedInc/4096.0f));
+ //if (maxMixAmount<1) maxMixAmount = 1; // NOTE, THIS MIGHT CAUSE PROBLEMS. NEEDS CHECKING
+ if (maxMixAmount>samplesToWrite) {
+ maxMixAmount=samplesToWrite;
+ }
+
+ if (maxMixAmount > 0) {
+ amount=mixBlock(target+totalMixed * 2, maxMixAmount);
+
+ if (amount == 0)
+ {
+ // Error!
+ break;
+ }
+
+ totalMixed+=amount;
+ } else {
+ amount = 0;
+ m_fixedPos = channelLength<<12;
+ }
+
+ // sample is ended,.. check the looping variables and see what to do.
+ if ((m_fixedPos>>12)>=channelLength) {
+ m_fixedPos -= (channelLength<<12);
+ if (m_loopTimes>0) m_loopTimes--;
+ if (m_loopTimes==0) {
+ stop();
+ return totalMixed;
+ }
+ }
+
+ samplesToWrite-=amount;
+ if (samplesToWrite<1) break;
+ };
+ return totalMixed*2;
+};
diff --git a/demos/mobile/quickhit/ga_src/GEAudioBuffer.h b/demos/mobile/quickhit/ga_src/GEAudioBuffer.h
new file mode 100644
index 0000000000..5fe5f0043f
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEAudioBuffer.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 __GE_IGA_AUDIOBUFFER__
+#define __GE_IGA_AUDIOBUFFER__
+
+#include <QFile>
+#include "GEInterfaces.h"
+
+
+namespace GE {
+
+ class CAudioBufferPlayInstance;
+ class CAudioBuffer; // forward declaration
+ typedef AUDIO_SAMPLE_TYPE(*SAMPLE_FUNCTION_TYPE)(CAudioBuffer *abuffer, int pos, int channel);
+
+ class CAudioBuffer { // container for a sound
+ public:
+ CAudioBuffer();
+ virtual ~CAudioBuffer();
+
+ static CAudioBuffer* loadWav( QString fileName );
+ static CAudioBuffer* loadWav( FILE *wavFile ); // support for stdio
+ void reallocate( int length );
+
+
+ inline void* getRawData() { return m_data; }
+ inline int getDataLength() { return m_dataLength; }
+
+ inline int getBytesPerSample() { return (m_bitsPerSample>>3); }
+ inline int getBitsPerSample() { return m_bitsPerSample; }
+ inline int getSamplesPerSec() { return m_samplesPerSec; }
+ inline short getNofChannels() { return m_nofChannels; }
+ inline SAMPLE_FUNCTION_TYPE getSampleFunction() { return m_sampleFunction; }
+
+
+ // static implementations of sample functions
+ static AUDIO_SAMPLE_TYPE sampleFunction8bitMono( CAudioBuffer *abuffer, int pos, int channel );
+ static AUDIO_SAMPLE_TYPE sampleFunction16bitMono( CAudioBuffer *abuffer, int pos, int channel );
+ static AUDIO_SAMPLE_TYPE sampleFunction8bitStereo( CAudioBuffer *abuffer, int pos, int channel );
+ static AUDIO_SAMPLE_TYPE sampleFunction16bitStereo( CAudioBuffer *abuffer, int pos, int channel );
+
+ CAudioBufferPlayInstance *playWithMixer( GE::CAudioMixer &mixer );
+
+ protected:
+ SAMPLE_FUNCTION_TYPE m_sampleFunction;
+ short m_nofChannels;
+ void *m_data;
+ int m_dataLength; // in bytes
+ short m_bitsPerSample;
+ bool m_signedData;
+ int m_samplesPerSec;
+ };
+
+
+
+ class CAudioBufferPlayInstance : public IAudioSource {
+ public:
+ CAudioBufferPlayInstance();
+ CAudioBufferPlayInstance( CAudioBuffer *start_playing );
+ virtual ~CAudioBufferPlayInstance();
+ void playBuffer( CAudioBuffer *startPlaying, float volume, float fixedSpeed, int loopTimes = 0 ); // looptimes -1 = loop forever
+
+ void setSpeed( float speed );
+ void setLeftVolume( float lvol );
+ void setRightVolume( float rvol );
+
+
+ inline void setLoopTimes( int ltimes ) { m_loopTimes = ltimes; }
+ void stop();
+
+
+
+ int pullAudio( AUDIO_SAMPLE_TYPE *target, int bufferLength );
+ bool canBeDestroyed();
+
+ bool isPlaying() { if (m_buffer) return true; else return false; }
+ inline bool isFinished() { return m_finished; }
+ inline bool destroyWhenFinished() { return m_destroyWhenFinished; }
+ inline void setDestroyWhenFinished( bool set ) { m_destroyWhenFinished = set; }
+
+ protected:
+ int mixBlock( AUDIO_SAMPLE_TYPE *target, int bufferLength );
+ bool m_finished;
+ bool m_destroyWhenFinished;
+ int m_fixedPos;
+ int m_fixedInc;
+
+ int m_fixedLeftVolume;
+ int m_fixedRightVolume;
+ int m_fixedCenter;
+ int m_loopTimes;
+ CAudioBuffer *m_buffer;
+ };
+
+};
+
+
+
+#endif
diff --git a/demos/mobile/quickhit/ga_src/GEAudioOut.cpp b/demos/mobile/quickhit/ga_src/GEAudioOut.cpp
new file mode 100644
index 0000000000..73a765ce77
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEAudioOut.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <QtCore/qstring.h>
+#include <QAudioOutput>
+
+#include "GEAudioOut.h"
+
+using namespace GE;
+//using namespace QTM_NAMESPACE;
+
+/*
+#ifndef Q_OS_WIN32
+QTM_USE_NAMESPACE
+#endif
+*/
+
+const int CHANNELS = 2;
+const QString CODEC = "audio/pcm";
+const QAudioFormat::Endian BYTEORDER = QAudioFormat::LittleEndian;
+const QAudioFormat::SampleType SAMTYPE = QAudioFormat::SignedInt;
+
+
+
+AudioOut::AudioOut( QObject *parent, GE::IAudioSource *source ) : QThread(parent) { // qobject
+ m_source = source;
+ QAudioFormat format;
+ format.setFrequency(AUDIO_FREQUENCY);
+ format.setChannels(CHANNELS);
+ format.setSampleSize(AUDIO_SAMPLE_BITS);
+ format.setCodec(CODEC);
+ format.setByteOrder(BYTEORDER);
+ format.setSampleType(SAMTYPE);
+
+ QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
+ if (!info.isFormatSupported(format))
+ format = info.nearestFormat(format);
+
+
+ m_audioOutput = new QAudioOutput(info,format);
+
+#ifdef Q_WS_MAEMO_5
+ m_audioOutput->setBufferSize(20000);
+ m_sendBufferSize = 5000;
+#else
+ m_audioOutput->setBufferSize(16000);
+ m_sendBufferSize = 4000;
+#endif
+
+ m_outTarget = m_audioOutput->start();
+
+
+ m_sendBuffer = new AUDIO_SAMPLE_TYPE[ m_sendBufferSize ];
+ m_samplesMixed = 0;
+
+ m_runstate=0;
+
+#ifndef Q_OS_SYMBIAN
+ start();
+#else
+ m_audioOutput->setNotifyInterval(5);
+ connect(m_audioOutput,SIGNAL(notify()),SLOT(audioNotify()));
+#endif
+
+};
+
+
+AudioOut::~AudioOut() {
+ if (m_runstate==0) m_runstate = 1;
+ if (QThread::isRunning() == false) m_runstate = 2;
+ while (m_runstate!=2) { msleep(50); } // wait until the thread is finished
+ m_audioOutput->stop();
+ delete m_audioOutput;
+ delete [] m_sendBuffer;
+};
+
+
+void AudioOut::audioNotify() {
+ tick();
+};
+
+void AudioOut::tick() {
+ // fill data to buffer as much as free space is available..
+ int samplesToWrite = m_audioOutput->bytesFree() / (CHANNELS*AUDIO_SAMPLE_BITS/8);
+ samplesToWrite*=2;
+
+ if (samplesToWrite > m_sendBufferSize) samplesToWrite = m_sendBufferSize;
+ if (samplesToWrite<=0) return;
+ int mixedSamples = m_source->pullAudio( m_sendBuffer, samplesToWrite );
+ m_outTarget->write( (char*)m_sendBuffer, mixedSamples*2 );
+
+};
+
+
+void AudioOut::run() {
+ if (!m_source) { m_runstate=2; return; }
+ int sleepTime = m_sendBufferSize * 340 / AUDIO_FREQUENCY;
+ if (sleepTime<2) sleepTime = 2;
+
+ while (m_runstate==0) {
+ tick();
+ msleep(sleepTime);
+ };
+ m_runstate = 2;
+};
+
+
diff --git a/demos/mobile/quickhit/ga_src/GEAudioOut.h b/demos/mobile/quickhit/ga_src/GEAudioOut.h
new file mode 100644
index 0000000000..dc1f7441d0
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEAudioOut.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 __GE_QTAUDIOOUT__
+#define __GE_QTAUDIOOUT__
+
+#include <QtCore/qobject.h>
+#include <QtCore/qfile.h>
+#include <QtMultimedia>
+#include <QtCore/qtimer.h>
+#include <QtCore/qstring.h>
+#include <QThread>
+
+#include "GEInterfaces.h"
+
+
+class QAudioOutput;
+
+namespace GE {
+
+
+
+ class AudioOut : public QThread {
+ Q_OBJECT
+
+ public:
+ AudioOut(QObject *parent, GE::IAudioSource *source);
+ virtual ~AudioOut();
+
+
+
+ private slots:
+ void audioNotify(); // for internal notify "solution"
+
+
+ protected:
+ void tick();
+ virtual void run(); // this is for the threaded mode only
+
+
+ qint64 m_samplesMixed;
+
+ QAudioOutput *m_audioOutput;
+ QIODevice *m_outTarget;
+ GE::IAudioSource *m_source;
+ int m_runstate;
+ AUDIO_SAMPLE_TYPE *m_sendBuffer;
+ int m_sendBufferSize;
+ };
+}
+
+#endif
diff --git a/demos/mobile/quickhit/ga_src/GEInterfaces.cpp b/demos/mobile/quickhit/ga_src/GEInterfaces.cpp
new file mode 100644
index 0000000000..a71f738891
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEInterfaces.cpp
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <memory.h>
+#include "GEInterfaces.h"
+
+
+using namespace GE;
+
+/**
+ * CAudioSource
+ * common functionality
+ *
+ */
+IAudioSource::IAudioSource() {
+ m_next = 0;
+};
+
+IAudioSource::~IAudioSource() {
+
+
+};
+
+/**
+ * CAudioMixer
+ *
+ */
+CAudioMixer::CAudioMixer() {
+ m_sourceList = 0;
+ m_mixingBuffer = 0;
+ m_mixingBufferLength = 0;
+ m_fixedGeneralVolume = 4096;
+};
+
+
+CAudioMixer::~CAudioMixer() {
+ destroyList();
+ if (m_mixingBuffer) {
+ delete [] m_mixingBuffer;
+ m_mixingBuffer = 0;
+ };
+};
+
+void CAudioMixer::destroyList() {
+ m_mutex.lock();
+ IAudioSource *l = m_sourceList;
+ while (l) {
+ IAudioSource *n = l->m_next;
+ delete l;
+ l = n;
+ };
+ m_sourceList = 0;
+ m_mutex.unlock();
+};
+
+
+IAudioSource* CAudioMixer::addAudioSource( IAudioSource *source ) {
+ m_mutex.lock();
+ source->m_next = 0;
+ if (m_sourceList) {
+ IAudioSource *l = m_sourceList;
+ while (l->m_next) l = l->m_next;
+ l->m_next = source;
+ } else m_sourceList = source;
+ m_mutex.unlock();
+ return source;
+
+};
+
+
+bool CAudioMixer::removeAudioSource( IAudioSource *source ) {
+ return true;
+};
+
+void CAudioMixer::setGeneralVolume( float vol ) {
+ m_fixedGeneralVolume = (4096.0f*vol);
+};
+
+int CAudioMixer::pullAudio( AUDIO_SAMPLE_TYPE *target, int bufferLength ) {
+
+ if (!m_sourceList) return 0;
+
+ m_mutex.lock();
+
+
+ if (m_mixingBufferLength<bufferLength) {
+ if (m_mixingBuffer) delete [] m_mixingBuffer;
+ m_mixingBufferLength = bufferLength;
+ m_mixingBuffer = new AUDIO_SAMPLE_TYPE[ m_mixingBufferLength ];
+ };
+
+ memset( target, 0, sizeof( AUDIO_SAMPLE_TYPE ) * bufferLength );
+
+ AUDIO_SAMPLE_TYPE *t;
+ AUDIO_SAMPLE_TYPE *t_target;
+ AUDIO_SAMPLE_TYPE *s;
+
+ IAudioSource *prev = 0;
+ IAudioSource *l = m_sourceList;
+ while (l) {
+ IAudioSource *next = l->m_next;
+
+ // process l
+ int mixed = l->pullAudio( m_mixingBuffer, bufferLength );
+ if (mixed>0) {
+ // mix to main..
+ t = target;
+ t_target = t+mixed;
+ s = m_mixingBuffer;
+ while (t!=t_target) {
+ *t +=(((*s)*m_fixedGeneralVolume)>>12);
+ t++;
+ s++;
+ };
+ };
+
+
+
+ // autodestroy
+ if (l->canBeDestroyed() == true) { // NOTE, IS UNDER TESTING,... MIGHT CAUSE UNPREDICTABLE CRASHING WITH SOME USE CASES!!!
+ if (!prev)
+ m_sourceList = next;
+ else prev->m_next = next;
+ delete l;
+ l = 0;
+ };
+
+
+
+
+ prev = l;
+ l = next;
+ };
+ m_mutex.unlock();
+ return bufferLength;
+};
+
+
+
+
diff --git a/demos/mobile/quickhit/ga_src/GEInterfaces.h b/demos/mobile/quickhit/ga_src/GEInterfaces.h
new file mode 100644
index 0000000000..7abd9848de
--- /dev/null
+++ b/demos/mobile/quickhit/ga_src/GEInterfaces.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 __GE_IGA_INTERFACES__
+#define __GE_IGA_INTERFACES__
+
+#include <QMutex>
+
+namespace GE {
+
+#define AUDIO_FREQUENCY 22050
+#define AUDIO_SAMPLE_TYPE short
+#define AUDIO_SAMPLE_BITS 16
+
+ class IAudioSource {
+ public:
+ IAudioSource();
+ virtual ~IAudioSource();
+
+ virtual int pullAudio( AUDIO_SAMPLE_TYPE *target, int bufferLength ) = 0;
+ virtual bool canBeDestroyed() { return false; }
+
+ IAudioSource *m_next; // for listing, do not touch if you dont know what you are doing.
+ };
+
+
+ class CAudioMixer : public IAudioSource {
+ public:
+ CAudioMixer();
+ virtual ~CAudioMixer();
+ void destroyList(); // destroy all the sources in the list
+
+
+ IAudioSource* addAudioSource( IAudioSource *s ); // add new audio source to the list
+ bool removeAudioSource( IAudioSource *s ); // remove an audio source from the list
+ int pullAudio( AUDIO_SAMPLE_TYPE *target, int bufferLength );
+ void setGeneralVolume( float vol );
+
+
+ protected:
+ QMutex m_mutex;
+ int m_fixedGeneralVolume;
+ AUDIO_SAMPLE_TYPE *m_mixingBuffer;
+ int m_mixingBufferLength;
+ IAudioSource *m_sourceList;
+ };
+
+};
+
+
+#endif
diff --git a/demos/mobile/quickhit/gameengine.cpp b/demos/mobile/quickhit/gameengine.cpp
new file mode 100644
index 0000000000..99e7d53adb
--- /dev/null
+++ b/demos/mobile/quickhit/gameengine.cpp
@@ -0,0 +1,592 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "gameengine.h"
+#include "plugins/levelplugininterface.h"
+#include "InvSounds.h"
+
+#include <QDebug>
+#include <QTimerEvent>
+#include <QTime>
+#include <QDesktopServices>
+
+const int TIMER_SPEED = 80;
+
+GameEngine::GameEngine(QObject* parent)
+ :QObject(parent)
+{
+ m_timerId = 0;
+ m_doEnemyMissile = 1500 / TIMER_SPEED;
+ m_GameGml = 0;
+ m_gameLevel = 0;
+
+ clearQmlObjects();
+
+ // For random
+ QTime time = QTime::currentTime();
+ qsrand((uint)time.msec());
+
+ // Sound engine
+ m_soundEngine = new CInvSounds(this);
+
+ // Device profile
+ m_silent = false;
+
+#ifdef Q_OS_SYMBIAN
+ iVibrate = CHWRMVibra::NewL();
+#endif
+
+ // Get device profile, is it silent?
+#if defined Q_OS_SYMBIAN || defined Q_WS_MAEMO_5
+ m_systemDeviceInfo = new QSystemDeviceInfo(this);
+ QObject::connect(m_systemDeviceInfo,SIGNAL(currentProfileChanged(QSystemDeviceInfo::Profile)),this,
+ SLOT(currentProfileChanged(QSystemDeviceInfo::Profile)));
+ QSystemDeviceInfo::Profile p = m_systemDeviceInfo->currentProfile();
+ if (p == QSystemDeviceInfo::SilentProfile) {
+ m_silent = true;
+ }
+#endif
+
+}
+
+
+GameEngine::~GameEngine()
+{
+#ifdef Q_OS_SYMBIAN
+ delete iVibrate;
+#endif
+
+}
+
+void GameEngine::gameStartSound()
+{
+ if (!m_silent)
+ m_soundEngine->gameStartSound();
+}
+
+#if defined Q_OS_SYMBIAN || defined Q_WS_MAEMO_5
+void GameEngine::currentProfileChanged(QSystemDeviceInfo::Profile p)
+{
+ if (p == QSystemDeviceInfo::SilentProfile) {
+ enableSounds(QVariant(false));
+ } else {
+ enableSounds(QVariant(true));
+ }
+}
+#endif
+
+void GameEngine::enableSounds(QVariant enable)
+{
+ m_silent = !enable.toBool();
+
+ if (m_silent)
+ this->m_soundEngine->enableSounds(false);
+ else
+ this->m_soundEngine->enableSounds(true);
+
+}
+
+QVariant GameEngine::randInt(QVariant low, QVariant high)
+{
+ // Random number between low and high
+ return qrand() % ((high.toInt() + 1) - low.toInt()) + low.toInt();
+}
+
+void GameEngine::setGameLevel(LevelPluginInterface* level)
+{
+ // Set used game level
+ m_gameLevel = level;
+
+ if (m_gameLevel) {
+ // Set used sound from the level into sound engine
+ m_soundEngine->enableSounds(m_gameLevel->levelSounds());
+ // Invoke QML to take new level in use
+ QMetaObject::invokeMethod(m_GameGml, "levelReadyForCreation", Qt::AutoConnection);
+
+ m_doEnemyMissile = m_gameLevel->enemyFireSpeed().toInt() / TIMER_SPEED;
+ }
+}
+
+void GameEngine::setPluginList(QList<QPluginLoader*> plugins)
+{
+ m_pluginList = plugins;
+}
+
+QVariant GameEngine::pluginList()
+{
+ QStringList list;
+ QPluginLoader* loader;
+ foreach (loader,m_pluginList) {
+ QString s = loader->fileName();
+ s = s.mid(s.lastIndexOf("/")+1);
+ s = s.left(s.lastIndexOf("."));
+ s = s.toUpper();
+#ifdef Q_WS_MAEMO_5
+ if (s.contains("LIB")) {
+ s = s.right(s.length() - (s.indexOf("LIB")+3));
+ }
+#endif
+ list.append(s);
+ }
+ return QVariant(list);
+}
+
+void GameEngine::pauseLevel(QVariant doPause)
+{
+ bool enableTimer = !doPause.toBool();
+ enableEngineTimer(QVariant(enableTimer));
+ QMetaObject::invokeMethod(m_levelQml, "pause", Qt::AutoConnection,Q_ARG(QVariant, doPause));
+}
+
+
+void GameEngine::findQmlObjects()
+{
+ if (m_GameGml) {
+ qDebug() << "GameEngine::findQmlObjects()";
+
+ // Find Missiles objects
+ m_missileList.clear();
+ m_enemyMissileList.clear();
+ findMissiles(m_GameGml);
+
+ // Set QMLs
+ setLevelQml(m_GameGml->findChild<QObject*>("level"));
+ setEnemiesGridQml(m_GameGml->findChild<QObject*>("enemiesGrid"));
+ setMyShipQml(m_GameGml->findChild<QObject*>("myShip"));
+
+ // Find Enemies objects
+ m_enemyList.clear();
+ qDebug() << "GameEngine::findQmlObjects() find enemies from: level QML";
+ findEnemies(m_levelQml);
+
+
+ } else {
+ qDebug() << "GameEngine::findQmlObjects() rootObject NULL";
+ }
+}
+
+void GameEngine::clearQmlObjects()
+{
+ m_missileList.clear();
+ m_enemyMissileList.clear();
+ m_enemyList.clear();
+ m_levelQml = 0;
+ m_enemiesGridGml = 0;
+ m_myShipGml = 0;
+ //m_GameGml = 0; // NOTE: Do not delete this
+}
+
+
+void GameEngine::findMissiles(QObject *rootObject)
+{
+ if (rootObject) {
+ QObjectList list = rootObject->children();
+ QObject* item;
+ foreach (item,list) {
+ if (item->children().count()>0) {
+ findMissiles(item);
+ } else {
+ if (rootObject->objectName()=="missile") {
+ QDeclarativeItem* missile = static_cast<QDeclarativeItem*>(rootObject);
+ m_missileList.append(missile);
+ } else if (rootObject->objectName()=="enemy_missile") {
+ QDeclarativeItem* enemyMissile = static_cast<QDeclarativeItem*>(rootObject);
+ m_enemyMissileList.append(enemyMissile);
+ }
+ }
+ }
+ } else {
+ qDebug() << "GameEngine::findMissiles() rootObject NULL";
+ }
+}
+
+void GameEngine::findEnemies(QObject *rootObject)
+{
+ if (rootObject) {
+ QObjectList list = rootObject->children();
+ QObject* item;
+ foreach (item,list) {
+ if (item->children().count()>0 && item->objectName()!="enemy") {
+ //qDebug() << "Enemy children found from: " << item->objectName();
+ findEnemies(item);
+ } else {
+ if (item->objectName()=="enemy") {
+ //qDebug() << "Enemy child founds: " << item->objectName();
+ QDeclarativeItem* enemy = static_cast<QDeclarativeItem*>(item);
+ m_enemyList.append(enemy);
+ }
+ }
+ }
+ } else {
+ qDebug() << "GameEngine::findEnemies() rootObject NULL";
+ }
+}
+
+void GameEngine::setEnemiesGridQml(QObject* o)
+{
+ m_enemiesGridGml = static_cast<QDeclarativeItem*>(o);
+}
+
+void GameEngine::setMyShipQml(QObject* o)
+{
+ m_myShipGml = static_cast<QDeclarativeItem*>(o);
+}
+
+void GameEngine::setGameQml(QObject* o)
+{
+ m_GameGml = static_cast<QDeclarativeItem*>(o);
+}
+
+
+void GameEngine::timerEvent(QTimerEvent *e)
+{
+ if (e->timerId()==m_timerId) {
+ // Do hit test
+ doHitTest();
+
+ m_doEnemyMissile--;
+
+ if (m_gameLevel && m_doEnemyMissile<0) {
+ m_doEnemyMissile = m_gameLevel->enemyFireSpeed().toInt() / TIMER_SPEED;
+ // Do emeny missile launch
+ doEnemyMissile();
+ }
+ }
+}
+
+void GameEngine::enableEngineTimer(QVariant enable)
+{
+ if (m_gameLevel) {
+ if (m_timerId==0 && enable.toBool()) {
+ m_timerId = QObject::startTimer(TIMER_SPEED);
+ }
+ else if (m_timerId != 0 && !enable.toBool()) {
+ QObject::killTimer(m_timerId);
+ m_timerId = 0;
+ }
+ }
+}
+
+void GameEngine::selectVisibleEnemy(int& start, int& end)
+{
+ QDeclarativeItem* enemy = 0;
+ for (int i=0 ; i<m_enemyList.count() ; i++) {
+ enemy = m_enemyList[i];
+ if (enemy->opacity()==1) {
+ start = i;
+ break;
+ }
+ }
+ enemy = 0;
+ for (int e=m_enemyList.count()-1 ; e>0 ; e--) {
+ enemy = m_enemyList[e];
+ if (enemy->opacity()==1) {
+ end = e;
+ break;
+ }
+ }
+}
+
+void GameEngine::doEnemyMissile()
+{
+ QMutexLocker locker(&m_enemyListMutex);
+
+ QDeclarativeItem* missile = 0;
+ QDeclarativeItem* enemy = 0;
+
+ // Find free missile
+ foreach (missile, m_enemyMissileList) {
+ if (missile->opacity()==0){
+ // Random select enemy who fire
+ int start=0; int end=0;
+ selectVisibleEnemy(start,end);
+ int whoWillFire = randInt(QVariant(start),QVariant(end)).toInt();
+ if (m_enemyList.count() < whoWillFire+1)
+ break;
+
+ enemy = m_enemyList.at(whoWillFire);
+ if (enemy && enemy->opacity()==1) {
+ QPointF enemyP = enemy->pos();
+ if (m_enemiesGridGml) {
+ enemyP += m_enemiesGridGml->pos();
+ }
+ //qDebug() << "QMetaObject::invokeMethod() - fireEnemyMissile";
+ QMetaObject::invokeMethod(m_GameGml, "fireEnemyMissile", Qt::AutoConnection,
+ Q_ARG(QVariant, enemyP.x()+enemy->boundingRect().width()/4),
+ Q_ARG(QVariant, enemyP.y()+enemy->boundingRect().height()),
+ Q_ARG(QVariant, m_GameGml->boundingRect().height()));
+ }
+ break;
+ }
+ }
+}
+
+void GameEngine::doHitTest()
+{
+ QMutexLocker locker(&m_enemyListMutex);
+
+ QDeclarativeItem* missile = 0;
+ QDeclarativeItem* enemy = 0;
+
+ // No enemies?
+ if (m_enemyList.count()==0) {
+ enableEngineTimer(QVariant(false));
+ qDebug() << "No enemies left";
+ gameOver(true);
+ return;
+ }
+
+ if (!m_myShipGml) {
+ return;
+ }
+
+ // Check ship collision
+ if (m_myShipGml->opacity()==1) {
+ for (int e=0; e<m_enemyList.count(); e++) {
+ enemy = m_enemyList[e];
+ if (enemy->opacity()==0) {
+ break;
+ }
+ QPointF enemyP = enemy->pos();
+ if (m_enemiesGridGml) {
+ enemyP += m_enemiesGridGml->pos();
+ }
+ QRectF enemyR(enemyP,QSize(enemy->boundingRect().width(),enemy->boundingRect().height()));
+ // Collision?
+ if (enemyR.contains(m_myShipGml->pos())) {
+ enableEngineTimer(QVariant(false));
+
+ // Collision explosion
+ QPointF myP = m_myShipGml->pos();
+ playSound(1);
+ QMetaObject::invokeMethod(m_levelQml, "explode", Qt::AutoConnection,
+ Q_ARG(QVariant, myP.x()+m_myShipGml->boundingRect().width()/2),
+ Q_ARG(QVariant, myP.y()+m_myShipGml->boundingRect().height()));
+ m_myShipGml->setOpacity(0);
+
+ gameOver(false);
+ qDebug() << "Collision";
+ return;
+ }
+ // Enemy too deep?
+ else if (enemyR.bottomLeft().y() > m_myShipGml->pos().y()+m_myShipGml->pos().y()*0.1) {
+ enableEngineTimer(QVariant(false));
+
+ // Enemy too deep explosion
+ QPointF myP = m_myShipGml->pos();
+ playSound(1);
+ QMetaObject::invokeMethod(m_levelQml, "explode", Qt::AutoConnection,
+ Q_ARG(QVariant, myP.x()+m_myShipGml->boundingRect().width()/2),
+ Q_ARG(QVariant, myP.y()+m_myShipGml->boundingRect().height()));
+ m_myShipGml->setOpacity(0);
+
+ gameOver(false);
+ qDebug() << "Enemy too deep";
+ return;
+ }
+ }
+ }
+
+ // Check your missiles hit to enemies
+ foreach (missile, m_missileList) {
+ if (missile->opacity()==1){
+ for (int e=0; e<m_enemyList.count(); e++) {
+ enemy = m_enemyList[e];
+ if (enemy->opacity()<1) {
+ break;
+ }
+ QPointF missileP = missile->pos();
+ missileP.setX(missileP.rx() + missile->boundingRect().width()/2);
+
+ QPointF enemyP = enemy->pos();
+ if (m_enemiesGridGml) {
+ enemyP += m_enemiesGridGml->pos();
+ }
+
+ QRectF r(enemyP,QSize(enemy->boundingRect().width(),enemy->boundingRect().height()));
+ if (r.contains(missileP)) {
+ // Hit !
+ playSound(0);
+ //qDebug() << "QMetaObject::invokeMethod() - explode";
+ QMetaObject::invokeMethod(m_levelQml, "explode", Qt::AutoConnection,
+ Q_ARG(QVariant, enemyP.x()+enemy->boundingRect().width()/2),
+ Q_ARG(QVariant, enemyP.y()+enemy->boundingRect().height()));
+ missile->setOpacity(0);
+ //fastVibra();
+ if (m_enemiesGridGml) {
+ // Set transparent placeholder for enemy when using GridView
+ enemy->setProperty("source",QVariant("file:/"+m_gameLevel->pathToTransparentEnemyPic().toString()));
+ } else {
+ // Hide enemy after explode
+ enemy->setOpacity(0);
+ }
+
+ // Remove enemy from list
+ m_enemyList.removeAt(e);
+ e--;
+ }
+ enemy = 0;
+ }
+ }
+ }
+
+ // Check enemies missiles hit to you
+ if (m_myShipGml->opacity()==1) {
+ foreach (missile, m_enemyMissileList) {
+ if (missile->opacity()==1){
+ QPointF missileP = missile->pos();
+ missileP.setX(missileP.rx() + missile->boundingRect().width()/2);
+
+ QPointF myP = m_myShipGml->pos();
+
+ QRectF r(myP,QSize(m_myShipGml->boundingRect().width(),m_myShipGml->boundingRect().height()));
+ if (r.contains(missileP)) {
+ // Hit !
+ playSound(1);
+ //qDebug() << "QMetaObject::invokeMethod() - explode";
+ QMetaObject::invokeMethod(m_levelQml, "explode", Qt::AutoConnection,
+ Q_ARG(QVariant, myP.x()+m_myShipGml->boundingRect().width()/2),
+ Q_ARG(QVariant, myP.y()+m_myShipGml->boundingRect().height()));
+ missile->setOpacity(0);
+ m_myShipGml->setOpacity(0);
+ break;
+ }
+ }
+ }
+ } else {
+ // You was killed
+ enableEngineTimer(QVariant(false));
+ gameOver(false);
+ qDebug() << "You was killed by enemy missile";
+ }
+
+}
+
+
+void GameEngine::playSound(QVariant index)
+{
+ if (!m_silent) {
+ int i = index.toInt();
+ m_soundEngine->playSound(i);
+ }
+}
+
+void GameEngine::playSounds(QVariant index, QVariant count)
+{
+ if (!m_silent) {
+ m_soundEngine->playSounds(index.toInt(),count.toInt());
+ }
+}
+
+void GameEngine::playInternalSound(QVariant index)
+{
+ if (!m_silent) {
+ m_soundEngine->playInternalSound(index.toInt());
+ }
+}
+
+void GameEngine::playInternalSounds(QVariant index, QVariant count)
+{
+ if (!m_silent) {
+ m_soundEngine->playInternalSounds(index.toInt(),count.toInt());
+ }
+}
+
+void GameEngine::gameOver(bool youWin)
+{
+ qDebug() << "GameEngine::gameOver() "<< youWin;
+ QMetaObject::invokeMethod(m_GameGml, "gameOver", Qt::AutoConnection,Q_ARG(QVariant, youWin));
+}
+
+void GameEngine::pauseGame() {
+ QMetaObject::invokeMethod(m_GameGml, "pauseGame", Qt::AutoConnection);
+}
+
+
+QVariant GameEngine::isSymbian()
+{
+#ifdef Q_OS_SYMBIAN
+ return QVariant(true);
+#else
+ return QVariant(false);
+#endif
+}
+
+QVariant GameEngine::isMaemo()
+{
+#ifdef Q_WS_MAEMO_5
+ return QVariant(true);
+#else
+ return QVariant(false);
+#endif
+}
+
+QVariant GameEngine::isWindows()
+{
+#ifdef Q_OS_WIN
+ return QVariant(true);
+#else
+ return QVariant(false);
+#endif
+}
+
+void GameEngine::vibra()
+{
+#ifdef Q_OS_SYMBIAN
+ if (iVibrate){
+ TRAPD(err, iVibrate->StartVibraL(4000,KHWRMVibraMaxIntensity));
+ }
+#endif
+}
+
+void GameEngine::fastVibra()
+{
+#ifdef Q_OS_SYMBIAN
+ if (iVibrate){
+ TRAPD(err, iVibrate->StartVibraL(100,KHWRMVibraMaxIntensity));
+ }
+#endif
+}
+
+void GameEngine::openLink(QVariant link)
+{
+QDesktopServices::openUrl(QUrl(link.toString()));
+}
+
diff --git a/demos/mobile/quickhit/gameengine.h b/demos/mobile/quickhit/gameengine.h
new file mode 100644
index 0000000000..c8c8b8cb80
--- /dev/null
+++ b/demos/mobile/quickhit/gameengine.h
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 GAMEENGINE_H
+#define GAMEENGINE_H
+
+#include <QObject>
+#include <QDeclarativeItem>
+#include <QMutex>
+#include <QPluginLoader>
+#include <QList>
+
+#ifdef Q_OS_SYMBIAN
+#include <hwrmvibra.h>
+#endif
+
+// QtMobility
+#if defined Q_OS_SYMBIAN || defined Q_WS_MAEMO_5
+#include <QSystemDeviceInfo>
+QTM_USE_NAMESPACE
+#endif
+
+class CInvSounds;
+class LevelPluginInterface;
+class GameEngine : public QObject
+{
+ Q_OBJECT
+
+public:
+ GameEngine(QObject* parent);
+ ~GameEngine();
+ void timerEvent(QTimerEvent *);
+ void setGameLevel(LevelPluginInterface* level);
+ void setPluginList(QList<QPluginLoader*> plugins);
+ void pauseGame();
+
+public:
+ Q_INVOKABLE void enableEngineTimer(QVariant enable);
+ Q_INVOKABLE QVariant randInt(QVariant low, QVariant high);
+ Q_INVOKABLE void enableSounds(QVariant enable);
+ Q_INVOKABLE void playSound(QVariant index);
+ Q_INVOKABLE void playSounds(QVariant index, QVariant count);
+ Q_INVOKABLE void playInternalSound(QVariant index);
+ Q_INVOKABLE void playInternalSounds(QVariant index, QVariant count);
+ Q_INVOKABLE QVariant pluginList();
+ Q_INVOKABLE void findQmlObjects();
+ Q_INVOKABLE void clearQmlObjects();
+ Q_INVOKABLE void pauseLevel(QVariant doPause);
+ Q_INVOKABLE void gameStartSound();
+
+ Q_INVOKABLE QVariant isSymbian();
+ Q_INVOKABLE QVariant isMaemo();
+ Q_INVOKABLE QVariant isWindows();
+
+ Q_INVOKABLE void vibra();
+ Q_INVOKABLE void fastVibra();
+
+ Q_INVOKABLE void openLink(QVariant link);
+
+
+private slots:
+#if defined Q_OS_SYMBIAN || defined Q_WS_MAEMO_5
+ void currentProfileChanged (QSystemDeviceInfo::Profile);
+#endif
+
+public:
+ void setGameQml(QObject* o);
+
+private:
+ void findMissiles(QObject* rootObject);
+ void findEnemies(QObject* rootObject);
+ void setLevelQml(QObject* o) {m_levelQml = o;}
+ void setEnemiesGridQml(QObject* o);
+ void setMyShipQml(QObject* o);
+ void gameOver(bool youWin);
+ void selectVisibleEnemy(int& start, int& end);
+
+private:
+ void doHitTest();
+ void doEnemyMissile();
+
+private:
+ bool m_enableEnemyMissiles;
+ QMutex m_enemyListMutex;
+ QList<QDeclarativeItem*> m_enemyList;
+ QList<QDeclarativeItem*> m_missileList;
+ QList<QDeclarativeItem*> m_enemyMissileList;
+ QObject* m_levelQml;
+ QDeclarativeItem* m_enemiesGridGml;
+ QDeclarativeItem* m_myShipGml;
+ QDeclarativeItem* m_GameGml;
+
+ LevelPluginInterface* m_gameLevel;
+ CInvSounds* m_soundEngine;
+ QList<QPluginLoader*> m_pluginList;
+
+ int m_timerId;
+ int m_doEnemyMissile;
+
+#if defined Q_OS_SYMBIAN || defined Q_WS_MAEMO_5
+ QSystemDeviceInfo* m_systemDeviceInfo;
+#endif
+ bool m_silent;
+
+#ifdef Q_OS_SYMBIAN
+ CHWRMVibra* iVibrate;
+#endif
+
+};
+
+#endif // GAMEENGINE_H
diff --git a/demos/mobile/quickhit/gfx/back.png b/demos/mobile/quickhit/gfx/back.png
new file mode 100644
index 0000000000..bb66f740d2
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/back.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/background2.png b/demos/mobile/quickhit/gfx/background2.png
new file mode 100644
index 0000000000..c81875ac92
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/background2.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/bigship.png b/demos/mobile/quickhit/gfx/bigship.png
new file mode 100644
index 0000000000..b88dc32142
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/bigship.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/exit.png b/demos/mobile/quickhit/gfx/exit.png
new file mode 100644
index 0000000000..a45abd6f3f
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/exit.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/pause.png b/demos/mobile/quickhit/gfx/pause.png
new file mode 100644
index 0000000000..05709087cb
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/pause.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/quickhit_logo.png b/demos/mobile/quickhit/gfx/quickhit_logo.png
new file mode 100644
index 0000000000..0b505c70fc
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/quickhit_logo.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/soundOff.png b/demos/mobile/quickhit/gfx/soundOff.png
new file mode 100644
index 0000000000..fed8520af2
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/soundOff.png
Binary files differ
diff --git a/demos/mobile/quickhit/gfx/soundOn.png b/demos/mobile/quickhit/gfx/soundOn.png
new file mode 100644
index 0000000000..03bd80e986
--- /dev/null
+++ b/demos/mobile/quickhit/gfx/soundOn.png
Binary files differ
diff --git a/demos/mobile/quickhit/icon.svg b/demos/mobile/quickhit/icon.svg
new file mode 100644
index 0000000000..3795e8d987
--- /dev/null
+++ b/demos/mobile/quickhit/icon.svg
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="128"
+ height="128"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="New document 1">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="151.3239"
+ inkscape:cy="33.99485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1680"
+ inkscape:window-height="1003"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-924.36218)">
+ <image
+ y="924.6955"
+ x="-0.20219566"
+ id="image2993"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAIABJREFU
+eJztvWmwZdd1HvatPZxz7vDm169HdANozA0QBCmKFBCKIGmpaJFlhYloKypJsUpUEvtHVJVQJblU
+KlmlHxQVJT/ilEuRVJVU+Y9t2VbRYlGxhsQUpYikJBAEAZAYuoGe3jzd+Zyzh5Uf+5xzz32vmwbR
+/V73Q7hQF/f1Hfbd5+y11/CttdcivEOp0+2Sc47m5+Z8/fWNjY13jUajTxpj/oFz7lFrLYwx30rT
+9F9tbe38wY/8yMdeqH/+T/7kT8X15RX+h//1T/HhXsHhEN3pCRwmGWtOdDvdp9M0/VFr7Q9Za09a
+a5Hn+cpwOPyTzc3tz7/44kv/7y/+4mdW7/RcD4vknZ7AYREzt5z37zd5/mye509nWXYuz3NprYW1
+LrHWKeedjaJo+Pob11ZWV66ZOz3nw6B3FANsbm3Rb/7mb+57nZkXrPfvH/T7Hx8OBh/pdDpPbG1t
+yc3NTXS7XWRZJr13S+y5DVB04cKj6ezC0u43nn9udAcu41DpHcUAN1n8FgPfb4356GAw+Gin03l0
+bW1NXb58BVevXMHW9hbyPIMQkpRS80rLZhTFbnFxId3ppGtXLl98R0uCdwQDbO/s0Oc+97l9r2d5
+dpyI3t/v9T4xGAw+sr29/e7VlVX55puXcfHiRVy5chVbW9tI0xRCEJTSUkp5QirRFkLGjzz8YH7v
+ufO9r33trwZ7x/5f/9n/Rn/0R188lOs7SHpHMMCNFp+ZFz3z087ajw4Ggw/v7u4+vLK8rK5cuYor
+V65gfX3d93pdjEYpsixj7z0JKaC1RhRFM0qqqSiKMDXVtotLp7ae//rfTKiDd8LiA+8QBthLnW73
+HBE9k45GnxgOhx/e2tp6fGVlRV2+fBnLK8vY3d2FtY4BEDNgrUGe5+SchxAErZVWSp2QSs5IKVvH
+jy/ZJ9/97sGff+k/du70td1uescxADMvWWefAeOH0jR9ttvtPriyvEJXrl7B8vIKRsORl1Jxq9Wi
+pNEgrTURCLkxnJucnXMkpUIcRUiSZEFpPRNpLaIoyu87/8DGV7/yV8M7fY23k95RDNDpdk979k/n
+Wf73sjx7ttPpnF9ZWaXLV65gZXkVw+EISSPh9lQbzVaLlFIgEiBB8N7DGIMsz8g7C6UU4iQRURQt
+aK3npZDx/Px8+r73v7/zf//Zn/bu9LXeLhJ3egJvh3Z3d/cBWMzcBuNJ7/yz3vun01F6//bODpZX
+lrG6sorhaOjjJPHz8/M0Nz9P7XYbcRwjSWI0W020p9qUxDHlee43Nzf96toqOp1dMHskcXz/1FT7
+6dnZmWdPnTz51K9/9rNTe3//d37n944kqKbu9ATeDu3u7k78Ozf5dJqm7/HO/pBz+PBoNHpge3sb
+K8srWF5eQafbgdKa2u022u02iARGoxGYGcwMQQJxFME7hzzPaDgcYX1tHUmcIEkSRFGMOI4eJCFy
+ZuZG0hj+3u/9n899+tP/sLIJtnd2983zKNCRZIB77713ApcfDIbntZTvB/ABZ+2Dw8EAm5ubWFlZ
+wdbWtjfWot1uU9JIIKSENQZZliLLMhhj4JwFEZUeAIwx6PZ6fmV1Fc1WS7TbbczOzkJr/SB7PwBj
+dYBBB8Bz5Rx+6Rc/cyRjBUfeBmDmc2maPgvgh421PzAcDZO1tXW8+eabuHL1Knq9PkspaardRtJI
+IIRAbgylaUpZmsFaC+89ASD2DOccjLEYjVLKshxgpqTRQLvdQpIkkgjHnPMuz83gg//Zhzf+wx//
+0ZH2DI6UDdDpdCb0rHd+Os/zB4noSWZ+yFqb9Ht9rK+vY2V5xe/u7LJzjrTWUFqDGHDWwjkHzwwA
+RKAwZrF/lVKIoxhSSKSjlNbW13l5edl3Oh1476G1jqIoekgp9WSc6If+0T/6+Zn6nP75P//fj5Qt
+cKRUwMzMzKToHw5Oa60vENHjzrmzo9EQGxsbuH7tOlbX1nkwGGJqaoqSOEEcx9CRBglBGkCkNYzW
+YO9BBQ+AiDTAznnoKEKWZeh0Ory8vMKzs7NotdqYmppCFOl74jh6Ior0K3PzM8sAKinwj//xf3uk
+VMGRYoA6MbPudnsnANwjhFjK8zzq9fpYW1/H2vo6hoMBlJTUbDbRareQNBLESUJCiCD2nWdrLMAM
+ISwAEFkCCUHee240G7DGYDgaUme3w2tra1hYWEAcJ1BKRlEcLSmt7tFanQDwGoD8jt6Qt0lHSgXs
+oSkh6JgQ4jgR5nKTY7fTwdraGra2tmGMpThJ0G630Wg2EMVxeEQRoiiCjjS0VlCFelBaQSkFrRS0
+1sFFbCSQUmI4GtLGxiY2NjYxHA5BRIi0noui6HgURcee/ejf2ecWHhU6ygwQCykaJChmhsyzHL1e
+D51uD7nJoSNN7XYLzVYTkY4giEAAU3gOmTBE4Z/hHyAiEBETEbRSSJLgBhIRjUYj9LpdjEZDeO8h
+lSKtdRxFOjm+dDy+o3fiFujIqgAASgoRERA571SWZRgORxiNRvDOI04SREnQ+yCQtRZCCBARrDEw
+1sBZC+s8vAtZY+w92Dsq7QKlFAe0kGCMwXA0QpZl8N5BCqEirVUcxbrdmjqy3tRRZgAWJDwzO++8
+s87Bew9BAkpraK0hhIBzDnmewzkHZy2IiK21yNKMsjwvcQACg521cNaSNQbOuQASCQGpFIQQYGa4
+4DZCCOmUUi6KIqdVdKQMvzodaQZgZgaDvffBmCNASgkpgmazxiLLMjhrIaWELbB/5x3y3MBZB+9c
+kABcYADOwgRGgPOBqUofkb2H8x7sGUIRtNYcRTEirb/HAHeA2DnvBcgD7GUVyw8731qLNE1LQ48j
+rQlEkILB3hMzM4IVACIwA8QFT3nvYJ3lkC9owb5Y3woyYADkhRBeKemllN9jgDtB1jkokgQQCSEh
+pQQJAe89rLUwWsPaENkjISClhBACIIKQjqSUYGYUdiEAgJlhpASMhS+QQWsdlPLw3qPgGwhBJKUk
+qSSkPrImwNFmAOcdJAfDTggR9LRnlDvXM5OUElEcI0kSjuMYRETOBT3urAMAeC9AVIoDsHMOzjky
+1oIZ8N6zK2wMZpSfHT+OsC91pBmAvScwV9vXM8N5B+c9QAWsG8eI4xhRpKGUAoPDgteORATmKcQ7
+M6y2cDbsfClF8Z1C/4MrhpNSQAii8rtHkY4wAzCV2piBIK6th3NhVyupEEUR6yiClBIAkWcPZmbv
+ffl3IdKBAIkQExEFy1+yVgEcKo1KLgxAYCwBCslzZDngCDNABeegNNy8dwADUgRXUClFRATvPAxK
+1y5gAtZYWGfh3TgWwOyJmRGkSsEIUkFKyUJS8XOlDRBsCikllDq6t/HozhyoFs770kALiymlhJIS
+JCjYBM5C+MJGQDDsnA/un2cP4rCbi7UPj8L1I4HKeJRSQgSxX+j+MKaSR/c2Ht2ZFxREeCmWg16W
+MhiG7D2ss2AAgvwkA1hX+PQegghMAegBjxmrpJKptNLQSkMVDEEFYijE97yAQ6cikaPmlgkoJSGl
+Klw9rnS89x4MoLTkiwOhyHMD5sAYWrlCCnA1ZmUnFgCT1gpRUC1BChQMc5TpyDKAKeBarVW1Q4O+
+DrsfDHge++4h28fDOQuTG+R5DmPyIB2EgNUaUgS14ZnD+hNVz6WoV0pVKqGUFEfYBjy6DGCtLXbr
+eIFk4ZqBijTv3GA0GgVx78YPYyysMWEMcGXISSlBhVPv2cMXRmK5y0kQiILeJ4gCEADoeyrg8Gks
+/gt/oAJmwgI655BlObznQloEbECQAMAQUkCRAjOK3SzgPYPZVrYBc+n7F+NXaoEqMEiKoBqOKh3Z
+mZeql8LqVwzAzCGpcziCkDmSOIaUAs1GhGazgUYSQKGx64dK7+fGYBxWzpBmBtZYGGNgo2isToKl
+CBLhUIlU35MAh07sy8ov48UHEZzzsMYgzw0aDYlms4H5uVnMz89iYX4W7XYzZAcXn6/bBsNRiuFw
+hJ2dXezsdLG1vYssywtJ4uE4RAZLiSMK1aO/hwMcPlXin8Y+fNDvObx3SGKFUycWcN999+LMmVNY
+WFzE7OwMdJEr4D0X0HGI8TN75FmGPM/R7XSwvb2D5eUVKMlYdgagcS6Ax6Tdob8nAQ6fuLIBAiOU
+YBAANJsNzE638fBDD+Khhx/E4tJJqKgBFhppbtEbMDJjYYyDcwzmsJCCBCLdxPRcE43WDBqNJgCC
+cw79wQhUGJdlxlAQ/wpxHN25G3GLdGQZoHTPvC8CNUUMoNVMcOrkMZw+dRL3n38Ac4unMbIxtrYy
+bO3uYrc7Qq+fYZRZpJmB9x5EQKQlWonEdDvG7JTCTEujObWAk6cy5HmKjc1tNBthoUtbgEBQUiLS
+32OAO0LljnTOAcxIYo1jxxbg3BzmFk9g4FrYvJzijWvrePPqNlbWuuj2RugNMmTGIzcWnhlSELQU
+aDc1ptoxlhabOHV8CmeOJ4iRoDm1iHlPiGONSCsAXHgMQJmIclTpyDKAL0C40rfXSmC63YI/toju
+wGJnoLB8bRtvLI/w8mvrWFnZwfb2AMY4ZLmFZ8AW8X0pgkEXRxI6UpiZSbB0bAoPnJvBqXmJY22B
+hm5huh0hSTSkoBB8YgYz4SgnVx9ZBjA27Pqgu4FGotFqt9AfWawvd/DtKzt4/tUuLl3r4tryLjDK
+gNwBgoLvV7iPAOCKhxkGBHFne4Q3Vwe4sj7AmcUID56SuO+4wPR0FIxIVSSQFEAUH2E4+MgygDXh
+RK+MGZIEoDRIRNjuM771Rh9f+eYGvvHqNvLdETDIABkWF1JUYE4R+QkDMsJKega8BzKH1dxhc1ui
+39ewpoHFuSZOehEYQBIsqPr4UaUDZ4B//fu/PwuQATj7+5/6lL1d43rnIGRYDEGAdUAvZVxaHuH5
+13bwzde3ka/1UeVwSVGG8gsq/lHleCH8O+SOAJ6AzMOmFq86Ay2BMycM7j2LwvcXBe/QvujhrdK/
+/Ff/VgGIAegf/wf/5YEWHjgECUCLAAYAugBuGwNQAchEOujfzDjs9HK8udLHpWtdpOt9YJgDiQIi
+CTQ0oCWkDn67FNW54AoPsNbDWQ9YBnIPeACZg991WN7MsbZj0U8ZDIJSISFFiGAI3k4SAjGAaQBt
+AEebAZj5fgAbCIu/r97e2yUpASEJWgl4D1jH6A4s1rdTbOykwCAPslkLiJkES/MtHFtoYqqdoN3S
+UEpAyQI6th5ZbtHvZ+j2c2ztptjuZPADG1RCyugOgc4QGOWAY0AQQckgWJS67UZgE8AJAMcRDp4e
+GB04AxDRWQR5u3VbxxUUYvKCIMBwjjFKLXZ7GfKhCb8438Tp++bxwLl53H/PLO45MYPpqRitVhQs
+fwGwDzGAPDfY7abY6YxwbbWHq6t9XF7uYf06AwMDY4IdaRzBe4CIIQQKCXC7w8HcALAI4OxtHngf
+HYYR+AAAA+Ba/cV//fv/hv7+p37sFuznQoSLEKVznpEbh+Go2LWzDTz8yBI+9P6zeOrCSdxzcgbz
+s80QERQE60KCJ7MvIF6HURqSRDa3+7i62sVLr27jrxXh6pUeAEJqGNaF4Uu9T0QQt8gAN7gXLQCn
+ADx4SwO/BToMBjgDYF0IMXGCttfr39qoZcJGYc1b62GshyRgfrGFk4st/NAz9+KjP3Af7j0zC6Uk
+stxhu5tiMDJIMxtcSc8APJQElGQ0GwrnTk1haT7C4rSCVoyvSKAzDPCvsQxrgTIdmejWE0LiePJw
+sfccE9ECEc7c0sBvgQ7DBjhLRFcBNPa8c0vjSkkhXZuD+M9NyAhemG3giYcX8fgDx/CBp07j9Ikp
+9IYG19e2sbzex9rWALu9FFnmwncQxHikCa1EYX46wsKsxvyUxPGFBE88OIXM5HhzNUW7IQubgeHC
+WTIIoltWAfUzCgU1ABwD6NwtDfwW6DAkwCwzt621E4D57OzsLQ2qpISUBG898tzDe0a7qfDQvbOw
+dgr3n52DEISXXt/Ei69t4pU3trCy3kN/aDAYmWD1u8CEUgQx3owlWg2NY3MJzp1s4N6TMaRgnDsR
+Q0nCVFsjUiH+YG04jBrsgFtjgOFosiq9lDJi5jaAuVsa+C3QYUiAKe99K8uyCQnwyU/+57c0riRi
+QcTGMnLroJTA4lwD58/OoNsPyRx/++IKXru8i+deXsPyWg/5KA9mu+ewclVWCVCkDgMgJInC8YUE
+D59r4cScRDNhLEwJzM9rTDUlhACMY0jBIBAL0C2Js+efn+hSA611w1rbYuYDrzxyKEig916ORiNd
+/J4FAEG3dtOsZWIwqSIo00gU5mcSdPsjLK93cfFyBy++to1LVzvornQDUkQAYhUWmvwYBQTGzGA8
+0n6Oy50MO90Mx+ckzh7XOH0sRisBppqESBeeAADPITv8Vq7lNz7769W9YGb1xT/6D9o5J/kQMObD
+YADy3os8NxI1BrhVynILzYRGQqSVRCsBokigN8zxyhs7+OtvruHiGzvAKBSCQlMXPtvetaqnfxOg
+RACALKO7naHbZfQHCsyMc6cctARiTZAyHCRzDrDutrqBSkkpiQ7nyOlhMIBjhufqkP3toaTR9N57
+H2nlAeaMGGnmcG21j5cvbuPipW1gazRGAhM9ueNLor1/FzEDcEAEhxYr3qPV0nika2EdQ0lCpAQz
+syehfBQ3b280gMJxx+JxoHQoKoAITCTG6Tu3gSKt2RjjpZbhxGdm0O0bXF8f4Pr6AOjnAMDQkqAl
+hJaslSCtBJQK2T/Fmc+QF+gZ1joY52Ess1c+sEYGRuqx1XXY6jqMsrAmShJXRSJub4UQ5nqq0wHT
+YUUDWQgqufq20PTM9CjPshQkLciwsYzewGBzJ+hu5A7QgtCKuNWKMDMV03QrRrOhkMQaSgYkEQw4
+52GsxXBkMEgNegND/ZHl4cgCmSM4z/0RozvkAAV7QAqwkMI2m0n65FNP3c7mUr7GAAfOBIfFALTn
++buiX/u1X6df/dVf2XszxGg0VFHckAAL5xmZYQxGFj73wdCbbeD+s7M4e3IGJ5faWJpvodWM0EpU
+OORJALOHMQ55btHtp+gNMqxvD7C2PcLKxhDXHAO9HMYBqQGMBbxjeGYBa2WWjdTlN1/fp69/8Zd+
+iT73G7/xdhbwlu7Vd0tHIh/gBouPL3/pz1tLx4/NtOKltoqiyBUBIWM5uHqzDTxw/wK//12n6NHz
+x3DmxDQvLbQoiRWSKGTxUlH4ITcGxlh0eykGwwyrmz1e3ujRa5c7AJivXfdF3SHAeoLzgLMuSk3W
+3tramnnxxRdbAHbq83ubi1/Q4R01OxIMsJcWFs8e+49f+tLj3/d977kwO6XPLCwuNpwHPBOUFDi+
+2MLCbIwPve8sPvR9Z/HwfYuYn21iZioJhr4M5//KTGKTh2Nig2GKPDfY2m1ic7uFkwsRkgiQ5NFP
+izQBT3BMMNY1dnZ7Z5aXVy68/PK33rzn3keyq29+e+NO35vvlo4iA7SffNcjT3Y6u09vbW891en2
+Tk/PzCrvQ6LG7HTMD983Rw+dm8Wz77sH3//EKRw/NoVQ7SMc/wIYznt4R3CeIIpYAKDRiAlKNjDd
+BGLlYE2ONM1wfTNHMxEMIvKeYK1T/cHwdLfTeWo4HO489sh5e/XNb38FwC0GOQ6XjhQDPP30DyxY
+y++Znml/zBjz9Gg4fHw4StvGMjxCVu99p6dw36kmP/HQIt574Tjde2YGkLoI+pTVRHyRBOLDqaDi
+dBAXuYJaCehWBFpqIB21qN9vcSsR3GhKRCpIAOsYaWaOpVnWcNbJqXar9eyHP0KRpuf++I//7LaG
+vg+S7sp01p/7uZ/bpwSfeeaZ5J57zr7r2NLihyKtf9Czf9w517aW4cLu59mpmM/fM43Hzs/h/jPT
+mJ2KQ9Gn3KA/yNDrZ+gPM/SHOfrDHIPR+NEvnwc5BiOLUebATGg3JU4uaNyzpLE0K9GMBRPAnssz
+Ca7N4Me1Vj84Nzv7oWPHjr/r4x//WPJWruluoLtSAvzu7/7uhAH1C7/wCzPr6+vvZua/673/sFLy
+vQAo7GKAIRApycfmG/BmiuIIODabQElCbnww2ioJgCKdm6ts3vJwaIUHFJVDrfOQAphuCpyYEyAp
+MNUkDmEEIj921NpCivfGcQyto+j48VP+M5/5zPO/9Vu/1bnZNd0tdFdKgDr9yq/8iur3+49KKT8o
+hPiQlPICFdkYRAIgwQTiSAvMtCKan4nQboRycMORwWBokGYu5Pv5IO6rBd/z8IUqsNYjyx2GaQB+
+mD1iDbQbQCMCBXuBGBCMcWIISSkuCCE+REQfHAwGj/7yL//yXX9o8K5mgJ/5mZ+J19fXH/XeP0tE
+f4eI3ktEjXEiSMBMEQ5oUquhMNXUaMQh6dMz2BcLXhX4Kihs3v1MAC5GDfg1vGcmMLT0SDQj1gwp
+QjrSuDpBVaOgUczxI977D25sbDzykz/5k3f1saG7UgWUJIQ4wcxPAvh+AI+haHJVRMl8We6/SMog
+KYmJimKPLux4z1zrjEVlCbBAtWpgVRWQsjA0APYBJbSuPHjqISiUluVQJCAkBxbB5GJUCeBRZt4E
+cDWO4y6Aqwd1j26V7moJQERnmfk9AN5DRMf2598Xq1EVbCSSZQm32lpXa87lvg9/lzUBJ6QAMKkW
+qqJR1YPK6iBALXQ0Gbo9AeA9AJ4ionsO7AbdBrprGeCnf/qnNYAFhJzCE/s+EBaeRDimTQCBmeA8
+yHsmDjF64lDRgQEeJyB8h+peYy1QmolMzEzeM3nHVDsKVpkixXRqUyMAWAJwmojmP/3pT9+1tsBd
+ywBCCIVwMGIO4ZRMSZ5CNhCVBRuBmn9fJIiMDfTxzi7/Lj8fLP/J3VvaBX6vfVCOu4dxikIj9TKi
+xes0hXC4o4G7uD/jXWsDJEkiioaOXF/kopMHWWu57OrBzrOzjmzoCch1vc8c8rWoPNBfjDNWDVzZ
+AjWVwMzhK8U/6yqi3PGVVqlqEU6qE0tEDgAnyT5Y4K6hu5YBZmZmRLfbFcxM9V1b3ugSxy+LPjrv
+kWVZUfqtjKZwuUJj474Yh4vvByTQjccNi0dcLagn9hVzjMGD8lwCxnaCr7mYKBI6hBBYWFi4K0Eg
+4C5mgM997nPDT33qU4MkSUZEVPUAGA6HkFIizzKyxoQ+wHkGYS3nWQ7nLAkhi/OeIdtzUsSPwaCA
+C7jKW/Clc7jPNSx3P1cSqSb2wZ7LfgJkjCk7luTe++FoNOr/9m//dnYn7uFboTtuA7z88st08eLF
+G+0Qt729bQaDgc2yjMvKoEIIiqMIjUYDURSBmZFlOY9GI2R5FuoBYpxrX4nomkVfShDnbMVYZRnZ
++mfYh0e9tHxtpwcIgsYVRIUQAKqqJZxlmet0OuZG1/3lL3+Znn/++ZtIhsMDDQ9TAtzwYh977LGb
+Xm2WZc47xxRFUEXt/larxVNTU3Ti+HGem5uDjiKy1lKpDoLWH5+1qInkylSvDD3nKwYAQmpYmQ+4
+1w2s2QNUdg5hZkgpOU5iNEwTzoXmVIV6Iu893ax8zAc/+MHvsMqVT3HgquMQGaCC794SfeELXzj2
+1a9+9eRwOJwSQlCx+Gg0GpiZmcHc3ByWjh1Ds9kM5eGsYWstVfqfMSnG61TYAKEfUGAAAmGv6Pfs
+K1uh6B5GhfTg0jaRSqPVakHKUDuoZAAiUlLK2QsXHj/7T/7JLx3/4Ad/cO2t3qjv5j7dKh0KAzCz
+z/MsB/AddeHrr7/eOH/+fAzgxPXr1x+IoujC5ubmkrUWURSh3Q7Nm1utFidJgkjrAvVzcAVaVzpj
+lZVfMkBZEKT+uvehbZx1oOJQSGnn+RoTjI27crziNYQq4knShI5iaCVZRxEJIiildavVPDU/v/Bk
+uz3VuXbt2mWt1dq3X3lldP3a9e2f+ImfuKEEIKLsi1/8vzJmPpS6I4eWFOrKOm41WllZbg2Ho7k4
+jo8ppWaklMf7/f4MEZ1pNBpnHnrooQunz5w55Z2D1hpJo4FmowGpFMBclHUdIsvzsJAcGkfuXfwS
+4y/TvksVUC8cXTadQlkyvrbzPfvCDqjVJyaCoFChXEcRNJiTJEGz0UAcR4jjRLZarbPtdhve+2Nb
+W1urRLTcbrV3H3nkkZXnnntuh4hWAew89dRTE0UgnPcWCFDEQS/MgTOAtdYbY+1wOJrorr2xsXHO
+OXdfkiTnpJQPCCGWhBAnjTFTQogFIcTU9PT03NTUVBO1qpwidPeGMabUs+NFmZCeNSiIuaojXIoI
+BsNxUT7eWihZ5AkWHUInQaBwlLwKLFEoDyOVhBCCiIh9EW4WUiKKYiRJgjiO54UQTef8CSI3EEJs
+CyEGAFaZed17/zozX/7a17526X3ve99rBW4ApZQ1xjgStG/T3G46jLOBLIRQS0vHZv7tv/uDMx//
+kY8Re3641+8/TkQPSSnPCSHuJ6JFZp5nZlFW4hRSQoRegAxm750jYwxZaynP89LvD6hNHY3d68bt
+mxMqI9CYgCN4paARILtJi7/EC+pt44ikFKxDiXlCOP3EQRU5HxJFWHjnlbOuba1tl/GKAtTqMvMO
+gDeY+TIzv/rCN77xzdWV668A5F/+9quLeZ5Fvix9eoB04AyglILSemphcf7+hx54MBkMhgtCiCcB
+PEZEZ4holohmgTEk68tFc64UyVwugqu5beUzECqGENM4ZFNngDIyhEn54Av7wRReQNV7MPj8NQi4
+fIzbyAohqv5BAMM5R9YYzvMcmcogSHgZGgsUreklmKuTxNNENM3Mi8z8IDM/luX5Iyur6y8KQdtE
+dJyEuLXj02+RDpwBpqenoyiKzszMTD/TaCTOWntCCPEQM+8L8OxF+saQbUDknAtGm3WuYAhPHCo1
+oogMltHcmv/vIcY9H0DVcSBUnkChTqqoYmkzsB9LgHGcgYuTTkRSFBIqnHqqMILQY9CRK4zTYKBy
+odInDPwWgBYzn3bOnXfOPeY9rxljyFm3ZKw98FyCA2eA+fnZJIqiM81tqndBAAAVSUlEQVRm84QQ
+IvbezwJo1uHdkth7X6Rrs/fFgnPwpyvL2wcEj0unvMRkC/VfLjzqO1jUfmOPSijxA/YeVkrowrOY
+kAKVKhnbFbXOoVy2likZtVIb4Tq4mDujYNYQxKyVuQ/zmHfOTxlru1mWpXmeU55nBy+hD/oHZmZm
+YinltFa6AUxW9d7LBOy98Fw0diw6ddZAFXjvuNxNQGGJF2VeaUK479fjJYlaYKl8z1oLh6L+X50B
+9kiA0gsosn+qDiVlj6LabxJXaQJcxBJ8FUou8wnGz2FOzjltjFkIDa2yNEuz9ACXBsAhMECkI0FE
+qrTCS53NY4VaBntKkGWsBlxo0uCLPn+uaPXu/bh9qyCJPWtfBfW5vOM18oVHUBEzfBFVNEUfIVF2
+Ct0XF5j8mRueNgaKE+fj9/ZEIhDSFAIqUUgQCsfBC4DKWhhjhDH5gUP1hwYE1d21giYQrwp2re36
+0ODRVwWhrXPki3Bv2amDC/y9GrK0GzAO4lS/ART1fSdfL6UAEcEYA6VULTro90iBPVPfU2OCuewm
+x7V3qxDzxPWXuQRCEJhF1e8ojBPUx9u742+dDgUHICJDJEgI0rgJzLnH7RqrgLD4bK2DdZaccwGC
+lRIyNIIcx2dRQfkon3jPb3i+AWMwV16Fsbamz3mCCWqMQ2XyYK28RF0NlTMYp68GsXODBaXim1Uf
+YhZEhoiMEHT03cCxdQ3yflJm7lkEKm9w6XO7ws0zYfErt6809KSUtTHGemC/8TZhZ0x4GeEbCB3H
+rYXJ86pORBUF9OMHar+2XwPUWK4am+sfpD1Cb4JKRiEKfYsPo0jIYTAACyEqRqhn99Seq6bNBfLG
+NUsa3jvyod0r25rfXyxmlaFDkyL3hmDQxO/wGGutpICzEC4UkKhjAJ5LZJbL1OFxaHHvxi7VANdy
+U1DMsvYPlAKrGmHckzj0Jzz4mNBh2QATf+/blTzeNcwMF/Q/F7qfrK3EM5VGZNCbe2yKcaTnhh5A
+ncrYf91IHNsCAqoK647PEpaG4DgTBAC4TA6rSZRKslBN99NeRinxqb3B37F0eQcwwD45hwkmoNr7
+vGfX0hgTcBUI5FzR49eX2p8qN2w8ECaYYN98biAByve88/DCwYMqCVAZpzzGF+q/NeFtFHOqeAJl
+bmH9A+XqVhPnIndpPAQw6a0cEB0aA3DN/dq382uf5SLhwo+tf6rH7a1zkEIGd65cfBDqpfoYqM7/
+32xOZfevfcag9xDWgTDuEFZ6Jjf6/FhFcHFaZMwMjLFdE1QVYw/Pjal0HWm8+w/cBcAhqoAqGld7
+re4YEVG1U+o3zvtiVxb2AHuPypYsAUCiiQ1ItUUBc802H4toz/vc0uozvmKQm9gSNPn5UjVUD9Sk
+wuT75fTKqU5SJfYrU+bA6Y6ogNrr+0xiLpAz731Y+OD/F0kfwTso8fwxGlcfuAbg+DLNs3yLAV8T
+9fuxiUo6eKJaLiDqK1utU/k7BUqJsotZiRpWeQTlLHhCqdddA54MZh9eUtChpYTdjBFu+FmUO6sG
+wpRZP+whS6uK9ujJuhq+gQ3AHOICN97VdeSufiSsNnBtS5afDsmmvkhGdXtAozH7VX8xY+/W5gpW
+oImx37FGYEl7Ld3y1pQLX2/5HiRA0TJeqbD4osTTa9+v2Rfs/URdugkJUKiTUndMCJFCl5f/7Zt3
+lXVahII9V/hEwCr2ZxlXVuHN7lM19vj5EGzAu+xcQF3vc5m3P2aEulFXYQp77lLwBGv6t/xOmepV
+lwAYewzVlydGKg3M/VMNKWHFtEv7hDEx10kV89Yk4Ngo2jehA6HDaBnzlj/LQJV6NQaCynhAeAhB
+leEnykhcXYrQ2DUL4JMoPLNiN3uelAA3EOuTDnkd8RkDz+XviwKt886DyU+eM3B+j62xX/zf4I5V
+i///Ewkwhsgrn7vKxK1Z2ZU4Lo6D01gQj2nC3ENwpcaGATPD1423miQYz2Xv7AiVnuHabxCN+xYV
+iI4vVEF94euJpTVE6OZscDi2X0WH0TYu/H8cqql2UZ3Ght+kBCj/5rr4F1U9gP0SpvLJASJfSxIK
+WH7pjt7Ir98zm0oP7802YBQSQMgqz4/BVch678MXTFGBUDe4Q1STNuNcgbd8k982HYIK+E+/z/Wd
+hbpPvcdaZw47j8Q4EWMPTRiCqNsEwbgcG24e9SNfN5/8GGyqxiZUuz8wQM19LELYpfryrp7YchMj
+sBAJJbA1ZoJ3gA2wl258r+uACY996MK/Hp/UDbtSVBm24gY4QNjpXBPVJfOU6GFYLAdnx8Zb+dm9
+VGabldMsn4kIUooyNRwAggoo5lyeOA5MUGYU75c4VaWR2q7fmy52kHSIDMA3Wfzy3fFnJnR0XQXU
+d0nlBewZh1EwAAAKNaOLuj5VV1hw6CnpNWANwWgC+0k0cUx7ZHFhzJVROylEkRg6hrl93dDk8cFU
+v0falOqolrQ8KQW+21v8NuiO4QD1AE6pAZjHGICvSYGxmK7XAypsgLoHUBp6lQcAgEODyLCzGAKB
+wQiMsvmjFJjMKyzd9moxxu/V/XUpJZTWCOcDFIhMZWzWYwSlVOOayhE1NLPUASVD08TrB0t31guo
+WVZ1I7C8YdhTlqUEf0Iu4PgGTdoMYUAlQ1sXJQlEYxXAjFqeQQCCwlm+MJ5nKhpDhocsOoMKSZX0
+KOcTqpPJ4uTy2CCs2buF0XdjCVDdhhqiWXkdN8EfbjcdqgS4iU6rXIP6jhnvwrIQmICQgqWUkFJW
+xhdqbBRMhPHuJoSzJblxyIxDmjkYwzBFZ5C8KDDB3kBSKBgtJRUeBMCF6ggSJCxMwagMgISQUEqx
+1hG01qFGgBRlVg8qx7Fkaj/JBMXC06QEKB/1Szs4uqMSgMeG+hgx54ofxqKQiIudT6X4JzFRAgBA
+iBFpRZAUsPXceoxSi+1ujk7fYLdnMMo80tzBWEZuLNg7xNpjtkVYnBaYbhMiFXqTO0dBAghACYas
+lqqsPkaQUpIuahcoJUsVxYWLWnm/tTIz46ufkBVjiVb+9Q5xA8fGURkWrt5DqTKZwDxxb+quUKkv
+S3ErZaECaiHmUlxDAnnuMBwZrG+nWNvOcG19iO2uwXbHYJR7pLlHbovGkcxoNwgn5iQeOB3hrBCY
+n5YQBBjPyDKPLPewDtXvlEndoYO4QhRpxHGMPM8BAqRS4VxjyazlZTFPqKoKoqigobpxeziI0KFJ
+gNLinWAC5hteZiEaubC0SRTJcUUmMFeHLLkAeZmhJFgEjsBgZHBtbYhvvdnDm8sjXF4dYXdg0enb
+YueHxfcMOMdoJQLHZhUGqYdxwbpvJQK5EeiOgO6Q4XKPOebgUQQlQABBSsFKa0SRho40mEFSSRqr
+qeI6CiBhjGhydflEVd2hQ3H96nQoEuBGMXdgQsNNfKJ0sYSUkMGnIhYi6FulIIWsMH5CyA9UkpBa
+RrdvcOl6Hy+8tovnXuniylqG9R0DtgxkBfZfWY0AHGMgCYOeRG4cQgtiwrG5CM4xrm8xtjYZkhlz
+c2GmQgQ7QwiClApxFKORNGCthWfPSmkqbAKuM0KBSlU/TzUXZq///47xAvamgdWpWEDef50B6y8B
+HxTp36owAEsVQERQSkBJASU9+oMMa9sZXrrUx998q4cXLg5g+i50EJMEwAHSI3QNLVp/uoIRcsLK
+Rg5JBsQWxxebIFK4uuqxuwO0NOFUJsAkQkMJJeC9nFQBJof3HlKKQlXVDFaxh91LXYBJJkDJCBUC
+ebB04AxQpoQD++yAwvTFpBlExKGnnwh5/wBxaDlXHDVXEEJWJV20Eoh0OHrd6Vt+/eoQz7/axTcv
+9WE20lAHTXuoFqMZOTQjpoZmaAlWMtT8tx48yhzl1sMbxyvrDr2BgaMYy5s5ej3CfEvj/Egjd6pY
+YMB5glQKcRyj2WwU7qWFIMFKq+AZaMVSFYxA1SmmqsI0atZguAdlajhV5xgPkg5FAtTVQI2rCxcJ
+hT0NhMsXJARBsgAVu6i0CbTWiKMISdKgOA6Vw5rNCLEWGKaGOkPGG6s5Li2nyHdzABY0RTg2ZbE4
+w5hrMdoJcbshEGtFkZIgIeAZNMo994YOw9TSKB9hOMjRSSOsbnq4oYPzGt2sCYMGojhBI4kghEOj
+kZAxbXjvWWsN5xwzmGoeS90eqIn2MYYRjILg++1XAwdLh9I7eN8L4eK4njIFoLhhXCz62DcWQngh
+JWulSClFWmuWImB6BA/nGINhjrXtFNfWR9jqpIBPSU0bnD9OOL3gsTQrsTCj0W5GmG4niKOIkzgi
+pRRAgp1n9IcG3X6K1a0hVrdSYGOEdXIYOYHUaO6lGv1MIM0drM3BPtgfcRKjzVOIoqhEMT0YwnPo
+PlpKMyELVVBbfwBcZhmWAHAFJr0T3EDUMLF64ANFkcoSuStFnyx8OVEucBCHgigUbiiTLTJCONMf
+/sDqdobV9R10e0NoMohmDN97zOCRMxKnFhXmphuYm2lT0mjSVLuFOI6RJAlrrSGlIikJubFIRyOs
+be7y9bUdzLS6YG9wkT2gmIapxdbOACtrW2A7AEOgN7RVrEIqCcmycO65EnFl/oIq1EANdK5UfbAG
+DicJpE6H1Du4EmfhMvcZhsG5Lo0lIYRl9t5aK5xzKh/lEyVhrLXw3sFag0iGLJy1HYsrVwYY9buY
+baSYb1o8egZ44LTC8cUptFrTmJqeRZy00GpPIQoMAK0VtNJQqjgJ5HIsLHRwfLGNufYqYr2DSKXY
+6Fvkow6uXvN4OdnB5lzA/40VkEqDqIgMEkEpDaUVoihyWqtUScVEpIkoFnsWOcg53ivuSz/xO4TP
+bg8dlgqQRBTd/AMEEDIiDISQHQZ3vfN5Okpb3V53qdPpLI5GI4zSFNaYUNTJWVhrQAgMsd1jbK4z
+lHc4PWdxchZ0dinmxblWWPjGDJLmDKKkiShpI4oj1nEcrPXgrpEigiCG1AmajRhaCYAkrNuiSys5
+cruD9dUOvmWB9WkKx9OhoXQEISS0DjZL0mig2WxidnZ2dXZmZiVuxkMCEgbm2ftpImoCSML9ryOD
+1XpHeKd0DxdCEPPECZmSsS0R9QEMGLxFoB2AN6JIr0gp14yx+erq6rGVldVHNjbWHx0MBseGw6E2
+xua5yT1757yzBDi2ltEdkeiNoigmGc9O6ejEnMLcTEKNRot11IbSTSgdRL7SEkpJKCVJSgEpBQsp
+uBLVuomkxZibS3H6hKGdToo8z7Gy0Xe93TS/luam1wQrJYiEJqU0E0mllCQlZZQ0G1m71V7Osuwb
+cRS9eOLEiU1BlBhjTqRZdpyIFikUxloEUOsrMGYCBgQfQp+Bw/ACplDpewYCV28C2AZ4pfj7OhFt
+MON6s9m8Pjc7u9brD8xf/MVfnnzjjTeWd3a2d7I8P5PnecM5l3vnHYEtERPgrWdyWSa1BJbasTo9
+1ZBLSSxAFMFyTMYrFp5CG7jioGkJMZfh5vLMIZGAMQ7eCTjEUDpBqxlhti3Q69punpm1LEu3RoKs
+IAgSuSouT1Oo/RNFke7FcfLGYDD4iiD6+jNPP72sldLrGxtLWZ6fJKITABaZcYaIFgA+TYRFIiwB
+aBTBsAi4udS8XXQYEkBwqBCSEdE6gDVmvgRgmRmXmbEBYJmIdoho4+zZc5tEVFbYvvTUU0+tz87O
+Xoui6IQQokmheIIXgqySQhBhxFDGOxdr7R+OI/eeRPuYwDOhmbSHtZakNT43OREBQhYLD66qgYxD
+uQRjLRuTi1GaI80NwB6J9r1WzN+G5RescRe9lxmDNXkkzlt4Zs3eSx8eHWvMlReef/6Fz372s6/+
+7M/+bHk9r7z00ktz3vtFZp5l5pMA5olwlohOEdF5AKeY+QSzb4E5vsEtva10GAww8N73KZRF/TYz
+vw7gFYRqmdeZucvMu1rr7MKFC3tLq+df//rXXzt58uTuvffeOz07MxPpKPJxHLPWysdRRI0kGiSN
+dr661Yvy3KwRfMTen81zOzMYZRBqBKk0QERKCmb2BELZeQROh7y9yvVkcJ5nNBwOsb3TwfZOF/3h
+EM7aTS3xQjPRX0LcfvHE0kxubR5Zy61QqNqpUNfHoN/rDVaWl7defPnlNQAT13ThwoWdS29c2h32
+h7GHe1NK0bTWn1BKHWfGgwDOe+8f9Z5PMXj+oNfnwBlASvk3RLTJzBcBPM/MF733V7TWnSeeeGL0
+FobIV1ZWrq+srFz/T33wUz/290ZCNVtgec5asZBm2YyQIaZQIvCRjdh7T1ppstZyGceXSjKBmD0j
+TUfodnu0vb2N3d0ORsNBx9nsJbjRX7pR7y/+4A//sGoD91M/89+pza0NluTFYDDA5Tcv86VLl+x3
+muf9993PANLigevLl69MtWfbKyurr6Zpeq/z/pLz7v5CQhwoHYYE+FMA60KIN5j51cFgsPaBD3zg
+O5Y/+7Vf+6d04bEL+LFPfeq7coN+/9/8+7X/4pOffFmp6BuAOSWy9L0lluC8E845xHEMZ0PxaWNN
+1YdASEHeM5y1GA6G6Ha72NndRa/XxWAweD1N068PBv1vfv4P//Ba/Tf/xf/x2+Vi37Su7xe+8AW6
+dPEi/fc///M3tOpPnzrHAHrM/Mrf/u3XN40xm87ZS8x+6bu5/rdDh1Eq9osAOlEUrT/wwAO9t/Kd
+X/3Vf/q2/d/e+muvxGef+DKDI2QkvPcPMXPLGIM8yxHHMdIkQ6Q1tNYocfpSLeR5jtFwhMFggF6v
+PxyNhq8Oh8M/M3n65Vef++Nvo+arvVX6xCc+MeHj3YwoNKHc/B9+4X/cfejBhy5LIafexi34rujA
+GaDVar08PT2dE9244tU3vvENIiK8613vetuL/uM/9d/Qv/wXv8MA8Cd/+eLox04+8qJkFgFu9lsA
+nnDOLVprZZ7nyLMcumCACp5lVA2o0jT1aZpujUajb2ZZ9jfpaPT/ZOnopW9dS29b4cayXcxgMMAz
+zzwzce3/y//0P1sAG//Vj39s83b93s3okIHHw6OPfuSj03MLCxeUUu9SSn2/lPK81vqMVjpRSiVK
+KZJSytAjAK5wBVNjTJbn+bUsyy6mafrX6Sh9/vVXX33xxZdf7N7pazoIOnQGeOONN+i+++47cIgT
+AP7uxz7earQap7XWjwshHlZSPSKEOKGUWhJCxFLKqIBgjWefeec3rbVrxppvG2NeGQ6HL6yvrV/7
+6lf/qn8Y8/385z9PP/qjP3oo96akd6wEqNMP//DHTjcajQe11u+WUj4opbxXCDEjhEhC+iin3vue
+tfaKtfZimqbPd7qdV77851+6fKfnftD0/wHqxrHboq02DgAAAABJRU5ErkJggg==
+"
+ height="128"
+ width="128" />
+ </g>
+</svg>
diff --git a/demos/mobile/quickhit/main.cpp b/demos/mobile/quickhit/main.cpp
new file mode 100644
index 0000000000..e2eb8cf2a4
--- /dev/null
+++ b/demos/mobile/quickhit/main.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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/QApplication>
+#include <QDesktopWidget>
+#include "mainwindow.h"
+
+// Lock S60 orientation
+#ifdef Q_OS_SYMBIAN
+#include <eikenv.h>
+#include <eikappui.h>
+#include <aknenv.h>
+#include <aknappui.h>
+#endif
+
+#ifndef QT_NO_OPENGL
+ #include <QGLWidget>
+#endif
+
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+
+ // Lock S60 orientation
+#ifdef Q_OS_SYMBIAN
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
+ TRAPD(error,
+ if (appUi) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
+ }
+ );
+#endif
+
+ MainWindow w;
+
+#ifndef QT_NO_OPENGL
+ // Use QGLWidget to get the opengl support if available
+ QGLFormat format = QGLFormat::defaultFormat();
+ format.setSampleBuffers(false);
+
+ QGLWidget *glWidget = new QGLWidget(format);
+ glWidget->setAutoFillBackground(false);
+ w.setViewport(glWidget); // ownership of glWidget is taken
+#endif
+
+ QObject *rootObject = dynamic_cast<QObject*>(w.rootObject());
+
+ // For Qt.exit() from QML
+ QObject::connect((QObject*)w.engine(), SIGNAL(quit()), &a, SLOT(quit()));
+ // Level activation signal from QML
+ QObject::connect(rootObject, SIGNAL(levelActivated(int)), &w, SLOT(levelActivated(int)));
+
+#if defined (Q_OS_SYMBIAN) || defined (Q_WS_MAEMO_5)
+ w.setGeometry(QApplication::desktop()->screenGeometry());
+ w.showFullScreen();
+#else
+ w.setGeometry(100,100,360,640);
+ w.setFixedSize(360,640);
+ w.show();
+#endif
+
+ return a.exec();
+}
diff --git a/demos/mobile/quickhit/mainwindow.cpp b/demos/mobile/quickhit/mainwindow.cpp
new file mode 100644
index 0000000000..51c440b16e
--- /dev/null
+++ b/demos/mobile/quickhit/mainwindow.cpp
@@ -0,0 +1,248 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "mainwindow.h"
+#include "gameengine.h"
+#include "plugins/levelplugininterface.h"
+
+#include <QDebug>
+#include <QDir>
+#include <QMessageBox>
+#include <QLibraryInfo>
+#include <QDeclarativeEngine>
+#include <QDesktopWidget>
+
+MainWindow::MainWindow(QWidget *parent)
+ : QDeclarativeView(parent)
+{
+
+#ifdef Q_WS_MAEMO_5
+ window()->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+#endif
+
+ // Game engine
+ m_gameEngine = new GameEngine(this);
+
+ // Load all levels plugins
+ m_levelPlugin = 0;
+ loadLevelPlugins();
+
+ // QML main window
+ engine()->addImportPath("./imports");
+ setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+ // Set game engine visible to QML
+ rootContext()->setContextProperty("GameEngine", m_gameEngine);
+
+ // Set QML source
+ setSource(QUrl("qrc:/Game.qml"));
+ //setSource(QUrl("../QuickHit/Game.qml"));
+
+ // Store QML root object for game engine
+ QObject *ro = static_cast<QObject*>(rootObject());
+ m_gameEngine->setGameQml(ro);
+ m_gameEngine->findQmlObjects();
+
+ // Application foreground / background event filter for filterin incoming call (window)
+ // when game will be paused
+ m_eventFilter = new MyEventFilter(this);
+ QObject::connect(m_eventFilter,SIGNAL(activationChangeFiltered()),this,SLOT(activationChangeFiltered()));
+ qApp->installEventFilter(m_eventFilter);
+
+ // Remove context menu from the all widgets
+ QWidgetList widgets = QApplication::allWidgets();
+ QWidget* w = 0;
+ foreach (w,widgets){
+ w->setContextMenuPolicy(Qt::NoContextMenu);
+ }
+}
+
+MainWindow::~MainWindow()
+{
+ for (int i=0;i<m_plugins.count();i++) {
+ m_plugins[i]->unload();
+ }
+ m_plugins.clear();
+
+}
+
+void MainWindow::activationChangeFiltered()
+{
+ m_gameEngine->pauseGame();
+}
+
+void MainWindow::levelActivated(int index)
+{
+ // Set level for the game engine
+ createPlugin(index);
+ rootContext()->setContextProperty("LevelPlugin", m_levelPlugin);
+ m_gameEngine->setGameLevel(m_levelPlugin);
+}
+
+void MainWindow::loadLevelPlugins()
+{
+#if defined (Q_OS_SYMBIAN)
+ bool exists_c = loadPlugins("c", "quickhitlevels");
+ bool exists_e = loadPlugins("e", "quickhitlevels");
+ bool exists_f = loadPlugins("f", "quickhitlevels");
+ if (exists_c || exists_e || exists_f) {
+ m_gameEngine->setPluginList(m_plugins);
+ createPlugin();
+ }
+ else {
+ //QMessageBox::information(this, "QuickHit", "Could not load any of the quickhitlevels");
+ }
+#else
+ if (loadPlugins("c", "quickhitlevels")) {
+ m_gameEngine->setPluginList(m_plugins);
+ createPlugin();
+ }
+ else {
+ //QMessageBox::information(this, "QuickHit", "Could not load any of the quickhitlevels");
+ }
+
+
+#endif
+}
+
+bool MainWindow::loadPlugins(QString drive, QString pluginDir)
+{
+#if defined (Q_OS_SYMBIAN)
+ QDir pluginsDir(drive + ":" + QLibraryInfo::location(QLibraryInfo::PluginsPath));
+#elif defined Q_OS_WIN32
+ QDir pluginsDir = QDir::currentPath();
+#else
+ QDir pluginsDir(QLibraryInfo::location(QLibraryInfo::PluginsPath));
+#endif
+ pluginsDir.cd(pluginDir);
+
+ qDebug() << "Loads plugins from : " << pluginsDir.path();
+
+ bool newPluginsLoaded = false;
+
+ foreach (QString fileName, pluginsDir.entryList(QDir::Files))
+ {
+ // Accept only plugin files
+#if defined (Q_OS_SYMBIAN)
+ if (fileName.contains(".qtplugin",Qt::CaseInsensitive)) {
+#elif defined (Q_WS_MAEMO_5)
+ if (fileName.contains(".so",Qt::CaseInsensitive)) {
+#else
+ if (fileName.contains(".dll",Qt::CaseInsensitive)) {
+#endif
+
+ // Create plugin loader
+ QPluginLoader* pluginLoader = new QPluginLoader(pluginsDir.absoluteFilePath(fileName));
+ // Load plugin
+ bool ret = pluginLoader->load();
+ if (!ret) {
+ // Loading failed
+ qDebug() << "Could not load plugin " << fileName;
+ } else {
+ // Loading done
+ // Test creating plugin
+ QObject *plugin = 0;
+ LevelPluginInterface* pluginIF = 0;
+ plugin = pluginLoader->instance();
+ pluginIF = qobject_cast<LevelPluginInterface*> (plugin);
+ if (pluginIF) {
+ qDebug() << "Plugin can be created";
+ // Store loader to array
+ m_plugins.append(pluginLoader);
+ newPluginsLoaded = true;
+ } else {
+ pluginLoader->unload();
+ qDebug() << "Plugin can NOT be created!";
+ }
+ }
+ }
+ }
+
+ return newPluginsLoaded;
+}
+
+
+void MainWindow::createPlugin(int index)
+{
+ if (index == -1) {
+ return;
+ }
+
+ m_levelPlugin = 0;
+
+ // Try to create plugin instance
+ QPluginLoader* pluginLoader = m_plugins[index];
+ QObject *plugin = pluginLoader->instance();
+ if (plugin) {
+ // Plugin instance created
+ // Cast plugin to LevelPluginInterface, that is common for all plugins
+ LevelPluginInterface* pluginIF = qobject_cast<LevelPluginInterface*> (plugin);
+ m_levelPlugin = pluginIF;
+ qDebug() << "Plugin created: " << index;
+ }
+ else {
+ qDebug() << "Creating plugin failed!";
+ QMessageBox::information(this, "QuickHit", "Could not create quickhitlevels");
+ }
+}
+
+void MainWindow::printObjectTree(QObject* parent)
+{
+ if (parent) {
+ qDebug() << "className:" << parent->metaObject()->className();
+ qDebug() << "objectName:" << parent->objectName();
+
+ QObjectList list = parent->children();
+ QObject* item;
+ foreach (item,list) {
+ if (item->children().count()>0) {
+ qDebug() << "--Childrens found--";
+ printObjectTree(item);
+ } else {
+ qDebug() << "className:" << item->metaObject()->className();
+ qDebug() << "objectName:" << item->objectName();
+ }
+ }
+ } else {
+ qDebug() << "object NULL";
+ }
+
+}
+
diff --git a/demos/mobile/quickhit/mainwindow.h b/demos/mobile/quickhit/mainwindow.h
new file mode 100644
index 0000000000..69846ef1cf
--- /dev/null
+++ b/demos/mobile/quickhit/mainwindow.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+#include <QDeclarativeView>
+
+#include <QApplication>
+#include <QDeclarativeView>
+#include <QDeclarativeContext>
+#include <QGraphicsObject>
+#include <QMouseEvent>
+#include <QPluginLoader>
+
+#include "myeventfilter.h"
+
+class GameEngine;
+class LevelPluginInterface;
+
+class MainWindow : public QDeclarativeView
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+public slots:
+ void levelActivated(int);
+ void activationChangeFiltered();
+
+private:
+ void printObjectTree(QObject* parent);
+ void loadLevelPlugins();
+ bool loadPlugins(QString drive, QString pluginDir);
+ void createPlugin(int index = -1);
+
+private:
+ GameEngine* m_gameEngine;
+ LevelPluginInterface* m_levelPlugin;
+ QList<QPluginLoader*> m_plugins;
+
+ MyEventFilter* m_eventFilter;
+};
+
+#endif // MAINWINDOW_H
diff --git a/demos/mobile/quickhit/myeventfilter.cpp b/demos/mobile/quickhit/myeventfilter.cpp
new file mode 100644
index 0000000000..6ff88906e7
--- /dev/null
+++ b/demos/mobile/quickhit/myeventfilter.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 <QDebug>
+#include "myeventfilter.h"
+
+MyEventFilter::MyEventFilter(QObject *parent) :
+ QObject(parent)
+{
+}
+
+MyEventFilter::~MyEventFilter()
+{
+}
+
+bool MyEventFilter::eventFilter(QObject *obj, QEvent *event)
+{
+ // http://doc.trolltech.com/4.7/qevent.html#QEvent
+
+ // QEvent::ActivationChange : The application has been made available to the user.
+
+ if (event->type() == QEvent::ActivationChange) {
+ emit activationChangeFiltered();
+ qDebug() << "ActivationChangeFiltered()";
+ return false;
+ } else {
+ // standard event processing
+ return QObject::eventFilter(obj, event);
+ }
+}
diff --git a/demos/mobile/quickhit/myeventfilter.h b/demos/mobile/quickhit/myeventfilter.h
new file mode 100644
index 0000000000..279cd2616f
--- /dev/null
+++ b/demos/mobile/quickhit/myeventfilter.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 KEYEVENTLISTENER_H
+#define KEYEVENTLISTENER_H
+
+#include <QObject>
+#include <QKeyEvent>
+
+class MyEventFilter : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyEventFilter(QObject *parent = 0);
+ ~MyEventFilter();
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *event);
+
+signals:
+ void activationChangeFiltered();
+
+};
+
+#endif // KEYEVENTLISTENER_H
diff --git a/demos/mobile/quickhit/plugins/LevelOne/Level.qml b/demos/mobile/quickhit/plugins/LevelOne/Level.qml
new file mode 100644
index 0000000000..d564e6e006
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/Level.qml
@@ -0,0 +1,214 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import Qt.labs.particles 1.0
+
+Rectangle {
+ id: enemies
+ anchors.fill: parent
+ color: "black"
+
+
+ // Background image for the level
+ Image {
+ id: background1
+ source: "file:/"+LevelPlugin.pictureRootPath()+"background3.png"
+ fillMode: Image.PreserveAspectCrop
+ smooth: true
+ //anchors.fill: parent
+ width: parent.width
+ height: parent.height
+ }
+
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ function pause(doPause) {
+ if (doPause) {
+ rightLeftAnim.pause()
+ upToDownAnim.pause()
+ } else {
+ rightLeftAnim.resume()
+ upToDownAnim.resume()
+ }
+ }
+
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ objectName: "level"
+
+ property int enemySpeed: LevelPlugin.enemySpeed()
+ property int enemyMaxWidth
+
+ // Create enemies dynamically
+ function createEnemies(amount) {
+ var b = false;
+ for (var i=0;i<amount;i++) {
+ if (b){
+ Qt.createQmlObject('import QtQuick 1.0; Image { property bool hit:false; width:50; objectName:"enemy"; smooth:true; fillMode:Image.PreserveAspectFit; source:"file:/"+LevelPlugin.pictureRootPath()+"enemy1.png";}',enemiesGrid);
+ } else {
+ Qt.createQmlObject('import QtQuick 1.0; Image { property bool hit:false; width:50; objectName:"enemy"; smooth:true; fillMode:Image.PreserveAspectFit; source:"file:/"+LevelPlugin.pictureRootPath()+"enemy2.png";}',enemiesGrid);
+ }
+ b = !b;
+ }
+ }
+
+ // Calculate enemy max width
+ function calEnemyMaxWidth() {
+ var enemyCountInCol = LevelPlugin.enemyCount() / LevelPlugin.enemyRowCount();
+ enemyCountInCol++; // add some extra space needs for width
+ if (enemyCountInCol*LevelPlugin.graphSize(LevelPlugin.pictureRootPath()+"enemy1.png").width > gameArea.width) {
+ enemyMaxWidth = gameArea.width / (enemyCountInCol + 1);
+ }
+ else {
+ enemyMaxWidth = LevelPlugin.graphSize(LevelPlugin.pictureRootPath()+"enemy1.png").width;
+ }
+ }
+
+
+ Component.onCompleted: {
+ // Calculate enemy max width
+ calEnemyMaxWidth()
+
+ // Create enemies dynamically after component created
+ createEnemies(LevelPlugin.enemyCount())
+
+ // Start animations
+ enemiesGrid.y = enemiesGrid.height * -1
+ rightLeftAnim.restart()
+ upToDownAnim.restart()
+
+ // Flying stars animation, not in Maemo
+ if (!GameEngine.isMaemo()) {
+ starBurstTimer.restart()
+ }
+
+ GameEngine.playSound(4) // NOTE: Level start sound
+ }
+
+
+ Timer {
+ id: starBurstTimer
+ interval: starParticles.lifeSpan+GameEngine.randInt(100,2000); running: false; repeat: true
+ onTriggered: {
+ starParticles.burst(GameEngine.randInt(4,10))
+ }
+ }
+
+
+ // Right-left animation
+ SequentialAnimation {
+ id: rightLeftAnim
+ loops: Animation.Infinite
+ NumberAnimation { target:enemiesGrid; property:"x"; from: 0; to:gameArea.width - enemiesGrid.width; easing.type: Easing.OutQuad; duration: 3000 }
+ NumberAnimation { target:enemiesGrid; property:"x"; to: 0; easing.type: Easing.OutQuad; duration: 3000 }
+ }
+
+ // Up to down animation
+ PropertyAnimation { id: upToDownAnim; target:enemiesGrid; property:"y"; to: gameArea.height;
+ easing.type: Easing.Linear; duration: enemies.enemySpeed }
+
+ Grid {
+ id: enemiesGrid
+ objectName: "enemiesGrid"
+ columns: LevelPlugin.enemyCount() / LevelPlugin.enemyRowCount()
+ spacing: 8
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Execute explode particle effect
+ function explode(x,y) {
+ explodeParticles.x = x
+ explodeParticles.y = y
+ explodeParticles.burst(20)
+ explodeParticles.opacity = 1
+ }
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Explode particle effect
+ Particles {
+ id: explodeParticles
+ opacity: 0
+ width: 1
+ height: 1
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"red_fire.png"
+ lifeSpan: 500
+ lifeSpanDeviation: 2000
+ count: -1
+ angle: 270
+ angleDeviation: 65
+ velocity: 100
+ velocityDeviation: 100
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 300
+ acceleration: 50
+ }
+ }
+
+ Particles {
+ id: starParticles
+ y: -50
+ x: 0
+ width: parent.width
+ height: 50
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"star3.png"
+ lifeSpan: 3000
+ count: -1
+ angle: 90
+ velocity: 100
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 500
+ }
+ }
+
+
+}
+
+
+
+
+
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/changelog b/demos/mobile/quickhit/plugins/LevelOne/debian/changelog
new file mode 100644
index 0000000000..de7ac989a8
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/changelog
@@ -0,0 +1,11 @@
+levelone (1.1.0) unstable; urgency=low
+
+ * Final graphics
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Wed, 5 Jan 2011 10:05:04 +0200
+
+levelone (1.0.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 19 Oct 2010 10:05:04 +0200
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/compat b/demos/mobile/quickhit/plugins/LevelOne/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/control b/demos/mobile/quickhit/plugins/LevelOne/debian/control
new file mode 100644
index 0000000000..c46afefb8b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/control
@@ -0,0 +1,11 @@
+Source: levelone
+Section: user/games
+Priority: extra
+Maintainer: Antonio Aloisio <antonio.aloisio@nokia.com>
+Standards-Version: 3.7.2
+
+Package: levelone
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: QuickHit - LevelOne
+ QuickHit - LevelOne
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/copyright b/demos/mobile/quickhit/plugins/LevelOne/debian/copyright
new file mode 100644
index 0000000000..fb9e5a8e34
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/copyright
@@ -0,0 +1,8 @@
+This is qmultiwinexample, written and maintained by Forum Nokia Antonio Aloisio <antonio.aloisio@nokia.com>
+on Tue, 19 Oct 2010 10:05:04 +0200
+
+
+Copyright Holder: Nokia (c) 2010
+
+License:
+
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/dirs b/demos/mobile/quickhit/plugins/LevelOne/debian/dirs
new file mode 100644
index 0000000000..80507f1030
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/postinst b/demos/mobile/quickhit/plugins/LevelOne/debian/postinst
new file mode 100644
index 0000000000..79fb6ddd0d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/demos/mobile/quickhit/plugins/LevelOne/debian/rules b/demos/mobile/quickhit/plugins/LevelOne/debian/rules
new file mode 100644
index 0000000000..53a1d2ea28
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+APPNAME := levelone
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/$(APPNAME).
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/$(APPNAME) install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ # dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/background3.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/background3.png
new file mode 100644
index 0000000000..c81875ac92
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/background3.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy1.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy1.png
new file mode 100644
index 0000000000..94f149bd61
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy1.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy2.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy2.png
new file mode 100644
index 0000000000..448f8ca627
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy_missile2.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy_missile2.png
new file mode 100644
index 0000000000..c0b28d869d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/enemy_missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/fire.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/fire.png
new file mode 100644
index 0000000000..84010340ac
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/fire.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/fire2.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/fire2.png
new file mode 100644
index 0000000000..139aa61194
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/fire2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/missile2.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/missile2.png
new file mode 100644
index 0000000000..dacd6106ac
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/red_fire.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/red_fire.png
new file mode 100644
index 0000000000..464d603d3e
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/red_fire.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/ship.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/ship.png
new file mode 100644
index 0000000000..cb7851c40e
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/ship.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/star3.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/star3.png
new file mode 100644
index 0000000000..f37a3917b4
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/star3.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/gfx/transparent.png b/demos/mobile/quickhit/plugins/LevelOne/gfx/transparent.png
new file mode 100644
index 0000000000..3aa1e41373
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/gfx/transparent.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp b/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp
new file mode 100644
index 0000000000..a3aa1f6be0
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "levelone.h"
+#include <QtCore/qplugin.h>
+
+
+LevelOne::LevelOne()
+{
+}
+
+LevelOne::~LevelOne()
+{
+}
+
+QString LevelOne::pathPrefix()
+{
+ /*
+QDir::rootPath()
+For Unix operating systems this returns "/".
+For Windows file systems this normally returns "c:/".
+On Symbian this typically returns "c:/data",
+*/
+
+#ifdef Q_WS_MAEMO_5
+ return "/home/user/.";
+#elif defined Q_OS_WIN32
+ return QDir::rootPath();
+#else
+ //return QDir::rootPath()+"/";
+ return "c:/System/";
+#endif
+}
+
+QStringList LevelOne::levelSounds()
+{
+ QStringList list;
+
+ // NOTE: Mandatory sounds/indexs for the all levels
+ // 0 = Enemy explode
+ list.append(LevelOne::pathPrefix()+"quickhitdata/levelone/sound/rocket_explosion.wav");
+ // 1 = You explode
+ list.append(LevelOne::pathPrefix()+"quickhitdata/levelone/sound/crash.wav");
+ // 2 = Missile fires
+ list.append(LevelOne::pathPrefix()+"quickhitdata/levelone/sound/rocket_explosion.wav");
+ // 3 = Emeny Missile fires
+ list.append(LevelOne::pathPrefix()+"quickhitdata/levelone/sound/rocket.wav");
+
+ // Additional sounds
+ // Level starts
+ list.append(LevelOne::pathPrefix()+"quickhitdata/levelone/sound/levelonestart.wav");
+
+ return list;
+}
+
+QVariant LevelOne::getData(QVariant key)
+{
+ QVariant ret;
+ switch (key.toInt()) {
+ case 1: {
+ // Any data what you need for this key
+ // Set your data into QVariant (ret)
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ return ret;
+}
+
+QVariant LevelOne::graphSize(QVariant pathToGraph)
+{
+ QVariant ret;
+ m_imageReader.setFileName(pathToGraph.toString());
+ QSize imageSize = m_imageReader.size();
+ ret.setValue(imageSize);
+ return ret;
+}
+
+// This Qt macro exports the plugin class LevelOne with the name levelplugins.
+// There should be exactly one occurrence of this LevelOne macro in a Qt plugin's source code.
+Q_EXPORT_PLUGIN2(levelplugins, LevelOne);
diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.h b/demos/mobile/quickhit/plugins/LevelOne/levelone.h
new file mode 100644
index 0000000000..6c64d7908b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 LEVELONE_H
+#define LEVELONE_H
+
+#include <QObject>
+#include <QDir>
+#include <QImageReader>
+
+#include "levelplugininterface.h"
+
+class LevelOne : public LevelPluginInterface
+{
+ Q_OBJECT
+
+ // This macro tells Qt which interfaces the class implements.
+ // This is used when implementing plugins.
+ Q_INTERFACES(LevelPluginInterface)
+
+public:
+ LevelOne();
+ ~LevelOne();
+
+ static QString pathPrefix();
+
+public: // From LevelPluginInterface
+
+ QStringList levelSounds();
+
+ Q_INVOKABLE QVariant getData(QVariant key);
+
+ Q_INVOKABLE QVariant graphSize(QVariant pathToGraph);
+
+ Q_INVOKABLE QVariant enemyCount() { return QVariant(30); } // 6x5=30
+ Q_INVOKABLE QVariant enemyRowCount() { return QVariant(6); } // 6 rows of enemies
+ Q_INVOKABLE QVariant enemySpeed() { return QVariant(36000); }
+ Q_INVOKABLE QVariant enemyFireSpeed() { return QVariant(200); }
+
+ // Root paths for the QML, Pictures and Sounds
+ Q_INVOKABLE QVariant qmlRootPath() { return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/"); }
+ Q_INVOKABLE QVariant pictureRootPath() { return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/gfx/"); }
+
+ // Full paths
+ Q_INVOKABLE QVariant pathToTransparentEnemyPic() {return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/gfx/transparent.png");}
+ Q_INVOKABLE QVariant pathToMissilePic() {return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/gfx/missile2.png");}
+ Q_INVOKABLE QVariant pathToEnemyMissilePic() {return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/gfx/enemy_missile2.png");}
+ Q_INVOKABLE QVariant pathToMyShipPic() {return QVariant(LevelOne::pathPrefix()+"quickhitdata/levelone/gfx/ship.png");}
+
+protected:
+ QImageReader m_imageReader;
+};
+
+#endif // LEVELONE_H
diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.pro b/demos/mobile/quickhit/plugins/LevelOne/levelone.pro
new file mode 100644
index 0000000000..fcbfc56a53
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.pro
@@ -0,0 +1,100 @@
+
+# Copyright (c) 2010 Nokia Corporation.
+
+TEMPLATE = lib
+
+#VERSION = 1.1.0
+
+CONFIG += plugin
+
+INCLUDEPATH += ../
+
+HEADERS = levelone.h
+
+SOURCES = levelone.cpp
+
+TARGET = $$qtLibraryTarget(levelone)
+
+OTHER_FILES += Level.qml
+
+
+# SYMBIAN ---------------------------
+symbian: {
+# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files
+load(data_caging_paths)
+
+# EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data
+TARGET.EPOCALLOWDLLDATA=1
+TARGET.UID3 = 0xE07dfb66
+
+TARGET.CAPABILITY = NetworkServices \
+ Location \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+# Defines plugin stub file into Symbian .pkg package
+pluginDep.sources = levelone.dll
+pluginDep.path = $$QT_PLUGINS_BASE_DIR/quickhitlevels
+DEPLOYMENT += pluginDep
+
+# Graphics and Sounds for the plugin
+BLD_INF_RULES.prj_exports += "gfx/background3.png ../winscw/c/Data/gfx/background3.png" \
+"gfx/enemy1.png ../winscw/c/Data/gfx/enemy1.png" \
+"gfx/enemy2.png ../winscw/c/Data/gfx/enemy2.png" \
+"gfx/red_fire.png ../winscw/c/Data/gfx/red_fire.png" \
+"gfx/missile2.png ../winscw/c/Data/gfx/missile2.png" \
+"gfx/enemy_missile2.png ../winscw/c/Data/gfx/enemy_missile2.png" \
+"gfx/ship.png ../winscw/c/Data/gfx/ship.png" \
+"gfx/transparent.png ../winscw/c/Data/gfx/transparent.png" \
+"gfx/star3.png ../winscw/c/Data/gfx/star3.png" \
+"sound/crash.wav ../winscw/c/Data/sound/crash.wav" \
+"sound/rocket.wav ../winscw/c/Data/sound/rocket.wav" \
+"sound/rocket_explosion.wav ../winscw/c/Data/sound/rocket_explosion.wav" \
+"sound/levelonestart.wav ../winscw/c/Data/sound/levelonestart.wav" \
+"Level.qml ../winscw/c/Data/Level.qml"
+
+
+myQml.sources = level.qml
+myQml.path = c:/System/quickhitdata/levelone
+myGraphic.sources = gfx/*
+myGraphic.path = c:/System/quickhitdata/levelone/gfx
+mySound.sources = sound/*
+mySound.path = c:/System/quickhitdata/levelone/sound
+# Takes qml, graphics and sounds into Symbian SIS package file (.pkg)
+DEPLOYMENT += myQml myGraphic mySound
+
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+# Installs binaries
+INSTALLS += target
+}
+
+# WINDOWS ---------------------------
+win32: {
+# Copy level sounds and graphics into right destination
+system(mkdir c:\\quickhitdata\\levelone)
+system(mkdir c:\\quickhitdata\\levelone\\gfx)
+system(mkdir c:\\quickhitdata\\levelone\\sound)
+system(copy *.qml c:\\quickhitdata\\levelone)
+system(copy gfx\\*.* c:\\quickhitdata\\levelone\\gfx)
+system(copy sound\\*.* c:\\quickhitdata\\levelone\\sound)
+
+# Installs binaries
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+INSTALLS += target
+}
+
+# MAEMO_5 ---------------------------
+maemo5: {
+myQml.path = /home/user/.quickhitdata/levelone/
+myQml.files += Level.qml
+myGraphic.path = /home/user/.quickhitdata/levelone/gfx/
+myGraphic.files += gfx/*
+mySound.path = /home/user/.quickhitdata/levelone/sound/
+mySound.files += sound/*
+
+target.path += /usr/lib/qt4/plugins/quickhitlevels
+# Installs qml, binaries, sounds and graphics
+INSTALLS += target myGraphic mySound myQml
+}
diff --git a/demos/mobile/quickhit/plugins/LevelOne/sound/crash.wav b/demos/mobile/quickhit/plugins/LevelOne/sound/crash.wav
new file mode 100644
index 0000000000..8076f0f6d7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/sound/crash.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/sound/levelonestart.wav b/demos/mobile/quickhit/plugins/LevelOne/sound/levelonestart.wav
new file mode 100644
index 0000000000..e9e3ac036b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/sound/levelonestart.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/sound/rocket.wav b/demos/mobile/quickhit/plugins/LevelOne/sound/rocket.wav
new file mode 100644
index 0000000000..8c0dee9ac5
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/sound/rocket.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelOne/sound/rocket_explosion.wav b/demos/mobile/quickhit/plugins/LevelOne/sound/rocket_explosion.wav
new file mode 100644
index 0000000000..d2b451ccda
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelOne/sound/rocket_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/changelog b/demos/mobile/quickhit/plugins/LevelTemplate/debian/changelog
new file mode 100644
index 0000000000..a5e0a1bd30
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/changelog
@@ -0,0 +1,11 @@
+leveltemplate (1.1.0) unstable; urgency=low
+
+ * Final graphics
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Wed, 5 Jan 2011 10:05:04 +0200
+
+leveltemplate (1.0.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 19 Oct 2010 10:05:04 +0200
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/compat b/demos/mobile/quickhit/plugins/LevelTemplate/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/control b/demos/mobile/quickhit/plugins/LevelTemplate/debian/control
new file mode 100644
index 0000000000..68742fdf8d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/control
@@ -0,0 +1,11 @@
+Source: leveltemplate
+Section: user/games
+Priority: extra
+Maintainer: Antonio Aloisio <antonio.aloisio@nokia.com>
+Standards-Version: 3.7.2
+
+Package: leveltemplate
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: QuickHit - Level Template
+ QuickHit - Level Template
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/copyright b/demos/mobile/quickhit/plugins/LevelTemplate/debian/copyright
new file mode 100644
index 0000000000..f9ee8e22cc
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/copyright
@@ -0,0 +1,8 @@
+This is leveltemplate, written and maintained by Forum Nokia Antonio Aloisio <antonio.aloisio@nokia.com>
+on Tue, 19 Oct 2010 10:05:04 +0200
+
+
+Copyright Holder: Nokia (c) 2010
+
+License:
+
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/dirs b/demos/mobile/quickhit/plugins/LevelTemplate/debian/dirs
new file mode 100644
index 0000000000..80507f1030
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist b/demos/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist
new file mode 100644
index 0000000000..f3146fa12d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/levelone.tarlist
@@ -0,0 +1,41 @@
+755 root root . home /
+755 root root . home/maemo /
+755 root root . home/maemo/quickhitdata /
+755 root root . home/maemo/quickhitdata/levelone /
+644 root root . home/maemo/quickhitdata/levelone/Level.qml debian/levelone/home/maemo/quickhitdata/levelone/Level.qml
+755 root root . home/maemo/quickhitdata/leveltwo /
+755 root root . home/maemo/quickhitdata/leveltwo/gfx /
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/background3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/background3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy1.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy1.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/moon.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/moon.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/ship.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/ship.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/star3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/star3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/transparent.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/transparent.png
+755 root root . home/maemo/quickhitdata/leveltwo/sound /
+644 root root . home/maemo/quickhitdata/leveltwo/sound/crash.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/crash.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/laser.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/laser.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav
+755 root root . usr /
+755 root root . usr/bin /
+755 root root . usr/lib /
+755 root root . usr/lib/qt4 /
+755 root root . usr/lib/qt4/plugins /
+755 root root . usr/lib/qt4/plugins/quickhitlevels /
+644 root root . usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so debian/levelone/usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so
+755 root root . usr/share /
+755 root root . usr/share/applications /
+755 root root . usr/share/applications/hildon /
+755 root root . usr/share/doc /
+755 root root . usr/share/doc/levelone /
+644 root root . usr/share/doc/levelone/changelog.gz debian/levelone/usr/share/doc/levelone/changelog.gz
+644 root root . usr/share/doc/levelone/copyright debian/levelone/usr/share/doc/levelone/copyright
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/postinst b/demos/mobile/quickhit/plugins/LevelTemplate/debian/postinst
new file mode 100644
index 0000000000..79fb6ddd0d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/debian/rules b/demos/mobile/quickhit/plugins/LevelTemplate/debian/rules
new file mode 100644
index 0000000000..7f30ca376b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+APPNAME := leveltemplate
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/$(APPNAME).
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/$(APPNAME) install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ # dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png
new file mode 100644
index 0000000000..8667a39767
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/blue_fire.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png
new file mode 100644
index 0000000000..94f149bd61
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy1.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png
new file mode 100644
index 0000000000..448f8ca627
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png
new file mode 100644
index 0000000000..c0b28d869d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/enemy_missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png
new file mode 100644
index 0000000000..dacd6106ac
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png
new file mode 100644
index 0000000000..cb7851c40e
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/ship.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png
new file mode 100644
index 0000000000..3aa1e41373
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/gfx/transparent.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp
new file mode 100644
index 0000000000..fffec69b09
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "leveltemplate.h"
+#include <QtCore/qplugin.h>
+
+
+LevelTemplate::LevelTemplate()
+{
+}
+
+LevelTemplate::~LevelTemplate()
+{
+}
+
+QString LevelTemplate::pathPrefix()
+{
+/*
+QDir::rootPath()
+For Unix operating systems this returns "/".
+For Windows file systems this normally returns "c:/".
+On Symbian this typically returns "c:/data",
+*/
+
+#ifdef Q_WS_MAEMO_5
+ return "/home/user/.";
+#elif defined Q_OS_WIN32
+ return QDir::rootPath();
+#else
+ //return QDir::rootPath()+"/";
+ return "c:/System/";
+#endif
+}
+
+QStringList LevelTemplate::levelSounds()
+{
+ QStringList list;
+
+
+ // NOTE: Mandatory sounds/indexs for the all levels
+ // 0 = Enemy explode
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/enemy_explosion.wav");
+ // 1 = You explode
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/myship_explosion.wav");
+ // 2 = Missile fires
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/laser.wav");
+ // 3 = Emeny Missile fires
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/rocket.wav");
+
+ // Additional sounds
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/enableship.wav");
+ list.append(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/sound/level2.wav");
+
+
+ return list;
+}
+
+QVariant LevelTemplate::getData(QVariant key)
+{
+ QVariant ret;
+ switch (key.toInt()) {
+ case 1: {
+ // Any data what you need for this key
+ // Set your data into QVariant (ret)
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ return ret;
+}
+
+QVariant LevelTemplate::graphSize(QVariant pathToGraph)
+{
+ QVariant ret;
+ m_imageReader.setFileName(pathToGraph.toString());
+ QSize imageSize = m_imageReader.size();
+ ret.setValue(imageSize);
+ return ret;
+}
+
+// This Qt macro exports the plugin class level with the name levelplugins.
+// There should be exactly one occurrence of this macro in a Qt plugin's source code.
+Q_EXPORT_PLUGIN2(levelplugins, LevelTemplate);
+
+
+
+
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h
new file mode 100644
index 0000000000..f13705adc0
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 LevelTemplate_H
+#define LevelTemplate_H
+
+#include <QObject>
+#include <QDir>
+#include <QImageReader>
+
+// Common interface header for all level plugins
+#include "levelplugininterface.h"
+
+// Level name
+#define LEVEL_NAME "leveltemplate"
+
+class LevelTemplate : public LevelPluginInterface
+{
+ Q_OBJECT
+
+ // This macro tells Qt which interfaces the class implements.
+ // This is used when implementing plugins.
+ Q_INTERFACES(LevelPluginInterface)
+
+public:
+ LevelTemplate();
+ ~LevelTemplate();
+
+ static QString pathPrefix();
+
+public: // From LevelPluginInterface
+
+ QStringList levelSounds();
+
+ Q_INVOKABLE QVariant getData(QVariant key);
+
+ Q_INVOKABLE QVariant graphSize(QVariant pathToGraph);
+
+ Q_INVOKABLE QVariant enemyCount() { return QVariant(1); }
+ Q_INVOKABLE QVariant enemyRowCount() { return QVariant(0); }
+ Q_INVOKABLE QVariant enemySpeed() { return QVariant(20000); }
+ Q_INVOKABLE QVariant enemyFireSpeed() { return QVariant(2000); }
+
+ // Root paths for the QML, Pictures and Sounds
+ Q_INVOKABLE QVariant qmlRootPath() { return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/"); }
+ Q_INVOKABLE QVariant pictureRootPath() { return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/"); }
+
+ // Full paths
+ Q_INVOKABLE QVariant pathToTransparentEnemyPic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/transparent.png");}
+ Q_INVOKABLE QVariant pathToMissilePic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/missile2.png");}
+ Q_INVOKABLE QVariant pathToEnemyMissilePic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/enemy_missile2.png");}
+ Q_INVOKABLE QVariant pathToMyShipPic() {return QVariant(LevelTemplate::pathPrefix()+"quickhitdata/"+LEVEL_NAME+"/gfx/ship.png");}
+
+protected:
+ QImageReader m_imageReader;
+};
+
+#endif // LevelTemplate_H
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro
new file mode 100644
index 0000000000..a4f590058b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/leveltemplate.pro
@@ -0,0 +1,103 @@
+
+# Copyright (c) 2010 Nokia Corporation.
+
+TEMPLATE = lib
+
+#VERSION = 1.1.0
+
+CONFIG += plugin
+
+INCLUDEPATH += ../
+
+HEADERS = leveltemplate.h
+
+SOURCES = leveltemplate.cpp
+
+TARGET = $$qtLibraryTarget(leveltemplate)
+
+OTHER_FILES += qml/Level.qml \
+ qml/Enemy.qml \
+ qml/Level.js
+
+
+# SYMBIAN ---------------------------
+symbian: {
+# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files
+load(data_caging_paths)
+
+# EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data
+TARGET.EPOCALLOWDLLDATA=1
+TARGET.UID3 = 0xE07dfb68
+
+TARGET.CAPABILITY = NetworkServices \
+ Location \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+# Defines plugin stub file into Symbian .pkg package
+pluginDep.sources = leveltemplate.dll
+pluginDep.path = $$QT_PLUGINS_BASE_DIR/quickhitlevels
+DEPLOYMENT += pluginDep
+
+# Graphics and Sounds for the plugin
+BLD_INF_RULES.prj_exports += "gfx/enemy1.png ../winscw/c/Data/gfx/enemy1.png" \
+"gfx/enemy2.png ../winscw/c/Data/gfx/enemy2.png" \
+"gfx/missile2.png ../winscw/c/Data/gfx/missile2.png" \
+"gfx/enemy_missile2.png ../winscw/c/Data/gfx/enemy_missile2.png" \
+"gfx/ship.png ../winscw/c/Data/gfx/ship.png" \
+"gfx/transparent.png ../winscw/c/Data/gfx/transparent.png" \
+"gfx/blue_fire.png ../winscw/c/Data/gfx/blue_fire.png" \
+"sound/enemy_explosion.wav ../winscw/c/Data/sound/enemy_explosion.wav" \
+"sound/myship_explosion.wav ../winscw/c/Data/sound/myship_explosion.wav" \
+"sound/enableship.wav ../winscw/c/Data/sound/enableship.wav" \
+"sound/laser.wav ../winscw/c/Data/sound/laser.wav" \
+"sound/level2.wav ../winscw/c/Data/sound/level2.wav" \
+"qml/Level.qml ../winscw/c/Data/Level.qml" \
+"qml/Level.js ../winscw/c/Data/Level.js" \
+"qml/Enemy.qml ../winscw/c/Data/Enemy.qml"
+
+
+myQml.sources = qml/*
+myQml.path = c:/System/quickhitdata/leveltemplate
+myGraphic.sources = gfx/*
+myGraphic.path = c:/System/quickhitdata/leveltemplate/gfx
+mySound.sources = sound/*
+mySound.path = c:/System/quickhitdata/leveltemplate/sound
+# Takes qml, graphics and sounds into Symbian SIS package file (.pkg)
+DEPLOYMENT += myQml myGraphic mySound
+
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+# Installs binaries
+INSTALLS += target
+}
+
+# WINDOWS ---------------------------
+win32: {
+# Copy level sounds and graphics into right destination
+system(mkdir c:\quickhitdata\leveltemplate)
+system(mkdir c:\quickhitdata\leveltemplate\gfx)
+system(mkdir c:\quickhitdata\leveltemplate\sound)
+system(copy qml\*.* c:\quickhitdata\leveltemplate)
+system(copy gfx\*.* c:\quickhitdata\leveltemplate\gfx)
+system(copy sound\*.* c:\quickhitdata\leveltemplate\sound)
+
+# Installs binaries
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+INSTALLS += target
+}
+
+# MAEMO_5 ---------------------------
+maemo5: {
+myQml.path = /home/user/.quickhitdata/leveltemplate/
+myQml.files += qml/*
+myGraphic.path = /home/user/.quickhitdata/leveltemplate/gfx/
+myGraphic.files += gfx/*
+mySound.path = /home/user/.quickhitdata/leveltemplate/sound/
+mySound.files += sound/*
+
+target.path += /usr/lib/qt4/plugins/quickhitlevels
+# Installs qml, binaries, sounds and graphics
+INSTALLS += target myGraphic mySound myQml
+}
diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml
index 3c60d120e8..b187c03f9b 100644
--- a/doc/src/snippets/declarative/grid/grid-items.qml
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Enemy.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -40,19 +40,22 @@
import QtQuick 1.0
-Rectangle {
- width: 112; height: 112
- color: "#303030"
+Image {
+ id: enemy
- Grid {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- columns: 2
- spacing: 6
+ // ***************************************************
+ // *** NOTE: This "enemy "is mandatory enemy object name for all enemy QML files
+ objectName: "enemy"
- Rectangle { color: "#aa6666"; width: 50; height: 50 }
- Rectangle { color: "#aaaa66"; width: 50; height: 50 }
- Rectangle { color: "#9999aa"; width: 50; height: 50 }
- Rectangle { color: "#6666aa"; width: 50; height: 50 }
+ smooth:true
+ opacity: 0 // 0=hidden by default
+ fillMode:Image.PreserveAspectFit
+ source:"file:/"+LevelPlugin.pictureRootPath()+"enemy1.png"
+
+ property int enemySpeed: LevelPlugin.enemySpeed()
+
+ // ***************************************************
+ // *** NOTE: This "pause(bool)" function is mandatory for all enemies QML files
+ function pause(doPause) {
}
}
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.js b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.js
new file mode 100644
index 0000000000..e2e1d3a62f
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.js
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+var hiddenEnemies = new Array()
+
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml
new file mode 100644
index 0000000000..3a383cf065
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/qml/Level.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import Qt.labs.particles 1.0
+
+// Level own JavaScript file
+import "Level.js" as LevelScript
+
+Rectangle {
+ id: enemies
+ anchors.fill: parent
+ property int enemiesCreated: 0
+ property int enemiesEnabled: 0
+ color: "black"
+
+ // ***************************************************
+ // *** NOTE: This "pause(bool)" function is mandatory for all level QML files
+ function pause(doPause) {
+ }
+
+ // ***************************************************
+ // *** NOTE: Level object name "level" is mandatory for all level QML files
+ objectName: "level"
+
+ // Enemy placeholder. Have to exist at least one enemy for prevent to level be stopped
+ Enemy {
+ x: parent.width / 2
+ y: parent.height / 2
+ opacity: 1
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Execute explode particle effect
+ function explode(x,y) {
+ explodeParticles.x = x
+ explodeParticles.y = y
+ explodeParticles.burst(20)
+ explodeParticles.opacity = 1
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Explode particle effect
+ Particles {
+ id: explodeParticles
+ opacity: 0
+ width: 1
+ height: 1
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"blue_fire.png"
+ lifeSpan: 500
+ lifeSpanDeviation: 2000
+ count: -1
+ angle: 270
+ angleDeviation: 65
+ velocity: 100
+ velocityDeviation: 100
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 300
+ acceleration: 50
+ }
+ }
+}
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav
new file mode 100644
index 0000000000..8076f0f6d7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/crash.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav
new file mode 100644
index 0000000000..6fe5fe84fd
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/enableship.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav
new file mode 100644
index 0000000000..fd338e6b9b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/enemy_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav
new file mode 100644
index 0000000000..c3b58b2022
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/laser.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav
new file mode 100644
index 0000000000..24d39174a8
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/level2.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav
new file mode 100644
index 0000000000..e22d030e1f
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/myship_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav
new file mode 100644
index 0000000000..8c0dee9ac5
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav b/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav
new file mode 100644
index 0000000000..d2b451ccda
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTemplate/sound/rocket_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/changelog b/demos/mobile/quickhit/plugins/LevelTwo/debian/changelog
new file mode 100644
index 0000000000..106ef66df0
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/changelog
@@ -0,0 +1,11 @@
+leveltwo (1.1.0) unstable; urgency=low
+
+ * Final graphics
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Wed, 5 Jan 2011 10:05:04 +0200
+
+leveltwo (1.0.0) unstable; urgency=low
+
+ * First version
+
+ -- Antonio Aloisio <antonio.aloisio@nokia.com> Tue, 19 Oct 2010 10:05:04 +0200
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/compat b/demos/mobile/quickhit/plugins/LevelTwo/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/control b/demos/mobile/quickhit/plugins/LevelTwo/debian/control
new file mode 100644
index 0000000000..8f9d05e4d9
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/control
@@ -0,0 +1,11 @@
+Source: leveltwo
+Section: user/games
+Priority: extra
+Maintainer: Antonio Aloisio <antonio.aloisio@nokia.com>
+Standards-Version: 3.7.2
+
+Package: leveltwo
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: QuickHit - LevelTwo
+ QuickHit - LevelTwo
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/copyright b/demos/mobile/quickhit/plugins/LevelTwo/debian/copyright
new file mode 100644
index 0000000000..fb9e5a8e34
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/copyright
@@ -0,0 +1,8 @@
+This is qmultiwinexample, written and maintained by Forum Nokia Antonio Aloisio <antonio.aloisio@nokia.com>
+on Tue, 19 Oct 2010 10:05:04 +0200
+
+
+Copyright Holder: Nokia (c) 2010
+
+License:
+
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/dirs b/demos/mobile/quickhit/plugins/LevelTwo/debian/dirs
new file mode 100644
index 0000000000..80507f1030
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications/hildon
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/levelone.tarlist b/demos/mobile/quickhit/plugins/LevelTwo/debian/levelone.tarlist
new file mode 100644
index 0000000000..f3146fa12d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/levelone.tarlist
@@ -0,0 +1,41 @@
+755 root root . home /
+755 root root . home/maemo /
+755 root root . home/maemo/quickhitdata /
+755 root root . home/maemo/quickhitdata/levelone /
+644 root root . home/maemo/quickhitdata/levelone/Level.qml debian/levelone/home/maemo/quickhitdata/levelone/Level.qml
+755 root root . home/maemo/quickhitdata/leveltwo /
+755 root root . home/maemo/quickhitdata/leveltwo/gfx /
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/background3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/background3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/blue_fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy1.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy1.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/enemy_missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/fire2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/fire2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/missile2.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/missile2.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/moon.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/moon.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/ship.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/ship.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/star3.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/star3.png
+644 root root . home/maemo/quickhitdata/leveltwo/gfx/transparent.png debian/levelone/home/maemo/quickhitdata/leveltwo/gfx/transparent.png
+755 root root . home/maemo/quickhitdata/leveltwo/sound /
+644 root root . home/maemo/quickhitdata/leveltwo/sound/crash.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/crash.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/enemy_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/laser.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/laser.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/myship_explosion.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket.wav
+644 root root . home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav debian/levelone/home/maemo/quickhitdata/leveltwo/sound/rocket_explosion.wav
+755 root root . usr /
+755 root root . usr/bin /
+755 root root . usr/lib /
+755 root root . usr/lib/qt4 /
+755 root root . usr/lib/qt4/plugins /
+755 root root . usr/lib/qt4/plugins/quickhitlevels /
+644 root root . usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so debian/levelone/usr/lib/qt4/plugins/quickhitlevels/libleveltwo.so
+755 root root . usr/share /
+755 root root . usr/share/applications /
+755 root root . usr/share/applications/hildon /
+755 root root . usr/share/doc /
+755 root root . usr/share/doc/levelone /
+644 root root . usr/share/doc/levelone/changelog.gz debian/levelone/usr/share/doc/levelone/changelog.gz
+644 root root . usr/share/doc/levelone/copyright debian/levelone/usr/share/doc/levelone/copyright
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/postinst b/demos/mobile/quickhit/plugins/LevelTwo/debian/postinst
new file mode 100644
index 0000000000..79fb6ddd0d
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/debian/rules b/demos/mobile/quickhit/plugins/LevelTwo/debian/rules
new file mode 100644
index 0000000000..5dac6e0960
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+APPNAME := leveltwo
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/$(APPNAME).
+ $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/$(APPNAME) install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ # dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/background2.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/background2.png
new file mode 100644
index 0000000000..8fbf2f46da
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/background2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/background_loop.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/background_loop.png
new file mode 100644
index 0000000000..3a135d2c76
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/background_loop.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/blue_fire.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/blue_fire.png
new file mode 100644
index 0000000000..8667a39767
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/blue_fire.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy1.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy1.png
new file mode 100644
index 0000000000..94f149bd61
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy1.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy_missile2.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy_missile2.png
new file mode 100644
index 0000000000..5011d755f9
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/enemy_missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire.png
new file mode 100644
index 0000000000..84010340ac
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire2.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire2.png
new file mode 100644
index 0000000000..139aa61194
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/fire2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile.png
new file mode 100644
index 0000000000..86bb41bc45
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile2.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile2.png
new file mode 100644
index 0000000000..dacd6106ac
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/missile2.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/ship.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/ship.png
new file mode 100644
index 0000000000..cb7851c40e
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/ship.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/star3.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/star3.png
new file mode 100644
index 0000000000..70af0f3c96
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/star3.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/gfx/transparent.png b/demos/mobile/quickhit/plugins/LevelTwo/gfx/transparent.png
new file mode 100644
index 0000000000..3aa1e41373
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/gfx/transparent.png
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp
new file mode 100644
index 0000000000..45a39e37e2
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 "leveltwo.h"
+#include <QtCore/qplugin.h>
+
+
+LevelTwo::LevelTwo()
+{
+}
+
+LevelTwo::~LevelTwo()
+{
+}
+
+QString LevelTwo::pathPrefix()
+{
+ /*
+QDir::rootPath()
+For Unix operating systems this returns "/".
+For Windows file systems this normally returns "c:/".
+On Symbian this typically returns "c:/data",
+*/
+
+#ifdef Q_WS_MAEMO_5
+ return "/home/user/.";
+#elif defined Q_OS_WIN32
+ return QDir::rootPath();
+#else
+ //return QDir::rootPath()+"/";
+ return "c:/System/";
+#endif
+}
+
+QStringList LevelTwo::levelSounds()
+{
+ QStringList list;
+
+
+ // NOTE: Mandatory sounds/indexs for the all levels
+ // 0 = Enemy explode
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/enemy_explosion.wav");
+ // 1 = You explode
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/myship_explosion.wav");
+ // 2 = Missile fires
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/laser.wav");
+ // 3 = Emeny Missile fires
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/rocket.wav");
+
+ // Additional sounds
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/enableship.wav");
+ list.append(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/sound/level2.wav");
+
+
+ return list;
+}
+
+QVariant LevelTwo::getData(QVariant key)
+{
+ QVariant ret;
+ switch (key.toInt()) {
+ case 1: {
+ // Any data what you need for this key
+ // Set your data into QVariant (ret)
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ return ret;
+}
+
+QVariant LevelTwo::graphSize(QVariant pathToGraph)
+{
+ QVariant ret;
+ m_imageReader.setFileName(pathToGraph.toString());
+ QSize imageSize = m_imageReader.size();
+ ret.setValue(imageSize);
+ return ret;
+}
+
+// This Qt macro exports the plugin class LevelTwo with the name levelplugins.
+// There should be exactly one occurrence of this LevelTwo macro in a Qt plugin's source code.
+Q_EXPORT_PLUGIN2(levelplugins, LevelTwo);
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h
new file mode 100644
index 0000000000..b983210256
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 LevelTwo_H
+#define LevelTwo_H
+
+#include <QObject>
+#include <QDir>
+#include <QImageReader>
+
+#include "levelplugininterface.h"
+
+class LevelTwo : public LevelPluginInterface
+{
+ Q_OBJECT
+
+ // This macro tells Qt which interfaces the class implements.
+ // This is used when implementing plugins.
+ Q_INTERFACES(LevelPluginInterface)
+
+public:
+ LevelTwo();
+ ~LevelTwo();
+
+ static QString pathPrefix();
+
+public: // From LevelPluginInterface
+
+ QStringList levelSounds();
+
+ Q_INVOKABLE QVariant getData(QVariant key);
+
+ Q_INVOKABLE QVariant graphSize(QVariant pathToGraph);
+
+ Q_INVOKABLE QVariant enemyCount() { return QVariant(35); }
+ Q_INVOKABLE QVariant enemyRowCount() { return QVariant(0); }
+ Q_INVOKABLE QVariant enemySpeed() { return QVariant(20000); }
+ Q_INVOKABLE QVariant enemyFireSpeed() { return QVariant(500); }
+
+ // Root paths for the QML, Pictures and Sounds
+ Q_INVOKABLE QVariant qmlRootPath() { return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/"); }
+ Q_INVOKABLE QVariant pictureRootPath() { return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/gfx/"); }
+
+ // Full paths
+ Q_INVOKABLE QVariant pathToTransparentEnemyPic() {return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/gfx/transparent.png");}
+ Q_INVOKABLE QVariant pathToMissilePic() {return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/gfx/missile2.png");}
+ Q_INVOKABLE QVariant pathToEnemyMissilePic() {return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/gfx/enemy_missile2.png");}
+ Q_INVOKABLE QVariant pathToMyShipPic() {return QVariant(LevelTwo::pathPrefix()+"quickhitdata/leveltwo/gfx/ship.png");}
+
+protected:
+ QImageReader m_imageReader;
+};
+
+#endif // LevelTwo_H
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.pro b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.pro
new file mode 100644
index 0000000000..171ee6c2da
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.pro
@@ -0,0 +1,108 @@
+
+# Copyright (c) 2010 Nokia Corporation.
+
+TEMPLATE = lib
+
+#VERSION = 1.1.0
+
+CONFIG += plugin
+
+INCLUDEPATH += ../
+
+HEADERS = leveltwo.h
+
+SOURCES = leveltwo.cpp
+
+TARGET = $$qtLibraryTarget(leveltwo)
+
+OTHER_FILES += qml/Level.qml \
+ qml/Enemy.qml \
+ qml/Level.js
+
+
+# SYMBIAN ---------------------------
+symbian: {
+# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files
+load(data_caging_paths)
+
+# EPOCALLOWDLLDATA have to set true because Qt macros has initialised global data
+TARGET.EPOCALLOWDLLDATA=1
+TARGET.UID3 = 0xE07dfb67
+
+TARGET.CAPABILITY = NetworkServices \
+ Location \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+# Defines plugin stub file into Symbian .pkg package
+pluginDep.sources = leveltwo.dll
+pluginDep.path = $$QT_PLUGINS_BASE_DIR/quickhitlevels
+DEPLOYMENT += pluginDep
+
+# Graphics and Sounds for the plugin
+BLD_INF_RULES.prj_exports += "gfx/background2.png ../winscw/c/Data/gfx/background2.png" \
+"gfx/background_loop.png ../winscw/c/Data/gfx/background_loop.png" \
+"gfx/enemy1.png ../winscw/c/Data/gfx/enemy1.png" \
+"gfx/fire2.png ../winscw/c/Data/gfx/fire2.png" \
+"gfx/fire.png ../winscw/c/Data/gfx/fire.png" \
+"gfx/missile2.png ../winscw/c/Data/gfx/missile2.png" \
+"gfx/enemy_missile2.png ../winscw/c/Data/gfx/enemy_missile2.png" \
+"gfx/ship.png ../winscw/c/Data/gfx/ship.png" \
+"gfx/transparent.png ../winscw/c/Data/gfx/transparent.png" \
+"gfx/star3.png ../winscw/c/Data/gfx/star3.png" \
+"gfx/blue_fire.png ../winscw/c/Data/gfx/blue_fire.png" \
+"sound/enemy_explosion.wav ../winscw/c/Data/sound/enemy_explosion.wav" \
+"sound/myship_explosion.wav ../winscw/c/Data/sound/myship_explosion.wav" \
+"sound/enableship.wav ../winscw/c/Data/sound/enableship.wav" \
+"sound/laser.wav ../winscw/c/Data/sound/laser.wav" \
+"sound/level2.wav ../winscw/c/Data/sound/level2.wav" \
+"qml/Level.qml ../winscw/c/Data/Level.qml" \
+"qml/Level.js ../winscw/c/Data/Level.js" \
+"qml/Enemy.qml ../winscw/c/Data/Enemy.qml"
+
+
+myQml.sources = qml/*
+myQml.path = c:/System/quickhitdata/leveltwo
+myGraphic.sources = gfx/*
+myGraphic.path = c:/System/quickhitdata/leveltwo/gfx
+mySound.sources = sound/*
+mySound.path = c:/System/quickhitdata/leveltwo/sound
+# Takes qml, graphics and sounds into Symbian SIS package file (.pkg)
+DEPLOYMENT += myQml myGraphic mySound
+
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+# Installs binaries
+INSTALLS += target
+}
+
+# WINDOWS ---------------------------
+win32: {
+
+# Copy level sounds and graphics into right destination
+system(mkdir c:\quickhitdata\leveltwo)
+system(mkdir c:\quickhitdata\leveltwo\gfx)
+system(mkdir c:\quickhitdata\leveltwo\sound)
+system(copy qml\*.* c:\quickhitdata\leveltwo)
+system(copy gfx\*.* c:\quickhitdata\leveltwo\gfx)
+system(copy sound\*.* c:\quickhitdata\leveltwo\sound)
+
+# Installs binaries
+target.path += $$[QT_INSTALL_PLUGINS]/quickhitlevels
+INSTALLS += target
+}
+
+# MAEMO_5 ---------------------------
+maemo5: {
+myQml.path = /home/user/.quickhitdata/leveltwo/
+myQml.files += qml/*
+myGraphic.path = /home/user/.quickhitdata/leveltwo/gfx/
+myGraphic.files += gfx/*
+mySound.path = /home/user/.quickhitdata/leveltwo/sound/
+mySound.files += sound/*
+
+target.path += /usr/lib/qt4/plugins/quickhitlevels
+# Installs qml, binaries, sounds and graphics
+INSTALLS += target myGraphic mySound myQml
+}
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/qml/Enemy.qml b/demos/mobile/quickhit/plugins/LevelTwo/qml/Enemy.qml
new file mode 100644
index 0000000000..1b489b282a
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/qml/Enemy.qml
@@ -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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+
+Image {
+ id: enemy
+ objectName: "enemy"
+ smooth:true
+ opacity: 0 // 0=hidden by default
+ fillMode:Image.PreserveAspectFit
+ source:"file:/"+LevelPlugin.pictureRootPath()+"enemy1.png"
+
+ property int enemySpeed: LevelPlugin.enemySpeed()
+
+ function pause(doPause) {
+ if (doPause) {
+ upToDownAnim.pause()
+ rightLeftAnim.pause()
+ } else {
+ upToDownAnim.resume()
+ rightLeftAnim.resume()
+ }
+ }
+
+ function startMovingAnim() {
+ upToDownAnim.restart()
+ rightLeftAnim.restart()
+ }
+
+ // Right-left animation
+ SequentialAnimation {
+ id: rightLeftAnim
+ loops: Animation.Infinite
+ NumberAnimation { target:enemy; property:"x";
+ to:gameArea.width - enemy.width; easing.type: Easing.OutQuad; duration: 3000 }
+ NumberAnimation { target:enemy; property:"x"; to:0; easing.type: Easing.OutQuad; duration: 3000 }
+ }
+
+ // Up to down animation
+ SequentialAnimation {
+ id: upToDownAnim
+ PropertyAnimation { target:enemy; property:"y"; to: gameArea.height;
+ easing.type: Easing.Linear; duration: enemy.enemySpeed }
+ PropertyAction { target: enemy; properties: "opacity"; value: 0 }
+ }
+}
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.js b/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.js
new file mode 100644
index 0000000000..e2e1d3a62f
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.js
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+var hiddenEnemies = new Array()
+
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.qml b/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.qml
new file mode 100644
index 0000000000..69a6593fe2
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/qml/Level.qml
@@ -0,0 +1,228 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import Qt.labs.particles 1.0
+import "Level.js" as LevelScript
+
+Item {
+ id: enemies
+ anchors.fill: parent
+
+ property int enemiesCreated: 0
+ property int enemiesEnabled: 0
+
+ property int backOneTop
+ property int backTwoTop
+
+ // Long background 2
+ Image {
+ id: longBackground_2
+ source: "file:/"+LevelPlugin.pictureRootPath()+"background_loop.png"
+ fillMode: Image.Stretch
+ smooth: false
+ width: gameArea.width
+ height: gameArea.height
+ }
+
+ // Long background 1
+ Image {
+ id: longBackground_1
+ source: "file:/"+LevelPlugin.pictureRootPath()+"background_loop.png"
+ fillMode: Image.Stretch
+ smooth: false
+ width: gameArea.width
+ height: gameArea.height
+ }
+
+ // Long background Up to down animation
+ ParallelAnimation {
+ id: backgroundAnim;
+ loops: Animation.Infinite
+ PropertyAnimation { target:longBackground_1; property:"y";
+ from:backOneTop; to:gameArea.height; easing.type:Easing.Linear; duration:10000 }
+ PropertyAnimation { target:longBackground_2; property:"y";
+ from:backTwoTop; to:backOneTop; easing.type:Easing.Linear; duration:10000 }
+ }
+
+
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ function pause(doPause) {
+ if (doPause) {
+ enemyCreationTimer.stop()
+ backgroundAnim.stop()
+ } else {
+ enemyCreationTimer.restart()
+ backgroundAnim.restart()
+ }
+ for (var i=0;i<LevelScript.hiddenEnemies.length;i++) {
+ var enemy = LevelScript.hiddenEnemies[i]
+ enemy.pause(doPause)
+ }
+ }
+
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ objectName: "level"
+
+
+ // Enemy creation timer
+ Timer {
+ id: enemyCreationTimer
+ interval: 1000; running: false; repeat: true
+ onTriggered: {
+ enableEnemy()
+ }
+ }
+
+ function enableEnemy() {
+ if (enemiesEnabled < enemiesCreated) {
+ var enemy = LevelScript.hiddenEnemies[enemiesEnabled]
+ enemy.opacity = 1
+ enemy.x = GameEngine.randInt(0,gameArea.width-enemy.width-50)
+ enemy.startMovingAnim()
+ enemyCreationTimer.stop()
+ enemyCreationTimer.interval = GameEngine.randInt(500,2000)
+ enemyCreationTimer.restart()
+ enemiesEnabled = enemiesEnabled + 1
+ GameEngine.playSound(4) // NOTE: Enable enemy sound
+ } else {
+ enemyCreationTimer.stop()
+ }
+ }
+
+ // Hidden enemies group
+ function createHiddenEnemiesGroup() {
+ for (var i=0;i<LevelPlugin.enemyCount();i++) {
+ var enemyComponent = Qt.createComponent("file:/"+LevelPlugin.qmlRootPath()+"Enemy.qml")
+ var enemyObject = enemyComponent.createObject(enemies)
+ LevelScript.hiddenEnemies.push(enemyObject)
+ enemiesCreated = enemiesCreated + 1
+ }
+ }
+
+ Component.onCompleted: {
+ // Create hidden enemies
+ createHiddenEnemiesGroup()
+ // Flying moons animation
+ starBurstTimer.restart()
+ // Create enemies timer
+ enemyCreationTimer.restart()
+
+ // Start Long background loop animation
+ backOneTop = 0
+ longBackground_1.y = backOneTop;
+ backTwoTop = gameArea.height * -1
+ longBackground_2.y = backTwoTop;
+ backgroundAnim.restart()
+
+ GameEngine.playSounds(5,3) //NOTE: Level starts sound, 3 times
+ }
+
+ Timer {
+ id: starBurstTimer
+ interval: starParticles.lifeSpan+GameEngine.randInt(100,2000); running: false; repeat: true
+ onTriggered: {
+ starParticles.burst(GameEngine.randInt(4,6))
+ }
+ }
+
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Execute explode particle effect
+ function explode(x,y) {
+ explodeParticles.x = x
+ explodeParticles.y = y
+ explodeParticles.burst(20)
+ explodeParticles.opacity = 1
+ }
+ // ***************************************************
+ // *** NOTE: This is mandatory for all level QML files
+ // Explode particle effect
+ Particles {
+ id: explodeParticles
+ opacity: 0
+ width: 1
+ height: 1
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"blue_fire.png"
+ lifeSpan: 500
+ lifeSpanDeviation: 2000
+ count: -1
+ angle: 270
+ angleDeviation: 65
+ velocity: 100
+ velocityDeviation: 100
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 300
+ acceleration: 50
+ }
+ }
+
+ Particles {
+ id: starParticles
+ y: -50
+ x: 0
+ width: parent.width
+ height: 50
+ emissionRate: 0
+ source: "file:/"+LevelPlugin.pictureRootPath()+"star3.png"
+ lifeSpan: 5000
+ count: -1
+ angle: 90
+ velocity: 100
+ opacity: 0.7
+ ParticleMotionGravity {
+ yattractor: 1000
+ xattractor: 500
+ }
+ }
+
+
+}
+
+
+
+
+
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/crash.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/crash.wav
new file mode 100644
index 0000000000..8076f0f6d7
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/crash.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/enableship.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/enableship.wav
new file mode 100644
index 0000000000..6fe5fe84fd
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/enableship.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/enemy_explosion.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/enemy_explosion.wav
new file mode 100644
index 0000000000..fd338e6b9b
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/enemy_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/laser.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/laser.wav
new file mode 100644
index 0000000000..c3b58b2022
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/laser.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/level2.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/level2.wav
new file mode 100644
index 0000000000..24d39174a8
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/level2.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/myship_explosion.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/myship_explosion.wav
new file mode 100644
index 0000000000..e22d030e1f
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/myship_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket.wav
new file mode 100644
index 0000000000..8c0dee9ac5
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket_explosion.wav b/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket_explosion.wav
new file mode 100644
index 0000000000..d2b451ccda
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/LevelTwo/sound/rocket_explosion.wav
Binary files differ
diff --git a/demos/mobile/quickhit/plugins/levelplugininterface.h b/demos/mobile/quickhit/plugins/levelplugininterface.h
new file mode 100644
index 0000000000..b8d5018032
--- /dev/null
+++ b/demos/mobile/quickhit/plugins/levelplugininterface.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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 LEVELPLUGININTERFACE_H
+#define LEVELPLUGININTERFACE_H
+
+#include <QObject>
+#include <QVariant>
+
+class LevelPluginInterface : public QObject
+{
+public:
+ // Full paths to level sounds
+ virtual QStringList levelSounds() = 0;
+
+ // Generic key/value data
+ virtual QVariant getData(QVariant key) = 0;
+
+ // Request picture size
+ virtual QVariant graphSize(QVariant pathToGraph) = 0;
+
+ // Enemy count in the level
+ virtual QVariant enemyCount() = 0;
+ // Enemy row count in the level
+ virtual QVariant enemyRowCount() = 0;
+ // Enemy speed
+ virtual QVariant enemySpeed() = 0;
+ // Enemy fire speed
+ virtual QVariant enemyFireSpeed() = 0;
+
+ // QML root path
+ virtual QVariant qmlRootPath() = 0;
+ // Picture root path
+ virtual QVariant pictureRootPath() = 0;
+
+ // Paths for GameEngine and QuickHit internal QML files
+ virtual QVariant pathToTransparentEnemyPic() = 0;
+ virtual QVariant pathToMissilePic() = 0;
+ virtual QVariant pathToEnemyMissilePic() = 0;
+ virtual QVariant pathToMyShipPic() = 0;
+};
+
+// This Qt macro associates the given Identifier "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0"
+// to the interface class called LevelPluginInterface. The Identifier must be unique.
+Q_DECLARE_INTERFACE(LevelPluginInterface,
+ "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0");
+
+
+#endif // LEVELPLUGININTERFACE_H
diff --git a/demos/mobile/quickhit/quickhit.png b/demos/mobile/quickhit/quickhit.png
new file mode 100644
index 0000000000..01d2d609c5
--- /dev/null
+++ b/demos/mobile/quickhit/quickhit.png
Binary files differ
diff --git a/demos/mobile/quickhit/quickhit.pro b/demos/mobile/quickhit/quickhit.pro
new file mode 100644
index 0000000000..e5a4b3da38
--- /dev/null
+++ b/demos/mobile/quickhit/quickhit.pro
@@ -0,0 +1,91 @@
+
+# Copyright (c) 2011 Nokia Corporation.
+
+QT += core gui declarative opengl
+
+VERSION = 1.1.1
+
+TARGET = quickhit
+TEMPLATE = app
+
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ gameengine.cpp \
+ InvSounds.cpp \
+ myeventfilter.cpp \
+ ga_src/GEAudioBuffer.cpp \
+ ga_src/GEAudioOut.cpp \
+ ga_src/GEInterfaces.cpp
+
+HEADERS += mainwindow.h \
+ gameengine.h \
+ myeventfilter.h \
+ plugins/levelplugininterface.h \
+ InvSounds.h \
+ ga_src/GEAudioBuffer.h \
+ ga_src/GEAudioOut.h \
+ ga_src/GEInterfaces.h
+
+RESOURCES += resources.qrc
+
+# QtMultimedia from Qt
+QT += multimedia
+
+symbian {
+ # in Symbian 1 we do not have OpenGL available
+ contains(SYMBIAN_VERSION, 9.4) {
+ DEFINES += QT_NO_OPENGL
+ QT -= opengl
+ warning("No OpenGL support")
+ }
+
+ CONFIG += mobility
+ MOBILITY = systeminfo
+ TARGET = QuickHit
+ TARGET.UID3 = 0xe7ced714
+
+ TARGET.CAPABILITY = NetworkServices \
+ Location \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment
+
+ LIBS += -lcone -leikcore -lavkon -lhwrmvibraclient
+
+ ICON = icon.svg
+
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x100000 0x2000000
+}
+
+maemo5 {
+ CONFIG += mobility
+ MOBILITY = systeminfo
+
+ BINDIR = /opt/usr/bin
+ DATADIR = /usr/share
+ DEFINES += DATADIR=\\\"$$DATADIR\\\" \
+ PKGDATADIR=\\\"$$PKGDATADIR\\\"
+
+ INSTALLS += target \
+ desktop \
+ icon64
+
+ target.path = $$BINDIR
+ desktop.path = $$DATADIR/applications/hildon
+ desktop.files += quickhit.desktop
+
+ icon64.path = $$DATADIR/icons/hicolor/64x64/apps
+ icon64.files += quickhit.png
+}
+
+OTHER_FILES += \
+ Game.qml \
+ Game.js \
+ MyShip.qml \
+ Missile.qml \
+ Menu.qml \
+ MenuItem.qml \
+ Button.qml \
+ Message.qml
diff --git a/demos/mobile/quickhit/resources.qrc b/demos/mobile/quickhit/resources.qrc
new file mode 100644
index 0000000000..8063bf7ad0
--- /dev/null
+++ b/demos/mobile/quickhit/resources.qrc
@@ -0,0 +1,25 @@
+<RCC>
+ <qresource prefix="/">
+ <file>Game.qml</file>
+ <file>Game.js</file>
+ <file>MyShip.qml</file>
+ <file>Missile.qml</file>
+ <file>Menu.qml</file>
+ <file>MenuItem.qml</file>
+ <file>Button.qml</file>
+ <file>Message.qml</file>
+ <file>gfx/back.png</file>
+ <file>gfx/exit.png</file>
+ <file>gfx/pause.png</file>
+ <file>gfx/soundOn.png</file>
+ <file>gfx/soundOff.png</file>
+ <file>gfx/background2.png</file>
+ <file>gfx/bigship.png</file>
+ <file>gfx/quickhit_logo.png</file>
+ <file>sound/menu1.wav</file>
+ <file>sound/menu2.wav</file>
+ <file>sound/gamestart.wav</file>
+ <file>sound/youwin.wav</file>
+ <file>sound/gameover.wav</file>
+ </qresource>
+</RCC>
diff --git a/demos/mobile/quickhit/sound/gameover.wav b/demos/mobile/quickhit/sound/gameover.wav
new file mode 100644
index 0000000000..e5b9e94d10
--- /dev/null
+++ b/demos/mobile/quickhit/sound/gameover.wav
Binary files differ
diff --git a/demos/mobile/quickhit/sound/gamestart.wav b/demos/mobile/quickhit/sound/gamestart.wav
new file mode 100644
index 0000000000..8632fca3f6
--- /dev/null
+++ b/demos/mobile/quickhit/sound/gamestart.wav
Binary files differ
diff --git a/demos/mobile/quickhit/sound/menu1.wav b/demos/mobile/quickhit/sound/menu1.wav
new file mode 100644
index 0000000000..586ab2cb82
--- /dev/null
+++ b/demos/mobile/quickhit/sound/menu1.wav
Binary files differ
diff --git a/demos/mobile/quickhit/sound/menu2.wav b/demos/mobile/quickhit/sound/menu2.wav
new file mode 100644
index 0000000000..70a61c114c
--- /dev/null
+++ b/demos/mobile/quickhit/sound/menu2.wav
Binary files differ
diff --git a/demos/mobile/quickhit/sound/youwin.wav b/demos/mobile/quickhit/sound/youwin.wav
new file mode 100644
index 0000000000..f48297dddf
--- /dev/null
+++ b/demos/mobile/quickhit/sound/youwin.wav
Binary files differ
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
index 64737c3d3a..538525974e 100644
--- a/demos/qtdemo/examplecontent.cpp
+++ b/demos/qtdemo/examplecontent.cpp
@@ -83,8 +83,10 @@ QString ExampleContent::loadDescription()
int errorLine, errorColumn;
QDomDocument exampleDoc;
- if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
- qDebug() << errorMsg << errorLine << errorColumn;
+ if (ba.isEmpty()) {
+ qDebug() << "No documentation found for" << name << "Is the documentation built?";
+ } else if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
+ qDebug() << "Error loading documentation for " << name << ": " << errorMsg << errorLine << errorColumn;
}
QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");
diff --git a/demos/spectrum/spectrum.pri b/demos/spectrum/spectrum.pri
index 57739007c0..75c011311a 100644
--- a/demos/spectrum/spectrum.pri
+++ b/demos/spectrum/spectrum.pri
@@ -41,9 +41,9 @@ win32 {
# ..$${spectrum_build_dir}
# without the result having a trailing slash where spectrum_build_dir
# is undefined.
- spectrum_build_dir = /release
- if (!debug_and_release|build_pass): CONFIG(debug, debug|release) {
- spectrum_build_dir = /debug
+ build_pass {
+ CONFIG(release, release|debug): spectrum_build_dir = /release
+ CONFIG(debug, release|debug): spectrum_build_dir = /debug
}
}
diff --git a/dist/changes-4.7.3 b/dist/changes-4.7.3
new file mode 100644
index 0000000000..1ff23c6e1f
--- /dev/null
+++ b/dist/changes-4.7.3
@@ -0,0 +1,59 @@
+Qt 4.7.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.7.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+http://qt.nokia.com/doc/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker or the Merge Request queue
+of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Merge Request: http://qt.gitorious.org
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtNetwork
+---------
+
+- SSL
+* [QTBUG-18338] blacklist fraudulent SSL certificates
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Symbian
+--------------
+
+- Bearer Management
+* [QTBUG-15108] Deadlock between SymbianEngine mutex and
+QNetworkConfigurationPrivate mutex in the symbian bearer code
+* [QTBUG-17627] qnetworksession.h Q_DECLARE_METATYPE breaks building
+QtMobility QtBearer depending applications
+
+- GraphicsView
+* [QTBUG-17966] Major regression in QGraphicsView OpenVG backend
+
+- Declarative
+* [QTBUG-17503] Export qml debugging symbols on Symbian
+
+- Widgets
+* [QTBUG-17786] BC between Qt 4.7.3 and 4.6.3 QTreeView::indexRowSizeHint
+doesn't return correct value on Symbian for row when QPushButton widget is
+inserted in the treeview
+* [QTBUG-4953] QMessageBox can not be closed/dismissed on touch phones if any
+widget is fullscreen
+
+- Painting
+* [QTBUG-17907] tst_QGraphicsTransform::rotation3d test case from
+tests/auto/qgraphicstransfor is failed for some rotation angle on
+Symbian^3 devices
+* [QTBUG-18154] Symbian's QPixmap::logicalDpi[X\Y]() incorrectly
+returns MAXINT
diff --git a/dist/changes-4.7.4 b/dist/changes-4.7.4
new file mode 100644
index 0000000000..a37e66a041
--- /dev/null
+++ b/dist/changes-4.7.4
@@ -0,0 +1,31 @@
+Qt 4.7.4 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.7.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+ http://qt.nokia.com/doc/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker or the Merge Request queue
+of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Merge Request: http://qt.gitorious.org
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
diff --git a/doc/doc.pri b/doc/doc.pri
index 3cdac61015..68d729b8db 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -15,6 +15,7 @@ win32:!win32-g++* {
$$unixstyle {
QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/bin/qdoc3 $$DOCS_GENERATION_DEFINES
+ COPYWEBKITGUIDE = $$QT_SOURCE_TREE/examples/webkit/webkit-guide
} else {
QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/bin/qdoc3.exe $$DOCS_GENERATION_DEFINES
QDOC = $$replace(QDOC, "/", "\\")
@@ -23,6 +24,7 @@ ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf
QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \
linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \
(cd $$QT_BUILD_TREE && \
+ $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc-build/html-qt && \
$$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \
$$GENERATOR doc-build/html-assistant/assistant.qhp -o doc/qch/assistant.qch && \
$$GENERATOR doc-build/html-designer/designer.qhp -o doc/qch/designer.qch && \
@@ -48,7 +50,7 @@ win32-g++*:isEmpty(QMAKE_SH) {
}
# Build rules:
-adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE)
+adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc/html)
adp_docs.depends += sub-qdoc3 # qdoc3
qch_docs.commands = $$QT_DOCUMENTATION
qch_docs.depends += sub-qdoc3
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index a1b5282aab..90a783efd4 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -153,7 +153,7 @@
\brief A Qt namespace contains enum types, functions, and sometimes classes.
- This is a list of the main namespaces in Qt.
+ This is a list of the main namespaces in Qt.
\generatelist{namespaces}
*/
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index c9f7a66e1b..95e20ddffb 100644
--- a/doc/src/classes/phonon-api.qdoc
+++ b/doc/src/classes/phonon-api.qdoc
@@ -691,11 +691,11 @@
Example where data is written repeatedly.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 0
Example where data is written once:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 1
\sa Phonon::MediaSource, Phonon::MediaObject
@@ -811,7 +811,7 @@
The function is necessary for the case where a non-seekable MediaStream is
played more than once. For a seekable stream the implementation can simply call
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 2
\sa writeData(), needData()
*/
@@ -1003,7 +1003,7 @@
send an URL or filename directly to the constructors of the
\l{Phonon::}{MediaObject}.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 3
A MediaSource object cannot be reused for another multimedia
source. It is possible to play the same source again, and also
@@ -1382,7 +1382,7 @@
immediately after you call the play() function.
A play and forget code example:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 4
\sa {Phonon Module}, MediaObject
*/
@@ -1471,7 +1471,7 @@
If you need low latency between calling play() and the sound actually
starting to play on your output device you need to use MediaObject
and be able to set the URL before calling play(). Note that
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 5
doesn't make a difference: the application should be idle between the
load and play calls so that the backend can start preloading the
media and fill audio buffers.
@@ -1612,13 +1612,13 @@
queue; the new source is then removed from the queue. The
queue can be altered at any time.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 7
You can also make use of the
\l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
guaranteed to be emitted in time for altering the queue.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 8
When playback is finishing, i.e., when a media source has been
played to the end and the queue is empty, several signals are
@@ -1715,9 +1715,9 @@
\warning The back-end is free to choose a different tick interval close
to what you asked for. This means that the following code \c may fail:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 9
On the other hand the following is guaranteed:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 10
\sa tick()
*/
@@ -1745,7 +1745,7 @@
media object gets a new source. Listen to the hasVideoChanged()
signal instead.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 11
Returns \c true if the media contains video data; otherwise,
returns \c false.
@@ -1763,7 +1763,7 @@
media object gets a new media source. The hasVideoChanged() signal
is emitted after this information is available.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 12
Returns \c true if the current media may be seeked; otherwise,
returns \c false.
@@ -1786,7 +1786,7 @@
A typical usage looks like this:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 13
*/
/*!
@@ -1867,7 +1867,7 @@
We show an example:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 14
\sa currentSource(), MediaSource
*/
@@ -2126,7 +2126,7 @@
You can use this signal to show a progress bar to the user when
in BufferingState:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 15
Note that the \l{Phonon::}{BufferingState} is commonly used when
waiting for data over a network connection, but this might not be
@@ -2270,7 +2270,7 @@
happen if the user has requested a backend change.
To connect to this signal do the following:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 16
\sa Notifier::capabilitiesChanged()
*/
@@ -2362,10 +2362,10 @@
An example use case would be to give the user a QComboBox to select
the output device:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 17
And to retrieve the selected AudioOutputDevice:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 18
*/
@@ -2565,7 +2565,7 @@
In order to use an effect, insert it into the path as follows:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 19
The effect will immediately begin applying it's transformations on
the path. To stop it, remove the Effect from the path.
@@ -3108,7 +3108,7 @@
The following code example shows how to create a path between two
media nodes and insert an effect on that path.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 20
\sa Phonon::MediaNode, Phonon::MediaObject, Phonon::AudioOutput,
Phonon::VideoWidget, {Phonon Module}
@@ -4085,7 +4085,7 @@
A typical example of usage follows below:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 21
\sa {Phonon Module}
*/
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 0655fdb55c..4dd5eb988a 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -28,15 +28,16 @@
/*!
\page qml-anchor-layout.html
\target anchor-layout
-\title Anchor-Based Layout in QML
-
-\section1 Overview
+\contentspage QML Features
+\previouspage {Using QML Positioner and Repeater Items}{Component Layouts}
+\nextpage {QML Mouse Events}{Mouse Events}
+\title Anchor-based Layout in QML
In addition to the more traditional \l Grid, \l Row, and \l Column,
QML also provides a way to layout items using the concept of \e anchors.
Each item can be thought of as having a set of 7 invisible "anchor lines":
\l {Item::anchors.left}{left}, \l {Item::anchors.horizontalCenter}{horizontalCenter},
-\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top},
+\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top},
\l {Item::anchors.verticalCenter}{verticalCenter}, \l {Item::anchors.baseline}{baseline},
and \l {Item::anchors.bottom}{bottom}.
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 59bf8f696e..129fa349f7 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -27,308 +27,214 @@
/*!
\page qdeclarativeanimation.html
-\title QML Animation
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML States}{States}
+\nextpage {QML Data Models}{Structuring Data with Models}
+\title QML Animation and Transitions
+
+\keyword qml-animation-elements
+\section1 Animation and Transitions Elements
+\list
+\o \l {Transition} - Animates transitions during state changes
+\o \l {SequentialAnimation} - Runs animations sequentially
+\o \l {ParallelAnimation} - Runs animations in parallel
+\o \l {Behavior} - Specifies a default animation for property changes
+\o \l {PropertyAction} - Sets immediate property changes during animation
+\o \l {PauseAnimation} - Introduces a pause in an animation
+\o \l {SmoothedAnimation} - Allows a property to smoothly track a value
+\o \l {SpringAnimation} - Allows a property to track a value in a spring-like motion
+\o \l {ScriptAction} - Runs scripts during an animation
+\endlist
+\keyword qml-property-animation-elements
+Elements that animate properties based on data types
+\list
+\o \l {PropertyAnimation} - Animates property changes
+\o \l {NumberAnimation} - Animates properties of type qreal
+\o \l {Vector3dAnimation} - Animates properties of type QVector3d
+\o \l {ColorAnimation} - Animates color changes
+\o \l {RotationAnimation} - Animates rotations
+\o \l {ParentAnimation} - Animates parent changes
+\o \l {AnchorAnimation} - Animates anchor changes
+\endlist
-In QML, animations are created by applying animation objects to object property
-values to gradually change them over time. Animation objects are created from
-the built-in set of animation elements, which can be used to animate various
-types of property values. In addition, animation objects can be applied in
-different ways depending on the context in which they are required.
+In QML, animations are created by applying animation elements to property
+values. Animation elements will interpolate property values to create smooth
+transitions. As well, state transitions may assign animations to state changes.
To create an animation, use an appropriate animation element for the type of
the property that is to be animated, and apply the animation depending on the
-type of behavior that is required. This page describes the \l {Types of
-Animations} that can be created and the \l {Animation Elements} that are used
-to create these animations.
-
-
-\section1 Types of Animations
-
-An animation is created in different ways depending on the context in which it
-is required. Suppose a \l Rectangle's movement - that is, changes in its \c x
-or \c y property values - should be animated. The semantics of the animation
-differ depending on whether you want to create:
-
-\list
-\o An animation that moves the \l Rectangle as soon as it is created, to a
-known position
-\o An animation that only triggers when the \l Rectangle is moved by external
-sources - for example, when the mouse is clicked, animate the movement to the
-mouse position
-\o An animation that triggers when a particular signal is received
-\o A standalone animation that is not bound to the \l Rectangle's movement, but
-instead can be started and stopped from script as required
-\o An animation that only triggers during \l{QML States}{state changes}
-\endlist
+type of behavior that is required.
-To support these different types of animation methods, QML provides several
-methods for defining an animation. These are:
+\keyword qml-triggering-animations
+\section1 Triggering Animations
-\list
-\o Creating an \l{Animations as Property Value Sources}{animation using
-property value sources}, to immediately animate a specific property
-\o Using \l{Behavioral Animations}{behavioral animations}, which are triggered
-when a property changes value
-\o \l{Animations in a Signal Handler}{Within a signal handler}, to be triggered
-when a signal is received
-\o As a \l{Standalone Animation}{standalone animation}, that can be
-started/stopped from script and can be rebound to different objects
-\o Using \l{Transitions}{transitions}, to provide animations between \l{QML
-States}{state changes}
-\endlist
+There are several ways of setting animation to an object.
-These methods are demonstrated below. Notice these examples use
-PropertyAnimation, which is one of several QML elements that can be used to
-create an animation. See the \l {Animation Elements} section further below for
-details.
+\keyword qml-direct-animation
+\section2 Direct Property Animation
+To create an immediate movement or animated movement, set the property value
+directly. This may be done in signal handlers or attached properties.
+\snippet doc/src/snippets/declarative/animation.qml direct property change
-\section2 Animations as Property Value Sources
+However, to create more control, \e {property animations} apply smooth movements
+by interpolating values between property value changes. Property animations
+provide timing controls and allows different interpolations through
+\l{qml-easing-animation}{easing curves}.
-An animation is applied as a \l{QDeclarativePropertyValueSource}{property value
-source} using the \e Animation \bold on \e Property syntax. Here is a \l
-Rectangle whose movement is animated using this method:
+\snippet doc/src/snippets/declarative/animation.qml property animation
-\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
-
-This applies a PropertyAnimation to the \l Rectangle's \c x and \c y properties
-to animate from their current values (i.e. zero) to 50, over 1000 milliseconds.
-The animation starts as soon as the \l Rectangle is loaded. To animate from
-specific values rather than the current \c x and \c y values, set the
-PropertyAnimation's \l {PropertyAnimation::}{from} property.
-
-Specifying an animation as a property value source is useful for animating a
-property to a particular value as soon as the object is loaded.
-
-
-\section2 Behavioral Animations
-
-Often an animation should be applied whenever a particular property value
-changes. In these cases, a \l Behavior can be used to specify a default
-animation for a property change. Here is an example:
-
-\snippet doc/src/snippets/declarative/animation-behavioral.qml 0
-
-This \l Rectangle has \l Behavior objects applied to its \c x and \c y
-properties. Whenever these properties change (in this case, when the mouse is
-clicked within the parent \l Item), the PropertyAnimation objects defined
-within the behaviors will be applied to these properties, thus animating the \l
-Rectangle's movement to its new position. Unlike the method of \l {Animations
-as Property Value Sources}{defining an animation as a property value source},
-which creates a one-time animation that animates a property to a known value, a
-behavioral animation is an animation that is triggered \e {in response to} a
-value change.
-
-Any changes to these properties will trigger their animations. If \c x or \c y
-were bound to other properties, and those properties changed, the animation
-would be triggered. The \l{Behavior::}{enabled} property can be used to force a
-\l Behavior to only apply under certain circumstances.
-
-Notice that unlike for property value source animations, the
-PropertyAnimation's \l {PropertyAnimation::}{from} and \l
-{PropertyAnimation::}{to} properties do not need to be defined because these
-values are already provided, respectively, by the \l Rectangle's current values
-and the new values set in the \c onClicked handler. If these properties were
-defined anyway, they would override the default values.
+Specialized \l{qml-property-animation-elements}{property animation elements}
+have more efficient implementations than the \l{PropertyAnimation} element. They
+are for setting animations to different QML types such as \c int, \c color, and
+rotations. Similarly, the \l{ParentAnimation} can animate parent changes.
-See the \l {declarative/animation/behaviors}{Behaviors example} for a
-demonstration of behavioral animations.
+See the \l {qml-controlling-animations}{Controlling Animations} section for more
+information about the different animation properties.
+\keyword qml-transition-animations
+\section2 Transitions during State Changes
-\section2 Animations in a Signal Handler
+\l{QML States}{States} are property configurations where a property may have different values to reflect different states. State changes introduce
+abrupt property changes; animations smooth transitions to produce visually
+appealing state changes.
-An animation can be created within a signal handler to be triggered when the
-signal is received. For example:
-
-\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
+The \l{Transition} element can contain
+\l{qml-animation-elements}{animation elements} to interpolate property changes
+caused by state changes. To assign the transition to an object, bind it to the
+\c transitions property.
-The PropertyAnimation is triggered when the MouseArea is clicked, animating the
-\c x and \c y properties to a value of 50 over 1000 milliseconds. Since the
-animation is not bound to a particular object or property, it must define the
-\l {PropertyAnimation::}{target} and \l {PropertyAnimation::}{property} (or \l
-{PropertyAnimation::}{targets} and \l{PropertyAnimation::}{properties}) values.
-The \l {PropertyAnimation::}{to} property is also required to specify the new
-\c x and \c y values.
+A button might have two states, the \c pressed state when the user clicks on the
+button and a \c released state when the user releases the button. We can assign
+different property configurations for each state. A transition would animate the
+change from the \c pressed state to the \c released state. Likewise, there would
+be an animation during the change from the \c released state to the \c pressed
+state.
+\snippet doc/src/snippets/declarative/animation.qml transition animation
-\section2 Standalone Animations
+Binding the \c to and \c from properties to the state's name will assign that
+particular transition to the state change. For simple or symmetric transitions,
+setting the to \c to property to the wild card symbol, "\c{*}", denotes
+that the transition applies to any state change.
-Animations can also be created as ordinary QML objects that are not bound to
-any particular objects and properties. Here is an example, using a
-PropertyAnimation object. The animation is explicitly started when the
-\l Rectangle is clicked:
+\snippet doc/src/snippets/declarative/animation.qml wildcard animation
-\snippet doc/src/snippets/declarative/animation-standalone.qml 0
+\section2 Default Animation as Behaviors
-A standalone animation object is not running by default and must be started explicitly
-using the \l {Animation::}{running} property or \l {Animation::}{start()} and
-\l {Animation::}{stop()} methods. Since the animation is not bound to a
-particular object or property, it must define the \l
-{PropertyAnimation::}{target} and \l {PropertyAnimation::}{property} (or \l
-{PropertyAnimation::}{targets} and \l{PropertyAnimation::}{properties}) values.
-The \l {PropertyAnimation::}{to} property is also required to specify the new
-\c x and \c y values. (The \l {PropertyAnimation::}{from} value can optionally
-be provided.)
+Default property animations are set using \e {behavior animations}. Animations
+declared in \l {Behavior} elements apply to the property and animates any
+property value changes. However, Behavior elements have an
+\c enabled property to purposely enable or disable the behavior animations.
-Standalone animations are useful when an animation is not targeted towards a
-single object property and the animation should be explicitly started and
-stopped.
+A ball component might have a behavior animation assigned to its \c x, \c y, and
+\c color properties. The behavior animation could be set up to simulate an
+elastic effect. In effect, this behavior animation would apply the elastic
+effect to the properties whenever the ball moves.
+\snippet doc/src/snippets/declarative/animation.qml behavior animation
-\section2 Transitions
+There are several methods of assigning behavior animations to properties. The
+\c{Behavior on <property>} declaration is a convenient way of assigning a
+behavior animation onto a property.
-Transitions are used to describe the animations to be applied when a \l {QML
-States}{state change} occurs. To create a transition, define a \l Transition
-object and add it to an item's \l {Item::}{transitions} property. An example:
+See the \l {declarative/animation/behaviors}{Behaviors example} for a
+demonstration of behavioral animations.
-\snippet doc/src/snippets/declarative/animation-transitions.qml 0
+\section1 Playing Animations in Parallel or in Sequence
-The PropertyChanges object in the \e moved state defines that when the
-\l Rectangle is in this state, its position should be changed
-to (50, 50). When the \l Rectangle changes to the \e moved state, the
-\l Transition will be triggered, and the transition's \l PropertyAnimation will
-animate the changes in the \c x and \c y properties to their new values.
-The animation will not be applied at any time other than during the state
-change.
+Animations can run \e {in parallel} or \e {in sequence}. Parallel animations
+will play a group of animations at the same time while sequential animations
+play a group of animations in order: one after the other. Grouping animations in
+\l{SequentialAnimation} and \l{ParallelAnimation} will play the animations in
+sequence or in parallel.
-Notice the example does not set any \l {PropertyAnimation::}{from} and \l
-{PropertyAnimation::}{to} values for the PropertyAnimation. As a convenience,
-these properties are automatically set to the values of \c x and \c y before
-and after the state change, respectively. However, they can be explicitly set
-if these values should be overrided.
+A banner component may have several icons or slogans to display, one after the
+other. The \c opacity property could transform to \c 1.0 denoting an opaque
+object. Using the \l{SequentialAnimation} element, the opacity animations will
+play after the preceding animation finishes. The \l{ParallelAnimation} element
+will play the animations at the same time.
-Also notice the PropertyAnimation does not need to specify a \l
-{PropertyAnimation::}{target} object; any \c x or \c y value of any object that
-has changed during the state change will be animated. However, the target can
-be set if the animation should be restricted to certain objects.
+\snippet doc/src/snippets/declarative/animation.qml sequential animation
-The top-level animations in a \l Transition are run in parallel. To run them
-one after the other, use a SequentialAnimation, as shown below in \l {Grouping
-Animations}.
+Once individual animations are placed into a SequentialAnimation or
+ParallelAnimation, they can no longer be started and stopped independently. The
+sequential or parallel animation must be started and stopped as a group.
-See the \l Transition documentation for more information.
+The \l SequentialAnimation element is also useful for playing
+\l{qml-transition-animations}{transition animations} because animations are
+played in parallel inside transitions.
+See the \l {declarative/animation/basics}{Animation basics example} for a
+demonstration of creating and combining multiple animations in QML.
-\section1 Animation Elements
+\keyword qml-controlling-animations
+\section1 Controlling Animations
-To create an animation, choose from one of the built-in QML animation elements.
-While the above examples are demonstrated using PropertyAnimation, they could
-have used other elements depending on the type of the property to be animated
-and whether a single or multiple animations are required.
+There are different methods to control animations.
-All animation elements inherit from the \l Animation element. It is not
+\section2 Animation Playback
+All \l{qml-animation-elements}{animation elements} inherit from the \l Animation element. It is not
possible to create \l Animation objects; instead, this element provides the
-essential properties and methods for animation elements. For example, it allows
-animations to be started and stopped through the \l {Animation::}{running}
-property and the \l{Animation::}{start()} and \l{Animation::}{stop()} methods.
-It can also define the number of \l {Animation::}{loops} for an animation.
+essential properties and methods for animation elements. Animation elements have
+\c{start()}, \c{stop()}, \c{resume()}, \c{pause()}, \c {restart()}, and
+\c{complete()} -- all of these methods control the execution of animations.
+\keyword qml-easing-animation
+\section2 Easing
-\section2 Property Animation Elements
+Easing curves define how the animation will interpolate between the start value
+and the end value. Different easing curves might go beyond the defined range of
+interpolation. The easing curves simplify the creation of animation effects such
+as bounce effects, acceleration, deceleration, and cyclical animations.
-PropertyAnimation is the most basic animation element for animating a property.
-It can be used to animate \c real, \c int, \c color, \c rect, \c point, \c size, and
-\c vector3d properties. It is inherited by NumberAnimation, ColorAnimation,
-RotationAnimation and Vector3dAnimation: NumberAnimation provides a more
-efficient implementation for animating \c real and \c int properties, and
-Vector3dAnimation does the same for \c vector3d properties. ColorAnimation
-and RotationAnimation provide more specific attributes for animating color
-and rotation changes.
+A QML object may have different easing curve for each property animation. There
+are also different parameters to control the curve, some of which are exclusive
+to a particular curve. For more information about the easing curves, visit the
+\l {PropertyAnimation::easing.type}{easing} documentation.
-A ColorAnimation allows color values for the \l {ColorAnimation::}{from}
-and \l {ColorAnimation::}{to} properties. The
-following animates the rectangle's \l {Rectangle::}{color} property:
-
-\snippet doc/src/snippets/declarative/animation-elements.qml color
+The \l{declarative/animation/easing}{easing example} visually demonstrates each
+of the different easing types.
-RotationAnimation allows a rotation's direction to be specified. The following
-animates the rectangle's \l {Item::rotation} property:
+\section2 Other Animation Elements
-\snippet doc/src/snippets/declarative/animation-elements.qml rotation
+In addition, QML provides several other elements useful for animation:
-In addition, the following specialized animation elements are available:
+\list
+\o PauseAnimation: enables pauses during animations
+\o ScriptAction: allows JavaScript to be executed during an animation, and can
+be used together with StateChangeScript to reused existing scripts
+\o PropertyAction: changes a property \e immediately during an animation,
+without animating the property change
+\endlist
+These are specialized animation elements that animate different property types
\list
-\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
+\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
changes in animation when the target value changes
-\o SpringAnimation: provides a spring-like animation with specialized
-attributes such as \l {SpringAnimation::}{mass},
+\o SpringAnimation: provides a spring-like animation with specialized
+attributes such as \l {SpringAnimation::}{mass},
\l{SpringAnimation::}{damping} and \l{SpringAnimation::}{epsilon}
\o ParentAnimation: used for animating a parent change (see ParentChange)
\o AnchorAnimation: used for animating an anchor change (see AnchorChanges)
\endlist
-See their respective documentation pages for more details.
-
-
-\section3 Easing
-
-Any PropertyAnimation-based animations can specify \l
-{PropertyAnimation::easing.type}{easing attributes} to control the
-easing curve applied when a property value is animated. These control the
-effect of the animation on the property value, to provide visual effects like
-bounce, acceleration and deceleration.
-
-For example, this modified version of an \l {Animations as Property Value
-Sources}{earlier example} uses \c Easing.OutBounce to create a bouncing effect
-when the animation reaches its target value:
-
-\snippet doc/src/snippets/declarative/animation-easing.qml 0
-
-The \l{declarative/animation/easing}{easing example} visually demonstrates each
-of the different easing types.
+*/
-\section2 Grouping Animations
-Multiple animations can be combined into a single animation using one of the
-animation group elements: ParallelAnimation or SequentialAnimation. As their
-names suggest, animations in a ParallelAnimation are run at the same time,
-while animations in a SequentialAnimation are run one after the other.
-To run multiple animations, define the animations within an animation group.
-The following example creates a SequentialAnimation that runs three animations
-one after the other: a NumberAnimation, a PauseAnimation and another
-NumberAnimation. The SequentialAnimation is applied as a \l{Animations as
-Property Value Sources}{property value source animation} on the image's \c y
-property, so that the animation starts as soon as the image is loaded, moving
-the image up and down:
+\snippet doc/src/snippets/declarative/animation-elements.qml color
+\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
+\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
+\snippet doc/src/snippets/declarative/animation-standalone.qml 0
+\snippet doc/src/snippets/declarative/animation-transitions.qml 0
\snippet doc/src/snippets/declarative/animation-groups.qml 0
-\image propanim.gif
-
-Since the SequentialAnimation is applied to the \c y property, the individual
-animations within the group are automatically applied to the \c y property as
-well; it is not required to set their \l{PropertyAnimation::}{properties}
-values to a particular property.
-
-Animation groups can be nested. Here is a rather complex animation making use
-of both sequential and parallel animations:
\snippet doc/src/snippets/declarative/animation-groups.qml 1
+\snippet doc/src/snippets/declarative/animation-groups.qml 0
+\image propanim.gif
-Once individual animations are placed into a SequentialAnimation or
-ParallelAnimation, they can no longer be started and stopped independently. The
-sequential or parallel animation must be started and stopped as a group.
-
-See the \l {declarative/animation/basics}{Animation basics example} for a
-demonstration of creating and combining multiple animations in QML.
-
-
-
-\section2 Other Animation Elements
-
-In addition, QML provides several other elements useful for animation:
-
-\list
-\o PauseAnimation: enables pauses during animations
-\o ScriptAction: allows JavaScript to be executed during an animation, and can
-be used together with StateChangeScript to reused existing scripts
-\o PropertyAction: changes a property \e immediately during an animation,
-without animating the property change
-\endlist
-
-See their respective documentation pages for more details.
-
-*/
diff --git a/doc/src/declarative/basicelements.qdoc b/doc/src/declarative/basicelements.qdoc
new file mode 100644
index 0000000000..0146591683
--- /dev/null
+++ b/doc/src/declarative/basicelements.qdoc
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qmlbasicelements.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage QML Features
+\nextpage {QML Basic Types}{Data Types}
+
+\title QML Basic Elements
+
+QML's basic elements allow the easy inclusion of objects into the
+scene.
+
+\section1 Basic Elements
+This is a list of some of the elements readily available for users.
+\list
+\o \l {Item}
+\o \l {Rectangle}
+\o \l {Image}
+\o \l {Text}
+\o \l {TextInput}
+\o \l {TextEdit}
+\o \l {FocusScope}
+\o \l {Component}
+\o \l {MouseArea}
+\endlist
+
+For a complete list of QML elements, please visit the \l {QML Elements} page.
+
+\section1 Properties and Qt Declarative Module
+
+When using QML elements, keep in mind that elements may possess properties that
+other elements also possess. This is because QML and its underlying engine is
+implemented in C++ using Qt. More importantly, the chain of property inheritance
+is directly due to QML's use of the \l {Qt Declarative Module} and Qt's
+\l {Meta-Object System}{meta-object} and \l {The Property System}{property} systems. For example, visual elements that have C++ implementation are sublcasses of
+\l {QDeclarativeItem}. As a result, elements such as \l {Rectangle} and
+\l {Text} elements inherit properties such as \c clip and \c smooth.
+
+\section1 Item Element
+
+Many QML elements inherit \l Item properties. \c Item possesses important properties
+such as \c focus, \c children, and dimension properties such as \c width and
+\c height. Although \c Item has physical properties, it is not a visual element.
+Using \c Item as the top-level QML element (as the screen) will not produce a
+visual result, use the \l {Rectangle} element instead. Use the \c Item to create
+opacity effects, such as when creating an invisible container to hold other
+components.
+
+\section1 Rectangle Element
+
+The \l Rectangle element is the basic visual element, for displaying different
+types of items onto the screen. The \c Rectangle is customizable and utilizes
+other elements such as \l Gradient and \l BorderImage for displaying advanced
+customized graphics.
+
+\section1 Image Element
+
+To insert an image into a QML scene, merely declare an \l Image element. The
+\c Image element can load images in formats supported by Qt.
+
+\section1 Text Elements
+
+The \l Text and \l TextEdit elements display formatted text onto the screen.
+\c TextEdit features multi-line editing while the \l TextInput element is for
+single line text input.
+
+\keyword qml-top-level-component
+\section1 Using Elements as the Top-Level Component
+
+For creating components (or displaying a simple scene), there are different
+elements that could be used as the top-level component. To display a simple scene,
+a \l Rectangle as the top-level component may suffice. \l Rectangle,
+\l FocusScope, \l Component, \l {QML:QtObject} {QtObject}, \l Item, are some of
+the commonly used elements as the top-level component.
+
+When importing components, the top-level component is important because the
+top-level component's properties are the only properties exposed to the parent.
+
+For example, a \c Button component may be implemented using different elements as
+its top-level component. When this component is loaded into another QML scene,
+the component will retain the top-level component's properties. If a non-visual
+component is the top-level component, the visual properties should be aliased to
+the top-level to display the component properly.
+
+For more information on how to build upon QML elements, see the
+\l{Importing Reusable Components} document.
+*/
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index f43e22e6ad..ff2b036d0c 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -27,23 +27,26 @@
/*!
\page qdeclarativebasictypes.html
+ \ingroup qml-features
+ \contentspage QML Features
+ \previouspage {QML Basic Elements}
+ \nextpage Property Binding
\title QML Basic Types
QML has a set of primitive types, as listed below, that are used throughout
the \l {QML Elements}.
- Some of these types can also be used for defining
- \c property values in QML. See \l{Writing QML Components: Properties, Methods and Signals} for the
- list of types that can be used for \c property values.
-
\annotatedlist qmlbasictypes
+
+ To create additional types, such as data types created in C++, read the
+ \l{Extending QML Functionalities using C++} article.
*/
/*!
\qmlbasictype int
\ingroup qmlbasictypes
- \brief An integer is a whole number, e.g. 0, 10, or -20.
+ \brief An integer is a whole number, e.g. 0, 10, or -20.
An integer is a whole number, e.g. 0, 10, or -20. The possible \c
int values range from around -2000000000 to around 2000000000,
@@ -137,7 +140,7 @@
\qmlbasictype url
\ingroup qmlbasictypes
- \brief A URL is a resource locator, like a file name.
+ \brief A URL is a resource locator, like a file name.
A URL is a resource locator, like a file name. It can be either
absolute, e.g. "http://qt.nokia.com", or relative, e.g.
@@ -150,9 +153,6 @@
Image { source: "pics/logo.png" }
\endqml
- \raw HTML
- \endraw
-
\sa {QML Basic Types}
*/
@@ -215,7 +215,7 @@
/*!
\qmlbasictype size
\ingroup qmlbasictypes
-
+
\brief A size type has width and height attributes
A \c size type has \c width and \c height attributes.
@@ -254,7 +254,7 @@
For example, to read the \l {Item::childrenRect.x}{Item::childrenRect} \c rect property:
\qml
- Rectangle {
+ Rectangle {
width: childrenRect.width
height: childrenRect.height
@@ -290,7 +290,7 @@
MyDatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" }
\endqml
- To read a date value returned from a C++ extension class, use
+ To read a date value returned from a C++ extension class, use
\l{QML:Qt::formatDate()}{Qt.formatDate()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
\sa {QML Basic Types}
@@ -309,7 +309,7 @@
MyTimePicker { time: "14:22:15" }
\endqml
- To read a time value returned from a C++ extension class, use
+ To read a time value returned from a C++ extension class, use
\l{QML:Qt::formatTime()}{Qt.formatTime()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
\sa {QML Basic Types}
@@ -399,8 +399,9 @@
\c child1, \c child2 and \c child3 will be added to the children list
in the order in which they appear.
- List \l {Adding Properties}{properties} can be declared as \c list<Type>
- type, where \c Type is the type of the object in the list:
+ List \l {Property Binding}{properties} can be created as a
+ \c variant type, or as a \c list<Type> type, where \c Type is the
+ type of the object in the list:
\qml
Item {
@@ -503,7 +504,7 @@
\qml
Item {
- property variant attributes: { ''color': 'red', 'width': 100 }
+ property variant attributes: { 'color': 'red', 'width': 100 }
Component.onCompleted: {
// Change the value of attributes.color to 'blue':
@@ -570,7 +571,7 @@
\qml
Text { horizontalAlignment: "AlignRight" }
\endqml
-
+
or as \c {<Element>.<value>}:
\qml
Text { horizontalAlignment: Text.AlignRight }
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 3962514c7d..93571bd56f 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -31,12 +31,10 @@
\ingroup qt-gui-concepts
\brief Qt Quick provides a declarative framework for building highly
-dynamic, custom user interfaces.
-
-\section1 Introduction
+dynamic user interfaces.
Qt Quick is a collection of technologies that are designed to help
-developers create the kind of intuitive, modern-looking, fluid user
+developers create the kind of intuitive, modern, fluid user
interfaces that are increasingly used on mobile phones, media players,
set-top boxes and other portable devices.
@@ -45,115 +43,108 @@ language for describing user interfaces and a language runtime. A collection
of C++ APIs is used to integrate these high level features with classic
Qt applications.
-\section2 QML, Elements and the Qt Declarative Module
-
-User interfaces and their behavior are described using QML, an extension to
-\l{About JavaScript}{JavaScript} that lets developers and designers
-use a declarative syntax to specify each user interface in terms of
-\l{QML Elements}{QML elements}. These elements are a sophisticated set of
-graphical and behavioral building blocks that can be combined together in
-\l{QML Documents}{QML documents} to build components ranging in complexity
-from simple buttons and sliders, to complete Internet-enabled applications.
-
-QML improves the integration between JavaScript and Qt's existing
-QObject-based type system, adds support for automatic
-\l{Property Binding}{property bindings} and provides
-\l{Network Transparency}{network transparency} at the language level.
-
-The Qt Declarative module implements the interface between the QML language
-and the elements available to it. It also provides a C++ API that can be
-used to load and interact with QML files from within Qt applications.
-
-Qt Quick builds on \l{QML for Qt programmers}{Qt's existing strengths}.
-QML can be be used to incrementally extend an existing application or
-to build completely new applications. QML is fully
-\l{Extending QML in C++}{extensible from C++} through the Qt Declarative
-Module.
-
\section1 Getting Started
\list
-\o \l{What's new in Qt Quick}
-\o \l{Introduction to the QML language}
-\o \l{QML for Qt Programmers}
+\o \l{Intro to Qt Quick}{Introduction to Qt Quick}
+\o \l{QML for Qt Programmers}{QML Programming for Qt Programmers}
\o \l{Getting Started Programming with QML}
-\o \l{Intro to Qt Quick}
-\endlist
-\list
-\o \l{QML Tutorial}{Tutorial: "Hello World"}
-\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"}
+\o \l{What's new in Qt Quick}{What's New in the Qt Quick Release}
\o \l{QML Examples and Demos}
\endlist
-\section1 QML Concepts
+\section1 QML Features
\list
-\o \l{QML Documents}
+\o \l{QML Basic Elements}{Basic Elements}
+\o \l{QML Basic Types}{Data Types}
\o \l{Property Binding}
-\o \l{Anchor-Based Layout in QML}
-\o \l{Writing QML Components: Properties, Methods and Signals}
-\o \l{QML Scope}
-\o \l{QML Modules}
+\o \l{Using QML Positioner and Repeater Items}{Component Layouts}
+\o \l{Anchor-based Layout in QML}{Layouts using Anchors}
+\o \l{QML Mouse Events}{Mouse Events}
+\o \l{QML Text Handling and Validators}{Text Handling and Validators}
+\o \l{Keyboard Focus in QML}{Keyboard Focus}
+\o \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+\o \l{Importing Reusable Components}
+\o \l{QML States}{States}
+\o \l{QML Animation and Transitions}{Animation and Transitions}
+\o \l{QML Data Models}{Structuring Data with Models}
+\o \l{Presenting Data with Views}
+\o \l{Extending QML Functionalities using C++}
+\o \l{Using QML Bindings in C++ Applications}
+\o \l{Integrating QML Code with Existing Qt UI Code}
+\o \l{Dynamic Object Management in QML}{Dynamic Object Management}
+\o \l{Network Transparency}{Loading Resources in QML}
+\o \l{QML Internationalization}{Internationalization}
\endlist
-\section1 User Interaction
+\section1 QML Add-Ons
\list
-\o \l{Keyboard Focus in QML}
-\o \l{QML States}
-\o \l{QML Animation}
+\o \l{QtWebKit QML Module}
+\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins}
\endlist
-\section1 Handling Data
+\section1 Qt Quick Tools
\list
-\o \l{QML Basic Types}{QML Basic Data Types}
-\o \l{Using QML Positioner and Repeater Items}
-\o \l{QML Data Models}
-\o \l{Presenting Data with QML}
-\o \l{Network Transparency}
+\o \l{Debugging QML}
+\o \l{external: Developing Qt Quick Applications with Creator}{Developing with Qt Creator}
+\o \l{QML Viewer}
\endlist
-\section1 Architecture
+\section1 Reference
\list
-\o \l{Qt Declarative UI Runtime}
-\o \l{Integrating JavaScript}
-\o \l{Dynamic Object Management in QML}
+\o \l{Introduction to the QML language}{QML Syntax}
+\o \l{QML Elements}
+\o \l{Qt Declarative Module}
+\o \l{QML Basic Types}{QML Data Types}
+\o \l{QML Coding Conventions}
+\o \l{external: Qt Creator Manual}{Qt Creator Manual}
+\o \l{Programming with Qt}
+\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility Documentation}
\endlist
-\section1 Using QML with C++
+\section1 Architecture
\list
\o \l{Qt Declarative UI Runtime}
-\o \l{Using QML in C++ Applications}
-\o \l{Integrating QML with existing Qt UI code}
-\o \l{Tutorial: Writing QML extensions with C++}
-\o \l{Extending QML in C++}
-\endlist
-
-\section1 Reference
-
-\list
-\o \l{QML Elements}
-\o \l{QML Basic Types}
+\o \l{Integrating JavaScript}
+\o \l{QML Scope}
+\o \l{QML Modules}
+\o \l{QML Documents}
\o \l{QML Global Object}
\o \l{QML Internationalization}
\o \l{QML Right-to-left User Interfaces}
\o \l{QML Security}
\o \l{Qt Declarative Module}
-\o \l{Debugging QML}
-\o \l{QML Viewer}
-\o \l{QML Performance}
-\o \l{QML Coding Conventions}
\endlist
-\section1 Online Examples
+\section1 Examples
\list
+\o \l{QML Tutorial}{"Hello World" Tutorial}
+\o \l{Getting Started Programming with QML}
+\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"}
+\o \l{Tutorial: Writing QML extensions with C++}
+\o \l{QML Examples and Demos}
+
\o Forum Nokia:
\l{http://wiki.forum.nokia.com/index.php/Qt_Quick_examples_for_porting}{Qt Quick
examples for porting}
\endlist
+
+\section1 Best Practices
+
+\list
+\o \l{QML Best Practices: Coding Conventions}{Coding Tips}
+\o \l{QML Performance}{Performance Tips}
+\endlist
+
+\section1 License Information
+\list
+\o \l{Qt Quick Licensing Information}
+\endlist
*/
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index f2ca0fdeff..90fb715e19 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -27,13 +27,17 @@
/*!
\page qdeclarativedynamicobjects.html
+\ingroup qml-features
+\contentspage {QML Features}
+\previouspage {Integrating QML Code with Existing Qt UI Code}
+\nextpage {Network Transparency}{Loading Resources in QML}
\title Dynamic Object Management in QML
-QML provides a number of ways to dynamically create and manage QML objects.
+QML provides a number of ways to dynamically create and manage QML objects.
The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements
-all support dynamic object management. Objects can also be created and managed
+all support dynamic object management. Objects can also be created and managed
from C++, and this is the preferred method for hybrid QML/C++ applications
-(see \l{Using QML in C++ Applications}).
+(see \l{Using QML Bindings in C++ Applications}).
QML also supports the dynamic creation of objects from within JavaScript
code. This is useful if the existing QML elements do not fit the needs of your
@@ -45,24 +49,24 @@ of the concepts discussed on this page.
\section1 Creating Objects Dynamically
-There are two ways to create objects dynamically from JavaScript. You can either call
+There are two ways to create objects dynamically from JavaScript. You can either call
\l {QML:Qt::createComponent()}{Qt.createComponent()} to dynamically create
a \l Component object, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
to create an item from a string of QML.
-Creating a component is better if you have an existing component defined in a \c .qml
+Creating a component is better if you have an existing component defined in a \c .qml
file, and you want to dynamically create instances of that component. Otherwise,
-creating an item from a string of QML is useful when the item QML itself is generated
+creating an item from a string of QML is useful when the item QML itself is generated
at runtime.
-\section2 Creating a Component dynamically
+\section2 Creating a Component Dynamically
-To dynamically load a component defined in a QML file, call the
-\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
+To dynamically load a component defined in a QML file, call the
+\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
This function takes the URL of the QML file as its only argument and creates
a \l Component object from this URL.
-Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
+Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
the component. This function can take one or two arguments:
\list
\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
@@ -96,25 +100,27 @@ in case the QML file is loaded over a network and thus is not ready immediately.
\codeline
\snippet doc/src/snippets/declarative/componentCreation.js finishCreation
-If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
+If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
function and call \l {Component::createObject()}{createObject()} immediately:
\snippet doc/src/snippets/declarative/componentCreation.js func
\snippet doc/src/snippets/declarative/componentCreation.js local
\snippet doc/src/snippets/declarative/componentCreation.js func-end
-Notice in both instances, \l {Component::createObject()}{createObject()} is called with
+Notice in both instances, \l {Component::createObject()}{createObject()} is called with
\c appWindow passed as an argument so that the created object will become a child of the
\c appWindow item in \c main.qml. Otherwise, the new item will not appear in the scene.
When using files with relative paths, the path should
be relative to the file where \l {QML:Qt::createComponent()}{Qt.createComponent()} is executed.
-To connect signals to (or receive signals from) dynamically created objects, use the signal
-\c connect() method. See \l {Connecting signals to methods and other signals} for more information.
+To connect signals to (or receive signals from) dynamically created objects,
+use the signal \c connect() method. See
+\l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}
+{Connecting Signals to Methods and Signals} for more information.
-\section2 Creating an object from a string of QML
+\section2 Creating an Object from a String of QML
If the QML is not defined until runtime, you can create a QML item from
a string of QML using the \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example:
@@ -164,7 +170,7 @@ items that you did not dynamically create yourself.
Items can be deleted using the \c destroy() method. This method has an optional
argument (which defaults to 0) that specifies the approximate delay in milliseconds
-before the object is to be destroyed.
+before the object is to be destroyed.
Here is an example. The \c application.qml creates five instances of the \c SelfDestroyingRect.qml
component. Each instance runs a NumberAnimation, and when the animation has finished, calls
@@ -198,7 +204,7 @@ Item {
}
\endqml
-This would result in an error, since items can only be dynamically
+This would result in an error, since items can only be dynamically
destroyed if they were dynamically created.
Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
@@ -206,6 +212,4 @@ can similarly be destroyed using \c destroy():
\snippet doc/src/snippets/declarative/createQmlObject.qml 0
\snippet doc/src/snippets/declarative/createQmlObject.qml destroy
-
*/
-
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index e2d9350f5a..8fb64c13d5 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -31,7 +31,8 @@
\title QML Elements
\brief A listing of standard QML elements.
-These are the functionally grouped lists of QML elements.
+These are the functionally grouped lists of QML elements as part of
+\l{Qt Quick}.
Elements are declared with the their name and two curly braces. Elements may
be nested in elements, thereby creating a parent-child relationship between the
@@ -44,7 +45,7 @@ To see the QML elements listed by functional area, see the
\list
\o \l {Item} - Basic item element inherited by QML elements
\o \l {Component} - Encapsulates QML elements during importing
-\o \l {QML:QtObject} {QtObject} - Basic element containing only the objectName property
+\o \l {QML:QtObject} {QtObject} - Basic element containing only the \c {objectName} property
\endlist
\section1 Graphics
@@ -54,7 +55,7 @@ To see the QML elements listed by functional area, see the
\o \l {BorderImage} - Allows the use of images as borders
\o \l {AnimatedImage} - For playing animations stored in a series of frames
\o \l {Gradient} - For defining a color gradient
-\o \l {GradientStop} - Used to define a color within a \l {Gradient}
+\o \l {GradientStop} - Used to define a color within a \l {Gradient}
\o \l {SystemPalette} - Provides access to the Qt palettes
\endlist
@@ -74,7 +75,7 @@ To see the QML elements listed by functional area, see the
\o \l {MouseArea} - Sets up an area for mouse interaction
\o \l {Keys} - Provides components with attached properties to handle key input.
\o \l {FocusScope} - Element that mediate keyboard focus changes
-\o \l {Flickable} - Provides a surface that can be "flicked"
+\o \l {Flickable} - Provides a surface that can be "flicked"
\o \l {Flipable} - Provides a surface that produces "flipping" effects
\o \l {PinchArea} - Enables simple pinch gesture handling
\endlist
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 9f84ee6ace..482a292dee 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -33,8 +33,6 @@ This example shows how to create a reusable switch component in QML.
The code for this example can be found in the \c $QTDIR/examples/declarative/ui-components/slideswitch directory.
-\section1 Overview
-
The elements that composed the switch are:
\list
@@ -123,7 +121,7 @@ For more information on scripts see \l{Integrating JavaScript}.
At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
In order for the the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
-For more information on transitions see \l{qdeclarativeanimation.html#transitions}{QML Transitions}.
+For more information on transitions see \l{QML Animation and Transitions}.
\section1 Usage
The switch can be used in a QML file, like this:
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index b359877291..b7420e011b 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -146,7 +146,6 @@ The examples can be found in Qt's \c examples/declarative directory.
\section2 Touch Interaction
\list
-\o \l{declarative/touchinteraction/gestures}{Gestures}
\o \l{declarative/touchinteraction/mousearea}{MouseArea}
\endlist
diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc
index 4caa63193f..0ddc430ea5 100644
--- a/doc/src/declarative/extending-tutorial.qdoc
+++ b/doc/src/declarative/extending-tutorial.qdoc
@@ -27,13 +27,13 @@
/*!
\page qml-extending-tutorial-index.html
-\title Tutorial: Writing QML extensions with C++
+\title Tutorial: Writing QML Extensions with C++
The Qt Declarative module provides a set of APIs for extending QML through
C++ extensions. You can write extensions to add your own QML types, extend existing
Qt types, or call C/C++ functions that are not accessible from ordinary QML code.
-This tutorial shows how to write a QML extension using C++ that includes
+This tutorial shows how to write a QML extension using C++ that includes
core QML features, including properties, signals and bindings. It also shows how
extensions can be deployed through plugins.
@@ -45,7 +45,7 @@ Tutorial chapters:
\list 1
\o \l{declarative/tutorials/extending/chapter1-basics}{Creating a New Type}
\o \l{declarative/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
-\o \l{declarative/tutorials/extending/chapter3-bindings}{Adding Property Bindings}
+\o \l{declarative/tutorials/extending/chapter3-bindings}{Property Binding}
\o \l{declarative/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
\o \l{declarative/tutorials/extending/chapter5-listproperties}{Using List Property Types}
\o \l{declarative/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
@@ -67,18 +67,18 @@ like network programming that are not accessible through built-in QML features.
In this tutorial, we will show how to use the C++ classes in the Qt Declarative
module to extend QML. The end result will be a simple Pie Chart display implemented by
-several custom QML types connected together through QML features like bindings and
+several custom QML types connected together through QML features like bindings and
signals, and made available to the QML runtime through a plugin.
To begin with, let's create a new QML type called "PieChart" that has two properties: a name
and a color. We will make it available in a \l {Modules}{module} called "Charts", with
-a module version of 1.0.
+a module version of 1.0.
We want this \c PieChart type to be usable from QML like this:
\code
import Charts 1.0
-
+
PieChart {
width: 100; height: 100
name: "A simple pie chart"
@@ -99,16 +99,16 @@ Here is our \c PieChart class, defined in \c piechart.h:
\snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0
-The class inherits from QDeclarativeItem because we want to override
+The class inherits from QDeclarativeItem because we want to override
QDeclarativeItem::paint() in order to draw. If the class just represented some
data type and was not an item that actually needed to be displayed, it could simply inherit
-from QObject. Or, if we want to extend the functionality of an existing QObject-based
+from QObject. Or, if we want to extend the functionality of an existing QObject-based
class, it could inherit from that class instead.
The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro,
-and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
-simply sets and returns the \c m_name and \c m_color values as appropriate, and
-implements \c paint() to draw a simple pie chart. It also turns off the
+and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
+simply sets and returns the \c m_name and \c m_color values as appropriate, and
+implements \c paint() to draw a simple pie chart. It also turns off the
QGraphicsItem::ItemHasNoContents flag to enable painting:
\snippet declarative/tutorials/extending/chapter1-basics/piechart.cpp 0
@@ -150,19 +150,19 @@ Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-b
At the moment, the \c app.qml is run from within a C++ application.
This may seem odd if you're used to running QML files with the \l {QML Viewer}.
-Later on, we'll show how to create a plugin so that you can run \c app.qml using the
+Later on, we'll show how to create a plugin so that you can run \c app.qml using the
\l {QML Viewer} instead.
*/
/*!
-\title Chapter 2: Connecting to C++ Methods and Signals
+\title Chapter 2: Connecting to C++ Methods and Signals
\example declarative/tutorials/extending/chapter2-methods
Suppose we want \c PieChart to have a "clearChart()" method that erases the
-chart and then emits a "chartCleared" signal. Our \c app.qml would be able
+chart and then emits a "chartCleared" signal. Our \c app.qml would be able
to call \c clearChart() and receive \c chartCleared() signals like this:
\snippet declarative/tutorials/extending/chapter2-methods/app.qml 0
@@ -210,7 +210,7 @@ Property bindings is a powerful feature of QML that allows values of different
elements to be synchronized automatically. It uses signals to notify and update
other elements' values when property values are changed.
-Let's enable property bindings for the \c color property. That means
+Let's enable property bindings for the \c color property. That means
if we have code like this:
\snippet declarative/tutorials/extending/chapter3-bindings/app.qml 0
@@ -224,7 +224,7 @@ updates to the same value. When the window is clicked, the \c onClicked
handler in the MouseArea changes the color of \c chartA, thereby changing
both charts to the color blue.
-It's easy to enable property binding for the \c color property.
+It's easy to enable property binding for the \c color property.
We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal
is emitted whenever the value changes.
@@ -244,7 +244,7 @@ It's important for \c setColor() to check that the color value has actually chan
before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and
also prevents loops when other elements respond to the value change.
-The use of bindings is essential to QML. You should always add NOTIFY
+The use of bindings is essential to QML. You should always add NOTIFY
signals for properties if they are able to be implemented, so that your
properties can be used in bindings. Properties that cannot be bound cannot be
automatically updated and cannot be used as flexibly in QML. Also, since
@@ -286,7 +286,7 @@ int-type property to store an identifier for each chart:
\endcode
We can also use various other property types. QML has built-in support for the types
-listed in the \l{Adding Properties} documentation, which includes the following:
+listed in the \l{QML Basic Types} documentation, which includes the following:
\list
\o bool, unsigned int, int, float, double, qreal
@@ -299,7 +299,7 @@ listed in the \l{Adding Properties} documentation, which includes the following:
If we want to create a property whose type is not supported by QML by default,
we need to register the type with QML.
-For example, let's replace the use of the \c property with a type called
+For example, let's replace the use of the \c property with a type called
"PieSlice" that has a \c color property. Instead of assigning a color,
we assign an \c PieSlice value which itself contains a \c color:
@@ -358,10 +358,10 @@ have a \c slices property that accepts a list of \c PieSlice items:
\image extending-tutorial-chapter5.png
To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property,
-declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
+declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
creation of list properties in QML extensions. We replace the \c pieSlice()
-function with a \c slices() function that returns a list of slices, and add
-an internal \c append_slice() function (discussed below). We also use a QList to
+function with a \c slices() function that returns a list of slices, and add
+an internal \c append_slice() function (discussed below). We also use a QList to
store the internal list of slices as \c m_slices:
\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 0
@@ -409,7 +409,7 @@ To create a plugin library, we need:
\list
\o A plugin class that registers our QML types
-\o A project file that describes the plugin
+\o A project file that describes the plugin
\o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\endlist
@@ -468,8 +468,9 @@ In this tutorial, we've shown the basic steps for creating a QML extension:
\endlist
-The \l {Extending QML in C++} reference documentation shows other useful features that can be added to
-QML extensions. For example, we could use \l{Default Property}{default properties} to allow
+The \l {Extending QML Functionalities using C++} reference documentation shows
+other useful features that can be added to QML extensions. For example, we
+could use \l{Default Property}{default properties} to allow
slices to be added without using the \c slices property:
\code
@@ -489,7 +490,8 @@ Or randomly add and remove slices from time to time using \l{Property Value Sour
\endcode
-See the \l{Extending QML in C++}{reference documentation} for more information.
+See the \l{Extending QML Functionalities using C++} reference documentation
+for more information.
*/
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 5a95551a2f..019f04a42e 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -27,7 +27,11 @@
/*!
\page qml-extending.html
-\title Extending QML in C++
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Presenting Data with Views}
+\nextpage {Using QML Bindings in C++ Applications}
+\title Extending QML Functionalities using C++
The QML syntax declaratively describes how to construct an in-memory object
tree. In Qt, QML is mainly used to describe a visual scene graph, but it is
@@ -51,7 +55,7 @@ to either instantiating an object instance, or assigning a property a value.
QML relies heavily on Qt's meta object system and can only instantiate classes
that derive from QObject. For visual element types, this will usually mean a subclass
of QDeclarativeItem; for models used with the view elements, a subclass of QAbstractItemModel;
-and for abitrary objects with properties, a direct subclass of QObject.
+and for arbitrary objects with properties, a direct subclass of QObject.
The QML engine has no intrinsic knowledge of any class types. Instead the
programmer must register the C++ types with their corresponding QML names.
@@ -82,7 +86,7 @@ Types can be registered by libraries, application code, or by plugins
Once registered, all \l {Qt's Property System}{properties} of the
supported types are available in QML. QML has intrinsic support for
-properties of the types listed in the \l{Adding Properties}
+properties of the types listed in the \l{QML Basic Types}
document, which includes the following:
\list
@@ -429,28 +433,28 @@ pointers to invalid objects. QML makes the following guarentees:
\list
\o An object assigned to a QObject (or QObject-derived) pointer property will be
-valid at the time of assignment.
+valid at the time of assignment.
-Following assignment, it is the responsibility of the class to subsequently guard
+Following assignment, it is the responsibility of the class to subsequently guard
this pointer, either through a class specific method or the generic QPointer class.
-\o An object assigned to a QVariant will be valid at the time of assignment.
+\o An object assigned to a QVariant will be valid at the time of assignment.
-When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
-typed QVariant. It is the responsibility of the class to guard the pointer. A
-general rule when writing a class that uses QVariant properties is to check the
-type of the QVariant when it is set and if the type is not handled by your class,
+When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
+typed QVariant. It is the responsibility of the class to guard the pointer. A
+general rule when writing a class that uses QVariant properties is to check the
+type of the QVariant when it is set and if the type is not handled by your class,
reset it to an invalid variant.
-\o An object assigned to a QObject (or QObject-derived) list property will be
-valid at the time of assignment.
+\o An object assigned to a QObject (or QObject-derived) list property will be
+valid at the time of assignment.
-Following assignment, it is the responsibility of the class to subsequently guard
+Following assignment, it is the responsibility of the class to subsequently guard
this pointer, either through a class specific method or the generic QPointer class.
\endlist
Elements should assume that any QML assigned object can be deleted at any time, and
-respond accordingly. If documented as such an element need not continue to work in
+respond accordingly. If documented as such an element need not continue to work in
this situation, but it must not crash.
\section1 Signal Support
@@ -477,7 +481,7 @@ but different parameters cannot be distinguished.
Signal parameters become accessible by name to the assigned script. An
unnamed parameter cannot be accessed, so care should be taken to name all the
signal parameters in the C++ class declaration. The intrinsic types
-listed in \l {Adding Types}, as well registered object types are permitted as
+listed in \l{Adding Types}, as well registered object types are permitted as
signal parameter types. Using other types is not an error, but the parameter
value will not be accessible from script.
@@ -498,7 +502,7 @@ on<Property-name>Changed, regardless of the name used for the NOTIFY
signal in C++. We recommend using <property-name>Changed() for the
NOTIFY signal in C++.
-See also \l {Writing QML Components: Properties, Methods and Signals}
+See also \l {Importing Reusable Components}
\section1 Methods
@@ -522,7 +526,7 @@ The \c {invite()} method is similarly available if it is declared as a slot.
\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 1
-The QML snippet shown above applies a property value source to the \c announcment property.
+The QML snippet shown above applies a property value source to the \c announcement property.
A property value source generates a value for a property that changes over time.
Property value sources are most commonly used to do animation. Rather than
@@ -562,7 +566,7 @@ assignment fails does the engine call the \l {QDeclarativePropertyValueSource::}
the type to also be used in contexts other than just as a value source.
\l {Extending QML - Property Value Source Example} shows the complete code used
-implement the \c HappyBirthdaySong property value source.
+to implement the \c HappyBirthdaySong property value source.
\section1 Property Binding
@@ -701,478 +705,4 @@ public:
}
};
\endcode
-
-*/
-
-/*!
-\page qml-extending-types.html
-\title Writing QML Components: Properties, Methods and Signals
-
-One of the key concepts in QML is the ability to define your own QML components that suit
-the purposes of your application. The standard \l {QML Elements} provide the essential components
-for creating a QML application; beyond these, you can write your own custom components that can
-be created and reused, without the use of C++.
-
-Components are the building blocks of a QML project. When writing a QML application, whether
-large or small, it is best to separate QML code into smaller components that perform specific
-sets of operations, instead of creating mammoth QML files with large, combined functionality
-that is more difficult to manage and may contain duplicated code.
-
-
-\section1 Defining New Components
-
-A component is a reusable type with a well-defined interface, built entirely in QML.
-Any snippet of QML code can become a component, by placing the code in a file "<Name>.qml" where
-<Name> is the new component name, beginning with an uppercase letter. These QML files automatically
-become available as new QML element types to other QML components and applications in the same directory.
-
-For example, one of the simplest and most common components you can build in QML is a
-button-type component. Below, we implement this component as a \l Rectangle with a clickable
-\l MouseArea, in a file named \c Button.qml:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0
-
-Now this component can be reused by another file within the same directory. Since the file is
-named \c Button.qml, the component is referred to as \c Button:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0
-\o \image qml-extending-types.png
-\endtable
-
-The root object in \c Button.qml defines the attributes that are available to users of the
-\c Button component. In this case, the root object is a \l Rectangle, so any properties, methods
-and signals of \l Rectangle are made available, allowing \c application.qml to
-customize the \c width, \c height, \c radius and \c color properties of \c Button objects.
-
-
-If \c Button.qml was not in the same directory, \c application.qml would need to load it as a
-\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}.
-Also, note the letter case of the component file name is significant on some (notably UNIX)
-filesystems. It is recommended the file name case matches the case of the QML component name
-exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the
-QML component will be deployed.
-
-To write a useful component, it is generally necessary to provide it with custom attributes that store and
-communicate specific data. This is achieved by adding the following attributes to your components:
-
-\list
-\o \bold Properties that can be accessed externally to modify an object (for example, \l Item has
- \l {Item::}{width} and \l {Item::}{height} properties) and used in \l {Property Binding}
-\o \bold Methods of JavaScript code can be invoked internally or externally (for example,
- \l Animation has a \l {Animation::}{start()} method)
-\o \bold Signals to notify other objects when an event has occurred (for example, MouseArea has a
- \c clicked signal)
-\endlist
-
-The following sections show how these attributes can be added to QML components.
-
-
-\section1 Adding Properties
-
-A property is a value of a QML component that can be read and modified by other objects. For
-example, a \l Rectangle component has \l {Item::}{width}, \l {Item::}{height} and \l
-{Rectangle::}{color} properties. Significantly, properties be used with \l {Property Binding}, where
-a property value is automatically updated using the value of another property.
-
-The syntax for defining a new property is:
-
-\code
-[default] property <type> <name>[: defaultValue]
-\endcode
-
-A \c property declaration can appear anywhere within a QML component definition, but it is customary
-to place it at the top. A component cannot declare more than one property with the same name. (It is
-possible to have a property name that is the same as an existing property in a type, but this is not
-recommended as the existing property becomes hidden and inaccessible.)
-
-Below is an example. The \c ImageViewer component has defined a \c string type property named
-\c currentImage, and its initial value is "default-image.png". This property is used to set the image
-displayed in the child \l Image object. Another file, \c application.qml, can create
-an \c ImageViewer object and read or modify the \c currentImage value:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0
-\endtable
-
-It is optional for a property to have a default value. The default value is a convenient shortcut, and is
-behaviorally identical to doing it in two steps, like this:
-
-\qml
-Item {
- // Use default value
- property int myProperty: 10
-
- // Longer, but behaviorally identical
- property int myProperty
- myProperty: 10
-}
-\endqml
-
-
-\section2 Supported property types
-
-All QML properties are typed. The examples above show properties with \c int and \c string types;
-notice that the type of the property must be declared. The type is used to determine the property
-behavior, and how the property is defined in C++.
-
-A number of property types are supported by default. These are listed in the table below,
-with their default values and the corresponding C++ type:
-
-\table
-\header \o QML Type Name \o Default value \o C++ Type Name
-\row \o \l int \o 0 \o int
-\row \o \l bool \o \c false \o bool
-\row \o \l double \o 0.0 \o double
-\row \o \l real \o 0.0 \o double
-\row \o \l string \o "" (empty string) \o QString
-\row \o \l url \o "" (empty url) \o QUrl
-\row \o \l color \o #000000 (black) \o QColor
-\row \o \l date \o \c undefined \o QDateTime
-\row \o \l variant \o \c undefined \o QVariant
-\endtable
-
-QML object types can also be used as property types. This includes
-\l {Defining new QML elements}{custom QML types} implemented in C++. Such properties are
-defined like this:
-
-\qml
-Item {
- property Item itemProperty
- property QtObject objectProperty
- property MyCustomType customProperty
-}
-\endqml
-
-Such object-type properties default to an \c undefined value.
-
-It is also possible to store a copy of a JavaScript object using the \c variant
-property type. This creates some restrictions on how the property should be used;
-see the \l {variant}{variant type documentation} for details.
-
-\l{list}{List properties} are created with the \c list<Type> syntax, and default to an empty
-list:
-
-\qml
-Item {
- property list<Item> listOfItems
-}
-\endqml
-
-Note that list properties cannot be modified like ordinary JavaScript
-arrays. See the \l {list}{list type documentation} for details.
-
-
-\section2 Property change signals
-
-Adding a \c property to an item automatically adds a \e {value changed}
-signal handler to the item. To connect to this signal, use a \l {Signal Handlers}{signal handler}
-named with the \c on<Property>Changed syntax, using upper case for the first letter of the
-property name.
-
-For example, the following \c onMyNumberChanged signal handler is automatically called whenever the
-\c myNumber property changes:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0
-
-
-\section2 Default properties
-
-The optional \c default attribute for a property marks it as the \e {default property}
-for a type. This allows other items to specify the default property's value
-as child elements. For example, the \l Item element's default property is its
-\l{Item::children}{children} property. This allows the children of an \l Item
-to be set like this:
-
-\qml
-Item {
- Rectangle {}
- Rectangle {}
-}
-\endqml
-
-If the \l{Item::children}{children} property was not the default property for
-\l Item, its value would have to be set like this instead:
-
-\qml
-Item {
- children: [
- Rectangle {},
- Rectangle {}
- ]
-}
-\endqml
-
-See the \l{declarative/ui-components/tabwidget}{TabWidget} example for a
-demonstration of using default properties.
-
-Specifying a default property overrides any existing default property (for
-example, any default property inherited from a parent item). Using the
-\c default attribute twice in the same type block is an error.
-
-
-\section2 Property aliases
-
-Property aliases are a more advanced form of property declaration. Unlike a
-property definition, which allocates a new, unique storage space for the
-property, a property alias connects the newly declared property (called the
-aliasing property) as a direct reference to an existing property (the aliased property). Read
-operations on the aliasing property act as read operations on the aliased
-property, and write operations on the aliasing property as write operations on
-the aliased property.
-
-A property alias declaration looks a lot like an ordinary property definition:
-\code
- [default] property alias <name>: <alias reference>
-\endcode
-
-As the aliasing property has the same type as the aliased property, an explicit
-type is omitted, and the special "alias" keyword is used. Instead of a default
-value, a property alias includes a compulsory alias reference. The alias
-reference is used to locate the aliased property. While similar to a property
-binding, the alias reference syntax is highly restricted.
-
-An alias reference takes one of the following forms:
-\code
- <id>.<property>
- <id>
-\endcode
-
-where <id> must refer to an object id within the same component as the type
-declaring the alias, and, optionally, <property> refers to a property on that object.
-
-For example, below is a \c Button.qml component with a \c buttonText aliased property which is
-connected to the child Text object's \c text property:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0
-
-The following code would create a \c Button with a defined text string for the
-child \l Text object:
-
-\qml
-Button { buttonText: "This is a button" }
-\endqml
-
-Here, modifying \c buttonText directly modifies the \c textItem.text value; it does not
-change some other value that then updates \c textItem.text.
-
-In this case, the use of aliased properties is essential. If \c buttonText was not an alias,
-changing its value would not actually change the displayed text at all, as
-\l {Property Binding}{property bindings} are not bi-directional: the \c buttonText value would
-change when \c textItem.text changes, but not the other way around.
-
-Aliased properties are also useful for allowing external objects to directly modify and
-access child objects in a component. For example, here is a modified version of the \c ImageViewer
-component shown \l {Adding Properties}{earlier} on this page. The \c currentImage property has
-been changed to an alias to the child \l Image object:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0
-\endtable
-
-Instead of being limited to setting the \l Image source, \c application.qml can now directly
-access and modify the child \l Image object and its properties.
-
-Obviously, exposing child objects in this manner should be done with care, as it allows external
-objects to modify them freely. However, this use of aliased properties can be quite useful in
-particular situations, such as for the \l {declarative/ui-components/tabwidget}{TabWidget}
-example, where new tab items are actually parented to a child object that displays the current tab.
-
-
-\section3 Considerations for property aliases
-
-Aliases are only activated once the component specifying them is completed. The
-most obvious consequence of this is that the component itself cannot generally
-use the aliased property directly during creation. For example, this will not work:
-
-\code
- // Does NOT work
- property alias buttonText: textItem.text
- buttonText: "Some text" // buttonText is not yet defined when this value is set
-\endcode
-
-A second, much less significant, consequence of the delayed activation of
-aliases is that an alias reference cannot refer to another aliasing property
-declared within the same component. This will not work:
-
-\code
- // Does NOT work
- id: root
- property alias buttonText: textItem.text
- property alias buttonText2: root.buttonText
-\endcode
-
-At the time the component is created, the \c buttonText value has not yet been assigned,
-so \c root.buttonText would refer to an undefined value. (From outside the component,
-however, aliasing properties appear as regular Qt properties and consequently can be
-used in alias references.)
-
-It is possible for an aliased property to have the same name as an existing property. For example,
-the following component has a \c color alias property, named the same as the built-in
-\l {Rectangle::color} property:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0
-
-Any objects that use this component and refer to its \c color property will be
-referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally,
-however, the rectangle can correctly set this property to "red" and refer to the actual defined
-property rather than the alias.
-
-
-\section1 Adding Methods
-
-A QML component can define methods of JavaScript code. These methods can be invoked
-either internally or by other objects.
-
-The syntax for defining a method is:
-
-\code
-function <name>([<parameter name>[, ...]]) { <body> }
-\endcode
-
-This declaration may appear anywhere within a type body, but it is customary to
-include it at the top. Attempting to declare two methods or signals with the
-same name in the same type block is an error. However, a new method may reuse
-the name of an existing method on the type. (This should be done with caution,
-as the existing method may be hidden and become inaccessible.)
-
-Unlike \l{Adding Signals}{signals}, method parameter types do not have to be declared as they
-default to the \c variant type. The body of the method is written in JavaScript and may access
-the parameters by name.
-
-Here is an example of a component with a \c say() method that accepts a single \c text argument:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0
-
-A method can be connected to a signal so that it is automatically invoked whenever the signal
-is emitted. See \l {Connecting signals to methods and other signals} below.
-
-Also see \l {Integrating JavaScript} for more information on using JavaScript with QML.
-
-
-\section1 Adding Signals
-
-Signals provide a way to notify other objects when an event has occurred. For example, the MouseArea
-\c clicked signal notifies other objects that the mouse has been clicked within the area.
-
-The syntax for defining a new signal is:
-
-\code
-signal <name>[([<type> <parameter name>[, ...]])]
-\endcode
-
-This declaration may appear anywhere within a type body, but it is customary to
-include it at the top. Attempting to declare two signals or methods with the
-same name in the same type block is an error. However, a new signal may reuse
-the name of an existing signal on the type. (This should be done with caution,
-as the existing signal may be hidden and become inaccessible.)
-
-Here are three examples of signal declarations:
-
-\code
-Item {
- signal clicked
- signal hovered()
- signal performAction(string action, variant actionArgument)
-}
-\endcode
-
-If the signal has no parameters, the "()" brackets are optional. If parameters are used, the
-parameter types must be declared, as for the \c string and \c variant arguments for the \c
-performAction signal above; the allowed parameter types are the same as those listed in the \l
-{Adding Properties} section on this page.
-
-Adding a signal to an item automatically adds a \l {Signal Handlers}{signal handler} as well.
-The signal hander is named \c on<SignalName>, with the first letter of the signal being upper
-cased. The above example item would now have the following signal handlers:
-
-\list
-\o onClicked
-\o onHovered
-\o onPerformAction
-\endlist
-
-To emit a signal, simply invoke it in the same way as a method. Below left, when the \l MouseArea is
-clicked, it emits the parent \c buttonClicked signal by invoking \c rect.buttonClicked(). The
-signal is received by \c application.qml through an \c onButtonClicked signal handler:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0
-\endtable
-
-If the signal has parameters, they are accessible by parameter name in the signal handler.
-In the example below, \c buttonClicked is emitted with \c xPos and \c yPos parameters instead:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0
-\endtable
-
-
-\section2 Connecting signals to methods and other signals
-
-Signal objects have a \c connect() method that can be used to a connect a signal to a method or
-another signal. When a signal is connected to a method, the method is automatically invoked
-whenever the signal is emitted. (In Qt terminology, the method is a \e slot that is connected
-to the \e signal; all methods defined in QML are created as Qt slots.) This enables a signal
-to be received by a method instead of a \l {Signal Handlers}{signal handler}.
-
-For example, the \c application.qml above could be rewritten as:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0
-
-The \c myMethod() method will be called whenever the \c buttonClicked signal is received.
-
-In many cases it is sufficient to receive signals through signal handlers rather than using
-the \c connect() function; the above example does not provide any improvements over using a
-simple \c onButtonClicked handler. However, if you are \l{Dynamic Object Management in QML}{creating objects dynamically},
-or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find the
-\c connect() method useful. For example, the component below creates three \c Button
-objects dynamically, and connects the \c buttonClicked signal of each object to the
-\c myMethod() function:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0
-
-In the same way, you could connect a signal to methods defined in a dynamically
-created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}.
-
-There is also a corresponding \c disconnect() method for removing connected signals. The following
-code removes the connection created in \c application.qml above:
-
-\qml
-// application.qml
-Item {
- // ...
-
- function removeSignal() {
- button.clicked.disconnect(item.myMethod)
- }
-}
-\endqml
-
-
-\section3 Forwarding signals
-
-The \c connect() method can also connect a signal to other signals. This has the effect
-of "forwarding" a signal: it is automatically emitted whenever the relevant signal is emitted. For
-example, the MouseArea \c onClicked handler in \c Button.qml above could have been replaced with
-a call to \c connect():
-
-\qml
-MouseArea {
- anchors.fill: parent
- Component.onCompleted: clicked.connect(item.buttonClicked)
-}
-\endqml
-
-Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will
-automatically be emitted as well.
*/
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 599d63ca81..940f864f76 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -28,11 +28,16 @@
/*!
\target qmlfocus
\page qdeclarativefocus.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Text Handling and Validators}{Text Handling and Validators}
+\nextpage {QML Signal and Handler Event System}{Signal and Handler Event System}
+
\title Keyboard Focus in QML
When a key is pressed or released, a key event is generated and delivered to the
focused QML \l Item. To facilitate the construction of reusable components
-and to address some of the cases unique to fluid user interfaces, the QML items add a
+and to address some of the cases unique to fluid user interfaces, the QML items add aged
\e scope based extension to Qt's traditional keyboard focus model.
\tableofcontents
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index f0d3a37f5e..c2f55f5267 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -27,7 +27,11 @@
/*!
\page qml-integration.html
-\title Integrating QML with existing Qt UI code
+\ingroup qml-features
+\previouspage {Using QML Bindings in C++ Applications}
+\nextpage {Dynamic Object Management in QML}{Dynamic Object Management}
+\contentspage QML Features
+\title Integrating QML Code with Existing Qt UI Code
There are a number of ways to integrate QML into QWidget-based UI applications,
depending on the characteristics of your existing UI code.
@@ -37,8 +41,8 @@ depending on the characteristics of your existing UI code.
If you have an existing QWidget-based UI, QML widgets can be integrated into
it using QDeclarativeView. QDeclarativeView is a subclass of QWidget so you
-can add it to your user interface like any other QWidget. Use
-QDeclarativeView::setSource() to load a QML file into the view, then add the
+can add it to your user interface like any other QWidget. Use
+QDeclarativeView::setSource() to load a QML file into the view, then add the
view to your UI:
\code
@@ -52,7 +56,7 @@ layout->addWidget(qmlView);
The one drawback to this approach is that QDeclarativeView is slower to initialize
and uses more memory than a QWidget, and creating large numbers of QDeclarativeView
-objects may lead to performance degradation. If this is the case, it may be
+objects may lead to performance degradation. If this is the case, it may be
better to rewrite your widgets in QML, and load the widgets from a main QML widget
instead of using QDeclarativeView.
@@ -70,7 +74,7 @@ of simple and dynamic elements.
If you have an existing UI based on the \l{Graphics View Framework},
you can integrate QML widgets directly into your QGraphicsScene. Use
QDeclarativeComponent to create a QGraphicsObject from a QML file, and
-place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
+place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
reparent it to an item already in the \l{QGraphicsScene}.
For example:
@@ -95,12 +99,13 @@ of QML UIs:
\section2 Loading QGraphicsWidget objects in QML
-An alternative approach is to expose your existing QGraphicsWidget objects to
+An alternative approach is to expose your existing QGraphicsWidget objects to
QML and construct your scene in QML instead. See the \l {declarative-cppextensions-qgraphicslayouts.html}{graphics layouts example}
which shows how to expose Qt's graphics layout classes to QML in order
to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout.
To expose your existing QGraphicsWidget classes to QML, use \l {qmlRegisterType()}.
-See \l{Extending QML in C++} for further information on using C++ types in QML.
+See \l{Extending QML Functionalities using C++} for further information on
+how to use C++ types in QML.
*/
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index 65877f9605..f78f3c264d 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -205,7 +205,7 @@ component destruction.
Property bindings can be created in JavaScript by assigning the property with a \c function
that returns the required value.
-See \l {Binding Properties from JavaScript} for details.
+See \l {qml-javascript-assignment}{Property Assignment versus Property Binding} for details.
\section1 Receiving QML Signals in JavaScript
@@ -224,7 +224,8 @@ in \c script.js:
The \c jsFunction() will now be called whenever MouseArea's \c clicked signal is emitted.
-See \l {Connecting signals to methods and other signals} for more information.
+See \l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}
+{Connecting Signals to Methods and Signals} for more information.
\section1 QML JavaScript Restrictions
@@ -292,8 +293,8 @@ To run code after the environment setup has completed, refer to
\o The value of \c this is currently undefined in QML in the majority of contexts
-The \c this keyword is supported when \l {Binding Properties from JavaScript}
-{binding properties from JavaScript}. In all other situations, the value of
+The \c this keyword is supported when binding properties from JavaScript.
+In all other situations, the value of
\c this is undefined in QML.
To refer to any element, provide an \c id. For example:
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index f1ebd00cba..dbc8806742 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -51,16 +51,14 @@ example, an \c import statement is required to use:
An \c import statement includes the module name, and possibly a version number.
This can be seen in the snippet commonly found at the top of QML files:
-\qml
-import QtQuick 1.0
-\endqml
+\snippet doc/src/snippets/declarative/imports/qtquick-1.0.qml import
This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML
library itself must be imported to use any of the \l {QML Elements}, as they
are not included in the global namespace by default.)
The \c Qt module is an \e installed module; it is found in the
-\l{The QML import path}{import path}. There are two types of QML modules:
+\l{#import-path}{import path}. There are two types of QML modules:
located modules (defined by a URL) and installed modules (defined by a URI).
@@ -94,24 +92,25 @@ MyQMLProject
\endcode
\o
-\code
+\qml
import "../MyComponents"
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
-\endcode
+\endqml
\endtable
Similarly, if the directory resided on a network source, it could
be imported like this:
-\code
- import "http://www.my-server.com/MyQMLProject/MyComponents"
- import "http://www.my-server.com/MyQMLProject/MyComponents" 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/network-imports.qml imports
A located module can also be imported as a network resource if it has a
\l{Writing a qmldir file}{qmldir file} in the directory that specifies the QML files
@@ -127,14 +126,18 @@ Window 1.0 Window.qml
If the \c MyComponents directory was then hosted as a network resource, it could
be imported as a module, like this:
-\code
+\qml
import "http://the-server-name.com/MyQMLProject/MyComponents"
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
-\endcode
+\endqml
with an optional "1.0" version specification. Notice the import would fail if
a later version was used, as the \c qmldir file specifies that these elements
@@ -145,7 +148,8 @@ defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{
are not available.
-\section1 Installed modules
+\target import-path
+\section1 Installed Modules
Installed modules are modules that are made available through the QML import path,
as defined by QDeclarativeEngine::importPathList(), or modules defined within
@@ -156,10 +160,7 @@ path or network resource URL.
When importing an installed module, an un-quoted URI is
used, with a mandatory version number:
-\code
- import QtQuick 1.0
- import com.nokia.qml.mymodule 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/installed-module.qml imports
When a module is imported, the QML engine searches the QML import path for a matching
module. The root directory of the module must contain a
@@ -190,7 +191,7 @@ Additional import paths can be added through QDeclarativeEngine::addImportPath()
can also use the \c -I option to add an import path.
-\section2 Creating installed modules
+\section2 Creating Installed Modules
As an example, suppose the \c MyQMLProject directory in the \l{Located Modules}{previous example}
was located on the local filesystem at \c C:\qml\projects\MyQMLProject. The \c MyComponents
@@ -211,8 +212,12 @@ without referring to the module's absolute filesystem location:
import projects.MyQMLProject.MyComponents 1.0
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
\endqml
@@ -225,22 +230,20 @@ defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{
are not available.
-\section2 Creating installed modules in C++
+\section2 Creating Installed Modules in C++
C++ applications can define installed modules directly within the application using qmlRegisterType().
For example, the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++ tutorial}
defines a C++ class named \c PieChart and makes this type available to QML by calling qmlRegisterType():
-\qml
+\code
qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
-\endqml
+\endcode
This allows the application's QML files to use the \c PieChart type by importing the declared
\c Charts module:
-\qml
-import Charts 1.0
-\endqml
+\snippet doc/src/snippets/declarative/imports/chart.qml import
For \l{QDeclarativeExtensionPlugin}{QML plugins}, the
module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes(). This method
@@ -253,9 +256,7 @@ example:
Once the plugin is built and installed, and includes a \l{Writing a qmldir file}{qmldir file},
the module can be imported from QML, like this:
-\code
-import com.nokia.TimeExample 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/timeexample.qml import
Unlike QML types defined by QML files, a QML type defined in a C++ extension plugin cannot be loaded by
a module that is imported as a network resource.
@@ -269,47 +270,34 @@ By default, when a module is imported, its contents are imported into the global
To import a module into a specific namespace, use the \e as keyword:
-\qml
- import QtQuick 1.0 as QtLibrary
- import "../MyComponents" as MyComponents
- import com.nokia.qml.mymodule 1.0 as MyModule
-\endqml
+\snippet doc/src/snippets/declarative/imports/named-imports.qml imports
Types from these modules can then only be used when qualified by the namespace:
-\qml
- QtLibrary.Rectangle { ... }
-
- MyComponents.Slider { ... }
-
- MyModule.SomeComponent { ... }
-\endqml
+\snippet doc/src/snippets/declarative/imports/named-imports.qml imported items
Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace:
-\qml
- import QtQuick 1.0 as Nokia
- import Ovi 1.0 as Nokia
-\endqml
+\snippet doc/src/snippets/declarative/imports/merged-named-imports.qml imports
-\section2 JavaScript files
+\section2 JavaScript Files
JavaScript files must always be imported with a named import:
\qml
- import "somescript.js" as MyScript
+import "somescript.js" as MyScript
- Item {
- //...
- Component.onCompleted: MyScript.doSomething()
- }
+Item {
+ //...
+ Component.onCompleted: MyScript.doSomething()
+}
\endqml
The qualifier ("MyScript" in the above example) must be unique within the QML document.
Unlike ordinary modules, multiple scripts cannot be imported into the same namespace.
-\section1 Writing a qmldir file
+\section1 Writing a qmldir File
A \c qmldir file is a metadata file for a module that maps all type names in
the module to versioned QML files. It is required for installed modules, and
diff --git a/doc/src/declarative/mouseevents.qdoc b/doc/src/declarative/mouseevents.qdoc
new file mode 100644
index 0000000000..ade676024d
--- /dev/null
+++ b/doc/src/declarative/mouseevents.qdoc
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page mouseevents.html
+\title QML Mouse Events
+\ingroup QML Features
+\previouspage {Anchor-based Layout in QML}{Layouts using Anchors}
+\nextpage {QML Text Handling and Validators}{Text Handling and Validators}
+\contentspage QML Features
+
+\tableofcontents
+
+\section1 Mouse Elements
+
+\list
+\o \l{MouseArea} Element
+\o \l{MouseEvent} Object
+\endlist
+
+\section1 Mouse Event Handling
+
+QML uses \l{QML Signal and Handler Event System}{signals and handlers} to
+deliver mouse interactions. Specifically, the \l MouseArea and \l MouseEvent
+elements provide QML components with signal handlers to accept mouse events
+within a defined area.
+
+\section1 Defining a Mouse Area
+
+The \l MouseArea element receives events within a defined area. One quick way
+to define this area is to anchor the \c MouseArea to its parent's area using the
+\c anchors.fill property. If the parent is a \l Rectangle (or any \l Item
+component), then the MouseArea will fill the area defined by the parent's
+dimensions. Alternatively, an area smaller or larger than the parent is
+definable.
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml anchor fill
+
+\section1 Receiving Events
+
+The MouseArea element provides
+\l{QML Signal and Handler Event System}{signals and handlers} to detect different
+mouse events. The \l MouseArea element documentation describes these
+gestures in greater detail:
+
+\list
+\o canceled
+\o clicked
+\o doubleClicked
+\o entered
+\o exited
+\o positionChanged
+\o pressAndHold
+\o pressed
+\o released
+\endlist
+
+These signals have signal handlers that are invoked when the signals are emitted.
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml mouse handlers
+
+\section1 Enabling Gestures
+Some mouse gestures and button clicks need to be enabled before they send or
+receive events. Certain \l MouseArea and \l MouseEvent properties enable these
+gestures.
+
+To listen to (or explicitly ignore) a certain mouse button, set the appropriate
+mouse button to the \l {MouseArea::acceptedButtons}{acceptedButtons} property.
+
+Naturally, the mouse events, such as button presses and mouse positions, are
+sent during a mouse click. For example, the \c containsMouse property will only
+retrieve its correct value during a mouse press. The
+\l {MouseArea::hoverEnabled}{hoverEnabled} will enable mouse events and
+positioning even when there are no mouse button presses. Setting the
+\c hoverEnabled property to \c true, in turn will enable the \c entered,
+\c exited, and \c positionChanged signal and their respective signal handlers.
+
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml enable handlers
+Additionally, to disable the whole mouse area, set the \c MouseArea
+element's \c enabled property to \c false.
+
+\section1 MouseEvent Object
+
+Signals and their handlers receive a \l MouseEvent object as a parameter. The
+\c mouse object contain information about the mouse event. For example, the
+mouse button that started the event is queried through the
+\l {MouseEvent::button}{mouse.button} property.
+
+The \c MouseEvent object can also ignore a mouse event using its \c accepted
+property.
+
+\section2 Accepting Further Signals
+Many of the signals are sent multiple times to reflect various mouse events
+such as double clicking. To facilitate the classification of mouse clicks, the
+MouseEvent object has an \c accepted property to disable the event propagation.
+
+To learn more about QML's event system, please read the \l {QML Signal and Handler Event System} document.
+*/
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
index 675a0aaef7..1b2934a41c 100644
--- a/doc/src/declarative/network.qdoc
+++ b/doc/src/declarative/network.qdoc
@@ -27,6 +27,10 @@
/*!
\page qdeclarativenetwork.html
+\ingroup qml-features
+\previouspage {Dynamic Object Management in QML}{Dynamic Object Management}
+\nextpage {QML Internationalization}{Internationalization}
+\contentspage QML Features
\title Network Transparency
QML supports network transparency by using URLs (rather than file names) for all
@@ -57,7 +61,7 @@ Network transparency is supported throughout QML, for example:
Even QML types themselves can be on the network - if the \l {QML Viewer} is used to load
\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", the engine
will load \tt http://example.com/mystuff/qmldir and resolve the type just as it would for a local file.
-For example if the qmldir file contains the line "World World.qml", it will load
+For example if the qmldir file contains the line "World World.qml", it will load
\tt http://example.com/mystuff/World.qml
Any other resources that \tt Hello.qml referred to, usually by a relative URL, would
similarly be loaded from the network.
diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc
index 5493d4ad64..763bc88077 100644
--- a/doc/src/declarative/positioners.qdoc
+++ b/doc/src/declarative/positioners.qdoc
@@ -27,9 +27,12 @@
/*!
\page qml-positioners.html
+\ingroup qml-features
+\previouspage Property Binding
+\nextpage Anchor-based Layout in QML
+\contentspage QML Features
\title Using QML Positioner and Repeater Items
-\section1 Introduction
Positioner items are container items that manage the positions and sizes of
items in a declarative user interface. Positioners behave in a similar way to
@@ -53,7 +56,7 @@ graphical elements:
\section2 Column
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-column.png
\enddiv
@@ -70,7 +73,7 @@ must be added to a parent Rectangle, if desired.
\section2 Row
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-row.png
\enddiv
@@ -87,7 +90,7 @@ left around the edges of the horizontally centered Row item.
\section2 Grid
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-grid-spacing.png
\enddiv
@@ -97,7 +100,7 @@ in a 2-by-2 grid. As with the other positioners, the spacing between items
can be specified using the \l{Grid::spacing}{spacing} property.
\clearfloat
-\snippet doc/src/snippets/declarative/grid/grid-spacing.qml document
+\snippet doc/src/snippets/declarative/grid-spacing.qml document
There is no difference between horizontal and vertical spacing inserted
between items, so any additional space must be added within the items
@@ -108,7 +111,7 @@ at the appropriate places in the Grid definition.
\section2 Flow
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-flow-text1.png
\inlineimage qml-flow-text2.png
\enddiv
@@ -137,7 +140,7 @@ control of spacing between items and between lines of items.
\section1 Repeaters
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-repeater-grid-index.png
\enddiv
diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
index 379a4ec655..88ec5c3f26 100644
--- a/doc/src/declarative/propertybinding.qdoc
+++ b/doc/src/declarative/propertybinding.qdoc
@@ -27,192 +27,298 @@
/*!
\page propertybinding.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Basic Types}{Data Types}
+\nextpage {Using QML Positioner and Repeater Items}{Component Layouts}
\title Property Binding
-Property binding is a declarative way of specifying the value of a property. Binding allows
-a property's value to be expressed as an JavaScript expression that defines the value relative
-to other property values or data accessible in the application. The property value is
-automatically kept up to date if the other properties or data values change.
+\section1 Properties
-Property bindings are created implicitly in QML whenever a property is assigned an JavaScript
-expression. The following QML uses two property bindings to connect the size of the rectangle
-to that of \c otherItem.
+QML components have \e properties that can be read and modified by other objects.
+In QML, properties serve many purposes but their main function is to bind to
+values. Values may be a \l{QML Basic Types}{basic type}, or other QML elements.
-\code
-Rectangle {
- width: otherItem.width
- height: otherItem.height
-}
-\endcode
+The syntax for properties is:
-QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
-used as a property binding. Bindings can access object properties, make function calls and even
-use builtin JavaScript objects like \e {Date} and \e {Math}. Assigning a constant value to a
-property can even be thought of as a binding - after all, a constant is a valid JavaScript
-expression! Here are some examples of more complex bindings:
-
-\code
-Rectangle {
- function calculateMyHeight() {
- return Math.max(otherItem.height, thirdItem.height);
- }
-
- anchors.centerIn: parent
- width: Math.min(otherItem.width, 10)
- height: calculateMyHeight()
- color: { if (width > 10) "blue"; else "red" }
-}
-\endcode
+\tt{[default] property <type> <name>[: defaultValue]}
-While syntactically bindings can be of arbitrary complexity, if a binding starts to become
-overly complex - such as involving multiple lines, or imperative loops - it may be better
-to refactor the component entirely, or at least factor the binding out into a separate
-function.
+Elements already possess useful properties but, to create custom properties,
+precede the property name with the keyword \c property.
-\section1 Changing Bindings
-
-The \l PropertyChanges element can be used within a state change to modify the bindings on
-properties.
-
-This example modifies the \l Rectangle's width property binding to be \c {otherItem.height}
-when in the "square" state. When it returns to its default state, width's original property
-binding will have been restored.
-
-\code
-Rectangle {
- id: rectangle
- width: otherItem.width
- height: otherItem.height
-
- states: State {
- name: "square"
- PropertyChanges {
- target: rectangle
- width: otherItem.height
- }
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/properties.qml parent begin
+\snippet doc/src/snippets/declarative/properties.qml inherited properties
+\snippet doc/src/snippets/declarative/properties.qml custom properties
+\snippet doc/src/snippets/declarative/properties.qml parent end
+QML property rules coincide with many of JavaScript's property rules, for example,
+property names must begin with a lowercase letter.
+\l {JavaScript Reserved Words}{JavaScript reserved words} are not valid property
+names.
-\section1 Binding Properties from JavaScript
+\section1 Property Binding
-When working with both QML and JavaScript, it is important to differentiate between
-\l {Property Binding} syntax in QML and simple \e {property assignment} in JavaScript. Take
-the example below, which uses property binding to ensure the item's \c height is always twice
-its \c width:
-
-\qml
-Item {
- width: 100
- height: width * 2
-}
-\endqml
-
-On the other hand, take the following JavaScript code snippet, which \e assigns, rather
-than \e binds, the value of the \c height property:
-
-\code
-Item {
- width: 100
-
- Component.onCompleted: {
- height = width * 2 // if width changes later, height is not updated!
- }
-}
-\endcode
+Property binding is a declarative way of specifying the value of a property. Binding allows
+a property's value to be expressed as an JavaScript expression that defines the value relative
+to other property values or data accessible in the application. The property value is
+automatically kept up to date if the other properties or data values change.
-Instead of creating a property binding, this simply sets the \c height property to the correct
-value \e {at the time that} the JavaScript code is invoked. Unlike the first example, the
-\c height will never change if \c width changes.
+Property bindings are created in QML using the colon "\c {:}" before the value:
+\snippet doc/src/snippets/declarative/properties.qml property binding
+The property binding causes the width of the \c Rectangle to update whenever the
+\c {parent}'s width changes.
-The \e {property : value} syntax for property binding is QML-specific and cannot be used in
-JavaScript. Instead, to bind a property from JavaScript, assign a \e function to the property
-that returns the required value. The following code correctly sets the property binding
-created in the first example, but creates the binding in JavaScript rather than QML:
+QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
+used as a property binding. Bindings can access object properties, make function calls and even
+use built-in JavaScript objects such as \c {Date} and \c {Math}.
+\snippet doc/src/snippets/declarative/properties.qml JavaScript sample
-\qml
-Item {
- width: 100
+While syntactically bindings can be of arbitrary complexity, if a binding starts to become
+overly complex - such as involving multiple lines, or imperative loops - it may be better
+to refactor the component entirely, or at least factor the binding out into a separate
+function.
- Component.onCompleted: {
- height = (function() { return width * 2 })
- }
-}
-\endqml
+\keyword qml-javascript-assignment
+\section1 Property Assignment versus Property Binding
+When working with both QML and JavaScript, it is important to differentiate between
+QML property binding and JavaScript value assignment. In QML, a property
+binding is created using the colon "\c {:}".
+\snippet doc/src/snippets/declarative/properties.qml property binding
+The property binding causes the width of the \c Rectangle to update whenever the
+\c {parent}'s width changes.
-\section2 Using \c this to create a binding
+Assigning a property value (using the equals sign "\c {=}") does not create a
+property binding.
+\snippet doc/src/snippets/declarative/properties.qml property assignment
-When creating a property binding from JavaScript, QML allows the use of the \c this keyword to
-refer to the object to which the property binding will be assigned. This allows one to
-explicitly refer to a property within an object when there may be ambiguity about the exact
-property that should be used for the binding.
+Instead of creating a property binding, the assignment simply sets the \c Rectangle
+\c width value to a number when the \c Component.onCompleted code is invoked.
-For example, the \c Component.onCompleted handler below is defined within the scope of the
-\l Item, and references to \c width within this scope would refer to the \l Item's width, rather
-than that of the \l Rectangle. To bind the \l Rectangle's \c height to its own \c width, the
-function needs to explicitly refer to \c this.width rather than just \c width. Otherwise, the
-height of the \l Rectangle would be bound to the width of the \l Item and not the \l Rectangle.
+Assigning a value to a property that is already bound will remove the previous binding.
+A property can only have one value at a time (a list of property is one value),
+and if any code explicitly re-sets this value, the property binding is removed.
-\qml
-Item {
- width: 500
- height: 500
+There is no way to create a property binding directly from imperative JavaScript code,
+although it is possible to use the \l {Using the Binding Element}{Binding} element.
- Rectangle {
- id: rect
- width: 100
- color: "yellow"
- }
+\section1 Types of Properties
- Component.onCompleted: {
- rect.height = (function() { return this.width * 2 })
- }
-}
-\endqml
+Properties may bind to different types, but they are are \e type-safe. That is,
+properties only allow you to assign a value that matches the property type. For
+example, if a property is a real, and if you try to assign a string to it you
+will get an error.
-(In this case, the function could also have referred to \c rect.width rather than \c this.width.)
+\badcode
+property real volume: "four" //generates an error
+\endcode
-Note that the value of \c this is not defined outside of its use in property binding.
-See \l {QML JavaScript Restrictions} for details.
+Certain properties bind to more complex types such as other elements and objects.
+
+\keyword qml-basic-property-types
+\section2 Basic Property Types
+Basic types such as \l int, \l real, and other Qt structures may be bound to
+properties. For a list of types, visit the \l {QML Basic Types} document.
-\section2 Effects of property assignment
+\keyword qml-id-property
+\section2 The \c id Property
+
+Each QML object may be given a special unique property called an \c id.
+No other object within the same QML component (see \l{QML Documents}) can have
+the same \c id value. QML objects may then access an object using the \c id
+property.
+\snippet doc/src/snippets/declarative/properties.qml id property
+A component may readily access its parent's properties by using the \c parent
+property.
-Note that assigning a value to a property that is currently bound will remove the binding.
-A property can only have one value at a time, and if any code explicitly sets this value, the
-binding is removed. In the following example, although \c width has been bound to \c height,
-the binding is removed by the JavaScript code that assigns \c width to 50:
+Note that an \c id must begin with a lower-case letter or an underscore. The
+\c id cannot contain characters other than letters, numbers, underscores, and
+\l {JavaScript Reserved Words}{JavaScript reserved words}.
+
+\section2 Elements and Objects as Property Values
-\code
-Item {
- width: height * 2
- height: 100
+Many properties bind to objects. For example, the \l Item element has a
+\c states property that can bind to \l State elements. This type of property
+binding allows elements to carry additional non-children elements. \c Item's
+\c transitions property behaves in a similar way; it can bind to \l Transition
+elements.
+
+Care must be taken when referring to the parent of an object property binding.
+Elements and components that are bound to properties are not necessarily set
+as children of the properties' component.
+
+\snippet doc/src/snippets/declarative/properties.qml object binding
+The code snippet has a \l Gradient element that attempts to print its parent's
+\c width value. However, the \c Gradient element is bound to the \c gradient
+property, not the \c children property of the \c Rectangle. As a result, the
+\c Gradient does not have the \c Rectangle as its parent. Printing the value
+of \c{parent.width} generates an error. Printing the \c Rectangle object's
+first child's \c name will print \c {childrectangle} because the second
+\c Rectangle is bound to the \c children property.
+
+For more information about the \c children property, please read the
+\l {Default Properties} section.
+
+\keyword attached-properties
+\section2 Attached Properties
+
+Certain objects provide additional properties by \e attaching properties to other
+objects. For example, the \l Keys element have properties that can \e attach to other QML
+objects to provide keyboard handling.
+
+\snippet doc/src/snippets/declarative/properties.qml list attached property
+The element \l ListView provides the delegate, \c listdelegate, the property
+\c isCurrentItem as an attached property. The \c ListView.isCurrentItem
+\e{attached property} provides highlight information to the delegate.
+Effectively, the \l ListView element attaches the \c ListView.isCurrentItem
+property to each delegate it creates.
+
+\keyword attached-signalhandlers
+\section2 Attached Signal Handlers
+
+\e {Attached signal handlers} are similar
+to \l{Attached Properties}{attached properties} in that they attach to objects
+to provide additional functionality to objects. Two prominent elements,
+\l Component and \l Keys element provide
+\l{QML Signal and Handler Event System}{signal handlers} as attached signal
+handlers.
+\snippet doc/src/snippets/declarative/properties.qml attached signal handler
+
+Read the \l{QML Signal and Handler Event System} and the \l{Keyboard Focus in QML}
+articles for more information.
+
+\section2 List properties
+
+Some properties may accept a binding to a list property, where more than one
+component can bind to the property. List properties allow multiple
+\l {State}{States}, \l {Gradient}{Gradients}, and other components to bind to a
+single property.
+\snippet doc/src/snippets/declarative/properties.qml list property
+The list is enclosed in square brackets, with a comma separating the
+list elements. In cases where you are only assigning a single item to a
+list, you may omit the square brackets.
+\snippet doc/src/snippets/declarative/properties.qml single property
+
+To access the list, use the \c index property.
+\snippet doc/src/snippets/declarative/properties.qml print list property
+The snippet code simply prints the name of the first state, \c FETCH.
+
+ See the \l{list}{list type} documentation
+for more details about list properties and their available operations.
+
+\keyword qml-grouped-properties
+\section2 Grouped Properties
+
+In some cases properties form a logical group and use either the \e dot notation
+or \e group notation.
+
+Grouped properties may be written both ways:
+\snippet doc/src/snippets/declarative/properties.qml grouped properties
+
+In the element documentation grouped properties are shown using the dot notation.
+
+\section2 Property Aliases
+
+Unlike a property definition, which allocates a new, unique storage space for
+the property, a property alias connects the newly declared property, called the
+\e{aliasing property} as a direct reference to an existing property, the
+\e{aliased property}. Read or write operations on the aliasing property results
+in a read or write operations on the aliased property, respectively.
+
+A property alias declaration is similar to an ordinary property definition:
+
+\tt{[default] property alias <name>: <alias reference>}
+
+As the aliasing property has the same type as the aliased property, an explicit
+type is omitted, and the special \c alias keyword is before the property name.
+Instead of a default value, a property alias has a compulsory alias reference.
+Accessing the aliasing property is similar to accessing a regular property. In
+addition, the optional \c default keyword indicates that the aliasing property
+is a \l{Default Properties}{default property}.
+
+\snippet doc/src/snippets/declarative/Button.qml property alias
+When importing the component as a \c Button, the \c buttonlabel is directly
+accessible through the \c label property.
+\snippet doc/src/snippets/declarative/properties.qml alias usage
+In addition, the \c id property may also be aliased and referred outside the
+component.
+\snippet doc/src/snippets/declarative/Button.qml parent begin
+\snippet doc/src/snippets/declarative/Button.qml id alias
+\snippet doc/src/snippets/declarative/Button.qml parent end
+The \c imagebutton component has the ability to modify the child \l Image object
+ and its properties.
+\snippet doc/src/snippets/declarative/properties.qml image alias
+
+Using aliases, properties may be exposed to the
+\l{qml-top-level-component}{top level component}. Exposing properties to the
+top-level component allows components to have interfaces similar to Qt widgets.
+
+\section3 Considerations for property aliases
+
+Aliases are only activated once the component
+\l{Component::onCompleted}{completes} its initialization. An error is generated
+when an uninitialized alias is referenced. Likewise, aliasing an aliasing
+property will also result in an error.
+
+\snippet doc/src/snippets/declarative/properties.qml alias complete
+
+When importing the component, however, aliasing properties appear as regular Qt
+properties and consequently can be used in alias references.
+
+It is possible for an aliasing property to have the same name as an existing
+property, effectively overwriting the existing property. For example,
+the following component has a \c color alias property, named the same as the built-in
+\l {Rectangle::color} property:
+
+\snippet doc/src/snippets/declarative/properties.qml alias overwrite
+
+Any object that use this component and refer to its \c color property will be
+referring to the alias rather than the ordinary \l {Rectangle::color} property.
+Internally, however, the \c coloredrectangle can correctly set its \c color
+property and refer to the actual defined property rather than the alias.
+
+The \l{declarative/ui-components/tabwidget}{TabWidget} example uses
+aliases to reassign children to the \l ListView, creating a tab effect.
+
+\keyword default-properties
+\section2 Default Properties
- Component.onCompleted: {
- width = 50;
- }
-}
-\endcode
+When imported, QML components will bind declared children to their designated
+\e{default properties}. The optional \c default attribute specifies a property
+as the \e {default property}. For example, the State element's default property
+is its \l{State::changes}{changes} property. \l PropertyChanges elements
+may simply be placed as the \c{State}'s children and they will be bound to the
+\c changes property.
+\snippet doc/src/snippets/declarative/properties.qml state default
+
+Similarly, the \l Item element's default property is its
+\l{Item::data}{data} property. The \c data property manages Item's
+\c children and \c resources properties. This way, different data types may be
+placed as direct children of the \c Item.
+\snippet doc/src/snippets/declarative/properties.qml default property
+Reassigning a default property is useful when a component is reused. For
+example, the \l{declarative/ui-components/tabwidget}{TabWidget} example uses
+the \c default attribute to reassign children to the \l ListView, creating
+a tab effect.
-\section1 The Binding Element
+\section1 Using the Binding Element
-The implicit binding syntax shown previously is easy to use and works perfectly for most uses
-of bindings. In some advanced cases, it is necessary to create bindings explicitly using the
-\l Binding element.
+In some advanced cases, it may be necessary to create bindings explicitly with
+the\l Binding element.
-For example, to bind a property exposed from C++ (\c system.brightness) to a value
-coming from QML (\c slider.value), you could use the Binding element as follows:
-\qml
-Binding {
- target: system
- property: "brightness"
- value: slider.value
-}
-\endqml
+For example, to bind a property exposed from C++ (\c system.brightness) to a
+value written in QML (\c slider.value), you could use the \l Binding element as
+follows:
+\snippet doc/src/snippets/declarative/properties.qml binding element
+\section1 Changing Property Values in States
+The \l PropertyChanges element is for setting property bindings within a
+\l State element to set a property binding.
+
+\snippet doc/src/snippets/declarative/properties.qml PropertyChanges element
+The rectangle's \c color property will bind to the \c warning component's
+\c color property when its \c state is set to the \c WARNING state.
*/
-
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index b94e32ec15..423d77c775 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -30,8 +30,6 @@
\title QML Documents
\brief A description of QML documents and the kind of content they contain.
-\section1 Introduction
-
A QML document is a block of QML source code. QML documents generally correspond to files
stored on a disk or at a location on a network, but they can also be constructed directly
from text data.
@@ -42,17 +40,17 @@ Here is a simple QML document:
QML documents are always encoded in UTF-8 format.
-A QML document always begins with one or more import statements. To prevent elements
-introduced in later versions from affecting existing QML programs, the element types
-available within a document are controlled by the imported QML \l {Modules}. That is,
+A QML document always begins with one or more import statements. To prevent elements
+introduced in later versions from affecting existing QML programs, the element types
+available within a document are controlled by the imported QML \l {Modules}. That is,
QML is a \e versioned language.
-Syntactically a QML document is self contained; QML does \e not have a preprocessor that
-modifies the document prior to presentation to the QML runtime. \c import statements
-do not "include" code in the document, but instead instruct the QML runtime on how to
-resolve type references found in the document. Any type reference present in a QML
-document - such as \c Rectangle and \c ListView - including those made within an
-\l {Inline JavaScript}{JavaScript block} or \l {Property Binding}s, are \e resolved based exclusively on the
+Syntactically a QML document is self contained; QML does \e not have a preprocessor that
+modifies the document prior to presentation to the QML runtime. \c import statements
+do not "include" code in the document, but instead instruct the QML runtime on how to
+resolve type references found in the document. Any type reference present in a QML
+document - such as \c Rectangle and \c ListView - including those made within an
+\l {Inline JavaScript}{JavaScript block} or \l {Property Binding}s, are \e resolved based exclusively on the
import statements. QML does not import any modules by default, so at least one \c import
statement must be present or no elements will be available!
@@ -63,12 +61,12 @@ resolved according to the document scope.
\section1 Documents as Component Definitions
-A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
-is a template that is interpreted by the QML runtime to create an object with some predefined
-behaviour. As it is a template, a single QML component can be "run" multiple times to
-produce several objects, each of which are said to be \e instances of the component.
+A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
+is a template that is interpreted by the QML runtime to create an object with some predefined
+behaviour. As it is a template, a single QML component can be "run" multiple times to
+produce several objects, each of which are said to be \e instances of the component.
-Once created, instances are not dependent on the component that created them, so they can
+Once created, instances are not dependent on the component that created them, so they can
operate on independent data. Here is an example of a simple "Button" component (defined
in a \c Button.qml file) that is instantiated four times by \c application.qml.
Each instance is created with a different value for its \c text property:
@@ -80,7 +78,7 @@ Each instance is created with a different value for its \c text property:
\row
\o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document
-\o
+\o
\qml
import QtQuick 1.0
@@ -112,23 +110,23 @@ to other QML components and applications in the same directory.
\section1 Inline Components
In addition to the top-level component that all QML documents define, and any reusable
-components placed in separate files, documents may also
-include \e inline components. Inline components are declared using the
-\l Component element, as can be seen in the first example above. Inline components share
+components placed in separate files, documents may also
+include \e inline components. Inline components are declared using the
+\l Component element, as can be seen in the first example above. Inline components share
all the characteristics of regular top-level components and use the same \c import list as their
-containing QML document. Components are one of the most basic building blocks in QML, and are
+containing QML document. Components are one of the most basic building blocks in QML, and are
frequently used as "factories" by other elements. For example, the \l ListView element uses the
\c delegate component as the template for instantiating list items - each list item is just a
new instance of the component with the item specific data set appropriately.
-Like other \l {QML Elements}, the \l Component element is an object and must be assigned to a
+Like other \l {QML Elements}, the \l Component element is an object and must be assigned to a
property. \l Component objects may also have an object id. In the first example on this page,
-the inline component is added to the \l Rectangle's \c resources list, and then
-\l {Property Binding} is used to assign the \l Component to the \l ListView's \c delegate
+the inline component is added to the \l Rectangle's \c resources list, and then
+\l {Property Binding} is used to assign the \l Component to the \l ListView's \c delegate
property. While using property binding allows the \l Component object to be shared (for example,
-if the QML document contained multiple \l ListView's with the same delegate), in this case the
-\l Component could have been assigned directly to the \l ListView's \c delegate. The QML
-language even contains a syntactic optimization when assigning directly to a component property
+if the QML document contained multiple \l ListView's with the same delegate), in this case the
+\l Component could have been assigned directly to the \l ListView's \c delegate. The QML
+language even contains a syntactic optimization when assigning directly to a component property
for this case where it will automatically insert the \l Component tag.
These final two examples are behaviorally identical to the original document.
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index 9ca8938c56..bbee37cfba 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -27,9 +27,12 @@
/*!
\page qdeclarativei18n.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Network Transparency}{Loading Resources in QML}
+\nextpage {QML Features}
\title QML Internationalization
-\section1 Overview
Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
QT_TR_NOOP(), and QT_TRANSLATE_NOOP() functions.
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 9409eaf032..23dd390000 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -27,10 +27,14 @@
/*!
\page qdeclarativemodels.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Animation and Transitions}{Animation and Transitions}
+\nextpage {Presenting Data with Views}
\target qmlmodels
\title QML Data Models
-QML items such as ListView, GridView and \l Repeater require Data Models
+QML items such as ListView, GridView and \l Repeater require Data Models
that provide the data to be displayed.
These items typically require a \e delegate component that
creates an instance for each item in the model. Models may be static, or
@@ -38,7 +42,7 @@ have items modified, inserted, removed or moved dynamically.
Data is provided to the delegate via named data roles which the
delegate may bind to. Here is a ListModel with two roles, \e type and \e age,
-and a ListView with a delegate that binds to these roles to display their
+and a ListView with a delegate that binds to these roles to display their
values:
\snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document
@@ -48,7 +52,7 @@ properties, the roles can be accessed with the qualified \e model name instead.
For example, if a \l Text element had \e type or \e age properties, the text in the
above example would display those property values instead of the \e type and \e age values
from the model item. In this case, the properties could have been referenced as
-\c model.type and \c model.age instead to ensure the delegate displays the
+\c model.type and \c model.age instead to ensure the delegate displays the
property values from the model item.
A special \e index role containing the index of the item in the model
@@ -68,11 +72,13 @@ QML provides several types of data models among the built-in set of
QML elements. In addition, models can be created with C++ and then
made available to QML components.
-The views used to access data models are described in \l{Presenting Data with QML}.
+The views used to access data models are described in the
+\l{Presenting Data with Views} overview.
The use of positioner items to arrange items from a model is covered in
\l{Using QML Positioner and Repeater Items}.
+\keyword qml-data-models
\section1 QML Data Models
\section2 ListModel
@@ -108,7 +114,7 @@ XmlListModel allows construction of a model from an XML data source. The roles
are specified via the \l XmlRole element.
The following model has three roles, \e title, \e link and \e description:
-\code
+\qml
XmlListModel {
id: feedModel
source: "http://rss.news.yahoo.com/rss/oceania"
@@ -117,7 +123,7 @@ XmlListModel {
XmlRole { name: "link"; query: "link/string()" }
XmlRole { name: "description"; query: "description/string()" }
}
-\endcode
+\endqml
The \l{demos/declarative/rssnews}{RSS News demo} shows how XmlListModel can
be used to display an RSS feed.
@@ -125,31 +131,19 @@ be used to display an RSS feed.
\section2 VisualItemModel
-VisualItemModel allows QML items to be provided as a model.
+VisualItemModel allows QML items to be provided as a model.
This model contains both the data and delegate; the child items of a
-VisualItemModel provide the contents of the delegate. The model
+VisualItemModel provide the contents of the delegate. The model
does not provide any roles.
-\code
- VisualItemModel {
- id: itemModel
- Rectangle { height: 30; width: 80; color: "red" }
- Rectangle { height: 30; width: 80; color: "green" }
- Rectangle { height: 30; width: 80; color: "blue" }
- }
-
- ListView {
- anchors.fill: parent
- model: itemModel
- }
-\endcode
+\snippet doc/src/snippets/declarative/models/visual-model-and-view.qml visual model and view
Note that in the above example there is no delegate required.
The items of the model itself provide the visual elements that
will be positioned by the view.
-
+\keyword qml-c++-models
\section1 C++ Data Models
Models can be defined in C++ and then made available to QML. This is useful
@@ -165,7 +159,7 @@ models.
A model may be a simple QStringList, which provides the contents of the list via the \e modelData role.
-Here is a ListView with a delegate that references its model item's
+Here is a ListView with a delegate that references its model item's
value using the \c modelData role:
\snippet examples/declarative/modelviews/stringlistmodel/view.qml 0
@@ -184,7 +178,7 @@ the model by calling QDeclarativeContext::setContextProperty() again.
\section2 QObjectList-based model
-A list of QObject* values can also be used as a model. A QList<QObject*> provides
+A list of QObject* values can also be used as a model. A QList<QObject*> provides
the properties of the objects in the list as roles.
The following application creates a \c DataObject class that with
@@ -205,7 +199,7 @@ the ListView delegate:
\snippet examples/declarative/modelviews/objectlistmodel/view.qml 0
-Note the use of the fully qualified access to the \c color property.
+Note the use of the fully qualified access to the \c color property.
The properties of the object are not replicated in the \c model
object, since they are easily available via the \c modelData
object.
@@ -221,10 +215,10 @@ the model by calling QDeclarativeContext::setContextProperty() again.
A model can be defined by subclassing QAbstractItemModel. This is the
best approach if you have a more complex model that cannot be supported
-by the other approaches. A QAbstractItemModel can also automatically
+by the other approaches. A QAbstractItemModel can also automatically
notify a QML view when the model data has changed.
-The roles of a QAbstractItemModel subclass can be exposed to QML by calling
+The roles of a QAbstractItemModel subclass can be exposed to QML by calling
QAbstractItemModel::setRoleNames(). The default role names set by Qt are:
\table
@@ -244,9 +238,9 @@ that has \e type and \e size roles. It calls QAbstractItemModel::setRoleNames()
role names for accessing the properties via QML:
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 0
-\dots
+\dots
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 1
-\dots
+\dots
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 2
\codeline
\snippet examples/declarative/modelviews/abstractitemmodel/model.cpp 0
@@ -261,14 +255,14 @@ roles:
QML views are automatically updated when the model changes. Remember the model
must follow the standard rules for model changes and notify the view when
-the model has changed by using QAbstractItemModel::dataChanged(),
+the model has changed by using QAbstractItemModel::dataChanged(),
QAbstractItemModel::beginInsertRows(), etc. See the \l {Model subclassing reference} for
more information.
The complete example is available in Qt's \l {declarative/modelviews/abstractitemmodel}{examples/declarative/modelviews/abstractitemmodel} directory.
QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML
-can only display list data.
+can only display list data.
In order to display child lists of a hierarchical model
the VisualDataModel element provides several properties and functions for use
with models of type QAbstractItemModel:
@@ -283,14 +277,14 @@ with models of type QAbstractItemModel:
\section2 Exposing C++ Data Models to QML
-The above examples use QDeclarativeContext::setContextProperty() to set
-model values directly in QML components. An alternative to this is to
-register the C++ model class as a QML type from a QML C++ plugin using
-QDeclarativeExtensionPlugin. This would allow the model classes to be
+The above examples use QDeclarativeContext::setContextProperty() to set
+model values directly in QML components. An alternative to this is to
+register the C++ model class as a QML type from a QML C++ plugin using
+QDeclarativeExtensionPlugin. This would allow the model classes to be
created directly as elements within QML:
\table
-\row
+\row
\o
\code
@@ -299,7 +293,7 @@ class MyModelPlugin : public QDeclarativeExtensionPlugin
public:
void registerTypes(const char *uri)
{
- qmlRegisterType<MyModel>(uri, 1, 0,
+ qmlRegisterType<MyModel>(uri, 1, 0,
"MyModel");
}
}
@@ -339,7 +333,7 @@ An integer can be used to specify a model that contains a certain number
of elements. In this case, the model does not have any data roles.
The following example creates a ListView with five elements:
-\code
+\qml
Item {
width: 200; height: 250
@@ -355,7 +349,7 @@ Item {
}
}
-\endcode
+\endqml
\section2 An Object Instance
@@ -367,7 +361,7 @@ The example below creates a list with one item, showing the color of the
\e myText text. Note the use of the fully qualified \e model.color property
to avoid clashing with \e color property of the Text element in the delegate.
-\code
+\qml
Rectangle {
width: 200; height: 250
@@ -389,7 +383,7 @@ Rectangle {
delegate: myDelegate
}
}
-\endcode
+\endqml
\section1 Accessing Views and Models from Delegates
@@ -408,44 +402,7 @@ In the following example, the delegate shows the property \e{language}
of the model, and the color of one of the fields depends on the
property \e{fruit_color} of the view.
-\code
-Rectangle {
- width: 200; height: 200
-
- ListModel {
- id: fruitModel
- property string language: "en"
- ListElement {
- name: "Apple"
- cost: 2.45
- }
- ListElement {
- name: "Orange"
- cost: 3.25
- }
- ListElement {
- name: "Banana"
- cost: 1.95
- }
- }
-
- Component {
- id: fruitDelegate
- Row {
- Text { text: " Fruit: " + name; color: ListView.view.fruit_color }
- Text { text: " Cost: $" + cost }
- Text { text: " Language: " + ListView.view.model.language }
- }
- }
-
- ListView {
- property color fruit_color: "green"
- model: fruitModel
- delegate: fruitDelegate
- anchors.fill: parent
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/models/views-models-delegates.qml rectangle
Another important case is when some action (e.g. mouse click) in the
delegate should update data in the model. In this case you can define
@@ -457,92 +414,11 @@ a function in the model, e.g.:
...and call it from the delegate using:
-\code
+\js
ListView.view.model.setData(index, field, value)
-\endcode
+\endjs
...assuming that \e{field} holds the name of the field which should be
updated, and that \e{value} holds the new value.
*/
-
-/*!
-\page qml-presenting-data.html
-\title Presenting Data with QML
-
-\section1 Introduction
-
-Qt Quick contains a set of standard items that can be used to present data in a
-number of different ways. For simple user interfaces,
-\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used
-in combination with
-\l{Using QML Positioner and Repeater Items#Positioners}{Positioners}
-to obtain pieces of data and arrange them in a user interface. However, when
-large quantities of data are involved, it is often better to use models with
-the standard views since these contain many built-in display and navigation
-features.
-
-\section1 Views
-
-Views are scrolling containers for collections of items. They are feature-rich,
-supporting many of the use cases found in typical applications, and can be
-customized to meet requirements on style and behavior.
-
-A set of standard views are provided in the basic set of Qt Quick
-graphical elements:
-
-\list
-\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list
-\o \l{#GridView}{GridView} arranges items in a grid within the available space
-\o \l{#PathView}{PathView} arranges items on a path
-\endlist
-
-Unlike these items, \l WebView is not a fully-featured view item, and needs
-to be combined with a \l Flickable item to create a view that performs like
-a Web browser.
-
-\section2 ListView
-
-\l ListView shows a classic list of items with horizontal or vertical placing
-of items.
-
-\div{float-right}
-\inlineimage qml-listview-snippet.png
-\enddiv
-
-The following example shows a minimal ListView displaying a sequence of
-numbers (using an \l{QML Data Models#An Integer}{integer as a model}).
-A simple delegate is used to define an items for each piece of data in the
-model.
-
-\clearfloat
-\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document
-
-
-
-\section2 GridView
-
-\l GridView displays items in a grid like an file manager's icon view.
-
-\section2 PathView
-
-\l PathView displays items on a path, where the selection remains in
-the same place and the items move around it.
-
-\section1 Decorating Views
-
-\section2 Headers and Footers
-
-\section2 Sections
-
-\section2 Navigation
-
-In traditional user interfaces, views can be scrolled using standard
-controls, such as scroll bars and arrow buttons. In some situations, it
-is also possible to drag the view directly by pressing and holding a
-mouse button while moving the cursor. In touch-based user interfaces,
-this dragging action is often complemented with a flicking action, where
-scrolling continues after the user has stopped touching the view.
-
-\section1 Further Reading
-*/
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 6d5aebc461..655b64712f 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -27,197 +27,110 @@
/*!
\page qdeclarativestates.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Importing Reusable Components}
+\nextpage {QML Animation and Transitions}{Animation and Transitions}
\target qmlstates
\title QML States
-\section1 Overview
-
-User interfaces are designed to present different interface configurations in
-different scenarios, or to modify their appearances in response to user
-interaction. Often, there are a set of changes that are made concurrently, such
-that the interface could be seen to be internally changing from one \e state to
-another.
+\section1 States Elements
+\list
+\o \l State
+\o \l PropertyChanges
+\o \l StateGroup
+\o \l StateChangeScript
+\o \l ParentChange
+\o \l AnchorChanges
+\endlist
-This applies generally to interface elements regardless of their complexity.
-A photo viewer may initially present images in a grid, and when an image is
-clicked, change to a "detailed" state where the individual image is expanded
-and the interface is changed to present new options for image editing. On the
-other end of the scale, when a simple button is pressed, it may change to a
-"pressed" state in which its color and position is modified to give a pressed
-appearance.
+Many user interface designs are \e state driven; interfaces have configurations
+that differ depending on the current state. For example, a traffic signal will
+configure its flags or lights depending on its state. While in the signal's
+\c stop state, a red light will turn on while the yellow and the green lights
+will turn off. In the \c caution state, the yellow light is on while the other
+lights are turned off.
-In QML, any object can change between different \e states to apply sets of
-changes that modify the properties of relevant items. Each \e state could
-present a different configuration that could, for example:
+In QML, \e states are a set of property configurations defined in a \l State
+element. Different configurations could, for example:
\list
\o Show some UI elements and hide others
\o Present different available actions to the user
-\o Start, stop or pause animations
+\o Start, stop, or pause animations
\o Execute some script required in the new state
\o Change a property value for a particular item
-\o Show a different view or "screen"
+\o Show a different view or screen
\endlist
-Changes between states can be animated using \l {Transitions}{transitions}, as
-discussed further below.
-
-All \l {Item}-based objects have a \e {default state}, and can specify additional
-states by adding new \l State objects to the item's \l {Item::}{states}
-property. Each state has a \e name that is unique for all states within that
-item; the default state's name is an empty string. To change the current state
+All \l {Item}-based objects have a \c state property, and can specify additional
+states by adding new \c State objects to the item's \l {Item::}{states}
+property. Each state within a component has a unique \c name, an empty string
+being the default. To change the current state
of an item, set the \l {Item::}{state} property to the name of the state.
-Non-Item objects can use states through the StateGroup element.
-
+Non-Item objects may use states through the \l StateGroup element.
\section1 Creating States
To create a state, add a \l State object to the item's \l {Item::}{states} property,
which holds a list of states for that item.
-Following is an example. Here, the \l Rectangle is initially placed in the
-default (0, 0) position. It has defined an additional state named "moved", in
-which a PropertyChanges object repositions the rectangle to (50, 50). Clicking
-within the MouseArea changes the state to the "moved" state, thus moving the \l
-Rectangle.
-
-\snippet doc/src/snippets/declarative/states.qml 0
-
-The \l State item defines all the changes to be made in the new state. It
-could specify additional properties to be changed, or create additional
-PropertyChanges for other objects. It can also modify the properties of other
-objects, not just the object that owns the state. For example:
-
-\qml
-Rectangle {
- // ...
- states: [
- State {
- name: "moved"
- PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" }
- PropertyChanges { target: someOtherItem; width: 1000 }
- }
- ]
-}
-\endqml
-
-As a convenience, if an item only has one state, its \l {Item::}{states}
-property can be defined as a single \l State, without the square-brace list
-syntax:
-
-\snippet doc/src/snippets/declarative/propertyanimation.qml single state
-
-A \l State is not limited to performing modifications on property values. It
-can also:
-
+A warning \c signal component may have two states, the \c NORMAL and the
+\c CRITICAL state. Suppose that in the \c NORMAL state, the \c color of the
+signal should be \c green and the warning \c flag is down. Meanwhile, in the
+\c CRITICAL state, the \c color should be \c red and the flag is \c up. We may
+model the states using the \c State element and the color and flag
+configurations with the \c PropertyChanges element.
+\snippet doc/src/snippets/declarative/states.qml signal states
+The \l PropertyChanges element will change the values of object properties.
+Objects are referenced through their \l {qml-id-property}{id}. Objects outside
+the component are also referenced using the \c id property, exemplified by the
+property change to the external \c flag object.
+
+Further, the state may change by assigning the \c state property with the
+appropriate signal state. A state switch could be in a \l MouseArea element,
+assigning a different state whenever the signal receives a mouse click.
+\snippet doc/src/snippets/declarative/states.qml switch states
+
+The State element is not limited to performing modifications on property values.
+It can also:
\list
-\o Run some script using StateChangeScript
-\o Override an existing signal handler for an object using PropertyChanges
-\o Re-parent an \l Item using ParentChanges
-\o Modify anchor values using AnchorChanges
+\o Run some script using \l StateChangeScript
+\o Override an existing signal handler for an object using \l PropertyChanges
+\o Re-parent an \l Item using \l ParentChange
+\o Modify anchor values using \l AnchorChanges
\endlist
-The \l {declarative/animation/states}{States and Transitions example}
-demonstrates how to declare a basic set of states and apply animated
-transitions between them.
-
-
\section1 The Default State
-Of course, the \l Rectangle in the example above could have simply been moved
-by setting its position to (50, 50) in the mouse area's \c onClicked handler.
-However, aside from enabling batched property changes, one of the features of
-QML states is the ability of an item to revert to its \e {default state}.
-The default state contains all of an item's initial property values before
-they were modified in a state change.
-
-For example, suppose the \l Rectangle should move to (50,50) when the mouse is
-pressed, and then move back to its original position when the mouse is
-released. This can be achieved by using the \l {State::}{when} property,
-like this:
-
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- }
-
- states: State {
- name: "moved"
- when: mouseArea.pressed
- // ...
- }
-}
-\endqml
-
-The \l {State::}{when} property is set to an expression that evaluates to
-\c true when the item should be set to that state. When the mouse is pressed,
-the state is changed to \e moved. When it is released, the item reverts to its
-\e default state, which defines all of the item's original property values.
-
-Alternatively, an item can be explicitly set to its default state by setting its
-\l {Item::}{state} property to an empty string (""). For example, instead of
-using the \l {State::}{when} property, the above code could be changed to:
-
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- anchors.fill: parent
- onPressed: myRect.state = 'moved';
- onReleased: myRect.state = '';
- }
-
- states: State {
- name: "moved"
- // ...
- }
-}
-\endqml
-
-Obviously it makes sense to use the \l {State::}{when} property when possible
-as it provides a simpler (and a better, more declarative) solution than
-assigning the state from signal handlers.
-
-
-\section1 Animating State Changes
+Every \l Item based component has a \c state property and a \e{default state}.
+The default state is the empty string (\c{""}) and contains all of an item's
+initial property values. The default state is useful for managing property
+values before state changes. Setting the \c state property to an empty string
+will load the default state.
+\section1 The \c when Property
-State changes can be easily animated through \l {Transitions}{transitions}. A
-\l Transition defines the animations that should be applied when an item
-changes from one state to another.
+For convenience, the \l State element has a \c when property that can bind to
+expressions to change the state whenever the bound expression evaluates to
+\c true. The \c when property will revert the state back to the
+\l {The Default State}{default state} when the expression evaluates to false.
-If the above example was modified to include the following \l Transition, the
-movement of the \l Rectangle would be animated:
+\snippet doc/src/snippets/declarative/states.qml when property
+The \c bell component will change to the \c RINGING state whenever the
+\c signal.state is \c CRITICAL.
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- // Handle mouse events...
- }
+\section1 Animating State Changes
- states: [
- // States are defined here...
- ]
-
- transitions: [
- Transition {
- NumberAnimation { properties: "x,y"; duration: 500 }
- }
- ]
- }
-\endqml
+State changes induce abrupt value changes. The \l Transition element allow
+smoother changes during state changes. In transitions, animations and
+interpolation behaviors are definable. The
+\l {QML Animation and Transitions}{Animation and Transitions} article has more
+information about creating state animations.
-This \l Transition defines that if any \c x or \c y properties have changed
-during a state change within this item, their values should be animated over 500
-milliseconds.
+The \l {declarative/animation/states}{States and Transitions example}
+demonstrates how to declare a basic set of states and apply animated
+transitions between them.
-See the \l Transitions documentation for more information.
*/
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
deleted file mode 100644
index 3f3e0e466e..0000000000
--- a/doc/src/declarative/qml-intro.qdoc
+++ /dev/null
@@ -1,616 +0,0 @@
-/****************************************************************************
-**
-** 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:FDL$
-** 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 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$
-**
-****************************************************************************/
-
-
-
-/*!
-\page qml-intro.html
-\title Intro to Qt Quick
-
-\section1 Overview
-
-QML is a high level, scripted language. Its commands, more correctly \e elements,
-leverage the power and efficiency of the Qt libraries to make easy to use
-commands that perform intuitive functions. Draw a rectangle, display an image at
-a position and so on. Behind these elements are complex C++ libraries that
-efficiently perform the action. As with any graphical application, always
-consider that this ability to easily build graphically rich applications means
-that some care may be needed to prevent performance problems.
-
-The language also allows more flexibility of these commands by using
-Javascript rather than C++ to add new layers of logic to your application.
-Javascript is easier to learn than C++ and can be embedded into the QML
-files or imported from a separate file.
-
-\bold{In QML the types of various 'objects' are referred to as \l {QML
-Elements}{elements}}.
-
-An element usually has various \e properties that help define the element. For
-example, if we created an element called Circle then the radius of the circle
-would be a property.
-
-
-\section1 A First Look
-
-The basic syntax of an \l{QML Elements}{element} is
-
-\qml
-SomeElement {
- id: myObject
- // ... some other things here ...
-}
-\endqml
-
-Here we are defining a new object. We specify its 'type' first as SomeElement.
-Then within matching braces { ... } we specify the various parts of our
-element.
-
-The \c id is a unique identifier for the element, it must start with a lower
-case letter and only contain letters, numbers and underscores. It is this
-particular object's name. If this SomeElement \l {QML Elements}{element} was
-a Rectangle instead and it was one of many then the \e optional unique id
-would allow us to manipulate each element individually.
-
-Each visual element is ultimately based on, or inherits from, an element
-called \l Item. \l Item has certain properties and actions that may be
-useful. The properties have default values so you need only specify the
-ones you will need.
-
-Take a simple element such as a \l Rectangle. It has an \c id, we will call
-it \e myRectangle, it has a \c width and a \c height. Imagine that we
-want a rectangle that is 500 pixels by 400 pixels in the x and y directions
-(horizontal by vertical).
-
-We can implement this \l Rectangle with these properties this way
-
-\snippet doc/src/snippets/declarative/qml-intro/rectangle.qml document
-
-This is a valid QML script. To run it, copy it and save it to a file, say
-myexample.qml, and on the command line run the following command:
-
-\code
-qmlviewer myexample.qml
-\endcode
-
-On Mac OS X, open the "QMLViewer" application instead and open the
-\c myexample.qml file, or run it from the command line:
-
-\code
-QMLViewer.app/Contents/MacOS/QMLViewer myexample.qml
-\endcode
-
-It will create a very boring rectangle in its own window.
-
-
-\section1 Hello World!
-
-We can now add some color and text to make a Hello World QML program.
-
-\l Rectangle has the property \l{Rectangle::color}{color} to produce a
-background color.
-
-Text is handled by a different element called \l Text. We need to create a
-\l Text object inside the \l Rectangle and set its \l{Text::}{text}
-property to "Hello World!". So to set the text to "Hello world" and the
-background colour to light gray,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world1.qml document
-
-
-\section1 Hello World Again
-
-From now on we will not always show the import statement for Qt but it
-should still be there when you create your QML scripts.
-
-To make our Hello World example a little nicer set the position of the text
-to be at pixel position x = 100, y = 100 within the displayed window. This
-position belongs to the \l Text element so we set the position inside its
-definition. Note that we separate different QML statements on the same line
-with a semi-colon, or we could have simply put each statement on a new line
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world2.qml updated text
-
-Not only did we reposition the text, but the text was altered by adding
-HTML tags to change the font size. The text color was also changed from the
-default black to dark green by using a standard string for the color's SVG
-name.
-
-We could also have used a hexadecimal string for the RGB (red-green-blue, as
-#rrggbb) values of the color similar to the method used in HTML. For
-example, mostly blue with a green tint,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world3.qml updated text
-
-All of these changes occurred within the \l Text object which is the scope
-of these property changes.
-
-Other objects may use the information but it belongs to the element where
-the property has been defined.
-
-
-\section1 Images
-
-To add an image to our little application we use the \l Image element. An
-\l Image uses a path to an image file, and has properties to control
-the aspect ratio, the image size, to tile the area amongst others. The
-source of the image, the path to the file, is a URL. Therefore the file can
-be local: \e {mydir/myimage1.png}. Or it can be remote:
-\e {"http://www.example.com/images/myimage1.png"}.
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world4.qml added an image
-
-This displays the image, as we would expect, at the top left of the window.
-The position of the default x = 0, y = 0 coordinate. The example here uses
-a PNG file, but it could have been one of various supported formats,
-including JPG and GIF.
-
-Let us reposition the image and enlarge it. Place it at the same 'x' offset
-as the "Hello world again" text, but put it another 50 pixels below the
-text, also make it 150 by 150 pixels in size,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world5.qml positioning the image
-
-Adding the Hello World example, with the text and the image example we can
-write a simple piece of QML that starts to look a bit better.
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world5.qml document
-
-The result is still quite simple
-
-\image qml-intro-helloa.png
-
-
-\section1 Anchors: Aligning Elements
-
-Using absolute positioning, such as saying x = 100 and y = 150, works well
-until the user or developer stretches or increases the size of the window.
-Then the positions need to be recalculated. What would be nice would be a
-relative means of positioning of objects in a window or rectangle. For
-example, we want to place an image at the bottom of a rectangle, we would
-like to specify the image's location as the 'bottom of the window', not a
-specific coordinate. We can do this with the anchors property, which
-objects inherit from Item.
-
-The anchors property is really a property group. It is a collection of
-related properties. It has properties within it which can be used by means
-of the dot notation.
-
-The dot notation uses object \c{id}s and property names to use a particular
-object or property. Say I have a rectangle r1, which contains a rectangle
-r2, which contains an Item item1, which has an 'x' property I want to
-change. I just use the dot notation to identify it: r1.r2.item1.x
-
-If we want to position an image at the bottom of the rectangle it is
-inside. I have to specify that the bottom of the image is also at the
-bottom of the rectangle
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors1.qml document
-
-This places the logo at the bottom left of the window.
-
-\image qml-intro-anchors1.png "A simple anchor"
-
-We would like it centered and not touching the bottom of the window, for
-aesthetic reasons. For the centering we use the horizontalCenter property,
-and to prevent the touching of the image to the bottom of the rectangle,
-the bottomMargin property is used. So the new actions for the script are
-
- \list
- \o set the bottom of the image (anchors.bottom) to be the bottom of the window
- \o move the image to be in the horizontal center of the window
- \o set a margin of 10 pixels so that the image does not touch the bottom window border
- \endlist
-
-Encoded into QML the script becomes
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors2.qml document
-
-Run this and resize the window. You will see that now the position of the
-image adjusts during the resize.
-
-\image qml-intro-anchors2.png "Image Centered at the Bottom"
-
-You can also add another object say a block of descriptive text and place
-it above or below the image or to the side. This code places some text just
-above the image
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors3.qml adding some text
-
-\image qml-intro-anchors3.png
-
-\note \e anchors is a property group, to be used within the object. When
-referencing these properties from another object we use the property
-directly, instead of saying:
-
-\qml
-Item {
- anchors.bottom: myRectangle.anchors.top // Wrong
-}
-\endqml
-
-we use
-
-\qml
-Item {
- anchors.bottom: myRectangle.top // Correct
-}
-\endqml
-
-
-\section1 Transformations
-
-We can transform a graphical object to get additional effects. Rotate a
-piece of text by 180 degrees to display upside-down text. Rotate an image
-by 90 degrees to lay it on its side. These transformations require
-additional information.
-
-For rotation, the additional information includes: the origin relative to
-the object being rotated, the axis of rotation, and the angle in degrees to
-rotate the image through in a clockwise direction. The axis does not have
-to be the z-axis, the line between your eyes and the image, it could be
-along the vertical y-axis or the horizontal x-axis. We have three
-dimensions to play with. For simplicity in this example we will rotate
-about the z-axis by 90 degrees in a negative direction, anti-clockwise.
-
-Rotation of text was also suggested. It could also be useful to scale the
-text. We can do both. The \l {Item::transform}{transform} property is a
-\e list of \l Transform elements, so using the list syntax
-\c{myList: [ listElement1, listElement2, ... } ]}
-we can produce a list of transformations.
-
-The text will be rotated by 45 degrees anti-clockwise and scaled
-vertically by a factor of 1.5 and by 1.2 horizontally.
-
-Using the example above as the basis for this we have,
-
-\snippet doc/src/snippets/declarative/qml-intro/transformations1.qml document
-
-The code block in \c image1 starting with \c transform specifies that the
-\l {Item::transform}{transform} property will be a Rotation through -90
-degrees, which is anti-clockwise, about the z-axis running through the
-center of the image at (75,75), since the image is 150 x 150 pixels.
-
-The other transformation available is \l Translate. This produces a change
-in position of the item.
-
-\note In a list of transformations the order of the transformations is
-important. In the above example try swapping around the Scale transform with
-the Rotation transform, remember to remove or add the comma. The results are
-acceptable for our little test but not the same.
-
-
-\section1 Animations
-
-Animation in QML is done by animating properties of objects. Properties
-that are numbers, colors, Rectangles, points and directions. In QML these
-are \l {QML Basic Types} named as real, int, color, rect, point, size, and
-vector3d. There are a number of different ways to do animation. Here we
-will look at a few of them.
-
-\section2 Number Animation
-
-Previously we have used a rotation transformation to change the orientation
-of an image. We could easily animate this rotation so that instead of a
-straight rotation counter-clockwise of 90 degrees we could rotate the image
-through a full 360 degrees in an animation. The axis of rotation wont
-change, the position of the center of the image will not change, only the
-angle will change. Therefore, a NumberAnimation of a rotation's angle should
-be enough for the task. If we wish for a simple rotation about the center
-of the image then we can use the \c rotation property that is inherited
-from \l Item. The rotation property is a real number that specifies the
-angle in a clockwise direction for the rotation of the object. Here is the
-code for our animated rotating image.
-
-\snippet doc/src/snippets/declarative/qml-intro/number-animation1.qml document
-
-The \c {transformOrigin: Item.Center} is redundant since this is the default
-axis of rotation anyway. But if you change \c Center to \c BottomRight you
-will see an interesting variation.
-
-Also if instead the \l Rotation transformation had been used then we would have
-more control over the various parameters. We could vary the axis, to be not
-just a different offset from the z-axis but along the y-axis, x-axis or
-combination. For example, if the task had been to animate the rotation
-about the y-axis passing through the center of the image then the following
-code would do it.
-
-\snippet doc/src/snippets/declarative/qml-intro/number-animation2.qml document
-
-Here there is a rectangle 600 by 400 pixels. Placed within that rectangle
-is an image 100 by 100 pixels. It is rotated about the center of the image
-about the y-axis so that it looks as if it is rotating about an invisible
-vertical string holding it up. The time it takes to complete the rotation is 3
-seconds (3,000 milliseconds). The NumberAnimation is applied to the angle
-taking it from 0 (no change) to 360 degrees, back where it started.
-Strictly speaking it isn't necessary to go from 0 to 360 since the same
-location is duplicated, but it makes it easier to read in this example and
-it has no visible effect on the animation. The number of loops that the
-animation will execute is set to \c {Animation.Infinite} which means that the
-animation is in an endless loop.
-
-To see an interesting variation. Change the axis to \c {axis { x:1; y:1; z:1
-}}. This is a line coming from the center of the image downwards to the
-right and out of the screen. Although the change is simple the rotation
-seems complex.
-
-\section2 Sequential Animation
-
-For a more complex animation we will need two images. The first image will
-be placed at the center of a window (Rectangle) and the second image will
-be at the upper left of the window. The animation will move the second
-image from the top left of the window to the bottom right. In doing so we
-will be animating the position and the size of the image.
-
-First create two images
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation1.qml document
-
-We will add to 'image1' a SequentialAnimation from x = 20 to the target of
-x = 450. The 'from' values will be used because we will be repeating the
-animation, so the object needs to know where the original position is, both
-x and y. The SequentialAnimation of x will set it to repeat by indicating
-that the number of animation loops is infinite, meaning that the 'loop'
-counter will be set to a value Animation.Infinite that indicates an endless
-cycle. Also there will be a NumberAnimation to vary the numeric property
-between the x values and over a given duration. After the NumberAnimation
-there will be a PauseAnimation that will pause the animation for 500
-milliseconds (half a second) simply for the visual effect.
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation2.qml adding a sequential animation
-
-A similar block of code is written for the animation of the 'y' value of
-the position.
-
-We will also animate the scale of the object, so as it goes from top left
-to bottom right of the window it will become smaller until about midway,
-and then become larger. To complete the animation we will set the 'z'
-values of the images. 'z' is the stacking order, the z-axis effectively
-points out from the screen to your eyes with the default value of 'z' being
-0. So if we set the Rectangle to have z with value zero, just to be sure,
-and image1 to 1 and image2 to 2 then image2 will be in the foreground and
-image1 in the background. When image1 passes image2 it will pass behind it.
-The completed code looks like
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation3.qml document
-
-The \c {easing.type} has many options, expressed as a string. It specifies the
-kind of equation that describes the acceleration of the property value, not
-necessarily position, over time.
-
-For example, \e InOutQuad means that at the start and the end of the animation the
-'velocity' is low but the acceleration or deceleration is high. Much like a car
-accelerating from stop, and decelerating to stop at the end of a journey,
-with the maximum speed being in the middle. Examine the \l {PropertyAnimation::easing.type}
-{easing} documentation and the various graphs that show the effect. The horizontal
-axis, 'progress', can be thought of as time. The vertical axis is the value
-of the particular property.
-
-In discussing animation we need to describe three objects: State, MouseArea
-and Signals. Although independent of the animation elements, animation
-delivers some of the best examples that illustrate these new elements.
-
-
-
-\section2 Animation Summary
-
-\table
- \header
- \o Name
- \o Description
- \row
- \o PropertyAnimation
- \o a property value on a target object is varied to a specified value over a given time.
-
- \row
- \o NumberAnimation
- \o animate a numeric property from one value to another over a given time.
-
- \row
- \o PauseAnimation
- \o results in the task waiting for the specified duration, in milliseconds.
-
- \row
- \o SequentialAnimation
- \o allows us to list in order the animation events we want to occur, first A then B then C and so on.
-
- \row
- \o ParallelAnimation
- \o enables us to run different animations at the same time instead of sequentially.
-
-\endtable
-
-
-\section1 Using States
-
-A state is a defined set of values in the configuration of an object and
-often depends on the previous state. For example, a glass could be in a
-state we call 'HalfFull' if it is being filled with a liquid and has
-reached half of its total capacity. We could also have a state called
-HalfEmpty which is the state that occurs when the amount of liquid drops to
-half of the glass's capacity. Both states represent the same amount of
-liquid, but we consider them different. Likewise, states in a program
-represent not just values but may include how the current values were
-reached.
-
-When a state changes a \e transition occurs. This is an opportunity to make
-changes or take actions that depend on the movement to the new state. For
-example, if we had a scene in the country where the state variable has two
-states "daylight" and "night". Then when the state changes to "night" at
-this transition the sky would be made dark, stars would be shown, the
-countryside would be darkened. And when the state changes to "daylight" the
-opposite changes would be made: the sky is now blue, the scenery is green,
-there is a sun in the sky.
-
-Here is a simple QML program that shows the change of state in the above
-example. We have two rectangles, the top one is the 'sky' and the bottom
-one is the 'ground'. We will animate the change from daylight to night.
-There will be two states, but we only need to define one since 'daylight'
-will be the default state. We will just go to 'night' by clicking and
-holding the left mouse button down, releasing the mouse button will reverse
-the process
-
-\snippet doc/src/snippets/declarative/qml-intro/states1.qml document
-
-Several new things appear in this sample. Firstly, we use a \l MouseArea
-element to detect mouse clicks in the \e mainRectangle. Secondly, we use
-the list notation [ thing1 , thing2, ... ] to build a list of states and a
-list of transitions.
-
-\l MouseArea defines a region that will respond to mouse clicks. In this case
-we are only concerned with when the mouse is pressed or not pressed, not
-the particular button or other details. The area of the MouseArea is the
-entire main window, mainRectangle, so that clicking anywhere in this region
-will start the animation. Since we are using the 'pressed' mouse state,
-then the animation will move from 'daylight' to 'night' only while the mouse
-button remains pressed.
-
-When the button is released the 'daylight' state is entered and the
-transition from 'night' to 'daylight' is triggered causing the animation to
-run. The transition specifies the duration in milliseconds of the
-ColorAnimation, while the state specifies the color of the new state.
-
-The PropertyChanges command is the way that we nominate which properties
-will change in a change of state, and what new value the property will
-take. Since, for example, we want the 'sky' region to turn to dark blue and
-the 'ground' region to turn to black for the 'night' state, then the
-rectangles for those regions are the 'target' and the property in the target
-is 'color'.
-
-
-\section1 Signals
-
-Signals are simply events that can be hooked up to actions we want performed.
-In QML they are usually preceded by the word 'on', for example in the animation
-using a MouseArea the signal was \l {MouseArea::onPressed}{onPressed}. If
-you look at the C++ documentation you will see a lot of talk about
-\l {Signals & Slots}{Signals and Slots}. Signals are connected to Slots. The
-signal represents an event and the Slot is the function that does something
-based on that event. You can also have Signals connected to other Signals, so
-that one Signal (event) triggers another Signal (event), and so forth. It is
-nice to know this is what happens beneath the QML layer but not essential for
-using QML.
-
-Most elements do not have Signals associated with them. However, a few like
-the \l Audio element have many signals. Some of the \l Audio signals are
-used to represent events such as when the audio is stopped, play is pressed,
-paused, and reaching the end of the media. They allow the developer to connect,
- for example, the press of a user interface button (perhaps a MouseArea) to
- some QML that will handle this event.
-
-
-\section1 Analyzing An Example: Dial Control
-
-In the Qt \e {examples/declarative/ui-components} folder you will find a folder
-\e {dialcontrol} which contains the \e dialcontrol example.
-
-\image qml-dial.png "QML Dial example with Slider"
-
-In essence this small application has a sliding bar that you can slide using
-a mouse, and a graphical dial that responds to the position of the slider.
-
-The code for the example is in two parts: Dial.qml and dialcontrol.qml.
-
-\e {Dial.qml} can be found in the \e content sub-directory. It defines a \c Dial
-component similar to an odometer. Eventually, the example will hook up a slider
-component so that moving the slider will change the position of a needle on the
-dial.
-
-The code for the \c Dial, identified by the name of the file, contains four images
-in overlapping order: the background (numbers and divisions), the shadow of the
-needle, the needle itself, and finally the 'glass' overlay (containing
-transparent layers).
-
-The \c needle_shadow.png image has a \l Rotation assigned to the \e transform
-attribute of the \l Image. The rotation is set to match the angle of the needle
-image angle value \e {needleRotation.angle}. Both the needle and the
-needle_shadow have the same default \e x and \e y values but the rotation origin
-for the needle is slightly different so that a shadow will be evident as the
-needle moves.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle_shadow
-
-And the needle
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle
-
-The final image is the overlay which simply has a position defined.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml overlay
-
-\e {dialcontrol.qml} in the \e {examples/declarative/ui-components/dialcontrol} directory is the
-main file of the example. It defines the visual environment that the Dial
-will fit into. Because the \e Dial component and the images live in the \e
-content sub-directory we will have to import this into \e dialcontrol.qml. So the
-start of the file looks like
-
-\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml imports
-
-The visual space is bound by a 300 by 300 pixel \l Rectangle which is given
-a gray color. Inside this rectangle is our component \e Dial and a \l Rectangle.
-Inside the rectangle called 'container' is another rectangle with the
-interesting name 'slider'.
-
-\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml 0
-
-The Dial component, named 'dial, is \e anchored to the center of the main
-rectangle. The \c value attribute of 'dial' is set to a value based on the
-'slider' horizontal position and the 'container' width. So changes to the
-'slider' position will change the Dial \c value which is used in Dial to compute
-the rotation of the needle image. Notice this piece of code in Dial where
-the change in \c value modifies the position of the needle.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle angle
-
-This is part of the \c needleRotation that rotates the needle and causes the
-rotation of its shadow. \l SpringAnimation is an element that modifies the value
-of that rotation \e angle and mimics the oscillatory behavior of a spring,
-with the appropriate \e spring constant to control the acceleration and the \e
-damping to control how quickly the effect dies away.
-
-The 'container' is light gray with a color gradient defined using
-\l GradientStop. The gradient is applied vertically. If you need a horizontal
-gradient then you could apply the vertical gradient and then rotate the item
-by 90 degrees.
-
-The 'slider' is dark gray and also has a vertical color gradient. The most
-important thing about the 'slider' is that it has a MouseArea defined, which
-specifies a \c {drag.target} on itself along the X-axis. With minimum
-and maximum values on the X-axis defined. So we can click on the 'slider' and
-drag it left and right within the confines of the 'container'. The motion of
-the 'slider' will then change the \c value attribute in \e Dial as discussed
-already.
-
-Also notice the use of a \c radius value for a rectangle. This produces rounded
-corners. That is how the 'container' and 'slider' are displayed with a
-pleasant rounded look.
-
-
-
-*/
-
-
-
diff --git a/doc/src/declarative/qmlevents.qdoc b/doc/src/declarative/qmlevents.qdoc
new file mode 100644
index 0000000000..566f71c505
--- /dev/null
+++ b/doc/src/declarative/qmlevents.qdoc
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qmlevents.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Keyboard Focus in QML}{Keyboard Focus}
+\nextpage Importing Reusable Components
+
+\title QML Signal and Handler Event System
+
+QML utilizes Qt's \l{The Meta-Object System}{meta-object} and
+\l{Signals & Slots}{signals} systems. Signals and slots created using Qt in C++
+are inheritely valid in QML.
+
+\keyword qml-signals-and-handlers
+\section1 Signals and Handlers
+
+Signals provide a way to notify other objects when an event has occurred. For
+example, the MouseArea \c clicked signal notifies other objects that the mouse
+has been clicked within the area.
+
+The syntax for defining a new signal is:
+
+\tt{signal <name>[([<type> <parameter name>[, ...]])]}
+
+Attempting to declare two signals or methods with the same name in the same type
+block generates an error. However, a new signal may reuse the name of an existing signal on the type. (This should be done with caution, as the existing signal may be hidden and become inaccessible.)
+
+Here are various examples of signal declarations:
+\snippet doc/src/snippets/declarative/events.qml parent begin
+\snippet doc/src/snippets/declarative/events.qml signal declaration
+\snippet doc/src/snippets/declarative/events.qml parent end
+
+If the signal has no parameters, the "\c{()}" brackets are optional. If
+parameters are used, the parameter types must be declared, as for the \c string
+and \c variant arguments of the \c perform signal.
+
+Adding a signal to an item automatically adds a \e{signal handler} as well. The
+signal hander is named \c on<SignalName>, with the first letter of the signal in
+uppercase. The previous signals have the following signal handlers:
+\snippet doc/src/snippets/declarative/events.qml signal handler declaration
+
+Further, each QML properties have a \c{<property_name>Changed} signal and its
+corresponding \c{on<property_name>Changed} signal handler. As a result, property
+changes may notify other components for any changes.
+\snippet doc/src/snippets/declarative/events.qml automatic signals
+
+To emit a signal, invoke it as a method. The signal handler binding is similar
+to a property binding and it is invoked when the signal is emitted. Use the
+defined argument names to access the respective arguments.
+\snippet doc/src/snippets/declarative/events.qml signal emit
+Note that the \c Component.onCompleted is an
+\l{attached-signalhandlers}{attached signal handler}; it is invoked when the
+\l Component initialization is complete.
+
+\keyword qml-connect-signals-to-method
+\section2 Connecting Signals to Methods and Signals
+
+Signal objects have a \c connect() method to a connect a signal either to a
+method or another signal. When a signal is connected to a method, the method is
+automatically invoked whenever the signal is emitted. (In Qt terminology, the
+method is a \e slot that is connected to the \e signal; all methods defined in
+QML are created as \l{Signals & Slots}{Qt slots}.) This enables a signal
+to be received by a method instead of a \l {Signal Handlers}{signal handler}.
+
+\snippet doc/src/snippets/declarative/events.qml connect method
+The \c {connect()} method is appropriate when connecting a JavaScript method to
+a signal.
+
+There is a corresponding \c disconnect() method for removing connected
+signals.
+
+\section3 Signal to Signal Connect
+
+By connecting signals to other signals, the \c connect() method can form different
+signal chains.
+\snippet doc/src/snippets/declarative/events.qml forward signal
+
+
+Whenever the \l MouseArea \c clicked signal is emitted, the \c send
+signal will automatically be emitted as well.
+
+\code
+output:
+ MouseArea clicked
+ Send clicked
+\endcode
+
+\section1 C++ Additions
+
+Because QML uses Qt, a signal defined in C++ also works as a QML signal. The
+signal may be emitted in QML code or called as a method. In addition, the QML
+runtime automatically creates signal handlers for the C++ signals. For more
+signal control, the \c connect() method and the \l Connections element may connect
+a C++ signal to another signal or method.
+
+For complete information on how to call C++ functions in QML, read the
+\l{Extending QML - Signal Support Example}.
+
+
+*/
diff --git a/doc/src/declarative/qmlreusablecomponents.qdoc b/doc/src/declarative/qmlreusablecomponents.qdoc
new file mode 100644
index 0000000000..ee360ebcac
--- /dev/null
+++ b/doc/src/declarative/qmlreusablecomponents.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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qmlreusablecomponents.html
+\ingroup qml-features
+\previouspage {QML Signal and Handler Event System}{Signal and Handler Event System}
+\nextpage {QML States}{States}
+\contentspage QML Features
+
+\title Importing Reusable Components
+
+A \e component is an instantiable QML definition, typically contained in a
+\c .qml file. For instance, a Button \e component may be defined in
+\c Button.qml. The QML runtime may instantiate this Button component to create
+Button \e objects. Alternatively, a component may be defined inside a
+\l Component element.
+
+Moreover, the Button definition may also contain other components. A Button
+component could use a Text element for its label and other components to
+implement its functions. Compounding components to form new components
+(and effectively new interfaces) is the emphasis in QML.
+
+\keyword qml-define-components
+\section1 Defining New Components
+
+Any snippet of QML code may become a component, by placing the code in a QML
+file (extension is \c .qml). A complete Button component that responds to user
+input may be in a Button.qml file.
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml document
+
+Alternatively, a \l Component element may encapsulate a QML object to form a
+component.
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent begin
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent end
+
+\keyword qml-loading-components
+\section1 Loading a Component
+
+The initialization of inline components is different from loading a component
+from a \c .qml file.
+
+\section2 Importing a Component
+
+A component defined in a \c .qml file is directly usable by declaring the name
+of the component. For example, a button defined in \c Button.qml is created by
+declaring a \c Button. The button is defined in the
+\l {qml-define-components}{Defining New Components} section.
+\snippet doc/src/snippets/declarative/reusablecomponents/application.qml document
+
+Note that the component name, \c Button, matches the QML filename, \c Button.qml.
+Also, the first character is in upper case. Matching the names allow
+components in the same directory to be in the direct import path of the
+application.
+
+For flexibility, a \c qmldir file is for dictating which additional components,
+plugins, or directories should be imported. By using a \c qmldir file,
+component names do not need to match the filenames. The \c qmldir file should,
+however, be in an imported path.
+\snippet doc/src/snippets/declarative/reusablecomponents/qmldir document
+
+\section2 Loading an Inline Component
+
+A consequence of inline components is that initialization may be deferred or
+delayed. A component may be created during a MouseArea event or by using a
+\l Loader element. The component can create an object, which is addressable in a
+similar way as an \l {qml-id-property}{id property}. Thus, the created object may
+have its bindings set and read like a normal QML object.
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml create inline component
+
+\keyword qml-component-properties
+\section1 Component Properties
+
+Initializing a component, either from a .qml file or initializing an inline
+component, have several properties to facilitate component execution.
+Specifically, there are \l{attached-properties}{attached properties} and
+\l{attached-signalhandlers}{attached signal handlers} for setting properties
+during the lifetime of a component.
+
+The \c{Component.onCompleted} attached signal handler is called when the
+component completes initialization. It is useful for executing any commands
+after component initialization. Similarly, the \c{Component.onDestruction}
+signal handler executes when the component finishes destruction.
+
+\keyword qml-top-level
+\section1 Top-Level Component
+
+Choosing the \e{top-level} or the \e{root} object of components is an important
+design aspect because the top-level object dictates which properties are
+accessible outside the component. Some elements are not visual elements and
+will not have visual properties exposed outside the component. Likewise, some
+elements add functionality that are not available to visual elements.
+
+Consider the Button component from the
+\l{qml-define-components}{Defining New Components} section; it's top-level
+object is a \l Rectangle. When imported, the Button component will possess the
+Rectangle's properties, methods, signals, and any custom properties.
+
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml properties
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end
+
+The Button's \c text alias is accessible from outside the component as well as
+the Rectangle's visual properties and signals such as \c x, \c y, \c anchors,
+and \c states.
+
+Alternatively, we may choose a \l {Keyboard Focus in QML}{FocusScope} as our
+top-level object. The \l FocusScope element manage keyboard focus for its
+children which is beneficial for certain types of interfaces. However, since
+\c FocusScopes are not visual elements, the visual properties of its child need
+to be exposed.
+
+\snippet doc/src/snippets/declarative/reusablecomponents/focusbutton.qml document
+*/
+
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index f6604fb377..a1f3f96be9 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -29,13 +29,13 @@
\page qmlruntime.html
\title Qt Declarative UI Runtime
-QML documents are loaded and executed by the QML runtime. This includes the
+QML documents are loaded and executed by the QML runtime. This includes the
Declarative UI engine along with the built-in QML elements and plugin modules,
and it also provides access to third-party QML elements and modules.
-Applications that use QML need to invoke the QML runtime in order to
-execute QML documents. This can be done by creating a QDeclarativeView
-or a QDeclarativeEngine, as described below. In addition, the Declarative UI
+Applications that use QML need to invoke the QML runtime in order to
+execute QML documents. This can be done by creating a QDeclarativeView
+or a QDeclarativeEngine, as described below. In addition, the Declarative UI
package includes the \QQV tool, which loads \c .qml files. This tool is
useful for developing and testing QML code without the need to write
a C++ application to load the QML runtime.
@@ -44,7 +44,7 @@ a C++ application to load the QML runtime.
\section1 Deploying QML-based applications
-To deploy an application that uses QML, the QML runtime must be invoked by
+To deploy an application that uses QML, the QML runtime must be invoked by
the application. This is done by writing a Qt C++ application that loads the
QDeclarativeEngine by either:
@@ -61,12 +61,12 @@ For example, if there is a QML file, \c application.qml, like this:
\qml
import QtQuick 1.0
-
+
Rectangle { width: 100; height: 100; color: "red" }
\endqml
It can be loaded in a Qt application's \c main.cpp file like this:
-
+
\code
#include <QApplication>
#include <QDeclarativeView>
@@ -82,10 +82,10 @@ It can be loaded in a Qt application's \c main.cpp file like this:
return app.exec();
}
\endcode
-
-This creates a QWidget-based view that displays the contents of
+
+This creates a QWidget-based view that displays the contents of
\c application.qml.
-
+
The application's \c .pro \l{qmake Project Files}{project file} must specify
the \c declarative module for the \c QT variable. For example:
@@ -97,36 +97,36 @@ the \c declarative module for the \c QT variable. For example:
\section2 Creating a QDeclarativeEngine directly
-
-If \c application.qml does not have any graphical components, or if it is
+
+If \c application.qml does not have any graphical components, or if it is
preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine
can be constructed directly instead. In this case, \c application.qml is
loaded as a QDeclarativeComponent instance rather than placed into a view:
\code
#include <QApplication>
- #include <QDeclarativeEngine>
+ #include <QDeclarativeEngine>
#include <QDeclarativeContext>
#include <QDeclarativeComponent>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
-
+
QDeclarativeEngine engine;
QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext());
-
+
QDeclarativeComponent component(&engine, "application.qml");
QObject *object = component.create(objectContext);
-
+
// ... delete object and objectContext when necessary
-
+
return app.exec();
}
\endcode
-See \l {Using QML in C++ Applications} for more information about using
-QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well
+See \l {Using QML Bindings in C++ Applications} for more information about using
+QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well
as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}.
@@ -135,8 +135,8 @@ as details on including QML files through \l{The Qt Resource System}{Qt's Resour
The Declarative UI package includes a QML runtime tool, the \QQV, which loads
and displays QML documents. This is useful during the application development
-phase for prototyping QML-based applications without writing your own C++
-applications to invoke the QML runtime.
+phase for prototyping QML-based applications without writing your own C++
+applications to invoke the QML runtime.
See the \l{QML Viewer} documentation for more details.
diff --git a/doc/src/declarative/qmlsyntax.qdoc b/doc/src/declarative/qmlsyntax.qdoc
new file mode 100644
index 0000000000..fc25bceb9a
--- /dev/null
+++ b/doc/src/declarative/qmlsyntax.qdoc
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qmlsyntax.html
+\title QML Syntax
+\ingroup QML Reference
+\contentspage QML Reference
+
+\tableofcontents
+
+QML is a declarative language designed to describe the user interface of a
+program: both what it looks like, and how it behaves. In QML, a user
+interface is specified as a tree of objects with properties.
+
+JavaScript is used as a scripting language in QML, so you may want
+to learn a bit more about it (\l{Javascript Guide}) before diving
+deeper into QML.
+
+\section1 Basic QML Syntax
+
+QML looks like this:
+
+\code
+import QtQuick 1.0
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "blue"
+
+ Image {
+ source: "pics/logo.png"
+ anchors.centerIn: parent
+ }
+}
+\endcode
+
+Objects are specified by their type, followed by a pair of braces. Object
+types always begin with a capital letter. In the above example, there are
+two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
+information about the object, such as its properties.
+
+Properties are specified as \c {propertyname: value}. In the above example, we
+can see the Image has a property named \c source, which has been assigned the
+value \c "pics/logo.png". The property and its value are separated by a colon.
+
+Properties can be specified one-per-line:
+
+\code
+Rectangle {
+ width: 100
+ height: 100
+}
+\endcode
+
+or you can put multiple properties on a single line:
+
+\code
+Rectangle { width: 100; height: 100 }
+\endcode
+
+When multiple property/value pairs are specified on a single line, they
+must be separated by a semicolon.
+
+The \c import statement imports the \c Qt \l{QML Modules}{module}, which contains all of the
+standard \l {QML Elements}. Without this import statement, the \l Rectangle
+and \l Image elements would not be available.
+
+\section1 Expressions
+
+In addition to assigning values to properties, you can also assign
+expressions written in JavaScript.
+
+\code
+Rotation {
+ angle: 360 * 3
+}
+\endcode
+
+These expressions can include references to other objects and properties, in which case
+a \e binding is established: when the value of the expression changes, the property the
+expression has been assigned to is automatically updated to that value.
+
+\code
+Item {
+ Text {
+ id: text1
+ text: "Hello World"
+ }
+ Text {
+ id: text2
+ text: text1.text
+ }
+}
+\endcode
+
+In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed,
+\c text2 is automatically changed to the same value.
+
+Note that to refer to other objects, we use their \e id values. (See below for more
+information on the \e id property.)
+
+\section1 QML Comments
+
+Commenting in QML is similar to JavaScript.
+\list
+\o Single line comments start with // and finish at the end of the line.
+\o Multiline comments start with /* and finish with *\/
+\endlist
+
+\snippet doc/src/snippets/declarative/comments.qml 0
+
+Comments are ignored by the engine. They are useful for explaining what you
+are doing; for referring back to at a later date, or for others reading
+your QML files.
+
+Comments can also be used to prevent the execution of code, which is
+sometimes useful for tracking down problems.
+
+\code
+Text {
+ text: "Hello world!"
+ //opacity: 0.5
+}
+\endcode
+
+In the above example, the Text object will have normal opacity, since the
+line opacity: 0.5 has been turned into a comment.
+
+*/
diff --git a/doc/src/declarative/qmltexthandling.qdoc b/doc/src/declarative/qmltexthandling.qdoc
new file mode 100644
index 0000000000..7906193ad7
--- /dev/null
+++ b/doc/src/declarative/qmltexthandling.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page texthandling.html
+\title QML Text Handling and Validators
+\ingroup QML Features
+\previouspage {QML Mouse Events}{Mouse Events}
+\nextpage {Keyboard Focus in QML}{Keyboard Focus}
+\contentspage QML Features
+
+\tableofcontents
+
+\section1 Text Elements
+
+\list
+\o \l{Text}
+\o \l{TextInput}
+\o \l{TextEdit}
+\endlist
+
+\section1 Validators
+\list
+\o \l{IntValidator}
+\o \l{DoubleValidator}
+\o \l{RegExpValidator}
+\endlist
+
+\section1 Displaying Text in QML
+QML provides several elements to display text onto the screen. The \l Text
+element will display formatted text onto the screen, the \l TextEdit element
+will place a multiline line edit onto the screen, and the \l TextInput will
+place a single editable line field onto the screen.
+
+To learn more about their specific features and properties, visit their
+respective element documentation.
+
+\section1 Validating Input Text
+The \l {Validators}{validator} elements enforce the type and format of
+\l TextInput objects.
+
+\snippet doc/src/snippets/declarative/texthandling.qml int validator
+The validator elements bind to \c {TextInput}'s \c validator property.
+
+\snippet doc/src/snippets/declarative/texthandling.qml regexp validator
+The regular expression in the snippet will only allow the inputted text to be
+\c {fruit basket}.
+
+Note that QML parses JavaScript regular expressions, while Qt's
+\l {QRegExp} class' regular expressions are based on Perl regular expressions.
+
+*/
diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc
index 585b402322..2e3cdc74df 100644
--- a/doc/src/declarative/qmlviewer.qdoc
+++ b/doc/src/declarative/qmlviewer.qdoc
@@ -31,34 +31,34 @@
\title QML Viewer
\ingroup qttools
-The Declarative UI package includes \QQV, a tool for loading QML documents that
-makes it easy to quickly develop and debug QML applications. It invokes the QML
-runtime to load QML documents and also includes additional features useful for
+The Declarative UI package includes \QQV, a tool for loading QML documents that
+makes it easy to quickly develop and debug QML applications. It invokes the QML
+runtime to load QML documents and also includes additional features useful for
the development of QML-based applications.
-The QML Viewer is a tool for testing and developing QML applications. It is
-\e not intended for use in a production environment and should not be used for the
+The QML Viewer is a tool for testing and developing QML applications. It is
+\e not intended for use in a production environment and should not be used for the
deployment of QML applications. In those cases, the QML runtime should be invoked
from a Qt application instead; see \l {Qt Declarative UI Runtime} for more
information.
The viewer is located at \c QTDIR/bin/qmlviewer. To load a \c .qml file
-with the viewer, run the viewer and select the file to be opened, or provide the
+with the viewer, run the viewer and select the file to be opened, or provide the
file path on the command line:
\code
qmlviewer myqmlfile.qml
\endcode
-
+
On Mac OS X, the QML Viewer application is named "QMLViewer" instead. You
-can launch the viewer by opening the QMLViewer application from the Finder, or
+can launch the viewer by opening the QMLViewer application from the Finder, or
from the command line:
\code
QMLViewer.app/Contents/MacOS/QMLViewer myqmlfile.qml
\endcode
-The QML Viewer has a number of configuration options involving features such as
+The QML Viewer has a number of configuration options involving features such as
fullscreen display, module import path configurations, video recording of QML
animations, and OpenGL support.
@@ -68,7 +68,7 @@ To see the configuration options, run \c qmlviewer with the \c -help argument.
\section1 Adding module import paths
Additional module import paths can be provided using the \c -I flag.
-For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates
+For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates
a C++ plugin identified as \c com.nokia.TimeExample. Since this has a namespaced
identifier, the viewer has to be run with the \c -I flag from the example's
base directory:
@@ -87,16 +87,16 @@ the path is explicitly added.
\section1 Loading translation files
-When the QML Viewer loads a QML file, it installs a translation file from a
-"i18n" subdirectory relative to that initial file. This directory should contain
+When the QML Viewer loads a QML file, it installs a translation file from a
+"i18n" subdirectory relative to that initial file. This directory should contain
translation files named "qml_<language>.qm", where <language> is a two-letter
ISO 639 language, such as "qml_fr.qm", optionally followed by an underscore and
an uppercase two-letter ISO 3166 country code, such as "qml_fr_FR.qm" or
-"qml_fr_CA.qm".
+"qml_fr_CA.qm".
Such files can be created using \l {Qt Linguist}.
-The actual translation file that is loaded depends on the system locale.
+The actual translation file that is loaded depends on the system locale.
Additionally, the viewer will load any translation files specified on the command
line via the \c -translation option.
@@ -110,7 +110,7 @@ shows how JavaScript code in QML files can be made to use translatable strings.
Often, QML applications are prototyped with fake data that is later replaced
by real data sources from C++ plugins. QML Viewer assists in this aspect by
loading fake data into the application context: it looks for a directory named
-"dummydata" in the same directory as the target QML file, and any \c .qml
+"dummydata" in the same directory as the target QML file, and any \c .qml
files in that directory are loaded as QML objects and bound to the root context
as properties named after the files.
@@ -124,7 +124,7 @@ ListView {
width: 200; height: 300
model: lottoNumbers
delegate: Text { text: number }
-}
+}
\endqml
If within the document's directory, there is a "dummydata" directory which
@@ -146,30 +146,30 @@ Child properties are included when loaded from dummy data. The following documen
refers to a \c clock.time property:
\qml
-import QtQuick 1.0
+import QtQuick 1.0
Text { text: clock.time }
\endqml
-
+
The text value could be filled by a \c dummydata/clock.qml file with a \c time
property in the root context:
\qml
-import QtQuick 1.0
+import QtQuick 1.0
QtObject { property int time: 54321 }
\endqml
To replace this with real data, you can simply bind the real data object to
the root context in C++ using QDeclarativeContext::setContextProperty(). This
-is detailed in \l {Using QML in C++ Applications}.
+is detailed in \l {Using QML Bindings in C++ Applications}.
\section1 Using the \c runtime object
QML applications that are loaded with the QML Viewer have access to a special
-\c runtime property on the root context. This property provides additional
+\c runtime property on the root context. This property provides additional
information about the application's runtime environment through the following properties:
\table
-\row
+\row
\o \c runtime.isActiveWindow
@@ -177,9 +177,9 @@ information about the application's runtime environment through the following pr
window on the system. It is useful for "pausing" an application, particularly
animations, when the QML Viewer loses focus or moves to the background.
-For example, the following animation is only played when the QML Viewer is
+For example, the following animation is only played when the QML Viewer is
the active window:
-
+
\qml
Rectangle {
width: 200; height: 200
@@ -200,9 +200,9 @@ through the \c active property of the \l {QML:Qt::application}{Qt.application} o
\o \c runtime.orientation
\o This property indicates the current orientation of the QML Viewer. On the
-N900 platform and most S60 5.0-based or newer Symbian devices, this property
-automatically updates to reflect the device's actual orientation; on other platforms,
-this indicates the orientation currently selected in the QML Viewer's
+N900 platform and most S60 5.0-based or newer Symbian devices, this property
+automatically updates to reflect the device's actual orientation; on other platforms,
+this indicates the orientation currently selected in the QML Viewer's
\e {Settings -> Properties} menu. The \c orientation value can be one of the following:
\list
@@ -213,7 +213,7 @@ this indicates the orientation currently selected in the QML Viewer's
\endlist
When the viewer's orientation changes, the appearance of the loaded QML document
-does not change unless it has been set to respond to changes in
+does not change unless it has been set to respond to changes in
\c runtime.orientation. For example, the following Rectangle changes its
aspect ratio depending on the orientation of the QML Viewer:
@@ -221,12 +221,12 @@ aspect ratio depending on the orientation of the QML Viewer:
Rectangle {
id: window
width: 640; height: 480
-
+
states: State {
name: "landscape"
PropertyChanges { target: window; width: 480; height: 640 }
}
- state: (runtime.orientation == Orientation.Landscape
+ state: (runtime.orientation == Orientation.Landscape
|| runtime.orientation == Orientation.LandscapeInverted) ? 'landscape' : ''
}
\endqml
diff --git a/doc/src/declarative/qmlviews.qdoc b/doc/src/declarative/qmlviews.qdoc
new file mode 100644
index 0000000000..53ce4b942d
--- /dev/null
+++ b/doc/src/declarative/qmlviews.qdoc
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qml-views.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Data Models}{Structuring Data with Models}
+\nextpage {Extending QML Functionalities using C++}
+\title Presenting Data with Views
+
+Views are containers for collections of items. They are feature-rich and can be
+customizable to meet style or behavior requirements.
+
+\keyword qml-view-elements
+A set of standard views are provided in the basic set of Qt Quick
+graphical elements:
+
+\list
+\o \l{ListView} arranges items in a horizontal or vertical list
+\o \l{GridView} arranges items in a grid within the available space
+\o \l{PathView} arranges items on a path
+\o \l{WebView}{WebView} - available from the \l {QtWebKit QML Module}.
+\endlist
+Unlike other views, \l WebView is not a fully-featured view item, and needs
+to be combined with a \l Flickable item to create a view that performs like
+a Web browser.
+
+These elements have properties and behaviors exclusive to each element. Visit
+their respective documentation for more information.
+
+\section1 Models
+
+Views display \l{qml-data-models}{models} onto the screen. A model could be a simple list of \l{QML Data Models#An Integer}{integer} or a \l{qml-c++-models}{C++ model}.
+
+To assign a model to a view, bind the view's \c model property to a model.
+\snippet doc/src/snippets/declarative/listview.qml model
+\snippet doc/src/snippets/declarative/listview.qml model
+
+For more information, consult the \l {QML Data Models} article.
+
+\keyword qml-view-delegate
+\section1 View Delegates
+
+Views need a \e delegate to visually represent an item in a list. A view will
+visualize each item list according to the template defined by the delegate.
+Items in a model are accessible through the \c index property as well as the
+item's properties.
+\snippet doc/src/snippets/declarative/listview.qml delegate
+\image listview-setup.png
+
+\section1 Decorating Views
+
+Views allow visual customization through \e decoration properties such as the \c header, \c footer, and \c section properties. By binding an object, usually
+another visual object, to these properties, the views are decoratable. A footer
+may include a \l Rectangle element showcasing borders or a header that displays
+a logo on top of the list.
+
+Suppose that a specific club wants to decorate its members list with its brand
+colors. A member list is in a \c model and the \c delegate will display the
+model's content.
+\snippet doc/src/snippets/declarative/listview-decorations.qml model
+\snippet doc/src/snippets/declarative/listview-decorations.qml delegate
+
+The club may decorate the members list by binding visual objects to the
+\c header and \c footer properties. The visual object may be defined inline, in another file, or in a
+\l {Component} element.
+\snippet doc/src/snippets/declarative/listview-decorations.qml decorations
+\image listview-decorations.png
+
+\section1 ListView Sections
+
+\l {ListView} contents may be grouped into \e sections, where related list items
+are labeled according to their sections. Further, the sections may be decorated
+with \l{qml-view-delegate}{delegates}.
+
+A list may contain a list indicating people's names and the team on which team
+the person belongs.
+\snippet doc/src/snippets/declarative/listview-sections.qml model
+\snippet doc/src/snippets/declarative/listview-sections.qml delegate
+
+The ListView element has the \c section
+\l{Property Binding#Attached Properties}{attached property} that can combine
+adjacent and related elements into a section. The section's \c property
+property is for selecting which list element property to use as sections.
+The \c criteria can dictate how the section names are displayed and the
+\c delegate is similar to the views' \l {qml-view-delegate}{delegate} property.
+\snippet doc/src/snippets/declarative/listview-sections.qml section
+\image listview-section.png
+*/
diff --git a/doc/src/declarative/qmlwebkit.qdoc b/doc/src/declarative/qmlwebkit.qdoc
new file mode 100644
index 0000000000..840f24da23
--- /dev/null
+++ b/doc/src/declarative/qmlwebkit.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qmlwebkit.html
+
+\title QtWebKit QML Module
+
+Qt WebKit QML
+
+\section1 WebKit QML Elements
+\list
+\o \l WebView
+\endlist
+
+\section1 QtWebKit Module
+The QtWebKit Module has a QML element, \l{WebView} for displaying web content
+from a \c URL.
+
+Import the QtWebKit module before declaring a \c WebView element:
+\snippet doc/src/snippets/declarative/webview/webview.qml import
+
+\section1 Simple Usage
+\snippet doc/src/snippets/declarative/webview/webview.qml document
+\image webview.png
+
+\sa {Models and Views: WebView Example}{WebView Example}, {QML Web Browser}
+*/
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 4b380a4981..3659caa6e7 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -27,10 +27,13 @@
/*!
\page qtbinding.html
-\target qtbinding
-\title Using QML in C++ Applications
+\ingroup qml-features
+\previouspage {Extending QML Functionalities using C++}
+\nextpage {Integrating QML Code with Existing Qt UI Code}
+\contentspage QML Features
+\title Using QML Bindings in C++ Applications
-QML is designed to be easily extensible from C++. The classes in the
+QML is designed to be easily extensible to and from C++. The classes in the
Qt Declarative module allow QML components to be loaded and manipulated from C++, and through
Qt's \l{The Meta-Object System}{meta-object system}, QML and C++ objects can easily
communicate through Qt signals and slots. In addition, QML plugins can be written to create
@@ -85,7 +88,7 @@ delete rectangleInstance;
QML documents can also be loaded using QDeclarativeView. This class provides a convenient
QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other
-methods of integrating QML into QWidget-based applications, see \l {Integrating QML with existing Qt
+methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with existing Qt
UI code}.)
@@ -262,8 +265,8 @@ Note that custom C++ types do not have to inherit from QDeclarativeItem; this is
a displayable item. If the item is not displayable, it can simply inherit from QObject.
For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++}
-{Writing QML extensions with C++} tutorial and the \l {Extending QML in C++} reference
-documentation.
+{Writing QML extensions with C++} tutorial and the
+\l {Extending QML Functionalities using C++} reference documentation.
@@ -500,7 +503,8 @@ can be registered using qmlRegisterUncreatableType(). To be accessible from QML
must begin with a capital letter.
See the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++} tutorial and
-the \l {Extending QML in C++} reference documentation for more information.
+the \l {Extending QML Functionalities using C++} reference documentation for
+more information.
\section2 Using enumeration values as signal parameters
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index b7d09a115e..e48dc9a3e4 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -30,8 +30,6 @@
\target qtprogrammers
\title QML for Qt Programmers
-\section1 Overview
-
While QML does not require Qt knowledge to use, if you \e are already familiar with Qt,
much of your knowledge is directly relevant to learning and using QML. Of course,
an application with a UI defined in QML also uses Qt for all the non-UI logic.
@@ -48,7 +46,8 @@ QML provides direct access to the following concepts from Qt:
\o Qt models - used directly in data binding (QAbstractItemModel)
\endlist
-Qt knowledge is \e required for \l {Extending QML in C++}, and also for \l{Integrating QML with existing Qt UI code}.
+Qt knowledge is \e required for \l {Extending QML Functionalities using C++},
+and also for \l{Integrating QML Code with existing Qt UI code}.
\section1 QML Items compared with QWidgets
diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc
new file mode 100644
index 0000000000..75236e623c
--- /dev/null
+++ b/doc/src/declarative/qtquick-intro.qdoc
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qml-intro.html
+\title Intro to Qt Quick
+
+Qt Quick is a collection of technologies that are designed to help developers
+create the kind of intuitive, modern, and fluid user interfaces that are
+increasingly used on mobile phones, media players, set-top boxes, and other
+portable devices. Qt Quick consists of a rich set of user interface
+\l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for
+describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A
+collection of C++ APIs is used to integrate these high level features with
+classic Qt applications. Version 2.1 of the Qt Creator integrated development
+environment (IDE) introduces tools for developing Qt Quick applications.
+
+\image qml-clocks-example.png
+
+\section1 The QML Language
+
+QML is a high level, scripted language. Its commands, more correctly
+\e elements, leverage the power and efficiency of the Qt libraries to make easy
+to use commands that perform intuitive functions. Drawing a rectangle,
+displaying an image, and application events -- all are possible with declarative
+programming.
+
+The language also allows more flexibility of these commands by using
+\l{About JavaScript}{JavaScript} to implement the high level user interface
+logic.
+
+A QML element usually has various \e properties that help define the element.
+For example, if we created an element called Circle then the radius of the
+circle would be a property. Building user interfaces by importing these elements
+is one of the great feature of QML and Qt Quick.
+\image qml-texteditor5_newfile.png
+
+\section1 QtDeclarative Module
+
+To make Qt Quick possible, Qt introduces the \l {QtDeclarative} module. The
+module creates a JavaScript runtime that QML runs under with a Qt based backend.
+Because QtDeclarative and QML are built upon Qt, they inherit many of Qt's
+technology, namely the \l{Signals and Slots}{signals and slots} mechanism and
+the \l{The Meta-Object System}{meta-object} system. Data created using C++ are
+directly accessible from QML and QML objects are also accessible from C++ code.
+
+In conjunction with the QML language, the QtDeclarative module separates the
+interface logic in QML from the application logic in C++.
+
+\section1 Creator Tools
+
+Qt Creator is a complete integrated development environment (IDE) for creating
+applications with Qt Quick and the Qt application framework.
+
+\image qmldesigner-visual-editor.png
+
+The main goal for Qt Creator is meeting the development needs of Qt Quick
+developers who are looking for simplicity, usability, productivity,
+extendibility and openness, while aiming to lower the barrier of entry for
+newcomers to Qt Quick and Qt. The key features of Qt Creator allow UI designers
+and developers to accomplish the following tasks:
+\list
+\o Get started with Qt Quick application development quickly and easily with
+examples, tutorials, and project wizards.
+\o Design application user interface with the integrated editor, Qt Quick
+Designer, or use graphics software to design the user interface and use scripts
+to export the design to Qt Quick Designer.
+\o Develop applications with the advanced code editor that provides new powerful
+features for completing code snippets, refactoring code, and viewing the element
+hierarchy of QML files.
+\o Build and deploy Qt Quick applications that target multiple desktop and
+mobile platforms, such as Microsoft Windows, Mac OS X, Linux, Symbian, and
+Maemo.
+\o Debug JavaScript functions and execute JavaScript expressions in the current
+context, and inspect QML at runtime to explore the object structure, debug
+animations, and inspect colors.
+\o Deploy applications to mobile devices and create application installation
+packages for Symbian and Maemo devices that can be published in the Ovi Store
+and other channels.
+\o Easily access information with the integrated context-sensitive Qt Help
+system.
+\endlist
+
+\image qtcreator-target-selector.png
+
+\section1 Where to Go from Here
+
+The \l {Qt Quick} page has links to various Qt Quick topics such as QML
+features, addons, and tools.
+
+The \l {QML Examples and Demos} page has a gallery of QML applications.
+
+\section1 License Information
+\list
+\o \l{Qt Quick Licensing Information}
+\endlist
+*/
+
+
+
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index 3317037a3e..9a9934a8b6 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -24,41 +24,17 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-/*
-
-
-
-and requires extension to
-fit naturally with QML.
-
-
-JavaScript has only b
-JavaScript has a very simple built in scope is very simple
-
-script, and the precede d
-
-and \l {Integrating JavaScript}{JavaScript} are executed in a scope chain
-automatically established by QML when a component instance is constructed. QML is a \e {dynamically scoped}
-language. Different object instances instantiated from the same component can exist in
-different scope chains.
-
-\image qml-scope.png
-
-
-*/
-
/*!
\page qdeclarativescope.html
\title QML Scope
\tableofcontents
-QML property bindings, inline functions and imported JavaScript files all
-run in a JavaScript scope. Scope controls which variables an expression can
+QML property bindings, inline functions and imported JavaScript files all
+run in a JavaScript scope. Scope controls which variables an expression can
access, and which variable takes precedence when two or more names conflict.
-As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
+As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
more naturally with the QML language extensions.
\section1 JavaScript Scope
@@ -67,8 +43,8 @@ QML's scope extensions do not interfere with JavaScript's natural scoping.
JavaScript programmers can reuse their existing knowledge when programming
functions, property bindings or imported JavaScript files in QML.
-In the following example, the \c {addConstant()} method will add 13 to the
-parameter passed just as the programmer would expect irrespective of the
+In the following example, the \c {addConstant()} method will add 13 to the
+parameter passed just as the programmer would expect irrespective of the
value of the QML object's \c a and \c b properties.
\code
@@ -83,8 +59,8 @@ QtObject {
}
\endcode
-That QML respects JavaScript's normal scoping rules even applies in bindings.
-This totally evil, abomination of a binding will assign 12 to the QML object's
+That QML respects JavaScript's normal scoping rules even applies in bindings.
+This totally evil, abomination of a binding will assign 12 to the QML object's
\c a property.
\code
@@ -101,13 +77,13 @@ with local variables declared in another.
\section1 Element Names and Imported JavaScript Files
-\l {QML Document}s include import statements that define the element names
-and JavaScript files visible to the document. In addition to their use in the
-QML declaration itself, element names are used by JavaScript code when accessing
-\l {Attached Properties} and enumeration values.
+\l {QML Document}s include import statements that define the element names
+and JavaScript files visible to the document. In addition to their use in the
+QML declaration itself, element names are used by JavaScript code when accessing
+\l {Attached Properties} and enumeration values.
-The effect of an import applies to every property binding, and JavaScript
-function in the QML document, even those in nested inline components. The
+The effect of an import applies to every property binding, and JavaScript
+function in the QML document, even those in nested inline components. The
following example shows a simple QML file that accesses some enumeration
values and calls an imported JavaScript function.
@@ -130,10 +106,10 @@ ListView {
\section1 Binding Scope Object
-Property bindings are the most common use of JavaScript in QML. Property
+Property bindings are the most common use of JavaScript in QML. Property
bindings associate the result of a JavaScript expression with a property of an
-object. The object to which the bound property belongs is known as the binding's
-scope object. In this QML simple declaration the \l Item object is the
+object. The object to which the bound property belongs is known as the binding's
+scope object. In this QML simple declaration the \l Item object is the
binding's scope object.
\code
@@ -144,21 +120,21 @@ Item {
Bindings have access to the scope object's properties without qualification.
In the previous example, the binding accesses the \l Item's \c parent property
-directly, without needing any form of object prefix. QML introduces a more
-structured, object-oriented approach to JavaScript, and consequently does not
+directly, without needing any form of object prefix. QML introduces a more
+structured, object-oriented approach to JavaScript, and consequently does not
require the use of the JavaScript \c this property.
Care must be used when accessing \l {Attached Properties} from bindings due
to their interaction with the scope object. Conceptually attached properties
exist on \e all objects, even if they only have an effect on a subset of those.
-Consequently unqualified attached property reads will always resolve to an
-attached property on the scope object, which is not always what the programmer
+Consequently unqualified attached property reads will always resolve to an
+attached property on the scope object, which is not always what the programmer
intended.
-For example, the \l PathView element attaches interpolated value properties to
+For example, the \l PathView element attaches interpolated value properties to
its delegates depending on their position in the path. As PathView only
-meaningfully attaches these properties to the root element in the delegate, any
-sub-element that accesses them must explicitly qualify the root object, as shown
+meaningfully attaches these properties to the root element in the delegate, any
+sub-element that accesses them must explicitly qualify the root object, as shown
below.
\code
@@ -181,7 +157,7 @@ the unset \c {PathView.scale} attached property on itself.
Each QML component in a QML document defines a logical scope. Each document
has at least one root component, but can also have other inline sub-components.
-The component scope is the union of the object ids within the component and the
+The component scope is the union of the object ids within the component and the
component's root element's properties.
\code
@@ -195,7 +171,7 @@ Item {
anchors.top: parent.top
}
- Text {
+ Text {
text: titleElement.text
font.pixelSize: 18
anchors.bottom: parent.bottom
@@ -203,7 +179,7 @@ Item {
}
\endcode
-The example above shows a simple QML component that displays a rich text title
+The example above shows a simple QML component that displays a rich text title
string at the top, and a smaller copy of the same text at the bottom. The first
\c Text element directly accesses the component's \c title property when
forming the text to display. That the root element's properties are directly
@@ -211,18 +187,18 @@ accessible makes it trivial to distribute data throughout the component.
The second \c Text element uses an id to access the first's text directly. IDs
are specified explicitly by the QML programmer so they always take precedence
-over other property names (except for those in the \l {JavaScript Scope}). For
-example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
-object} had a \c titleElement property in the previous example, the \c titleElement
+over other property names (except for those in the \l {JavaScript Scope}). For
+example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
+object} had a \c titleElement property in the previous example, the \c titleElement
id would still take precedence.
\section1 Component Instance Hierarchy
-In QML, component instances connect their component scopes together to form a
-scope hierarchy. Component instances can directly access the component scopes of
+In QML, component instances connect their component scopes together to form a
+scope hierarchy. Component instances can directly access the component scopes of
their ancestors.
-The easiest way to demonstrate this is with inline sub-components whose component
+The easiest way to demonstrate this is with inline sub-components whose component
scopes are implicitly scoped as children of the outer component.
\code
@@ -239,16 +215,16 @@ Item {
}
\endcode
-The component instance hierarchy allows instances of the delegate component
+The component instance hierarchy allows instances of the delegate component
to access the \c defaultColor property of the \c Item element. Of course,
-had the delegate component had a property called \c defaultColor that would
-have taken precedence.
+had the delegate component had a property called \c defaultColor that would
+have taken precedence.
The component instance scope hierarchy extends to out-of-line components, too.
-In the following example, the \c TitlePage.qml component creates two
-\c TitleText instances. Even though the \c TitleText element is in a separate
-file, it still has access to the \c title property when it is used from within
-the \c TitlePage. QML is a dynamically scoped language - depending on where it
+In the following example, the \c TitlePage.qml component creates two
+\c TitleText instances. Even though the \c TitleText element is in a separate
+file, it still has access to the \c title property when it is used from within
+the \c TitlePage. QML is a dynamically scoped language - depending on where it
is used, the \c title property may resolve differently.
\code
@@ -256,13 +232,13 @@ is used, the \c title property may resolve differently.
import QtQuick 1.0
Item {
property string title
-
- TitleText {
+
+ TitleText {
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
size: 18
anchors.bottom: parent.bottom
}
@@ -277,10 +253,10 @@ Text {
}
\endcode
-Dynamic scoping is very powerful, but it must be used cautiously to prevent
+Dynamic scoping is very powerful, but it must be used cautiously to prevent
the behavior of QML code from becoming difficult to predict. In general it
-should only be used in cases where the two components are already tightly
-coupled in another way. When building reusable components, it is preferable
+should only be used in cases where the two components are already tightly
+coupled in another way. When building reusable components, it is preferable
to use property interfaces, like this:
\code
@@ -289,14 +265,14 @@ import QtQuick 1.0
Item {
id: root
property string title
-
- TitleText {
+
+ TitleText {
title: root.title
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
title: root.title
size: 18
anchors.bottom: parent.bottom
@@ -322,7 +298,7 @@ QML specific tasks a little easier. These extensions are described in the
\l {QML Global Object} documentation.
QML disallows element, id and property names that conflict with the properties
-on the global object to prevent any confusion. Programmers can be confident
+on the global object to prevent any confusion. Programmers can be confident
that \c Math.min(10, 9) will always work as expected!
*/
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 1ee5e61b3c..dc08ba0845 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -144,7 +144,7 @@ An \l Item is the most basic visual element in QML and is often used as a contai
We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us
to instantiate the cells with different colors.
-This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Adding Properties}).
+This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Property Binding}).
\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
diff --git a/doc/src/demos/guitartuner.qdoc b/doc/src/demos/guitartuner.qdoc
new file mode 100644
index 0000000000..8678db11df
--- /dev/null
+++ b/doc/src/demos/guitartuner.qdoc
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \page guitartuner_example.html
+ \title Guitar Tuner Example
+ \example demos/mobile/guitartuner
+
+The Guitar Tuner application can be used to tune guitar strings by analyzing the
+audio recorded by the device microphone. Guitar Tuner can be also used in the
+listening mode. It will then play the audio by the corresponding frequency, and
+the user can tune the guitar by ear. The application demonstrates the audio-in
+and the audio-out interfaces of
+\l{external: Mobility Multimedia}{Qt Mobility Multimedia} and integrating Qt
+code to the Qt Quick UI.
+
+ The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/guitartuner
+
+\note This demonstration requires QtMobility libraries.
+ \image qml-guitartuner-example.png
+*/
diff --git a/doc/src/demos/mobiledemos.qdoc b/doc/src/demos/mobiledemos.qdoc
new file mode 100644
index 0000000000..15fac7ed42
--- /dev/null
+++ b/doc/src/demos/mobiledemos.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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 demos/mobile/quickhit
+ \title Quick Hit Demo
+
+ This demo shows how to use Mobility APIs to access device audio
+ capabilities. Uses the multimedia and systeminfo modules of
+ \l{external: Qt Mobility Manual}{Qt Mobility}.
+
+ \note This demonstration requires QtMobility libraries.
+
+*/
+
+
diff --git a/doc/src/demos/qcamera.qdoc b/doc/src/demos/qcamera.qdoc
new file mode 100644
index 0000000000..315e82a600
--- /dev/null
+++ b/doc/src/demos/qcamera.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \page qcamera_example.html
+ \title QCamera Example
+ \example demos/mobile/qcamera
+
+ This Qt C++ application demonstrates how to use Multimedia, Messaging and Contacts modules from \l{external: Qt Mobility Manual}{Qt Mobility}.
+
+ \image qcameraexample.png
+
+ The application shows the viewfinder picture from the device camera and allows the user to capture images. Captured images are stored into the gallery and can be sent as an MMS message to a friend. Application listens for incoming MMS messages in the Inbox folder. If the MMS message contains a picture, the application asks the user whether he or she wants to add the picture as an avatar of the sender. The person's general contact information has to exist in the device phonebook in order to store the avatar in it.
+
+ The application uses own MyVideoSurface video surface derived from QAbstractVideoSurface for showing camera view finder pictures. A video surface presents a continuous stream of identically formatted frames.
+
+ \snippet demos/mobile/qcamera/cameraexample.cpp 0
+
+ The application handles Graphics Out Of Memory (GOOM) events in it's QApplication::symbianEventFilter() method.
+
+ \snippet demos/mobile/qcamera/main.cpp 0
+
+ \section1 Required capabilities
+
+ Application can be self-signed.
+
+ After enabling Qt Mobility Messaging module (MESSAGING_ENABLED flag in .pro file)
+ from the project file is ReadDeviceData WriteDeviceData capabilities also needed and
+ application have to be Developer Signed. Enabling Messaging adds MMS sending feature for the application.
+
+ \section1 Compatibility
+
+ Qt SDK 1.1
+
+ Qt 4.7.2 for Symbian
+
+ QtMobility 1.1.1
+
+ Tested on: Nokia N8, Nokia E7
+
+ Developed with: Qt SDK 1.1
+
+
+*/
diff --git a/doc/src/demos/qml-qtbubblelevel.qdoc b/doc/src/demos/qml-qtbubblelevel.qdoc
new file mode 100644
index 0000000000..82ea4dc931
--- /dev/null
+++ b/doc/src/demos/qml-qtbubblelevel.qdoc
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \page qtbubblelevel_example.html
+ \title Qt Bubble Level Example
+ \example demos/mobile/qtbubblelevel
+
+Qt Bubble Level is a simple application that uses
+\l{external: Qt Mobility Manual}{Qt Mobility's} accelerometer APIs and hardware
+sensor information to calculate the inclination of the device and presents this
+as atraditional bubble level. The application provides a calibration feature to
+handle any possible errors in accelerometer readings. The example is hosted in
+Projects Forum Nokia: https://projects.forum.nokia.com/qtbubblelevel
+
+\note This demonstration requires QtMobility libraries.
+
+ \image qml-qtbubblelevel-demo.png
+
+ \section1 Initialising the application
+
+ All of the initialisations are done in the main function.
+
+ First, QDeclarativeView is created to intepret the QML files. The QML file given is found in the Qt resource. The root QML element is set to resize to the view whenever the view is resized.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 0
+
+ The Settings object will handle the loading or storing of the calibration value. Next, we create instances from QAccelerometer and AccelerometerFilter and attach the filter to the sensor.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 1
+
+ The Qt code is then connected to QML code by using Qt Signals and Slots connections. First, the root object is retrieved from QDeclarativeView. The root object now represents the Qt object of the QML root element.
+
+ The saveCorrectionAngle signal of the QML root element is connected to the Qt slot saveCorrectionAngle. The rotationChanged and correctionAngle Qt signals are connected to the handleRotation and setCorrectionAngle slot of the QML root element. Finally, the quit signal of QDeclarativeEngine is connected to QApplication's quit slot.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 2
+
+ On the Maemo target, the application needs a minimise button, so we connect one additional QML signal to the Qt slot. The minimise button is made visible by setting the value of the QML root element's taskSwitcherVisible property to true.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 3
+
+ The correction factor of the accelerometer is retrieved from persistent storage by using QSettings. The correction factor is signalled to the QML side by using the function setCorrectionAngle. The accelerometer sensor is started and it will eventually begin to signal the changes in accelerometer readings.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 4
+
+ Finally, in the end of the function the view is shown in full screen on mobile devices. On other targets, the application is shown as 800 x 480 resolution in the 100, 100 position from the top-left corner of the desktop.
+
+ \snippet demos/mobile/qtbubblelevel/main.cpp 5
+
+ \section1 Accessing the accelerometer information
+
+ The inclination of the device is resolved by using the QAccelerometer sensor of QtMobility. We already created the sensor in the main function and attached our self-derived AccelerometerFilter object to it. Here is the definition of the AccelerometerFilter class:
+
+ \snippet demos/mobile/qtbubblelevel/accelerometerfilter.h 0
+
+ The class is multiderived from QObject and QAccelerometerFilter classes. The QAccelerometerFilter class is derived from QObject because we want to use Qt Signals and Slots to signal changes in accelerometer readings.
+
+ The members x, y, and z store the previous values of the sensor reading in order to implement a low pass filter to the values.
+
+ In the implementation of the AccelerometerFilter class, we first read the value of each axis from the QAccelerometerReading object. The values are then converted from radians to degrees and applied the low pass filter to reduce noise in the sensor readings. Different low pass factors are used depending on the platform (these were determined to be good via experimenting). Finally, the calculated value is emitted.
+
+ Note that the accelerometer sensors are oriented differently in Symbian and Maemo devices, and we must account for this by using platform-specific code.
+
+ \snippet demos/mobile/qtbubblelevel/accelerometerfilter.cpp 0
+
+ \section1 The Qt Quick UI
+
+ BubbleLevel.qml is the main QML element. It represents the wooden board of the bubble level, and it also acts as a connection point between the QML and the Qt side. In the beginning of the element, there are two signals, two functions, and one property. All of these define the interface between Qt and QML.
+
+ On the Maemo platform, when the application is to be minimised, minimizeApplication is signalled. When a new calibration factor is to be stored in the device's memory, saveCorrectionAngle is signalled.
+
+ The handleRotation function acts as a Qt slot to which the AccelerometerFilters signal rotationChanged is connected. Similarly, the setCorrectionAngle function also acts as a Qt slot to which the Settings object's signal, correctionAngle, is connected.
+
+ The property alias taskSwitcherVisible is provided to allow the Qt model to show or hide the task switcher button which minimises the application. This is only meaningful on Maemo platforms, where every application normally has a task switcher button.
+
+ \snippet demos/mobile/qtbubblelevel/qml/BubbleLevel.qml 0
+
+ The Tube element represents the the glass tube of the bubble level. It is anchored to the centre of the wooden board. The width and height are calculated with specific factors to make the glass tube scale to different resolutions.
+
+ \snippet demos/mobile/qtbubblelevel/qml/BubbleLevel.qml 1
+
+ In the implementation of Tube.qml, the property deg represents the current inclination. The x-position of the bubble is bound to the JavaScript function calX which is called every time the property deg, center, or bubblCenter is changed. The function places the bubble in the corresponding place on its parent.
+
+ \snippet demos/mobile/qtbubblelevel/qml/Tube.qml 0
+*/
diff --git a/doc/src/deployment/deployment-plugins.qdoc b/doc/src/deployment/deployment-plugins.qdoc
index 12a3b0c975..03685e5d36 100644
--- a/doc/src/deployment/deployment-plugins.qdoc
+++ b/doc/src/deployment/deployment-plugins.qdoc
@@ -104,7 +104,7 @@
plugins to be built in release mode, add the following line to the plugin's
project file:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.pro 3
This will ensure that the plugin is compatible with the version of the library
used in the application.
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index bc80ed36ae..50f873f72a 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -336,7 +336,7 @@
are many ways to solve this:
\list
-
+
\o You can install the Qt libraries in one of the system
library paths (e.g. \c /usr/lib on most systems).
@@ -345,7 +345,7 @@
linker to look in this directory when starting your application.
\o You can write a startup script for your application, where you
- modify the dynamic linker configuration (e.g. adding your
+ modify the dynamic linker configuration (e.g., adding your
application's directory to the \c LD_LIBRARY_PATH environment
variable. \note If your application will be running with "Set
user ID on execution," and if it will be owned by root, then
@@ -375,7 +375,7 @@
\c plugins directory, or you can set the \c DESTDIR in the
plugins' project files:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 8
An archive distributing all the Qt libraries, and all the plugins,
required to run the \l {tools/plugandpaint}{Plug & Paint}
@@ -422,7 +422,7 @@
application using QApplication::addLibraryPath() or
QApplication::setLibraryPaths().
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 9
\section1 Application Dependencies
@@ -718,7 +718,7 @@
using QApplication::addLibraryPath() or
QApplication::setLibraryPaths().
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 19
One benefit of using plugins is that they can easily be made
available to a whole family of applications.
@@ -753,7 +753,7 @@
To use the options, add
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 21
to your .pro file. The \c embed_manifest_dll option is enabled by default.
The \c embed_manifest_exe option is NOT enabled by default.
@@ -965,7 +965,7 @@
command line application on Unix and Windows. You probably don't
want to run it in a bundle: Add this to your application's .pro:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 26
This will tell \c qmake not to put the executable inside a
bundle. Please refer to the \l{Deploying an Application on
@@ -1249,7 +1249,7 @@
to look for the new plugins. After constructing the
QApplication, we add the following code:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 49
First, we tell the application to only look for plugins in this
directory. In our case, this is what we want since we only want to
@@ -1366,7 +1366,7 @@
variable to get \e{weak linking} to work for your application. You
can add:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 51
to your .pro file, and qmake will take care of this for you.
@@ -1416,7 +1416,7 @@
add both to the \c CONFIG line. PowerPC users also need an
SDK. For example:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 53
Besides \c lipo, you can also check your binaries with the \c file(1)
command line tool or the Finder.
@@ -1513,12 +1513,12 @@
First, we will change the vendor statement to something more meaningful. The application
vendor is visible to end-user during the installation.
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 56
Second we will tell the Symbian application installer that this application supports
only S60 5.0 based devices:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 57
You can find a list of platform and device indentification codes from
\l {http://wiki.forum.nokia.com/index.php/S60_Platform_and_device_identification_codes}{Forum Nokia Wiki}.
diff --git a/doc/src/development/activeqt-dumpcpp.qdoc b/doc/src/development/activeqt-dumpcpp.qdoc
index 504b3b4cff..54581e168b 100644
--- a/doc/src/development/activeqt-dumpcpp.qdoc
+++ b/doc/src/development/activeqt-dumpcpp.qdoc
@@ -83,24 +83,24 @@
as \c noncreatable) have a default constructor; this is typically a single class
of type \c Application.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 0
All other classes can only be created by passing an IDispatch interface pointer
to the constructor; those classes should however not be created explicitly.
Instead, use the appropriate API of already created objects.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 1
All coclass wrappers also have one constructors taking an interface wrapper class
for each interface implemented.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 2
You have to create coclasses to be able to connect to signals of the subobject.
Note that the constructor deletes the interface object, so the following will
cause a segmentation fault:
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 3
If the return type is of a coclass or interface type declared in another type
library you have to include the namespace header for that other type library
@@ -115,7 +115,7 @@
In this case, create the correct wrapper class explicitly:
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 4
You can of course use the IDispatch* returned directly, in which case you have to
call \c Release() when finished with the interface.
diff --git a/doc/src/development/debug.qdoc b/doc/src/development/debug.qdoc
index 044ad0d379..1669b00a55 100644
--- a/doc/src/development/debug.qdoc
+++ b/doc/src/development/debug.qdoc
@@ -142,7 +142,7 @@
If you include the <QtDebug> header file, the \c qDebug() function
can also be used as an output stream. For example:
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 0
The Qt implementation of these functions prints the text to the
\c stderr output under Unix/X11 and Mac OS X. With Windows, if it
@@ -199,14 +199,14 @@
These macros are useful for detecting program errors, e.g. like this:
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 1
Q_ASSERT(), Q_ASSERT_X(), and Q_CHECK_PTR() expand to nothing if
\c QT_NO_DEBUG is defined during compilation. For this reason,
the arguments to these macro should not have any side-effects.
Here is an incorrect usage of Q_CHECK_PTR():
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 2
If this code is compiled with \c QT_NO_DEBUG defined, the code in
the Q_CHECK_PTR() expression is not executed and \e alloc returns
diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc
index 9a6220f7a0..0f38c613a5 100644
--- a/doc/src/development/designer-manual.qdoc
+++ b/doc/src/development/designer-manual.qdoc
@@ -1385,17 +1385,13 @@
\target CreatingAMenu
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-creating-menu1.png
\inlineimage designer-creating-menu2.png
\br
\inlineimage designer-creating-menu3.png
\inlineimage designer-creating-menu4.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating a Menu
@@ -1410,9 +1406,8 @@
\key Escape to reject it. You can undo the editing operation later if
required.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
Menus can also be rearranged in the menu bar simply by dragging and
dropping them in the preferred location. A vertical red line indicates the
@@ -1423,17 +1418,13 @@
navigating the menu structure in the usual way.
\target CreatingAMenuEntry
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-creating-menu-entry1.png
\inlineimage designer-creating-menu-entry2.png
\br
\inlineimage designer-creating-menu-entry3.png
\inlineimage designer-creating-menu-entry4.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating a Menu Entry
@@ -1453,9 +1444,8 @@
be accessible via the \l{#TheActionEditor}{Action Editor}, and any
associated keyboard shortcut can be set there.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
Just like with menus, entries can be moved around simply by dragging and
dropping them in the preferred location. When an entry is dragged over a
@@ -1465,13 +1455,9 @@
\section1 Toolbars
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-creating-toolbar.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating and Removing a Toolbar
@@ -1483,9 +1469,8 @@
Toolbars are removed from the form via an entry in the toolbar's context
menu.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section2 Adding and Removing Toolbar Buttons
@@ -1494,14 +1479,10 @@
Since actions can be represented by menu entries and toolbar buttons,
they can be moved between menus and toolbars.
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-adding-toolbar-action.png
\inlineimage designer-removing-toolbar-action.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
To share an action between a menu and a toolbar, drag its icon from the
action editor to the toolbar rather than from the menu where its entry is
@@ -1510,9 +1491,8 @@
Toolbar buttons are removed via the toolbar's context menu.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section1 Actions
@@ -1521,13 +1501,9 @@
action editor window, simplifying the creation and management of actions.
\target TheActionEditor
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-action-editor.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 The Action Editor
@@ -1543,9 +1519,8 @@
\gui{Detailed View}. You can also copy and paste actions between menus,
toolbars and forms.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section2 Creating an Action
@@ -1560,19 +1535,14 @@
Once the action is created, it can be used wherever actions are applicable.
- \raw HTML
- <div style="clear: left" />
- \endraw
+ \div {class="clear-left"}
+ \enddiv
\target AddingAnAction
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-adding-menu-action.png
\inlineimage designer-adding-toolbar-action.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Adding an Action
@@ -1584,9 +1554,8 @@
will be added. Release the mouse button to add the action when you have
found the right spot.
- \raw HTML
- <div style="clear: right" />
- \endraw
+ \div {class="clear-right"}
+ \enddiv
\section1 Dock Widgets
@@ -1598,13 +1567,9 @@
\target AddingADockWidget
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-adding-dockwidget.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Adding a Dock Widget
@@ -1623,9 +1588,8 @@
\l{QDockWidget::}{windowTitle} property. This also helps to identify them on the
form.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
*/
@@ -2044,7 +2008,7 @@ pixmap property in the property editor.
project file, ensuring that the application is compiled and linked
appropriately.
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 0
The QUiLoader class provides a form loader object to construct the user
interface. This user interface can be retrieved from any QIODevice, e.g.,
@@ -2054,7 +2018,7 @@ pixmap property in the property editor.
The QtUiTools module classes can be included using the following directive:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 1
The QUiLoader::load() function is invoked as shown in this code from the
\l{Text Finder Example}{Text Finder} example:
@@ -2126,7 +2090,7 @@ pixmap property in the property editor.
\c setupUi() function to do this, so we only need to declare and
implement a slot with a name that follows a standard convention:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 2
Using this convention, we can define and implement a slot that responds to
mouse clicks on the \gui OK button:
@@ -2588,7 +2552,7 @@ pixmap property in the property editor.
plugins are also built in release mode. To do this, include the following
declaration in the plugin's \c{.pro} file:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 3
If plugins are built in a mode that is incompatible with \QD, they will
not be loaded and installed. For more information about plugins, see the
@@ -2597,7 +2561,7 @@ pixmap property in the property editor.
It is also necessary to ensure that the plugin is installed together with
other \QD widget plugins:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 4
The \c $[QT_INSTALL_PLUGINS] variable is a placeholder to the location of
the installed Qt plugins. You can configure \QD to look for plugins in
@@ -2756,7 +2720,7 @@ pixmap property in the property editor.
using the Q_INTERFACES() macro in the extension class's definition. For
example:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 7
This enables \QD to use the qobject_cast() function to query for supported
interfaces using a QObject pointer only.
@@ -2791,13 +2755,13 @@ pixmap property in the property editor.
You can either create a new QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 8
or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to enable the factory to
create your custom extension as well:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 9
\section2 Accessing Qt Designer's Extension Manager
@@ -2809,7 +2773,7 @@ pixmap property in the property editor.
an extension factory is typically made in the
QDesignerCustomWidgetInterface::initialize() function:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 10
The \c formEditor parameter in the
QDesignerCustomWidgetInterface::initialize() function is a pointer to \QD's
diff --git a/doc/src/development/moc.qdoc b/doc/src/development/moc.qdoc
index fc0165b31f..5d524b2f29 100644
--- a/doc/src/development/moc.qdoc
+++ b/doc/src/development/moc.qdoc
@@ -136,7 +136,7 @@
This guarantees that make will run the moc before it compiles
\c foo.cpp. You can then put
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 3
at the end of \c foo.cpp, where all the classes declared in that
file are fully known.
@@ -223,7 +223,7 @@
file. \c moc defines the preprocessor symbol \c Q_MOC_RUN. Any
code surrounded by
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 4
is skipped by the \c moc.
@@ -245,7 +245,7 @@
\c moc does not handle all of C++. The main problem is that class
templates cannot have signals or slots. Here is an example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 5
Another limitation is that moc does not expand macros, so you
for example cannot use a macro to declare a signal/slot
@@ -261,7 +261,7 @@
first inherited class is a subclass of QObject. Also, be sure
that only the first inherited class is a QObject.
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 6
Virtual inheritance with QObject is \e not supported.
@@ -271,11 +271,11 @@
signal or slot parameters, we think inheritance is a better
alternative. Here is an example of illegal syntax:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 7
You can work around this restriction like this:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 8
It may sometimes be even better to replace the function pointer
with inheritance and virtual functions.
@@ -289,7 +289,7 @@
fully qualify the data types when declaring signals and slots,
and when establishing connections. For example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 9
\section2 Type Macros Cannot Be Used for Signal and Slot Parameters
@@ -297,7 +297,7 @@
an argument will not work in signals and slots. Here is an
illegal example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 10
A macro without parameters will work.
@@ -305,7 +305,7 @@
Here's an example of the offending construct:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 11
\section2 Signal/Slot return types cannot be references
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 9a46ea8f69..103f474b71 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -34,26 +34,26 @@
\ingroup qttools
\keyword qmake
- \l {qmake}{ \c qmake} is a tool that helps simplify the build
- process for development project across different platforms. \l {qmake}{ \c qmake}
+ \l{qmake}{\c qmake} is a tool that helps simplify the build process for
+ development project across different platforms. \l{qmake}{\c qmake}
automates the generation of Makefiles so that only a few lines of
- information are needed to create each Makefile. \l {qmake}{ \c qmake} can be used for
- any software project, whether it is written in Qt or not.
-
- \l {qmake}{ \c qmake} generates a Makefile based on the information in a project
- file. Project files are created by the developer, and are usually
- simple, but more sophisticated project files can be created for
- complex projects.
- \l {qmake}{ \c qmake} contains additional features to support development with Qt,
- automatically including build rules for \l{moc.html}{moc}
+ information are needed to create each Makefile. \l{qmake}{\c qmake} can be
+ used for any software project, whether it is written in Qt or not.
+
+ \l{qmake}{\c qmake} generates a Makefile based on the information in a
+ project file. Project files are created by the developer, and are usually
+ simple, but more sophisticated project files can be created for complex
+ projects.
+ \l{qmake}{\c qmake} contains additional features to support development
+ with Qt, automatically including build rules for \l{moc.html}{moc}
and \l{uic.html}{uic}.
- \l {qmake}{ \c qmake} can also generate projects for Microsoft Visual studio
+ \l{qmake}{\c qmake} can also generate projects for Microsoft Visual studio
without requiring the developer to change the project file.
\section1 Getting Started
The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews
- that aim to help new users get started with \l {qmake}{ \c qmake}.
+ that aim to help new users get started with \l{qmake}{\c qmake}.
\list
\o \l{qmake Tutorial}
@@ -98,23 +98,24 @@
\previouspage qmake Manual
\nextpage qmake Project Files
- \l {qmake}{ \c qmake} provides a project-oriented system for managing the build
- process for applications, libraries, and other components. This
- approach gives developers control over the source files used, and
+ \l{qmake Manual#qmake}{\c qmake} provides a project-oriented system for
+ managing the buildprocess for applications, libraries, and other components.
+ This approach gives developers control over the source files used, and
allows each of the steps in the process to be described concisely,
- typically within a single file. \l {qmake}{ \c qmake} expands the information in
- each project file to a Makefile that executes the necessary commands
- for compiling and linking.
+ typically within a single file. \l{qmake Manual#qmake}{\c qmake} expands
+ the information in each project file to a Makefile that executes the necessary
+ commands for compiling and linking.
In this document, we provide a basic introduction to project files,
- describe some of the main features of \l {qmake}{ \c qmake}, and show how to use
- \l {qmake}{ \c qmake} on the command line.
+ describe some of the main features of \l{qmake Manual#qmake}{\c qmake},
+ and show how to use \l{qmake Manual#qmake}{\c qmake} on the command line.
\section1 Describing a Project
Projects are described by the contents of project (\c .pro) files.
- The information within these is used by \l {qmake}{ \c qmake} to generate a Makefile
- containing all the commands that are needed to build each project.
+ The information within these is used by \l{qmake Manual#qmake}{\c qmake}
+ to generate a Makefile containing all the commands that are needed to
+ build each project.
Project files typically contain a list of source and header files,
general configuration information, and any application-specific details,
such as a list of extra libraries to link against, or a list of extra
@@ -134,13 +135,14 @@
\section1 Building a Project
- For simple projects, you only need to run \l {qmake}{ \c qmake} in the top
- level directory of your project. By default, \l {qmake}{ \c qmake} generates a
- Makefile that you then use to build the project, and you can then
- run your platform's \c make tool to build the project.
+ For simple projects, you only need to run \l{qmake Manual#qmake}{\c qmake}
+ in the top level directory of your project. By default,
+ \l{qmake Manual#qmake}{\c qmake} generates a Makefile that you then use
+ to build the project, and you can then run your platform's \c make tool
+ to build the project.
- \l {qmake}{ \c qmake} can also be used to generate project files. A full
- description of \c{qmake}'s command line options can be found in the
+ \l{qmake Manual#qmake}{\c qmake} can also be used to generate project files.
+ A full description of \c{qmake}'s command line options can be found in the
\l{Running qmake} chapter of this manual.
\section1 Using Precompiled Headers
@@ -157,38 +159,40 @@
\previouspage Using qmake
\nextpage Running qmake
- Project files contain all the information required by \l {qmake}{ \c qmake} to build
- your application, library, or plugin. The resources used by your project
- are generally specified using a series of declarations, but support for
- simple programming constructs allow you to describe different build
- processes for different platforms and environments.
+ Project files contain all the information required by
+ \l{qmake Manual#qmake}{\c qmake} to build your application, library,
+ or plugin. The resources used by your project are generally specified
+ using a series of declarations, but support for simple programming
+ constructs allow you to describe different build processes for different
+ platforms and environments.
\tableofcontents
\section1 Project File Elements
- The project file format used by \l {qmake}{ \c qmake} can be used to support both
- simple and fairly complex build systems. Simple project files will
- use a straightforward declarative style, defining standard variables
- to indicate the source and header files that are used in the project.
- Complex projects may use the control flow structures to fine-tune the
- build process.
+ The project file format used by \l{qmake Manual#qmake}{\c qmake} can be
+ used to support both simple and fairly complex build systems.
+ Simple project files will use a straightforward declarative style,
+ defining standard variables to indicate the source and header files
+ that are used in the project. Complex projects may use the control flow
+ structures to fine-tune the build process.
The following sections describe the different types of elements used
in project files.
\section2 Variables
- In a project file, variables are used to hold lists of strings.
- In the simplest projects, these variables inform \l {qmake}{ \c qmake} about the
- configuration options to use, or supply filenames and paths to use
- in the build process.
+ In a project file, variables are used to hold lists of strings. In the
+ simplest projects, these variables inform \l{qmake Manual#qmake}{\c qmake}
+ about the configuration options to use, or supply filenames and paths to
+ use in the build process.
- \l {qmake}{ \c qmake} looks for certain variables in each project file, and it
- uses the contents of these to determine what it should write to a
- Makefile. For example, the list of values in the \c HEADERS and
- \c SOURCES variables are used to tell \l {qmake}{ \c qmake} about header and
- source files in the same directory as the project file.
+ \l{qmake Manual#qmake}{\c qmake} looks for certain variables in each
+ project file, and it uses the contents of these to determine what it
+ should write to a Makefile. For example, the list of values in the
+ \c HEADERS and \c SOURCES variables are used to tell
+ \l{qmake Manual#qmake}{\c qmake} about header and source files in the
+ same directory as the project file.
Variables can also be used internally to store temporary lists of values,
and existing lists of values can be overwritten or extended with new
@@ -206,14 +210,15 @@
\snippet doc/src/snippets/qmake/variables.pro 1
- The \c CONFIG variable is another special variable that \l {qmake}{ \c qmake}
- uses when generating a Makefile. It is discussed in the section on
+ The \c CONFIG variable is another special variable that
+ \l{qmake Manual#qmake}{\c qmake} uses when generating a Makefile.
+ It is discussed in the section on
\l{#GeneralConfiguration}{general configuration} later in this chapter.
In the above line, \c qt is added to the list of existing values
contained in \c CONFIG.
- The following table lists the variables that \l {qmake}{ \c qmake} recognizes, and
- describes what they should contain.
+ The following table lists the variables that \l{qmake Manual#qmake}{\c qmake}
+ recognizes, and describes what they should contain.
\table
\header \o Variable \o Contents
@@ -276,8 +281,9 @@
\section2 Built-in Functions and Control Flow
- \l {qmake}{ \c qmake} provides a number of built-in functions to allow the contents
- of variables to be processed. The most commonly used function in simple
+ \l{qmake Manual#qmake}{\c qmake} provides a number of built-in functions
+ to allow the contents of variables to be processed.
+ The most commonly used function in simple
project files is the \c include function which takes a filename as an
argument. The contents of the given file are included in the project
file at the place where the \c include function is used.
@@ -295,7 +301,8 @@
The assignments inside the braces are only made if the condition is
true. In this case, the special \c win32 variable must be set; this
happens automatically on Windows, but this can also be specified on
- other platforms by running \l {qmake}{ \c qmake} with the \c{-win32} command line
+ other platforms by running \l{qmake Manual#qmake}{\c qmake}
+ with the \c{-win32} command line
option (see \l{Running qmake} for more information). The opening
brace must stand on the same line as the condition.
@@ -316,15 +323,17 @@
\section1 Project Templates
The \c TEMPLATE variable is used to define the type of project that will
- be built. If this is not declared in the project file, \l {qmake}{ \c qmake} assumes
- that an application should be built, and will generate an appropriate
- Makefile (or equivalent file) for the purpose.
+ be built. If this is not declared in the project file,
+ \l{qmake Manual#qmake}{\c qmake} assumes that an application should be
+ built, and will generate an appropriate Makefile (or equivalent file)
+ for the purpose.
The types of project available are listed in the following table with
- information about the files that \l {qmake}{ \c qmake} will generate for each of them:
+ information about the files that \l{qmake Manual#qmake}{\c qmake}
+ will generate for each of them:
\table
- \header \o Template \o Description of \l {qmake}{ \c qmake}output
+ \header \o Template \o Description of \l{qmake Manual#qmake}{\c qmake} output
\row \o app (default) \o Creates a Makefile to build an application.
\row \o lib \o Creates a Makefile to build a library.
\row \o subdirs \o Creates a Makefile containing rules for the
@@ -339,9 +348,10 @@
See the \l{qmake Tutorial} for advice on writing project files for
projects that use the \c app and \c lib templates.
- When the \c subdirs template is used, \l {qmake}{ \c qmake} generates a Makefile
- to examine each specified subdirectory, process any project file it finds
- there, and run the platform's \c make tool on the newly-created Makefile.
+ When the \c subdirs template is used, \l{qmake Manual#qmake}{\c qmake}
+ generates a Makefile to examine each specified subdirectory,
+ process any project file it finds there, and run the platform's
+ \c make tool on the newly-created Makefile.
The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to
contain a list of all the subdirectories to be processed.
@@ -351,7 +361,8 @@
The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the
options and features that the compiler should use and the libraries that
should be linked against. Anything can be added to the \c CONFIG variable,
- but the options covered below are recognized by \l {qmake}{ \c qmake} internally.
+ but the options covered below are recognized by
+ \l{qmake Manual#qmake}{\c qmake} internally.
The following options control the compiler flags that are used to build the
project:
@@ -363,11 +374,11 @@
\row \o debug \o The project is to be built in debug mode.
\row \o debug_and_release \o The project is built in \e both debug and
release modes.
- \row \o debug_and_release_target \o The project is built in \e both debug
+ \row \o debug_and_release_target \o The project is built in \e both debug
and release modes. TARGET is built into \e both the debug and release directories.
\row \o build_all \o If \c debug_and_release is specified, the project is
built in both debug and release modes by default.
- \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
+ \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
the precompiled header file specified in the .pro file.
\row \o ordered \o When using the \c subdirs template, this option
specifies that the directories listed should be processed in the
@@ -375,15 +386,15 @@
\row \o warn_on \o The compiler should output as many warnings as possible.
This is ignored if \c warn_off is specified.
\row \o warn_off \o The compiler should output as few warnings as possible.
- \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
+ \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
\endtable
The \c debug_and_release option is special in that it enables \e both debug and
release versions of a project to be built. In such a case, the Makefile that
- \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can be
- invoked in the following way:
+ \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both versions,
+ and this can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 0
Adding the \c build_all option to the \c CONFIG variable makes this rule
the default when building the project, and installation targets will be
@@ -426,10 +437,11 @@
build it as a multi-threaded application in \c debug mode, your project
file will contain the following line:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 1
- Note, that you must use "+=", not "=", or \l {qmake}{ \c qmake} will not be able to
- use Qt's configuration to determine the settings needed for your project.
+ Note, that you must use "+=", not "=", or \l{qmake Manual#qmake}{\c qmake}
+ will not be able to use Qt's configuration to determine the settings
+ needed for your project.
\section1 Declaring Qt Libraries
@@ -439,21 +451,21 @@
variable which can be used to declare the required extension modules.
For example, we can enable the XML and network modules in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 2
Note that \c QT includes the \c core and \c gui modules by default, so the
above declaration \e adds the network and XML modules to this default list.
The following assignment \e omits the default modules, and will lead to
errors when the application's source code is being compiled:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 3
If you want to build a project \e without the \c gui module, you need to
exclude it with the "-=" operator. By default, \c QT contains both
\c core and \c gui, so the following line will result in a minimal
Qt project being built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 4
The table below shows the options that can be used with the \c QT variable
and the features that are associated with each of them:
@@ -478,18 +490,18 @@
\section1 Configuration Features
- \l {qmake}{ \c qmake} can be set up with extra configuration features that are specified
- in feature (.prf) files. These extra features often provide support for
- custom tools that are used during the build process. To add a feature to
- the build process, append the feature name (the stem of the feature filename)
- to the \c CONFIG variable.
+ \l{qmake Manual#qmake}{\c qmake} can be set up with extra configuration
+ features that are specified in feature (.prf) files. These extra features
+ often provide support for custom tools that are used during the build
+ process. To add a feature to the build process, append the feature name
+ (the stem of the feature filename) to the \c CONFIG variable.
- For example, \l {qmake}{ \c qmake} can configure the build process to take advantage
- of external libraries that are supported by
+ For example, \l{qmake Manual#qmake}{\c qmake} can configure the build
+ process to take advantage of external libraries that are supported by
\l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config},
such as the D-Bus and ogg libraries, with the following lines:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 5
More information about features can be found in the
\l{qmake Advanced Usage#Adding New Configuration Features}
@@ -501,15 +513,15 @@
If you are using other libraries in your project in addition to those
supplied with Qt, you need to specify them in your project file.
- The paths that \l {qmake}{ \c qmake} searches for libraries and the specific libraries
- to link against can be added to the list of values in the
+ The paths that \l{qmake Manual#qmake}{\c qmake} searches for libraries
+ and the specific libraries to link against can be added to the list of values in the
\l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries
themselves can be given, or the familiar Unix-style notation for specifying
libraries and paths can be used if preferred.
For example, the following lines show how a library can be specified:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 6
The paths containing header files can also be specified in a similar way
using the \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} variable.
@@ -517,7 +529,7 @@
For example, it is possible to add several paths to be searched for header
files:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 7
*/
/*!
@@ -527,8 +539,8 @@
\previouspage qmake Project Files
\nextpage qmake Platform Notes
- The behavior of \l {qmake}{ \c qmake} can be customized when it is run by
- specifying various options on the command line. These allow the
+ The behavior of \l{qmake Manual#qmake}{\c qmake} can be customized when it
+ is run by specifying various options on the command line. These allow the
build process to be fine-tuned, provide useful diagnostic
information, and can be used to specify the target platform for
your project.
@@ -540,21 +552,23 @@
\section2 Syntax
- The syntax used to run \l {qmake}{ \c qmake} takes the following simple form:
+ The syntax used to run \l{qmake Manual#qmake}{\c qmake} takes the
+ following simple form:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 8
- \l {qmake}{ \c qmake} supports two different modes of operation: In the default mode,
- \l {qmake}{ \c qmake} will use the description in a project file to generate a Makefile,
- but it is also possible to use \l {qmake}{ \c qmake} to generate project files.
+ \l{qmake Manual#qmake}{\c qmake} supports two different modes of operation:
+ In the default mode,\l{qmake Manual#qmake}{\c qmake} will use the
+ description in a project file to generate a Makefile, but it is also
+ possible to use \l{qmake Manual#qmake}{\c qmake} to generate project files.
If you want to explicitly set the mode, you must specify it before all
other options. The \c mode can be either of the following two values:
\list
\o \c -makefile \BR
- \c qmake output will be a Makefile.
+ \l{qmake Manual#qmake}{\c qmake} output will be a Makefile.
\o \c -project \BR
- \c qmake output will be a project file. \BR
+ \l{qmake Manual#qmake}{\c qmake} output will be a project file. \BR
\bold{Note:} It is likely that the created file will need to be edited; for example,
adding the \c QT variable to suit what modules are required for the project.
\endlist
@@ -570,42 +584,48 @@
\section2 Options
- A wide range of options can be specified on the command line to \l {qmake}{ \c qmake} in
- order to customize the build process, and to override default settings for
- your platform. The following basic options provide usage information, specify
- where \l {qmake}{ \c qmake} writes the output file, and control the level of debugging
- information that will be written to the console:
+ A wide range of options can be specified on the command line to
+ \l{qmake Manual#qmake}{\c qmake} in order to customize the build process,
+ and to override default settings for your platform. The following basic
+ options provide usage information, specify where
+ \l{qmake Manual#qmake}{\c qmake} writes the output file, and control the
+ level of debugging information that will be written to the console:
\list
\o \c -help \BR
- \c qmake will go over these features and give some useful help.
+ \l{qmake Manual#qmake}{\c qmake} will go over these features and give some
+ useful help.
\o \c -o file \BR
- \c qmake output will be directed to \e file. If this option
- is not specified, \c qmake will try to use a suitable file name for its
- output, depending on the mode it is running in.\BR
+ \l{qmake Manual#qmake}{\c qmake} output will be directed to \e file. If
+ this option is not specified, \l{qmake Manual#qmake}{\c qmake} will try
+ to use a suitable file name for its output, depending on the mode it is
+ running in.\BR
If '-' is specified, output is directed to stdout.
\o \c -d \BR
- \c qmake will output debugging information.
+ \l{qmake Manual#qmake}{\c qmake} will output debugging information.
\endlist
- For projects that need to be built differently on each target platform, with
- many subdirectories, you can run \l {qmake}{ \c qmake} with each of the following
- options to set the corresponding platform-specific variable in each
- project file:
+ For projects that need to be built differently on each target platform,
+ with many subdirectories, you can run \l{qmake Manual#qmake}{\c qmake} with
+ each of the following options to set the corresponding platform-specific
+ variable in each project file:
\list
\o \c -unix \BR
- \c qmake will run in unix mode. In this mode, Unix file
- naming and path conventions will be used, additionally testing for \c unix
- (as a scope) will succeed. This is the default mode on all Unices.
+ \l{qmake Manual#qmake}{\c qmake} will run in unix mode. In this mode,
+ Unix file naming and path conventions will be used, additionally
+ testing for \c unix (as a scope) will succeed. This is the default
+ mode on all Unices.
\o \c -macx \BR
- \c qmake will run in Mac OS X mode. In this mode, Unix file
- naming and path conventions will be used, additionally testing for \c macx
- (as a scope) will succeed. This is the default mode on Mac OS X.
+ \l{qmake Manual#qmake}{\c qmake} will run in Mac OS X mode. In this
+ mode, Unix file naming and path conventions will be used, additionally
+ testing for \c macx (as a scope) will succeed. This is the default mode
+ on Mac OS X.
\o \c -win32 \BR
- \c qmake will run in win32 mode. In this mode, Windows file naming and path
- conventions will be used, additionally testing for \c win32 (as a scope)
- will succeed. This is the default mode on Windows.
+ \l{qmake Manual#qmake}{\c qmake} will run in win32 mode. In this mode,
+ Windows file naming and path conventions will be used, additionally
+ testing for \c win32 (as a scope) will succeed. This is the default
+ mode on Windows.
\endlist
The template used for the project is usually specified by the \c TEMPLATE
@@ -614,10 +634,11 @@
\list
\o \c -t tmpl \BR
- \c qmake will override any set \c TEMPLATE variables with tmpl, but only
- \e after the .pro file has been processed.
+ \l{qmake Manual#qmake}{\c qmake} will override any set \c TEMPLATE
+ variables with tmpl, but only \e after the .pro file has been processed.
\o \c -tp prefix \BR
- \c qmake will add the prefix to the \c TEMPLATE variable.
+ \l{qmake Manual#qmake}{\c qmake} will add the prefix to the \c TEMPLATE
+ variable.
\endlist
The level of warning information can be fine-tuned to help you find problems in
@@ -625,54 +646,59 @@
\list
\o \c -Wall \BR
- \c qmake will report all known warnings.
+ \l{qmake Manual#qmake}{\c qmake} will report all known warnings.
\o \c -Wnone \BR
- No warning information will be generated by \c qmake.
+ No warning information will be generated by \
+ l{qmake Manual#qmake}{\c qmake}.
\o \c -Wparser \BR
- \c qmake will only generate parser warnings. This will alert
- you to common pitfalls and potential problems in the parsing of your
- project files.
+ \l{qmake Manual#qmake}{\c qmake} will only generate parser warnings.
+ This will alert you to common pitfalls and potential problems in the
+ parsing of your project files.
\o \c -Wlogic \BR
- \c qmake will warn of common pitfalls and potential problems in your
- project file. For example, \c qmake will report whether a file is placed
- into a list of files multiple times, or if a file cannot be found.
+ \l{qmake Manual#qmake}{\c qmake} will warn of common pitfalls and
+ potential problems in your project file. For example,
+ \l{qmake Manual#qmake}{\c qmake} will report whether a file is placed
+ into a list of files multiple times, or if a file cannot be found.
\endlist
\target MakefileMode
\section2 Makefile Mode Options
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 9
- In Makefile mode, \l {qmake}{ \c qmake} will generate a Makefile that is used to build the
- project. Additionally, the following options may be used in this mode to
- influence the way the project file is generated:
+ In Makefile mode, \l{qmake Manual#qmake}{\c qmake} will generate a Makefile
+ that is used to build the project. Additionally, the following options may
+ be used in this mode to influence the way the project file is generated:
\list
\o \c -after \BR
- \c qmake will process assignments given on the command line after
- the specified files.
+ \l{qmake Manual#qmake}{\c qmake} will process assignments given on the
+ command line after the specified files.
\o \c -nocache \BR
- \c qmake will ignore the .qmake.cache file.
+ \l{qmake Manual#qmake}{\c qmake} will ignore the .qmake.cache file.
\o \c -nodepend \BR
- \c qmake will not generate any dependency information.
+ \l{qmake Manual#qmake}{\c qmake} will not generate any dependency
+ information.
\o \c -cache file \BR
- \c qmake will use \e file as the cache file, ignoring any other
- .qmake.cache files found.
+ \l{qmake Manual#qmake}{\c qmake} will use \e file as the cache file,
+ ignoring any other .qmake.cache files found.
\o \c -spec spec \BR
- \c qmake will use \e spec as a path to platform and compiler information,
- and the value of \c QMAKESPEC will be ignored.
+ \l{qmake Manual#qmake}{\c qmake} will use \e spec as a path to
+ platform and compiler information, and the value of \c QMAKESPEC will
+ be ignored.
\endlist
- You may also pass \l {qmake}{ \c qmake} assignments on the command line;
- they will be processed before all of the files specified. For example:
+ You may also pass \l{qmake Manual#qmake}{\c qmake} assignments on the
+ command line; they will be processed before all of the files specified.
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 10
This will generate a Makefile, from test.pro with Unix pathnames. However
many of the specified options aren't necessary as they are the default.
Therefore, the line can be simplified on Unix to:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 11
If you are certain you want your variables processed after the
files specified, then you may pass the \c -after option. When this
@@ -682,17 +708,18 @@
\target ProjectMode
\section2 Project Mode Options
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 12
- In project mode, \l {qmake}{ \c qmake} will generate a project file. Additionally, you
- may supply the following options in this mode:
+ In project mode, \l{qmake Manual#qmake}{\c qmake} will generate a project
+ file. Additionally, you may supply the following options in this mode:
\list
\o \c -r \BR
- \c qmake will look through supplied directories recursively
+ \l{qmake Manual#qmake}{\c qmake} will look through supplied directories
+ recursively
\o \c -nopwd \BR
- \c qmake will not look in your current working directory for
- source code and only use the specified \c files
+ \l{qmake Manual#qmake}{\c qmake} will not look in your current working
+ directory for source code and only use the specified \c files
\endlist
In this mode, the \c files argument can be a list of files or directories.
@@ -715,9 +742,10 @@
Many cross-platform projects can be handled by the \c{qmake}'s basic
configuration features. On some platforms, it is sometimes useful, or even
- necessary, to take advantage of platform-specific features. \l {qmake}{ \c qmake} knows
- about many of these features, and these can be accessed via specific
- variables that only have an effect on the platforms where they are relevant.
+ necessary, to take advantage of platform-specific features.
+ \l{qmake Manual#qmake}{\c qmake} knows about many of these features, and
+ these can be accessed via specific variables that only have an effect on
+ the platforms where they are relevant.
\tableofcontents
@@ -728,38 +756,39 @@
\section2 Source and Binary Packages
- The version of \l {qmake}{ \c qmake} supplied in source packages is configured slightly
- differently to that supplied in binary packages in that it uses a different
- feature specification. Where the source package typically uses the
- \c macx-g++ specification, the binary package is typically configured to
- use the \c macx-xcode specification.
+ The version of \l{qmake Manual#qmake}{\c qmake} supplied in source packages
+ is configured slightly differently to that supplied in binary packages in
+ that it uses a different feature specification. Where the source package
+ typically uses the \c macx-g++ specification, the binary package is
+ typically configured to use the \c macx-xcode specification.
- Users of each package can override this configuration by invoking \l {qmake}{ \c qmake}
- with the \c -spec option (see \l{Running qmake} for more information). This
- makes it possible, for example, to use \l {qmake}{ \c qmake} from a binary package to
+ Users of each package can override this configuration by invoking
+ \l{qmake Manual#qmake}{\c qmake} with the \c -spec option (see
+ \l{Running qmake} for more information). This makes it possible, for
+ example, to use \l{qmake Manual#qmake}{\c qmake} from a binary package to
create a Makefile in a project directory with the following command line
invocation:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 13
\section2 Using Frameworks
- \l {qmake}{ \c qmake} is able to automatically generate build rules for linking against
- frameworks in the standard framework directory on Mac OS X, located at
- \c{/Library/Frameworks/}.
+ \l{qmake Manual#qmake}{\c qmake} is able to automatically generate build
+ rules for linking against frameworks in the standard framework directory on
+ Mac OS X, located at \c{/Library/Frameworks/}.
Directories other than the standard framework directory need to be specified
to the build system, and this is achieved by appending linker options to the
\l{qmake Variable Reference#QMAKE_LFLAGS}{QMAKE_LFLAGS} variable, as shown
in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 14
The framework itself is linked in by appending the \c{-framework} options and
the name of the framework to the \l{qmake Variable Reference#LIBS}{LIBS}
variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 15
\section2 Creating Frameworks
@@ -771,7 +800,7 @@
\c lib_bundle option to the
\l{qmake Variable Reference#CONFIG}{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 16
The data associated with the library is specified using the
\l{qmake Variable Reference#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA}
@@ -779,7 +808,7 @@
bundle, and is often used to specify a collection of header files,
as in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 17
Here, the \c FRAMEWORK_HEADERS variable is a user-defined variable that
is used to define the headers required to use a particular framework.
@@ -804,10 +833,11 @@
The architectures to be supported in the binary are specified with the
\l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the
- following assignment causes \l {qmake}{ \c qmake} to generate build rules to create
- a universal binary for both PowerPC and x86 architectures:
+ following assignment causes \l{qmake Manual#qmake}{\c qmake} to generate
+ build rules to create a universal binary for both PowerPC and x86
+ architectures:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 18
Additionally, developers using a PowerPC-based platform need to set the
\l{qmake Variable Reference#QMAKE_MAC_SDK}{QMAKE_MAC_SDK} variable.
@@ -819,13 +849,15 @@
Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode
project files, as described in
\l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native},
- by running \l {qmake}{ \c qmake} to generate an Xcode project from an existing \l {qmake}{ \c qmake}
- project files. For example:
+ by running \l{qmake Manual#qmake}{\c qmake} to generate an Xcode project
+ from an existing \l{qmake Manual#qmake}{\c qmake} project files. For
+ example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 19
- Note that, if a project is later moved on the disk, \l {qmake}{ \c qmake} must be run
- again to process the project file and create a new Xcode project file.
+ Note that, if a project is later moved on the disk,
+ \l{qmake Manual#qmake}{\c qmake} must be run again to process the project
+ file and create a new Xcode project file.
\section2 On supporting two build targets simultaneously
@@ -863,24 +895,27 @@
\l{Qt Commercial Edition} and do not need to worry about how
project dependencies are managed.
- However, some developers may need to import an existing \l {qmake}{ \c qmake} project
- into Visual Studio. \l {qmake}{ \c qmake} is able to take a project file and create a
- Visual Studio project that contains all the necessary information required
- by the development environment. This is achieved by setting the \c qmake
+ However, some developers may need to import an existing
+ \l{qmake Manual#qmake}{\c qmake} project into Visual Studio.
+ \l{qmake Manual#qmake}{\c qmake} is able to take a project file and create
+ a Visual Studio project that contains all the necessary information
+ required by the development environment. This is achieved by setting the
+ \l{qmake Manual#qmake}{\c qmake}
\l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp
(for application projects) or \c vclib (for library projects).
This can also be set using a command line option, for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 20
It is possible to recursively generate \c{.vcproj} files in subdirectories
and a \c{.sln} file in the main directory, by typing:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 21
- Each time you update the project file, you need to run \l {qmake}{ \c qmake} to generate
- an updated Visual Studio project.
+ Each time you update the project file, you need to run
+ \l{qmake Manual#qmake}{\c qmake} to generate an updated Visual Studio
+ project.
\note If you are using the Visual Studio Add-in, you can import \c .pro
files via the \gui{Qt->Import from .pro file} menu item.
@@ -896,25 +931,25 @@
the following assignment to the \l{qmake Variable Reference#CONFIG}
{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 22
Also, the manifest embedding for DLLs can be removed with the following
assignment to the \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 23
This is discussed in more detail in the
\l{Deploying an Application on Windows#Visual Studio 2005 Onwards}
{deployment guide for Windows}.
- \section1 Symbian platform
+ \section1 Symbian Platform
Features specific to this platform include handling of static data,
capabilities, stack and heap size, compiler specific options, and unique
identifiers for the application or library.
- \section2 Handling of static data
+ \section2 Handling of Static Data
If the application uses any static data, the build system needs to be
informed about it. This is because Symbian tries to save memory if no
@@ -922,11 +957,11 @@
To specify that static data support is desired, add this to the project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 129
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 129
The default value is zero.
- \section2 Stack and heap size
+ \section2 Stack and Heap Size
The Symbian platform uses predefined sizes for stacks and heaps. If an
application exceeds either limit, it may crash or fail to complete its
@@ -938,13 +973,13 @@
prevents the application from starting if that amount of memory is not available. The
minimum and maximum values are separated by a space. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 130
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 130
The default values depend on the version of the Symbian SDK you're using,
- however, the Qt toolchain sets this to the maximum possible value and this
- should not be changed.
+ however, the Qt toolchain sets this to the maximum possible value and this
+ should not be changed.
- \section2 Compiler specific options
+ \section2 Compiler-Specific Options
General compiler options can as usual be set using \c QMAKE_CFLAGS and \c QMAKE_CXXFLAGS.
In order to set specific compiler options, \c QMAKE_CFLAGS.<compiler> and
@@ -954,9 +989,9 @@
Here is an example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
- \section2 Unique identifiers
+ \section2 Unique Identifiers
Symbian applications may have unique identifiers attached to them.
Here is how to define them in a project file:
@@ -964,37 +999,38 @@
There are four available types of IDs supported: \c UID2, \c UID3, \c SID, and \c VID. They
are specified like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 132
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 132
If \c SID is not specified, it defaults to the same value as \c UID3.
If \c UID3 is not specified, qmake will automatically generate a \c UID3
suitable for development and debugging. This value should be manually
- specified for applications that are to be released. In order to obtain
- an official UID, please contact \l{Symbian}{http:\\www.symbiansigned.com}.
- Both \c SID and \c VID default to empty values.
+ specified for applications that are to be released. See the
+ \l{Symbian Signed} Web site for information about obtaining an official
+ UID. Both \c SID and \c VID default to empty values.
There exists one UID1 too, but this should not be touched by any application.
-
- The UID2 has a specific value for different types of files - e.g. apps/exes
- are always 0x100039CE. The toolchain will set this for value for the most common file types like,
- EXE/APP and shared library DLL.
-
- For more information about unique identifiers and their meaning for Symbian applications,
- please refer to the \l{Symbian SDK documentation}{http://developer.symbian.org/main/documentation/reference/s3/pdk/GUID-380A8C4F-3EB6-5E1C-BCFB-ED5B866136D9.html}
-
+
+ The UID2 has a specific value for different types of files; e.g. apps/exes
+ are always 0x100039CE. The toolchain will set this for value for the most common file types like,
+ EXE/APP and shared library DLL.
+
+ For more information about unique identifiers and their meaning for
+ Symbian applications, please refer to the \l{UID Q&As (Symbian Signed)}
+ page in the \l{Forum Nokia Wiki} for more information.
+
\section2 Capabilities
Capabilities define extra privileges for the application, such as the
ability to list all files on the file system. Capabilities are defined
in the project file like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 133
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 133
It is also possible to specify which capabilities \e not to have,
by first specifying \c ALL and then list the unwanted capabilities
with a minus in front of them, like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 134
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 134
For more information about capabilities, please refer to the Symbian SDK documentation.
*/
@@ -1006,14 +1042,14 @@
\previouspage Using Precompiled Headers
\nextpage qmake Variable Reference
- This reference is a detailed index of all the variables and function
- that are available for use in \c qmake project files.
+ This reference is a detailed index of all the variables and function that
+ are available for use in \l{qmake Manual#qmake}{\c qmake} project files.
\section1 Variable Reference
The \l{qmake Variable Reference} describes the variables that are
- recognized by \l {qmake}{ \c qmake}when configuring the build process for
- projects.
+ recognized by \l{qmake Manual#qmake}{\c qmake}when configuring the build
+ process for projects.
\section1 Function Reference
@@ -1062,8 +1098,8 @@
\section1 Environment Variables and Configuration
The \l{Configuring qmake's Environment} chapter of this manual
- describes the environment variables that \l {qmake}{ \c qmake} uses when
- configuring the build process.
+ describes the environment variables that \l{qmake Manual#qmake}{\c qmake}
+ uses when configuring the build process.
*/
/*!
@@ -1092,23 +1128,23 @@
\e {This is only used on the Symbian platform.}
- Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables.
- The section of \c bld.inf file where each rule goes is appended to
+ Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables.
+ The section of \c bld.inf file where each rule goes is appended to
\c BLD_INF_RULES with a dot.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 152
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 152
- This will add the specified statements to the \c prj_exports section of the
+ This will add the specified statements to the \c prj_exports section of the
generated \c bld.inf file.
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the generated \c bld.inf file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 143
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 143
Any rules you define will be added after automatically generated
rules in each section.
@@ -1118,7 +1154,7 @@
The \c CONFIG variable specifies project configuration and
compiler options. The values will be recognized internally by
- \l {qmake}{ \c qmake} and have special meaning. They are as follows.
+ \l{qmake Manual#qmake}{\c qmake} and have special meaning. They are as follows.
These \c CONFIG values control compilation flags:
@@ -1154,25 +1190,28 @@
defined in the \c CONFIG variable, it is necessary to use the
\c debug_and_release option if you want to allow both debug and release
versions of a project to be built. In such a case, the Makefile that
- \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can
- be invoked in the following way:
+ \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both
+ versions, and this can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 24
- When linking a library, \l {qmake}{ \c qmake} relies on the underlying platform to know
- what other libraries this library links against. However, if linking
- statically, \l {qmake}{ \c qmake} will not get this information unless we use the following
- \c CONFIG options:
+ When linking a library, \l{qmake Manual#qmake}{\c qmake} relies on the
+ underlying platform to know what other libraries this library links
+ against. However, if linking statically, \l{qmake Manual#qmake}{\c qmake}
+ will not get this information unless we use the following \c CONFIG
+ options:
\table 95%
\header \o Option \o Description
- \row \o create_prl \o This option enables \l {qmake}{ \c qmake} to track these
- dependencies. When this option is enabled, \l {qmake}{ \c qmake} will create a file
+ \row \o create_prl \o This option enables
+ \l{qmake Manual#qmake}{\c qmake} to track these dependencies. When this
+ option is enabled, \l{qmake Manual#qmake}{\c qmake} will create a file
ending in \c .prl which will save meta-information about the library
(see \l{LibDepend}{Library Dependencies} for more info).
- \row \o link_prl \o When this is enabled, \l {qmake}{ \c qmake} will process all
- libraries linked to by the application and find their meta-information
- (see \l{LibDepend}{Library Dependencies} for more info).
+ \row \o link_prl \o When this is enabled,
+ \l{qmake Manual#qmake}{\c qmake} will process all libraries linked to
+ by the application and find their meta-information(see
+ \l{LibDepend}{Library Dependencies} for more info).
\endtable
Please note that \c create_prl is required when \e {building} a
@@ -1192,7 +1231,7 @@
will be set for each of these mode, and you can test for this to perform
build-specific tasks. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 25
As a result, it may be useful to define mode-specific variables, such as
\l{#QMAKE_LFLAGS_RELEASE}{QMAKE_LFLAGS_RELEASE}, instead of general
@@ -1290,7 +1329,7 @@
\row \o stdbinary \o Builds an Open C binary (i.e. STDDLL, STDEXE, or STDLIB,
depending on the target binary type.)
\row \o no_icon \o Doesn't generate resources needed for displaying an icon
- for executable in application menu (app only).
+ for executable in application menu (app only).
\row \o symbian_test \o Places mmp files and extension makefiles under
test sections in generated bld.inf instead of their regular sections.
Note that this only affects automatically generated bld.inf content;
@@ -1319,17 +1358,17 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 26
\target DEFINES
\section1 DEFINES
- \l {qmake}{ \c qmake} adds the values of this variable as compiler C
- preprocessor macros (-D option).
+ \l{qmake Manual#qmake}{\c qmake} adds the values of this variable as
+ compiler C preprocessor macros (-D option).
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 27
\target DEF_FILE
\section1 DEF_FILE
@@ -1363,7 +1402,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 28
This will upload all PNG images in \c path to the same directory your
build target will be deployed to.
@@ -1379,7 +1418,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 29
\note In Windows CE all linked Qt libraries will be deployed to the path
specified by \c{myFiles.path}. On Symbian platform all libraries and executables
@@ -1390,7 +1429,7 @@
dynamically loadable libraries need special handling. When deploying
extra executables or dynamically loadable libraries, the target path
must specify \\sys\\bin. For plugins, the target path must specify the
- location where the plugin stub will be deployed to (see the
+ location where the plugin stub will be deployed to (see the
\l{How to Create Qt Plugins} document for more information about plugins).
If the binary cannot be found from the indicated source path,
the directory Symbian build process moves the executables to is
@@ -1398,10 +1437,10 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 128
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 128
On the Symbian platform, generic PKG file content can also be specified with this
- variable. You can use either \c pkg_prerules or \c pkg_postrules to
+ variable. You can use either \c pkg_prerules or \c pkg_postrules to
pass raw data to PKG file. The strings in \c pkg_prerules are added before
package-body and \c pkg_postrules after. \c pkg_prerules is used for
defining vendor information, dependencies, custom package headers, and the
@@ -1414,7 +1453,7 @@
For example, to deploy DLL and add a new dependency:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 140
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 140
Please note that \c pkg_prerules can also replace default statements in
pkg file. If no pkg_prerules is defined, qmake makes sure that PKG file
@@ -1448,7 +1487,7 @@
targeted to only one of above files by appending listed rules suffix
to the variable name:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 153
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 153
On the Symbian platform, the \c default_deployment item specifies
default platform and package dependencies. Those dependencies can be
@@ -1465,7 +1504,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 141
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 141
On the Symbian platform, a default deployment is generated for all
application projects. You can modify the autogenerated default
@@ -1479,7 +1518,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 154
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 154
This will entirely remove the default application deployment.
@@ -1489,7 +1528,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 155
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 155
This will show a message box that gives user an option to cancel the
installation and then automatically runs the application after
@@ -1505,19 +1544,19 @@
Often the default is not optimal for displaying to end user. To set a better
display name for these purposes, use \c{DEPLOYMENT.display_name} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 156
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 156
On the Symbian platform, you can use \c{DEPLOYMENT.installer_header}
variable to generate smart installer wrapper for your application.
If you specify just UID of the installer package as the value, then
installer package name and version will be autogenerated:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 146
If autogenerated values are not suitable, you can also specify the sis
header yourself using this variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 147
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 147
\target DEPLOYMENT_PLUGIN
\section1 DEPLOYMENT_PLUGIN
@@ -1528,8 +1567,8 @@
available in Qt can be explicitly deployed to the device. See
\l{Static Plugins}{Static Plugins} for a complete list.
- \note In Windows CE, No plugins will be deployed automatically.
- If the application depends on plugins, these plugins have to be specified
+ \note In Windows CE, No plugins will be deployed automatically.
+ If the application depends on plugins, these plugins have to be specified
manually.
\note On the Symbian platform, all plugins supported by this variable
@@ -1538,7 +1577,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 142
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 142
This will upload the jpeg imageformat plugin to the plugins directory
on the Windows CE device.
@@ -1550,15 +1589,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 30
\target DESTDIR_TARGET
\section1 DESTDIR_TARGET
- This variable is set internally by \l {qmake}{ \c qmake}, which is basically the
- \c DESTDIR variable with the \c TARGET variable appened at the end.
- The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
+ is basically the \c DESTDIR variable with the \c TARGET variable appened at
+ the end. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target DLLDESTDIR
\section1 DLLDESTDIR
@@ -1573,15 +1613,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 31
\target DSP_TEMPLATE
\section1 DSP_TEMPLATE
- This variable is set internally by \l {qmake}{ \c qmake}, which specifies where the
- dsp template file for basing generated dsp files is stored. The value
- of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
+ specifies where the dsp template file for basing generated dsp files is
+ stored. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target FORMS
\section1 FORMS
@@ -1593,7 +1634,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 32
If FORMS3 is defined in your project, then this variable must contain
forms for uic, and not uic3. If CONFIG contains uic3, and FORMS3 is not
@@ -1609,7 +1650,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 33
\target GUID
\section1 GUID
@@ -1626,16 +1667,16 @@
Defines the header files for the project.
- \l {qmake}{ \c qmake} will generate dependency information (unless \c -nodepend
- is specified on the \l{Running qmake#Commands}{command line})
- for the specified headers. \l {qmake}{ \c qmake} will also automatically detect if
- \c moc is required by the classes in these headers, and add the
- appropriate dependencies and files to the project for generating and
- linking the moc files.
+ \l{qmake Manual#qmake}{\c qmake} will generate dependency information (unless
+ \c -nodepend is specified on the \l{Running qmake#Commands}{command line})
+ for the specified headers. \l{qmake Manual#qmake}{\c qmake} will also
+ automatically detect if \c moc is required by the classes in these headers,
+ and add the appropriate dependencies and files to the project for generating
+ and linking the moc files.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 34
See also \l{#SOURCES}{SOURCES}.
@@ -1650,12 +1691,11 @@
\section1 INCLUDEPATH
This variable specifies the #include directories which should be
- searched when compiling the project. Use ';' or a space as the
- directory separator.
+ searched when compiling the project.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 35
To specify a path containing spaces, quote the path using the technique
mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
@@ -1677,24 +1717,25 @@
build target will be installed, and the \c INSTALLS assignment adds the
build target to the list of existing resources to be installed:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 36
- Note that \l {qmake}{ \c qmake} will skip files that are executable. If you need to install
- executable files, you can unset the files' executable flags.
+ Note that \l{qmake Manual#qmake}{\c qmake} will skip files that are
+ executable. If you need to install executable files, you can unset the
+ files' executable flags.
\target LEXIMPLS
\section1 LEXIMPLS
This variable contains a list of lex implementation files. The value
- of this variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
- needs to be modified.
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target LEXOBJECTS
\section1 LEXOBJECTS
This variable contains the names of intermediate lex object
files.The value of this variable is typically handled by
- \l {qmake}{ \c qmake} and rarely needs to be modified.
+ \l{qmake Manual#qmake}{\c qmake} and rarely needs to be modified.
\target LEXSOURCES
\section1 LEXSOURCES
@@ -1705,7 +1746,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 37
\target LIBS
\section1 LIBS
@@ -1719,7 +1760,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 38
To specify a path containing spaces, quote the path using the technique
mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
@@ -1749,7 +1790,7 @@
unique names before it is used. To change this behavior, add the
\c no_lflags_merge option to the \c CONFIG variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 39
\target LITERAL_HASH
\section1 LITERAL_HASH
@@ -1769,9 +1810,10 @@
\section1 MAKEFILE
This variable specifies the name of the Makefile which
- \l {qmake}{ \c qmake} should use when outputting the dependency information
- for building a project. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \l{qmake Manual#qmake}{\c qmake} should use when outputting the dependency
+ information for building a project. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\bold{Note:} On the Symbian platform, this variable is ignored.
@@ -1780,44 +1822,45 @@
This variable contains the name of the Makefile generator to use
when generating a Makefile. The value of this variable is typically
- handled internally by \l {qmake}{ \c qmake} and rarely needs to be modified.
+ handled internally by \l{qmake Manual#qmake}{\c qmake} and rarely needs to
+ be modified.
\target MMP_RULES
\section1 MMP_RULES
\e {This is only used on the Symbian platform.}
- Generic MMP file content can be specified with this variable.
+ Generic MMP file content can be specified with this variable.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 137
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 137
This will add the specified statement to the end of the generated MMP file.
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the generated MMP file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 138
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 138
If you need to include a hash (\c{#}) character inside the
- \c MMP_RULES statement, it can be done with the variable
+ \c MMP_RULES statement, it can be done with the variable
\c LITERAL_HASH as follows:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 139
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 139
There is also a convenience function for adding conditional rules
called \c{addMMPRules}. Suppose you need certain functionality
to require different library depending on architecture. This
can be specified with \c{addMMPRules} as follows:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 148
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 148
\note You should not use this variable to add MMP statements that are
explicitly supported by their own variables, such as
- \c TARGET.EPOCSTACKSIZE.
+ \c TARGET.EPOCSTACKSIZE.
Doing so could result in duplicate statements in the MMP file.
\target MOC_DIR
@@ -1828,7 +1871,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 40
\target OBJECTS
\section1 OBJECTS
@@ -1836,8 +1879,8 @@
This variable is generated from the \link #SOURCES SOURCES
\endlink variable. The extension of each source file will have been
replaced by .o (Unix) or .obj (Win32). The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ typically handled by \l {qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target OBJECTS_DIR
\section1 OBJECTS_DIR
@@ -1847,16 +1890,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 41
\target OBJMOC
\section1 OBJMOC
- This variable is set by \l {qmake}{ \c qmake} if files can be found that
- contain the Q_OBJECT macro. \c OBJMOC contains the
- name of all intermediate moc object files. The value of this variable
- is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
+ found that contain the Q_OBJECT macro. \c OBJMOC contains the name of all
+ intermediate moc object files. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target POST_TARGETDEPS
\section1 POST_TARGETDEPS
@@ -1895,67 +1938,71 @@
This variable contains a list of header files that require some
sort of pre-compilation step (such as with moc). The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target PWD
\section1 PWD
This variable contains the full path leading to the directory where
- the \l {qmake}{ \c qmake} project file (project.pro) is located.
+ the \l{qmake Manual#qmake}{\c qmake} project file (project.pro) is located.
\target OUT_PWD
\section1 OUT_PWD
This variable contains the full path leading to the directory where
- \l {qmake}{ \c qmake} places the generated Makefile.
+ \l{qmake Manual#qmake}{\c qmake} places the generated Makefile.
\target QMAKE_systemvariable
\section1 QMAKE
- This variable contains the name of the \l {qmake}{ \c qmake} program
- itself and is placed in generated Makefiles. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
+ program itself and is placed in generated Makefiles. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKESPEC_systemvariable
\section1 QMAKESPEC
- This variable contains the name of the \l {qmake}{ \c qmake}
- configuration to use when generating Makefiles. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} and rarely needs to be modified.
+ This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
+ configuration to use when generating Makefiles. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} and rarely needs
+ to be modified.
- Use the \c{QMAKESPEC} environment variable to override the \l {qmake}{ \c qmake} configuration.
- Note that, due to the way \l {qmake}{ \c qmake} reads project files, setting the \c{QMAKESPEC}
- environment variable from within a project file will have no effect.
+ Use the \c{QMAKESPEC} environment variable to override the
+ \l{qmake Manual#qmake}{\c qmake} configuration. Note that, due to the way
+ \l{qmake Manual#qmake}{\c qmake} reads project files, setting the
+ \c{QMAKESPEC} environment variable from within a project file will have no
+ effect.
\target QMAKE_APP_FLAG
\section1 QMAKE_APP_FLAG
This variable is empty unless the \c app
\l{#TEMPLATE}{TEMPLATE} is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified. Use the following instead:
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. Use the
+ following instead:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 42
\target QMAKE_APP_OR_DLL
\section1 QMAKE_APP_OR_DLL
- This variable is empty unless the \c app or \c dll
- \l{#TEMPLATE}{TEMPLATE} is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is empty unless the \c app or \c dll \l{#TEMPLATE}{TEMPLATE}
+ is specified. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_AR_CMD
\section1 QMAKE_AR_CMD
\e {This is used on Unix platforms only.}
- This variable contains the command for invoking the program which
- creates, modifies and extracts archives. The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the command for invoking the program which creates,
+ modifies and extracts archives. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_BUNDLE_DATA
\section1 QMAKE_BUNDLE_DATA
@@ -1967,7 +2014,7 @@
and \c path/to/header_two.h to a group containing information about the
headers supplied with the framework:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 43
The last line adds the information about the headers to the collection of
resources that will be installed with the library bundle.
@@ -1989,7 +2036,7 @@
For example, the following definition will result in a framework with the
\c{.myframework} extension:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 44
\e{This is used on Mac OS X only.}
@@ -2003,9 +2050,10 @@
\target QMAKE_CFLAGS_DEBUG
\section1 QMAKE_CFLAGS_DEBUG
- This variable contains the flags for the C compiler in debug mode.The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the flags for the C compiler in debug mode. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_MT
\section1 QMAKE_CFLAGS_MT
@@ -2013,7 +2061,7 @@
This variable contains the compiler flags for creating a
multi-threaded application or when the version of Qt that you link
against is a multi-threaded statically linked library. The value of
- this variable is typically handled by \l {qmake}{ \c qmake} or
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_CFLAGS_MT_DBG
@@ -2022,8 +2070,9 @@
This variable contains the compiler flags for creating a debuggable
multi-threaded application or when the version of Qt that you link
against is a debuggable multi-threaded statically linked library. The
- value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_MT_DLL
\section1 QMAKE_CFLAGS_MT_DLL
@@ -2033,8 +2082,8 @@
This variable contains the compiler flags for creating a
multi-threaded dll or when the version of Qt that you link
against is a multi-threaded dll. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target QMAKE_CFLAGS_MT_DLLDBG
\section1 QMAKE_CFLAGS_MT_DLLDBG
@@ -2044,16 +2093,17 @@
This variable contains the compiler flags for creating a debuggable
multi-threaded dll or when the version of Qt that you link
against is a debuggable multi-threaded statically linked library.
- The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_RELEASE
\section1 QMAKE_CFLAGS_RELEASE
This variable contains the compiler flags for creating a non-debuggable
application. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target QMAKE_CFLAGS_SHLIB
\section1 QMAKE_CFLAGS_SHLIB
@@ -2062,33 +2112,32 @@
This variable contains the compiler flags for creating a shared
library. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_THREAD
\section1 QMAKE_CFLAGS_THREAD
This variable contains the compiler flags for creating a multi-threaded
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_WARN_OFF
\section1 QMAKE_CFLAGS_WARN_OFF
This variable is not empty if the warn_off
\l{#CONFIG}{CONFIG} option is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_CFLAGS_WARN_ON
\section1 QMAKE_CFLAGS_WARN_ON
- This variable is not empty if the warn_on
- \l{#CONFIG}{CONFIG} option is specified.
- The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable is not empty if the warn_on \l{#CONFIG}{CONFIG} option is
+ specified. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CLEAN
\section1 QMAKE_CLEAN
@@ -2106,17 +2155,17 @@
\section1 QMAKE_CXXFLAGS
This variable contains the C++ compiler flags that are used when building
- a project. The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The flags
- specific to debug and release modes can be adjusted by modifying
- the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables,
- respectively.
+ a project. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified. The flags specific to debug and release modes can be
+ adjusted by modifying the \c QMAKE_CXXFLAGS_DEBUG and
+ \c QMAKE_CXXFLAGS_RELEASE variables, respectively.
\bold{Note:} On the Symbian platform, this variable can be used to pass
architecture specific options to each compiler in the Symbian build system.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
For more information, see
\l{qmake Platform Notes#Compiler specific options}{qmake Platform Notes}.
@@ -2126,24 +2175,24 @@
This variable contains the C++ compiler flags for creating a debuggable
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT
\section1 QMAKE_CXXFLAGS_MT
This variable contains the C++ compiler flags for creating a multi-threaded
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DBG
\section1 QMAKE_CXXFLAGS_MT_DBG
- This variable contains the C++ compiler flags for creating a debuggable multi-threaded
- application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a debuggable
+ multi-threaded application. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DLL
\section1 QMAKE_CXXFLAGS_MT_DLL
@@ -2152,56 +2201,58 @@
This variable contains the C++ compiler flags for creating a multi-threaded
dll. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DLLDBG
\section1 QMAKE_CXXFLAGS_MT_DLLDBG
\c {This is used on Windows only.}
- This variable contains the C++ compiler flags for creating a multi-threaded debuggable
- dll. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ debuggable dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_RELEASE
\section1 QMAKE_CXXFLAGS_RELEASE
- This variable contains the C++ compiler flags for creating an
- application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating an application.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_SHLIB
\section1 QMAKE_CXXFLAGS_SHLIB
- This variable contains the C++ compiler flags for creating a
- shared library. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a shared library.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_THREAD
\section1 QMAKE_CXXFLAGS_THREAD
- This variable contains the C++ compiler flags for creating a
- multi-threaded application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ application. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_WARN_OFF
\section1 QMAKE_CXXFLAGS_WARN_OFF
- This variable contains the C++ compiler flags for suppressing compiler warnings.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the C++ compiler flags for suppressing compiler
+ warnings. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_WARN_ON
\section1 QMAKE_CXXFLAGS_WARN_ON
This variable contains C++ compiler flags for generating compiler warnings.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_DISTCLEAN
\section1 QMAKE_DISTCLEAN
@@ -2211,9 +2262,9 @@
\target QMAKE_EXTENSION_SHLIB
\section1 QMAKE_EXTENSION_SHLIB
- This variable contains the extention for shared libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the extention for shared libraries. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
Note that platform-specific variables that change the extension will override
the contents of this variable.
@@ -2285,16 +2336,18 @@
\target QMAKE_FAILED_REQUIREMENTS
\section1 QMAKE_FAILED_REQUIREMENTS
- This variable contains the list of requirements that were failed to be met when
- \l {qmake}{ \c qmake}was used. For example, the sql module is needed and wasn't compiled into Qt. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the list of requirements that were failed to be met
+ when \l{qmake Manual#qmake}{\c qmake} was used. For example, the sql module
+ is needed and wasn't compiled into Qt. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_FILETAGS
\section1 QMAKE_FILETAGS
- This variable contains the file tags needed to be entered into the Makefile, such as SOURCES
- and HEADERS. The value of this variable is typically handled by \l {qmake}{ \c qmake}or
+ This variable contains the file tags needed to be entered into the
+ Makefile, such as SOURCES and HEADERS. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_FRAMEWORK_BUNDLE_NAME
@@ -2328,26 +2381,28 @@
\target QMAKE_INCDIR
\section1 QMAKE_INCDIR
- This variable contains the location of all known header files to be added to
- INCLUDEPATH when building an application. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
- needs to be modified.
+ This variable contains the location of all known header files to be added
+ to INCLUDEPATH when building an application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_EGL
\section1 QMAKE_INCDIR_EGL
- This variable contains the location of EGL header files to be added
- to INCLUDEPATH when building an application with OpenGL/ES or
- OpenVG support. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of EGL header files to be added to
+ INCLUDEPATH when building an application with OpenGL/ES or OpenVG support.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_INCDIR_OPENGL
\section1 QMAKE_INCDIR_OPENGL
This variable contains the location of OpenGL header files to be added
to INCLUDEPATH when building an application with OpenGL support. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
@@ -2358,8 +2413,9 @@
to INCLUDEPATH when building an application with OpenGL ES 1
or OpenGL ES 2 support respectively.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by \
+ l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
@@ -2369,8 +2425,9 @@
This variable contains the location of OpenVG header files to be added
to INCLUDEPATH when building an application with OpenVG support. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also
need to be set.
@@ -2378,28 +2435,28 @@
\target QMAKE_INCDIR_QT
\section1 QMAKE_INCDIR_QT
- This variable contains the location of all known header file
- paths to be added to INCLUDEPATH when building a Qt application. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known header file paths to be
+ added to INCLUDEPATH when building a Qt application. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_THREAD
\section1 QMAKE_INCDIR_THREAD
- This variable contains the location of all known header file
- paths to be added to INCLUDEPATH when building a multi-threaded application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known header file paths to be
+ added to INCLUDEPATH when building a multi-threaded application. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_X11
\section1 QMAKE_INCDIR_X11
\e {This is used on Unix platforms only.}
- This variable contains the location of X11 header file paths to be
- added to INCLUDEPATH when building a X11 application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of X11 header file paths to be added
+ to INCLUDEPATH when building a X11 application. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INFO_PLIST
\section1 QMAKE_INFO_PLIST
@@ -2427,31 +2484,30 @@
\e {This is used on Windows only.}
- This variable contains link flags when building console
- programs. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building console programs. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_CONSOLE_DLL
\e {This is used on Windows only.}
- This variable contains link flags when building console
- dlls. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building console dlls. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_DEBUG
- This variable contains link flags when building debuggable applications. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building debuggable applications.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_PLUGIN
- This variable contains link flags when building plugins. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building plugins. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_RPATH
@@ -2462,122 +2518,125 @@
\section1 QMAKE_LFLAGS_QT_DLL
- This variable contains link flags when building programs that
- use the Qt library built as a dll. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building programs that use the Qt
+ library built as a dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_RELEASE
- This variable contains link flags when building applications for
- release. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building applications for release.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_SHAPP
- This variable contains link flags when building applications which are using
- the \c app template. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building applications which are
+ using the \c app template. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_SHLIB
This variable contains link flags when building shared libraries
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_SONAME
This variable specifies the link flags to set the name of shared objects,
- such as .so or .dll. The value of this variable is typically handled by \c
- qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ such as .so or .dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_THREAD
This variable contains link flags when building multi-threaded projects.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_WINDOWS
\e {This is used on Windows only.}
- This variable contains link flags when building Windows GUI projects
- (i.e. non-console applications).
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building Windows GUI projects (i.e.
+ non-console applications). The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_WINDOWS_DLL
\e {This is used on Windows only.}
- This variable contains link flags when building Windows DLL projects.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building Windows DLL projects. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBDIR
- This variable contains the location of all known library
- directories.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known library directories. The
+ value of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBDIR_FLAGS
\e {This is used on Unix platforms only.}
- This variable contains the location of all library
- directory with -L prefixed. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all library directory with -L
+ prefixed. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBDIR_EGL
- This variable contains the location of the EGL library
- directory, when EGL is used with OpenGL/ES or OpenVG. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the EGL library directory, when EGL
+ is used with OpenGL/ES or OpenVG. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\section1 QMAKE_LIBDIR_OPENGL
- This variable contains the location of the OpenGL library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the OpenGL library directory. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBDIR_EGL may also need to be set.
\section1 QMAKE_LIBDIR_OPENVG
- This variable contains the location of the OpenVG library
- directory. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the OpenVG library directory. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL
may also need to be set.
\section1 QMAKE_LIBDIR_QT
- This variable contains the location of the Qt library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the Qt library directory. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBDIR_X11
\e {This is used on Unix platforms only.}
- This variable contains the location of the X11 library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the X11 library directory. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS
- This variable contains all project libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all project libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_CONSOLE
@@ -2590,42 +2649,44 @@
\section1 QMAKE_LIBS_EGL
- This variable contains all EGL libraries when building Qt with
- OpenGL/ES or OpenVG. The value of this variable is typically
- handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ This variable contains all EGL libraries when building Qt with OpenGL/ES
+ or OpenVG. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
needs to be modified. The usual value is \c{-lEGL}.
\section1 QMAKE_LIBS_OPENGL
- This variable contains all OpenGL libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all OpenGL libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBS_EGL may also need to be set.
\section1 QMAKE_LIBS_OPENGL_QT
- This variable contains all OpenGL Qt libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all OpenGL Qt libraries.The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2
These variables contain all the OpenGL libraries for OpenGL ES 1
and OpenGL ES 2.
- The value of these variables is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of these variables is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBS_EGL may also need to be set.
\section1 QMAKE_LIBS_OPENVG
- This variable contains all OpenVG libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified. The usual value is \c{-lOpenVG}.
+ This variable contains all OpenVG libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The usual
+ value is \c{-lOpenVG}.
Some OpenVG engines are implemented on top of OpenGL. This will
be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly
@@ -2636,95 +2697,96 @@
\section1 QMAKE_LIBS_QT
- This variable contains all Qt libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all Qt libraries.The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_QT_DLL
\e {This is used on Windows only.}
- This variable contains all Qt libraries when Qt is built as a dll. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all Qt libraries when Qt is built as a dll. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_QT_OPENGL
- This variable contains all the libraries needed to link against if
- OpenGL support is turned on. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all the libraries needed to link against if OpenGL
+ support is turned on. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_QT_THREAD
- This variable contains all the libraries needed to link against if
- thread support is turned on. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all the libraries needed to link against if thread
+ support is turned on. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_RT
\e {This is used with Borland compilers only.}
This variable contains the runtime library needed to link against when
- building an application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ building an application. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
\section1 QMAKE_LIBS_RTMT
\e {This is used with Borland compilers only.}
This variable contains the runtime library needed to link against when
- building a multi-threaded application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ building a multi-threaded application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_THREAD
\e {This is used on Unix and Symbian platforms only.}
- This variable contains all libraries that need to be linked against
- when building a multi-threaded application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all libraries that need to be linked against when
+ building a multi-threaded application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_WINDOWS
\e {This is used on Windows only.}
- This variable contains all windows libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all windows libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_X11
\e {This is used on Unix platforms only.}
- This variable contains all X11 libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all X11 libraries.The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_X11SM
\e {This is used on Unix platforms only.}
- This variable contains all X11 session management libraries. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all X11 session management libraries. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIB_FLAG
- This variable is not empty if the \c lib template is specified. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is not empty if the \c lib template is specified. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LINK_SHLIB_CMD
- This variable contains the command to execute when creating a
- shared library. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the command to execute when creating a shared
+ library. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_POST_LINK
@@ -2742,10 +2804,10 @@
\section1 QMAKE_LN_SHLIB
- This variable contains the command to execute when creating a link
- to a shared library. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the command to execute when creating a link to a
+ shared library. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_MAC_SDK
@@ -2764,28 +2826,29 @@
\section1 QMAKE_MAKEFILE
- This variable contains the name of the Makefile to create. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the name of the Makefile to create. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_MOC_SRC
- This variable contains the names of all moc source files to
- generate and include in the project. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the names of all moc source files to generate and
+ include in the project. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_QMAKE
- This variable contains the location of qmake if it is not in the path.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of qmake if it is not in the path. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_QT_DLL
- This variable is not empty if Qt was built as a dll. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is not empty if Qt was built as a dll. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_RESOURCE_FLAGS
@@ -2795,7 +2858,7 @@
\c{-compress} options are used with particular values each time that
\c rcc is invoked:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 45
\section1 QMAKE_RPATH
@@ -2813,44 +2876,49 @@
\section1 QMAKE_RUN_CC
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CC_IMP
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CXX
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CXX_IMP
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_TARGET
- This variable contains the name of the project target. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the name of the project target. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_UIC
- This variable contains the location of uic if it is not in the path.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of uic if it is not in the path. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
It can be used to specify arguments to uic as well, such as additional plugin
paths. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 46
\section1 QT
@@ -2881,7 +2949,7 @@
exclude the \c gui value with the "-=" operator; the following line will
result in a minimal Qt project being built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 47
Note that adding the \c opengl option to the \c QT variable automatically
causes the equivalent option to be added to the \c CONFIG variable.
@@ -2917,8 +2985,9 @@
\section1 RC_FILE
This variable contains the name of the resource file for the application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target RCC_DIR
\section1 RCC_DIR
@@ -2928,13 +2997,13 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 48
\target REQUIRES
\section1 REQUIRES
- This is a special variable processed by \c qmake. If the
- contents of this variable do not appear in CONFIG by the time this
+ This is a special variable processed by \l{qmake Manual#qmake}{\c qmake}.
+ If the contents of this variable do not appear in CONFIG by the time this
variable is assigned, then a minimal Makefile will be generated that
states what dependencies (the values assigned to REQUIRES) are
missing.
@@ -2943,27 +3012,28 @@
\section1 RESOURCES
- This variable contains the name of the resource collection file (qrc)
+ This variable contains the name of the resource collection file (qrc)
for the application. Further information about the resource collection
file can be found at \l{The Qt Resource System}.
\section1 RES_FILE
This variable contains the name of the resource file for the application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target RSS_RULES
\section1 RSS_RULES
- \e {This is only used on the Symbian platform.}
+ \e {This is only used on the Symbian platform.}
- Generic RSS file content can be specified with this variable. The syntax is
+ Generic RSS file content can be specified with this variable. The syntax is
similar to \c MMP_RULES and \c BLD_INF_RULES.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 144
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 144
This will add the specified statement to the end of the \c APP_REGISTRATION_INFO
resource struct in the generated registration resource file.
@@ -2972,9 +3042,9 @@
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the registration resource file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 145
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 145
This example will install the application to MyFolder in the Symbian
platform application shell. In addition it will make the application to
@@ -3006,7 +3076,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 151
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 151
This example will define service information for a fictional service that requires
an icon to be supplied via the \c opaque_data of the service information.
@@ -3035,17 +3105,17 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 49
See also \l{#HEADERS}{HEADERS}
\section1 SRCMOC
- This variable is set by \l {qmake}{ \c qmake}if files can be found that
- contain the Q_OBJECT macro. \c SRCMOC contains the
- name of all the generated moc files. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
+ found that contain the Q_OBJECT macro. \c SRCMOC contains the name of all
+ the generated moc files. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
\target SUBDIRS
\section1 SUBDIRS
@@ -3057,18 +3127,18 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 50
It is essential that the project file in each subdirectory has the same
- name as the subdirectory itself, so that \l {qmake}{ \c qmake}can find it.
- For example, if the subdirectory is called \c myapp then the project file
- in that directory should be called \c myapp.pro.
+ name as the subdirectory itself, so that \l{qmake Manual#qmake}{\c qmake}
+ can find it. For example, if the subdirectory is called \c myapp then the
+ project file in that directory should be called \c myapp.pro.
If you need to ensure that the subdirectories are built in the order in
which they are specified, update the \l{#CONFIG}{CONFIG} variable to
include the \c ordered option:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 51
It is possible to modify this default behavior of \c SUBDIRS by giving
additional modifiers to \c SUBDIRS elements. Supported modifiers are:
@@ -3092,11 +3162,11 @@
For example, define two subdirectories, both of which reside in a different directory
than the \c SUBDIRS value, and one of the subdirectories must be built before the other:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 149
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 149
For example, define a subdirectory that is only build for emulator builds in Qt for Symbian:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 150
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 150
\target SYMBIAN_VERSION
\section1 SYMBIAN_VERSION
@@ -3112,7 +3182,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 52
The project file above would produce an executable named \c myapp on
unix and 'myapp.exe' on windows.
@@ -3122,8 +3192,34 @@
\e {This is only used on the Symbian platform.}
- Specifies which platform capabilities the application should have. For more
- information, please refer to the Symbian SDK documentation.
+ Specifies which platform capabilities the application should have. These
+ include the following basic capabilities, but others are also available
+ for signed applications.
+
+ \table
+ \header \o Capability \o Description
+ \row \o LocalServices \o The ability to use local services running on the
+ phone or device, including those which provide
+ local connectivity to other devices.
+ \row \o Location \o Access to the service that provides information
+ about the user's location, from GPS, phone
+ network, or other sources.
+ \row \o NetworkServices \o Use of services that access the phone network,
+ such as dialling a phone number, sending an SMS,
+ or other operations that result in network
+ traffic.
+ \row \o ReadUserData \o Access to the user's private data, such as
+ contact information.
+ \row \o UserEnvironment \o The ability to use services that provide from the
+ user's physical environment, such as the camera or
+ microphone.
+ \row \o WriteUserData \o The ability to write or modify the user's private
+ data.
+ \endtable
+
+ For more information, and a comprehensive list of capabilities, please refer
+ to the Symbian SDK documentation or the \l{Symbian Capabilities} page of
+ the \l{Forum Nokia Wiki}.
\target TARGET.EPOCALLOWDLLDATA
\section1 TARGET.EPOCALLOWDLLDATA
@@ -3142,7 +3238,7 @@
will refuse to run if the minimum size is not available when it starts. For
example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 135
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 135
\target TARGET.EPOCSTACKSIZE
\section1 TARGET.EPOCSTACKSIZE
@@ -3151,7 +3247,7 @@
Specifies the maximum stack size of the application. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 136
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 136
\target TARGET.SID
\section1 TARGET.SID
@@ -3191,21 +3287,23 @@
\section1 TARGET_EXT
- This variable specifies the target's extension. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension. The value of this variable
+ is typically handled by \l {qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 TARGET_x
- This variable specifies the target's extension with a major version number. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension with a major version number.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 TARGET_x.y.z
- This variable specifies the target's extension with version number. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension with version number. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target TEMPLATE
\section1 TEMPLATE
@@ -3232,7 +3330,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 53
The template can be overridden by specifying a new template type with the
\c -t command line option. This overrides the template type \e after the .pro
@@ -3251,16 +3349,16 @@
\section1 UICIMPLS
This variable contains a list of the generated implementation files by UIC.
- The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 UICOBJECTS
- This variable is generated from the UICIMPLS variable. The extension of each
- file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ This variable is generated from the UICIMPLS variable. The extension of
+ each file will have been replaced by .o (Unix) or .obj (Win32). The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target UI_DIR
\section1 UI_DIR
@@ -3271,7 +3369,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 54
\target UI_HEADERS_DIR
\section1 UI_HEADERS_DIR
@@ -3281,7 +3379,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 55
\target UI_SOURCES_DIR
\section1 UI_SOURCES_DIR
@@ -3291,7 +3389,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 56
\target VERSION
\section1 VERSION
@@ -3302,7 +3400,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 57
\section1 VER_MAJ
@@ -3321,36 +3419,36 @@
\section1 VPATH
- This variable tells \l {qmake}{ \c qmake}where to search for files it cannot
- open. With this you may tell \l {qmake}{ \c qmake}where it may look for things
- like SOURCES, and if it finds an entry in SOURCES that cannot be
- opened it will look through the entire VPATH list to see if it can
- find the file on its own.
+ This variable tells \l{qmake Manual#qmake}{\c qmake} where to search for
+ files it cannot open. With this you may tell
+ \l{qmake Manual#qmake}{\c qmake} where it may look for things like SOURCES,
+ and if it finds an entry in SOURCES that cannot be opened it will look
+ through the entire VPATH list to see if it can find the file on its own.
See also \l{#DEPENDPATH}{DEPENDPATH}.
\section1 YACCIMPLS
- This variable contains a list of yacc source files. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains a list of yacc source files. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 YACCOBJECTS
- This variable contains a list of yacc object files. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains a list of yacc object files. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target YACCSOURCES
\section1 YACCSOURCES
This variable contains a list of yacc source files to be included
- in the project. All dependencies, headers and source files will
+ in the project. All dependencies, headers and source files will
automatically be included in the project.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 58
\section1 _PRO_FILE_
@@ -3379,8 +3477,8 @@
\previouspage qmake Variable Reference
\nextpage Configuring qmake's Environment
- \l {qmake}{ \c qmake}provides built-in functions to allow the contents of
- variables to be processed, and to enable tests to be performed
+ \l{qmake Manual#qmake}{\c qmake} provides built-in functions to allow the
+ contents of variables to be processed, and to enable tests to be performed
during the configuration process. Functions that process the
contents of variables typically return values that can be assigned
to other variables, and these values are obtained by prefixing
@@ -3394,7 +3492,7 @@
Returns the basename of the file specified. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 59
\section1 CONFIG(config)
[Conditional]
@@ -3407,7 +3505,7 @@
mutually exclusive values) a second parameter can be used to specify a set
of values to consider. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 60
Because release is considered the active setting (for feature parsing)
it will be the CONFIG used to generate the build file. In the common
@@ -3423,7 +3521,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 61
The contents of the scope are only processed if the \c drivers
variable contains the value, \c network. If this is the case, the
@@ -3450,19 +3548,19 @@
\section1 error(string)
- This function never returns a value. \l {qmake}{ \c qmake}displays the given
- \e string to the user, and exits. This function should only be used
- for unrecoverable errors.
+ This function never returns a value. \l{qmake Manual#qmake}{\c qmake}
+ displays the given \e string to the user, and exits. This function
+ should only be used for unrecoverable errors.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 62
\section1 eval(string)
[Conditional]
- Evaluates the contents of the string using \c qmake's syntax rules
- and returns true.
+ Evaluates the contents of the string using
+ \l{qmake Manual#qmake}{\c qmake}'s syntax rules and returns true.
Definitions and assignments can be used in the string to modify the
values of existing variables or create new definitions.
@@ -3481,7 +3579,7 @@
succeeds if any file matches the regular expression specified.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 63
Note that "/" can be used as a directory separator, regardless of the
platform in use.
@@ -3491,7 +3589,7 @@
Places all the values in \e variablename that match \e substr. \e
substr may be a regular expression, and will be matched accordingly.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 64
MY_VAR2 will contain '-Lone -Ltwo -Lthree -Lfour -Lfive', and MY_VAR3 will
contains 'three two three'.
@@ -3508,7 +3606,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 65
\section1 include(filename)
[Conditional]
@@ -3521,15 +3619,16 @@
You can check whether the file was included by using this function as
the condition for a scope; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 66
\section1 infile(filename, var, val)
[Conditional]
- Succeeds if the file \e filename (when parsed by \l {qmake}{ \c qmake}itself)
- contains the variable \e var with a value of \e val; otherwise fails.
- If you do not specify a third argument (\e val), the function will
- only test whether \e var has been declared in the file.
+ Succeeds if the file \e filename (when parsed by
+ \l{qmake Manual#qmake}{\c qmake} itself) contains the variable \e var with
+ a value of \e val; otherwise fails. If you do not specify a third argument
+ (\e val), the function will only test whether \e var has been declared in
+ the file.
\section1 isEmpty(variablename)
[Conditional]
@@ -3539,7 +3638,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 67
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 67
\section1 join(variablename, glue, before, after)
@@ -3563,7 +3662,7 @@
This function simply writes a message to the console. Unlike the
\c error() function, this function allows processing to continue.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 68
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 68
The above line causes "This is a message" to be written to the console.
The use of quotation marks is optional.
@@ -3574,7 +3673,7 @@
\l{qmake Advanced Usage}{in conjunction with a scope} to filter out
messages during builds; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 69
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 69
\section1 prompt(question)
@@ -3598,7 +3697,7 @@
prints the message:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 70
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 70
\section1 sprintf(string, arguments...)
@@ -3614,13 +3713,13 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 71
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 71
Alternatively, you can use this function to obtain stdout and stderr
from the command, and assign it to a variable. For example, you can
use this to interrogate information about the platform:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 72
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 72
\target unique
\section1 unique(variablename)
@@ -3628,7 +3727,7 @@
This will return a list of values in variable that are unique (that is
with repetitive entries removed). For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 73
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 73
\section1 warning(string)
@@ -3648,18 +3747,19 @@
\target Properties
\section1 Properties
- \l {qmake}{ \c qmake}has a system of persistent information, this allows you to
- \c set a variable in qmake once, and each time qmake is invoked this
- value can be queried. Use the following to set a property in qmake:
+ \l{qmake Manual#qmake}{\c qmake} has a system of persistent information,
+ this allows you to \c set a variable in qmake once, and each time qmake is
+ invoked this value can be queried. Use the following to set a property in
+ qmake:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 74
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 74
The appropriate variable and value should be substituted for
\c VARIABLE and \c VALUE.
To retrieve this information back from qmake you can do:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 75
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 75
\note \c{qmake -query} will only list variables that you have
previously set with \c{qmake -set VARIABLE VALUE}.
@@ -3667,24 +3767,26 @@
This information will be saved into a QSettings object (meaning it
will be stored in different places for different platforms). As
\c VARIABLE is versioned as well, you can set one value in an older
- version of \c qmake, and newer versions will retrieve this value. However,
- if you set \c VARIABLE for a newer version of \c qmake, the older version
- will not use this value. You can however query a specific version of a
- variable if you prefix that version of \l {qmake}{ \c qmake}to \c VARIABLE, as in
- the following example:
+ version of \l{qmake Manual#qmake}{\c qmake}, and newer versions will
+ retrieve this value. However, if you set \c VARIABLE for a newer version
+ of \l{qmake Manual#qmake}{\c qmake}, the older version will not use this
+ value. You can however query a specific version of a variable if you
+ prefix that version of \l{qmake Manual#qmake}{\c qmake} to \c VARIABLE,
+ as in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 76
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 76
- \l {qmake}{ \c qmake}also has the notion of \c builtin properties, for example you can
- query the installation of Qt for this version of \l {qmake}{ \c qmake}with the
+ \l{qmake Manual#qmake}{\c qmake} also has the notion of \c builtin
+ properties, for example you can query the installation of Qt for this
+ version of \l{qmake Manual#qmake}{\c qmake} with the
\c QT_INSTALL_PREFIX property:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 77
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 77
- These built-in properties cannot have a version prefixed to them as
- they are not versioned, and each version of \l {qmake}{ \c qmake}will have its own
- built-in set of these values. The list below outlines the built-in
- properties:
+ These built-in properties cannot have a version prefixed to them as they
+ are not versioned, and each version of \l{qmake Manual#qmake}{\c qmake}
+ will have its own built-in set of these values. The list below outlines
+ the built-in properties:
\list
\o \c QT_INSTALL_PREFIX - Where the version of Qt this qmake is built for resides
@@ -3695,27 +3797,27 @@
Finally, these values can be queried in a project file with a special
notation such as:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 78
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 78
\target QMAKESPEC
\section1 QMAKESPEC
- \l {qmake}{ \c qmake}requires a platform and compiler description file which
- contains many default values used to generate appropriate Makefiles.
- The standard Qt distribution comes with many of these files, located
- in the \c mkspecs subdirectory of the Qt installation.
+ \l{qmake Manual#qmake}{\c qmake}requires a platform and compiler
+ description file which contains many default values used to generate
+ appropriate Makefiles. The standard Qt distribution comes with many of
+ these files, located in the \c mkspecs subdirectory of the Qt installation.
The \c QMAKESPEC environment variable can contain any of the following:
\list
\o A complete path to a directory containing a \c{qmake.conf} file.
- In this case \l {qmake}{ \c qmake}will open the \c{qmake.conf} file from within that
- directory. If the file does not exist, \l {qmake}{ \c qmake}will exit with an
- error.
- \o The name of a platform-compiler combination. In this case, \c qmake
- will search in the directory specified by the \c mkspecs subdirectory
- of the data path specified when Qt was compiled (see
- QLibraryInfo::DataPath).
+ In this case \l{qmake Manual#qmake}{\c qmake} will open the
+ \c{qmake.conf} file from within that directory. If the file does not
+ exist, \l{qmake Manual#qmake}{\c qmake} will exit with an error.
+ \o The name of a platform-compiler combination. In this case,
+ \l{qmake Manual#qmake}{\c qmake} will search in the directory specified
+ by the \c mkspecs subdirectory of the data path specified when Qt was
+ compiled (see QLibraryInfo::DataPath).
\endlist
\bold{Note:} The \c QMAKESPEC path will automatically be added to the
@@ -3726,31 +3828,32 @@
It is common on Unix to also use the build tool to install applications
and libraries; for example, by invoking \c{make install}. For this reason,
- \l {qmake}{ \c qmake}has the concept of an install set, an object which contains
- instructions about the way part of a project is to be installed.
- For example, a collection of documentation files can be described in the
- following way:
+ \l{qmake Manual#qmake}{\c qmake}has the concept of an install set, an
+ object which contains instructions about the way part of a project is to
+ be installed. For example, a collection of documentation files can be
+ described in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 79
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 79
- The \c path member informs \l {qmake}{ \c qmake}that the files should be installed in
- \c /usr/local/program/doc (the path member), and the \c files member
- specifies the files that should be copied to the installation directory.
- In this case, everything in the \c docs directory will be coped to
- \c /usr/local/program/doc.
+ The \c path member informs \l{qmake Manual#qmake}{\c qmake} that the files
+ should be installed in \c /usr/local/program/doc (the path member), and the
+ \c files member specifies the files that should be copied to the
+ installation directory. In this case, everything in the \c docs directory
+ will be coped to \c /usr/local/program/doc.
Once an install set has been fully described, you can append it to the
install list with a line like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 80
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 80
- \l {qmake}{ \c qmake}will ensure that the specified files are copied to the installation
- directory. If you require greater control over this process, you can also
- provide a definition for the \c extra member of the object. For example,
- the following line tells \l {qmake}{ \c qmake}to execute a series of commands for this
+ \l{qmake Manual#qmake}{\c qmake} will ensure that the specified files are
+ copied to the installation directory. If you require greater control over
+ this process, you can also provide a definition for the \c extra member of
+ the object. For example, the following line tells
+ \l{qmake Manual#qmake}{\c qmake} to execute a series of commands for this
install set:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 81
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 81
The \c unix scope
(see \l{qmake Advanced Usage#Scopes and Conditions}{Scopes and Conditions})
@@ -3762,23 +3865,24 @@
in the other members of the object are performed.
If you append a built-in install set to the \c INSTALLS variable and do
- not specify \c files or \c extra members, \l {qmake}{ \c qmake}will decide what needs to
- be copied for you. Currently, the only supported built-in install set is
- \c target:
+ not specify \c files or \c extra members, \l{qmake Manual#qmake}{\c qmake}
+ will decide what needs to be copied for you. Currently, the only supported
+ built-in install set is \c target:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 82
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 82
- In the above lines, \l {qmake}{ \c qmake}knows what needs to be copied, and will handle
- the installation process automatically.
+ In the above lines, \l{qmake Manual#qmake}{\c qmake} knows what needs to
+ be copied, and will handle the installation process automatically.
\target cache
\section1 Cache File
- The cache file is a special file \l {qmake}{ \c qmake}reads to find settings not specified
- in the \c qmake.conf file, project files, or at the command line. If
- \c -nocache is not specified when \l {qmake}{ \c qmake}is run, it will try to find a file
- called \c{.qmake.cache} in parent directories of the current directory. If
- it fails to find this file, it will silently ignore this step of processing.
+ The cache file is a special file \l{qmake Manual#qmake}{\c qmake} reads to
+ find settings not specified in the \c qmake.conf file, project files, or
+ at the command line. If \c -nocache is not specified when
+ \l{qmake Manual#qmake}{\c qmake} is run, it will try to find a file called
+ \c{.qmake.cache} in parent directories of the current directory. If it
+ fails to find this file, it will silently ignore this step of processing.
If it finds a \c{.qmake.cache} file then it will process this file first before
it processes the project file.
@@ -3786,67 +3890,73 @@
\target LibDepend
\section1 Library Dependencies
- Often when linking against a library, \l {qmake}{ \c qmake}relies on the underlying
- platform to know what other libraries this library links against, and
- lets the platform pull them in. In many cases, however, this is not
- sufficent. For example, when statically linking a library, no other
- libraries are linked to, and therefore no dependencies to those
- libraries are created. However, an application that later links
+ Often when linking against a library, \l{qmake Manual#qmake}{\c qmake}
+ relies on the underlying platform to know what other libraries this
+ library links against, and lets the platform pull them in. In many cases,
+ however, this is not sufficent. For example, when statically linking a
+ library, no other libraries are linked to, and therefore no dependencies
+ to those libraries are created. However, an application that later links
against this library will need to know where to find the symbols that
- the static library will require. To help with this situation, \c qmake
- attempts to follow a library's dependencies where appropriate, but
- this behavior must be explicitly enabled by following two steps.
+ the static library will require. To help with this situation,
+ \l{qmake Manual#qmake}{\c qmake} attempts to follow a library's
+ dependencies where appropriate, but this behavior must be explicitly
+ enabled by following two steps.
The first step is to enable dependency tracking in the library itself.
- To do this you must tell \l {qmake}{ \c qmake}to save information about the library:
+ To do this you must tell \l{qmake Manual#qmake}{\c qmake} to save
+ information about the library:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 83
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 83
- This is only relevant to the \c lib template, and will be ignored for
- all others. When this option is enabled, \l {qmake}{ \c qmake}will create a file
- ending in .prl which will save some meta-information about the
- library. This metafile is just like an ordinary project file, but only
+ This is only relevant to the \c lib template, and will be ignored for all
+ others. When this option is enabled, \l{qmake Manual#qmake}{\c qmake} will
+ create a file ending in .prl which will save some meta-information about
+ the library. This metafile is just like an ordinary project file, but only
contains internal variable declarations. You are free to view this file
- and, if it is deleted, \l {qmake}{ \c qmake}will know to recreate it when necessary,
- either when the project file is later read, or if a dependent library
- (described below) has changed. When installing this library, by
- specifying it as a target in an \c INSTALLS declaration, \l {qmake}{ \c qmake}will
- automatically copy the .prl file to the installation path.
+ and, if it is deleted, \l{qmake Manual#qmake}{\c qmake} will know to
+ recreate it when necessary, either when the project file is later read, or
+ if a dependent library (described below) has changed. When installing this
+ library, by specifying it as a target in an \c INSTALLS declaration,
+ \l{qmake Manual#qmake}{\c qmake} will automatically copy the .prl file to
+ the installation path.
The second step in this process is to enable reading of this meta
information in the applications that use the static library:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 84
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 84
- When this is enabled, \l {qmake}{ \c qmake}will process all libraries linked to
- by the application and find their meta-information. \l {qmake}{ \c qmake}will use
- this to determine the relevant linking information, specifically adding
- values to the application project file's list of \c DEFINES as well as
- \c LIBS. Once \l {qmake}{ \c qmake}has processed this file, it will then look through
- the newly introduced libraries in the \c LIBS variable, and find their
- dependent .prl files, continuing until all libraries have been resolved.
- At this point, the Makefile is created as usual, and the libraries are
- linked explicitly against the application.
+ When this is enabled, \l{qmake Manual#qmake}{\c qmake} will process all
+ libraries linked to by the application and find their meta-information.
+ \l{qmake Manual#qmake}{\c qmake} will use this to determine the relevant
+ linking information, specifically adding values to the application project
+ file's list of \c DEFINES as well as \c LIBS. Once
+ \l{qmake Manual#qmake}{\c qmake} has processed this file, it will then
+ look through the newly introduced libraries in the \c LIBS variable, and
+ find their dependent .prl files, continuing until all libraries have been
+ resolved. At this point, the Makefile is created as usual, and the
+ libraries are linked explicitly against the application.
The internals of the .prl file are left closed so they can easily
change later. They are not designed to be changed by hand, should only
- be created by \c qmake, and should not be transferred between operating
- systems as they may contain platform-dependent information.
+ be created by \{qmake Manual#qmake}{\c qmake}, and should not be
+ transferred between operating systems as they may contain
+ platform-dependent information.
\target Extensions
\section1 File Extensions
- Under normal circumstances \l {qmake}{ \c qmake}will try to use appropriate file extensions
- for your platform. However, it is sometimes necessary to override the default
- choices for each platform and explicitly define file extensions for \l {qmake}{ \c qmake}to use.
- This is achieved by redefining certain built-in variables; for example the extension
- used for \l moc files can be redefined with the following assignment in a project
- file:
+ Under normal circumstances \l{qmake Manual#qmake}{\c qmake} will try to
+ use appropriate file extensions for your platform. However, it is
+ sometimes necessary to override the default choices for each platform and
+ explicitly define file extensions for \l{qmake Manual#qmake}{\c qmake} to
+ use. This is achieved by redefining certain built-in variables; for
+ example the extension used for \l moc files can be redefined with the
+ following assignment in a project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 85
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 85
The following variables can be used to redefine common file extensions recognized
- by \c qmake:
+ by \l{qmake Manual#qmake}{\c qmake}:
\list
\o QMAKE_EXT_MOC - This modifies the extension placed on included moc files.
@@ -3864,45 +3974,47 @@
accept a list of values:
\list
- \o QMAKE_EXT_CPP - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
- C++ source files.
- \o QMAKE_EXT_H - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
- C and C++ header files.
+ \o QMAKE_EXT_CPP - Causes \l{qmake Manual#qmake}{\c qmake} to interpret
+ all files with these suffixes as C++ source files.
+ \o QMAKE_EXT_H - Causes \l qmake Manual#{qmake}{\c qmake} to interpret
+ all files with these suffixes as C and C++ header files.
\endlist
\target Customizing
\section1 Customizing Makefile Output
- \l {qmake}{ \c qmake}tries to do everything expected of a cross-platform build tool.
- This is often less than ideal when you really need to run special
- platform-dependent commands. This can be achieved with specific instructions
- to the different \l {qmake}{ \c qmake}backends.
+ \l{qmake Manual#qmake}{\c qmake} tries to do everything expected of a
+ cross-platform build tool. This is often less than ideal when you really
+ need to run special platform-dependent commands. This can be achieved with
+ specific instructions to the different \l{qmake Manual#qmake}{\c qmake}
+ backends.
Customization of the Makefile output is performed through an object-style
- API as found in other places in \c qmake. Objects are defined automatically
- by specifying their members; for example:
+ API as found in other places in \l{qmake Manual#qmake}{\c qmake}. Objects
+ are defined automatically by specifying their members; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 86
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 86
- The definitions above define a \l {qmake}{ \c qmake}target called \c mytarget, containing
- a Makefile target called \c{.buildfile} which in turn is generated with
- the \c touch command. Finally, the \c{.depends} member specifies that
- \c mytarget depends on \c mytarget2, another target that is defined afterwards.
- \c mytarget2 is a dummy target; it is only defined to echo some text to
- the console.
+ The definitions above define a \l{qmake Manual#qmake}{\c qmake} target
+ called \c mytarget, containing a Makefile target called \c{.buildfile}
+ which in turn is generated with the \c touch command. Finally, the
+ \c{.depends} member specifies that \c mytarget depends on \c mytarget2,
+ another target that is defined afterwards. \c mytarget2 is a dummy target;
+ it is only defined to echo some text to the console.
- The final step is to instruct \l {qmake}{ \c qmake}that this object is a target to be built:
+ The final step is to instruct \l{qmake Manual#qmake}{\c qmake} that this
+ object is a target to be built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 87
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 87
- This is all you need to do to actually build custom targets. Of course, you may
- want to tie one of these targets to the
- \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you simply need to
- include your Makefile target in the list of
+ This is all you need to do to actually build custom targets. Of course,
+ you may want to tie one of these targets to the
+ \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you
+ simply need to include your Makefile target in the list of
\l{qmake Variable Reference#PRE_TARGETDEPS}{PRE_TARGETDEPS}.
- The following tables are an overview of the options available to you with the QMAKE_EXTRA_TARGETS
- variable.
+ The following tables are an overview of the options available to you with
+ the QMAKE_EXTRA_TARGETS variable.
\table
\header
@@ -3947,15 +4059,16 @@
For convenience, there is also a method of customizing projects
for new compilers or preprocessors:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 88
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 88
With the above definitions, you can use a drop-in replacement for moc if one
is available. The commands is executed on all arguments given to the
\c NEW_HEADERS variable (from the \c input member), and the result is written
to the file defined by the \c output member; this file is added to the
other source files in the project.
- Additionally, \l {qmake}{ \c qmake}will execute \c depend_command to generate dependency
- information, and place this information in the project as well.
+ Additionally, \l{qmake Manual#qmake}{\c qmake} will execute
+ \c depend_command to generate dependency information, and place this
+ information in the project as well.
These commands can easily be placed into a cache file, allowing subsequent
project files to add arguments to \c NEW_HEADERS.
@@ -4004,71 +4117,71 @@
\table
\header
- \o Member
- \o Description
- \row
- \o commands
- \o The commands used for for generating the output from the input.
- \row
- \o CONFIG
- \o Specific configuration options for the custom compiler. See the CONFIG table for details.
- \row
- \o depend_command
- \o Specifies a command used to generate the list of dependencies for the output.
- \row
- \o dependency_type
- \o Specifies the type of file the output is, if it is a known type (such as TYPE_C,
- TYPE_UI, TYPE_QRC) then it is handled as one of those type of files.
- \row
- \o depends
- \o Specifies the dependencies of the output file.
- \row
- \o input
- \o The variable that contains the files that should be processed with the custom compiler.
- \row
- \o name
- \o A description of what the custom compiler is doing. This is only used in some backends.
- \row
- \o output
- \o The filename that is created from the custom compiler.
- \row
- \o output_function
- \o Specifies a custom qmake function that is used to specify the filename to be created.
- \row
- \o variables
- \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to
- in the pro file as $(VARNAME).
- \row
- \o variable_out
- \o The variable that the files created from the output should be added to.
- \endtable
-
- List of members specific to the CONFIG option:
-
- \table
- \header
- \o Member
- \o Description
- \row
- \o combine
- \o Indicates that all of the input files are combined into a single output file.
- \row
- \o target_predeps
- \o Indicates that the output should be added to the list of PRE_TARGETDEPS.
- \row
- \o explicit_dependencies
- \o The dependencies for the output only get generated from the depends member and from
- nowhere else.
- \row
- \o no_link
- \o Indicates that the output should not be added to the list of objects to be linked in.
- \endtable
+ \o Member
+ \o Description
+ \row
+ \o commands
+ \o The commands used for for generating the output from the input.
+ \row
+ \o CONFIG
+ \o Specific configuration options for the custom compiler. See the CONFIG table for details.
+ \row
+ \o depend_command
+ \o Specifies a command used to generate the list of dependencies for the output.
+ \row
+ \o dependency_type
+ \o Specifies the type of file the output is, if it is a known type (such as TYPE_C,
+ TYPE_UI, TYPE_QRC) then it is handled as one of those type of files.
+ \row
+ \o depends
+ \o Specifies the dependencies of the output file.
+ \row
+ \o input
+ \o The variable that contains the files that should be processed with the custom compiler.
+ \row
+ \o name
+ \o A description of what the custom compiler is doing. This is only used in some backends.
+ \row
+ \o output
+ \o The filename that is created from the custom compiler.
+ \row
+ \o output_function
+ \o Specifies a custom qmake function that is used to specify the filename to be created.
+ \row
+ \o variables
+ \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to
+ in the pro file as $(VARNAME).
+ \row
+ \o variable_out
+ \o The variable that the files created from the output should be added to.
+ \endtable
+
+ List of members specific to the CONFIG option:
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o combine
+ \o Indicates that all of the input files are combined into a single output file.
+ \row
+ \o target_predeps
+ \o Indicates that the output should be added to the list of PRE_TARGETDEPS.
+ \row
+ \o explicit_dependencies
+ \o The dependencies for the output only get generated from the depends member and from
+ nowhere else.
+ \row
+ \o no_link
+ \o Indicates that the output should not be added to the list of objects to be linked in.
+ \endtable
\note Symbian platform specific: Generating objects to be linked in is
not supported on the Symbian platform, so either the \c CONFIG option
\c no_link or variable \c variable_out should always be defined for
extra compilers.
-
+
*/
/*!
@@ -4078,12 +4191,13 @@
\previouspage qmake Platform Notes
\nextpage Using Precompiled Headers
- Many \l {qmake}{ \c qmake}project files simply describe the sources and header files used
- by the project, using a list of \c{name = value} and \c{name += value}
- definitions. \l {qmake}{ \c qmake}also provides other operators, functions, and scopes
- that can be used to process the information supplied in variable declarations.
- These advanced features allow Makefiles to be generated for multiple platforms
- from a single project file.
+ Many \l{qmake Manual#qmake}{\c qmake} project files simply describe the
+ sources and header files used by the project, using a list of
+ \c{name = value} and \c{name += value} definitions.
+ \l{qmake Manual#qmake}{\c qmake} also provides other operators, functions,
+ and scopes that can be used to process the information supplied in
+ variable declarations. These advanced features allow Makefiles to be
+ generated for multiple platforms from a single project file.
\tableofcontents
@@ -4092,28 +4206,29 @@
In many project files, the assignment (\c{=}) and append (\c{+=}) operators can
be used to include all the information about a project. The typical pattern of
use is to assign a list of values to a variable, and append more values
- depending on the result of various tests. Since \l {qmake}{ \c qmake}defines certain
- variables using default values, it is sometimes necessary to use the removal
- (\c{-=}) operator to filter out values that are not required. The following
- operators can be used to manipulate the contents of variables.
+ depending on the result of various tests. Since
+ \l{qmake Manual#qmake}{\c qmake} defines certain variables using default
+ values, it is sometimes necessary to use the removal (\c{-=}) operator to
+ filter out values that are not required. The following operators can be
+ used to manipulate the contents of variables.
The \c = operator assigns a value to a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 89
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 89
The above line sets the \c TARGET variable to \c myapp. This will overwrite any
values previously set for \c TARGET with \c myapp.
The \c += operator appends a new value to the list of values in a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 90
The above line appends \c QT_DLL to the list of pre-processor defines to be put
in the generated Makefile.
The \c -= operator removes a value from the list of values in a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 91
The above line removes \c QT_DLL from the list of pre-processor defines to be
put in the generated Makefile.
@@ -4122,7 +4237,7 @@
if it is not already present. This prevents values from being included many
times in a variable. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 92
In the above line, \c QT_DLL will only be added to the list of pre-processor
defines if it is not already defined. Note that the
@@ -4133,7 +4248,7 @@
The \c ~= operator replaces any values that match a regular expression with
the specified value:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 93
In the above line, any values in the list that start with \c QT_D or \c QT_T are
replaced with \c QT.
@@ -4141,7 +4256,7 @@
The \c $$ operator is used to extract the contents of a variable, and can be
used to pass values between variables or supply them to functions:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 94
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 94
\target Scopes
\section1 Scopes
@@ -4168,9 +4283,9 @@
\snippet doc/src/snippets/qmake/scopes.pro 0
The above code will add the \c paintwidget_win.cpp file to the sources listed
- in the generated Makefile if \l {qmake}{ \c qmake}is used on a Windows platform.
- If \l {qmake}{ \c qmake}is used on a platform other than Windows, the define will be
- ignored.
+ in the generated Makefile if \l{qmake Manual#qmake}{\c qmake} is used on a
+ Windows platform. If \l{qmake Manual#qmake}{\c qmake} is used on a
+ platform other than Windows, the define will be ignored.
The conditions used in a given scope can also be negated to provide an
alternative set of declarations that will be processed only if the
@@ -4195,17 +4310,17 @@
You may also use the \c : operator to perform single line conditional
assignments; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 95
The above line adds \c QT_DLL to the \c DEFINES variable only on the
Windows platform.
Generally, the \c : operator behaves like a logical AND operator, joining
together a number of conditions, and requiring all of them to be true.
- There is also the \c | operator to act like a logical OR operator, joining
- together a number of conditions, and requiring only one of them to be true.
+ There is also the \c | operator to act like a logical OR operator, joining
+ together a number of conditions, and requiring only one of them to be true.
- \snippet doc/src/snippets/qmake/scopes.pro 4
+ \snippet doc/src/snippets/qmake/scopes.pro 4
You can also provide alternative declarations to those within a scope by
using an \c else scope. Each \c else scope is processed if the conditions
@@ -4213,15 +4328,15 @@
This allows you to write complex tests when combined with other scopes
(separated by the \c : operator as above). For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 96
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 96
\section2 Configuration and Scopes
The values stored in the
- \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable}
- are treated specially by \c qmake. Each of the possible values can be
- used as the condition for a scope. For example, the list of values
- held by \c CONFIG can be extended with the \c opengl value:
+ \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable} are
+ treated specially by \l{qmake Manual#qmake}{\c qmake}. Each of the possible
+ values can be used as the condition for a scope. For example, the list of
+ values held by \c CONFIG can be extended with the \c opengl value:
\snippet doc/src/snippets/qmake/configscopes.pro 0
@@ -4264,12 +4379,13 @@
\section1 Variables
Many of the variables used in project files are special variables that
- \l {qmake}{ \c qmake}uses when generating Makefiles, such as \c DEFINES, \c SOURCES,
- and \c HEADERS. It is possible for you to create variables for your own
- use; \l {qmake}{ \c qmake}creates new variables with a given name when it encounters
- an assignment to that name. For example:
+ \l{qmake Manual#qmake}{\c qmake} uses when generating Makefiles, such as
+ \c DEFINES, \c SOURCES, and \c HEADERS. It is possible for you to create
+ variables for your own use; \l{qmake Manual#qmake}{\c qmake} creates new
+ variables with a given name when it encounters an assignment to that name.
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 97
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 97
There are no restricitions on what you do to your own variables, as \c
qmake will ignore them unless it needs to evaluate them when processing
@@ -4278,26 +4394,27 @@
You can also assign the value of a current variable to another
variable by prefixing $$ to the variable name. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 98
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 98
Now the MY_DEFINES variable contains what is in the DEFINES variable at
this point in the project file. This is also equivalent to:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 99
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 99
The second notation allows you to append the contents of the variable to
another value without separating the two with a space. For example, the
following will ensure that the final executable will be given a name
that includes the project template being used:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 100
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 100
Variables can be used to store the contents of environment variables.
- These can be evaluated at the time that \l {qmake}{ \c qmake}is run, or included
- in the generated Makefile for evaluation when the project is built.
+ These can be evaluated at the time that \l{qmake Manual#qmake}{\c qmake}
+ is run, or included in the generated Makefile for evaluation when the
+ project is built.
- To obtain the contents of an environment value when \l {qmake}{ \c qmake}is run,
- use the \c $$(...) operator:
+ To obtain the contents of an environment value when
+ \l{qmake Manual#qmake}{\c qmake}is run, use the \c $$(...) operator:
\snippet doc/src/snippets/qmake/environment.pro 0
@@ -4325,17 +4442,17 @@
For example, a \QD plugin can be installed alongside \QD's built-in
plugins if the following declaration is made in its project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 101
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 101
\target VariableProcessingFunctions
\section1 Variable Processing Functions
- \l {qmake}{ \c qmake}provides a selection of built-in functions to allow the
- contents of variables to be processed. These functions process the
- arguments supplied to them and return a value, or list of values, as
- a result. In order to assign a result to a variable, it is necessary
- to use the \c $$ operator with this type of function in the same way
- used to assign contents of one variable to another:
+ \l{qmake Manual#qmake}{\c qmake} provides a selection of built-in
+ functions to allow the contents of variables to be processed. These
+ functions process the arguments supplied to them and return a value, or
+ list of values, as a result. In order to assign a result to a variable,
+ it is necessary to use the \c $$ operator with this type of function in
+ the same way used to assign contents of one variable to another:
\snippet doc/src/snippets/qmake/functions.pro 1
@@ -4346,7 +4463,7 @@
contents of variables. These functions can be defined in the following
way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 102
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 102
The following example function takes a variable name as its only
argument, extracts a list of values from the variable with the
@@ -4358,9 +4475,9 @@
\target ConditionalFunctions
\section1 Conditional Functions
- \l {qmake}{ \c qmake}provides built-in functions that can be used as conditions
- when writing scopes. These functions do not return a value, but
- instead indicate "success" or "failure":
+ \l{qmake Manual#qmake}{\c qmake} provides built-in functions that can be
+ used as conditions when writing scopes. These functions do not return a
+ value, but instead indicate "success" or "failure":
\snippet doc/src/snippets/qmake/functions.pro 3
@@ -4375,13 +4492,13 @@
\section1 Adding New Configuration Features
- \l {qmake}{ \c qmake}lets you create your own \e features that can be included in
- project files by adding their names to the list of values specified by
- the \c CONFIG variable. Features are collections of custom functions and
- definitions in \c{.prf} files that can reside in one of many standard
- directories. The locations of these directories are defined in a number
- of places, and \l {qmake}{ \c qmake}checks each of them in the following order when
- it looks for \c{.prf} files:
+ \l{qmake Manual#qmake}{\c qmake} lets you create your own \e features that
+ can be included in project files by adding their names to the list of
+ values specified by the \c CONFIG variable. Features are collections of
+ custom functions and definitions in \c{.prf} files that can reside in one
+ of many standard directories. The locations of these directories are
+ defined in a number of places, and \l{qmake Manual#qmake}{\c qmake} checks
+ each of them in the following order when it looks for \c{.prf} files:
\list 1
\o In a directory listed in the \c QMAKEFEATURES environment variable;
@@ -4415,12 +4532,12 @@
For example, consider the following assignment in a project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 103
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 103
- With this addition to the \c CONFIG variable, \l {qmake}{ \c qmake}will search the
- locations listed above for the \c myfeatures.prf file after it has
- finished parsing your project file. On Unix systems, it will look for
- the following file:
+ With this addition to the \c CONFIG variable,
+ \l{qmake Manual#qmake}{\c qmake} will search the locations listed above for
+ the \c myfeatures.prf file after it has finished parsing your project file.
+ On Unix systems, it will look for the following file:
\list 1
\o \c $QMAKEFEATURES/myfeatures.prf (for each directory listed in the
@@ -4460,8 +4577,8 @@
specified file. Each subsequent compilation is faster because the
stable code does not need to be recompiled.
- \l {qmake}{ \c qmake}supports the use of precompiled headers (PCH) on some
- platforms and build environments, including:
+ \l{qmake Manual#qmake}{\c qmake} supports the use of precompiled headers
+ (PCH) on some platforms and build environments, including:
\list
\o Windows
\list
@@ -4492,7 +4609,7 @@
\section3 Example: \c stable.h
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 104
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.cpp 104
Note that a precompiled header file needs to separate C includes from
C++ includes, since the precompiled header file for C files may not
@@ -4504,11 +4621,12 @@
To make your project use PCH, you only need to define the
\c PRECOMPILED_HEADER variable in your project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 105
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 105
- \l {qmake}{ \c qmake}will handle the rest, to ensure the creation and use of the
- precompiled header file. You do not need to include the precompiled
- header file in \c HEADERS, as \l {qmake}{ \c qmake}will do this if the configuration
+ \l{qmake Manual#qmake}{\c qmake} will handle the rest, to ensure the
+ creation and use of the precompiled header file. You do not need to
+ include the precompiled header file in \c HEADERS, as
+ \l{qmake Manual#qmake}{\c qmake} will do this if the configuration
supports PCH.
All platforms that support precompiled headers have the configuration
@@ -4516,7 +4634,7 @@
conditional blocks in your project file to add settings when using PCH.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 106
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 106
\section1 Notes on Possible Issues
@@ -4525,7 +4643,7 @@
declarations may cause two different object files with the same name to
be generated:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 107
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 107
To avoid potential conflicts like these, it is good practice to ensure
that header files that will be precompiled are given distinctive names.
@@ -4573,8 +4691,9 @@
\previouspage qmake Manual
\nextpage qmake Common Projects
- This tutorial teaches you how to use \c qmake. We recommend that
- you read the \l {qmake}{ \c qmake}user guide after completing this tutorial.
+ This tutorial teaches you how to use \l{qmake Manual#qmake}{\c qmake}. We
+ recommend that you read the \l{qmake Manual#qmake}{\c qmake} user guide
+ after completing this tutorial.
\section1 Starting off Simple
@@ -4592,25 +4711,25 @@
the application is that it's written in Qt. First, using your favorite
plain text editor, create a file called \c hello.pro in
\c{examples/qmake/tutorial}. The first thing you need to do is add the
- lines that tell \l {qmake}{ \c qmake}about the source and header files that are part
- of your development project.
+ lines that tell \l{qmake Manual#qmake}{\c qmake} about the source and
+ header files that are part of your development project.
We'll add the source files to the project file first. To do this you
need to use the \l{qmake Variable Reference#SOURCES}{SOURCES} variable.
Just start a new line with \c {SOURCES +=} and put hello.cpp after it.
You should have something like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 108
We repeat this for each source file in the project, until we end up
with the following:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 109
If you prefer to use a Make-like syntax, with all the files listed in
one go you can use the newline escaping like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 110
Now that the source files are listed in the project file, the header
files must be added. These are added in exactly the same way as source
@@ -4620,7 +4739,7 @@
Once you have done this, your project file should look something like
this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 111
The target name is set automatically; it is the same as the project
file, but with the suffix appropriate to the platform. For example, if
@@ -4628,29 +4747,30 @@
on Windows and \c hello on Unix. If you want to use a different name
you can set it in the project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 112
The final step is to set the \l{qmake Variable Reference#CONFIG}{CONFIG}
variable. Since this is a Qt application, we need to put \c qt on the
- \c CONFIG line so that \l {qmake}{ \c qmake}will add the relevant libraries to be
- linked against and ensure that build lines for \c moc and \c uic are
- included in the generated Makefile.
+ \c CONFIG line so that \l{qmake Manual#qmake}{\c qmake} will add the
+ relevant libraries to be linked against and ensure that build lines for
+ \c moc and \c uic are included in the generated Makefile.
The finished project file should look like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 113
- You can now use \l {qmake}{ \c qmake}to generate a Makefile for your application.
- On the command line, in your project's directory, type the following:
+ You can now use \l{qmake Manual#qmake}{\c qmake} to generate a Makefile
+ for your application. On the command line, in your project's directory,
+ type the following:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 114
Then type \c make or \c nmake depending on the compiler you use.
- For Visual Studio users, \l {qmake}{ \c qmake}can also generate \c .dsp or
- \c .vcproj files, for example:
+ For Visual Studio users, \l{qmake Manual#qmake}{\c qmake} can also
+ generate \c .dsp or \c .vcproj files, for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 115
\section1 Making an Application Debuggable
@@ -4662,11 +4782,11 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 116
- Use \l {qmake}{ \c qmake}as before to generate a Makefile and you will be able to
- obtain useful information about your application when running it in
- a debugging environment.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile and
+ you will be able to obtain useful information about your application when
+ running it in a debugging environment.
\section1 Adding Platform-Specific Source Files
@@ -4677,44 +4797,46 @@
hellounix.cpp. We can't just add these to the \c SOURCES
variable since this will put both files in the Makefile. So, what we
need to do here is to use a scope which will be processed depending on
- which platform \l {qmake}{ \c qmake}is run on.
+ which platform \l{qmake Manual#qmake}{\c qmake} is run on.
A simple scope that will add in the platform-dependent file for
Windows looks like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 117
- So if \l {qmake}{ \c qmake}is run on Windows, it will add \c hellowin.cpp to the
- list of source files. If \l {qmake}{ \c qmake}is run on any other platform, it
+ So if \l{qmake Manual#qmake}{\c qmake} is run on Windows, it will add
+ \c hellowin.cpp to the list of source files. If
+ \l{qmake Manual#qmake}{\c qmake} is run on any other platform, it
will simply ignore it. Now all that is left to be done is to create a
scope for the Unix-specific file.
When you have done that, your project file should now look
something like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 118
- Use \l {qmake}{ \c qmake}as before to generate a Makefile.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile.
\section1 Stopping qmake If a File Doesn't Exist
You may not want to create a Makefile if a certain file doesn't exist.
We can check if a file exists by using the exists() function. We can
- stop \l {qmake}{ \c qmake}from processing by using the error() function. This
- works in the same way as scopes do. Simply replace the scope condition
- with the function. A check for a \c main.cpp file looks like this:
+ stop \l{qmake Manual#qmake}{\c qmake} from processing by using the error()
+ function. This works in the same way as scopes do. Simply replace the
+ scope condition with the function. A check for a \c main.cpp file looks
+ like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 119
The \c{!} symbol is used to negate the test; i.e. \c{exists( main.cpp )}
is true if the file exists, and \c{!exists( main.cpp )} is true if the
file doesn't exist.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 120
- Use \l {qmake}{ \c qmake}as before to generate a makefile. If you rename \c
- main.cpp temporarily, you will see the message and \l {qmake}{ \c qmake}will stop
- processing.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a makefile.
+ If you rename \c main.cpp temporarily, you will see the message and
+ \l{qmake Manual#qmake}{\c qmake} will stop processing.
\section1 Checking for More than One Condition
@@ -4729,15 +4851,16 @@
the other inside it. Put the settings to be processed inside the last
scope, like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 121
Nested scopes can be joined together using colons, so the final
project file looks like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 122
- That's it! You have now completed the tutorial for \c qmake, and are
- ready to write project files for your development projects.
+ That's it! You have now completed the tutorial for
+ \l{qmake Manual#qmake}{\c qmake}, and are ready to write project files for
+ your development projects.
*/
/*!
@@ -4747,10 +4870,10 @@
\previouspage qmake Tutorial
\nextpage Using qmake
- This chapter describes how to set up \l {qmake}{ \c qmake}project files for three
- common project types that are based on Qt. Although all kinds of
- projects use many of the same variables, each of them use project-specific
- variables to customize output files.
+ This chapter describes how to set up \l{qmake Manual#qmake}{\c qmake}
+ project files for three common project types that are based on Qt.
+ Although all kinds of projects use many of the same variables, each of
+ them use project-specific variables to customize output files.
Platform-specific variables are not described here; we refer the reader to
the \l{Deploying Qt Applications} document for information on issues such as
@@ -4766,9 +4889,10 @@
\section2 The app Template
- The \c app template tells \l {qmake}{ \c qmake}to generate a Makefile that will build
- an application. With this template, the type of application can be specified
- by adding one of the following options to the \c CONFIG variable definition:
+ The \c app template tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile that will build an application. With this template, the type of
+ application can be specified by adding one of the following options to the
+ \c CONFIG variable definition:
\table
\header \o Option \o Description
@@ -4777,9 +4901,9 @@
application.
\endtable
- When using this template the following \l {qmake}{ \c qmake}system variables are recognized.
- You should use these in your .pro file to specify information about your
- application.
+ When using this template the following \l{qmake Manual#qmake}{\c qmake}
+ system variables are recognized. You should use these in your .pro file to
+ specify information about your application.
\list
\o HEADERS - A list of all the header files for the application.
@@ -4801,12 +4925,12 @@
\o RES_FILE - Windows only: A resource file to be linked against for the application.
\endlist
- You only need to use the system variables that you have values for,
- for instance, if you do not have any extra INCLUDEPATHs then you do not
- need to specify any, \l {qmake}{ \c qmake}will add in the default ones needed.
- For instance, an example project file might look like this:
+ You only need to use the system variables that you have values for, for
+ instance, if you do not have any extra INCLUDEPATHs then you do not need
+ to specify any, \l{qmake Manual#qmake}{\c qmake} will add in the default
+ ones needed. For instance, an example project file might look like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 123
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 123
For items that are single valued, e.g. the template or the destination
directory, we use "="; but for multi-valued items we use "+=" to \e
@@ -4819,11 +4943,11 @@
\section2 The lib Template
- The \c lib template tells \l {qmake}{ \c qmake}to generate a Makefile that will
- build a library. When using this template, in addition to the system variables
- mentioned above for the \c app template the \c VERSION variable is
- supported. You should use these in your .pro file to specify
- information about the library.
+ The \c lib template tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile that will build a library. When using this template, in addition
+ to the system variables mentioned above for the \c app template the
+ \c VERSION variable is supported. You should use these in your .pro file
+ to specify information about the library.
When using the \c lib template, the following options can be added to the
\c CONFIG variable to determine the type of library that is built:
@@ -4850,10 +4974,10 @@
\section1 Building a Plugin
Plugins are built using the \c lib template, as described in the previous
- section. This tells \l {qmake}{ \c qmake}to generate a Makefile for the project that will
- build a plugin in a suitable form for each platform, usually in the form of a
- library. As with ordinary libraries, the \c VERSION variable is used to specify
- information about the plugin.
+ section. This tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile for the project that will build a plugin in a suitable form for
+ each platform, usually in the form of a library. As with ordinary
+ libraries, the \c VERSION variable is used to specify information about the plugin.
\list
\o VERSION - The version number of the target library, for example, 2.3.1.
@@ -4888,11 +5012,11 @@
ensure that the resulting targets have different names. Providing different
names for targets ensures that one will not overwrite the other.
- When \l {qmake}{ \c qmake}processes the project file, it will generate a Makefile rule
- to allow the project to be built in both modes. This can be invoked in the
- following way:
+ When \l{qmake Manual#qmake}{\c qmake} processes the project file, it will
+ generate a Makefile rule to allow the project to be built in both modes.
+ This can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 124
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 124
The \c build_all option can be added to the \c CONFIG variable in the
project file to ensure that the project is built in both modes by default:
@@ -4901,14 +5025,14 @@
This allows the Makefile to be processed using the default rule:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 125
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 125
\section2 Installing in Both Modes
The \c build_all option also ensures that both versions of the target
will be installed when the installation rule is invoked:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 126
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 126
It is possible to customize the names of the build targets depending on
the target platform. For example, a library or plugin may be named using a
@@ -4918,7 +5042,7 @@
Note: This was originally used in the customwidgetplugin.pro file, but is
no longer needed there.
\endomit
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 127
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 127
The default behavior in the above snippet is to modify the name used for
the build target when building in debug mode. An \c else clause could be
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index 8924bdb81e..44b682a3d8 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -119,7 +119,7 @@
testfunction.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 0
For more examples, refer to the \l{QTestLib Tutorial}.
@@ -128,7 +128,7 @@
If you are using \c qmake as your build tool, just add the
following to your project file:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtestlib.pro 1
If you are using other build tools, make sure that you add the location
of the QTestLib header files to your include path (usually \c{include/QtTest}
@@ -217,7 +217,7 @@
To create a benchmark, follow the instructions for creating a test and then add a
QBENCHMARK macro to the test function that you want to benchmark.
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 12
The code inside the QBENCHMARK macro will be measured, and possibly also repeated
several times in order to get an accurate measurement. This depends on the selected
@@ -410,7 +410,7 @@
Then you need to implement the test function itself. The
implementation could look like this:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 8
The \l QVERIFY() macro evaluates the expression passed as its
argument. If the expression evaluates to true, the execution of
@@ -475,7 +475,7 @@
test function. If we add more test data, the function might look like
this:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 11
To prevent that the function ends up being cluttered by repetitive
code, QTestLib supports adding test data to a test function. All
diff --git a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
new file mode 100644
index 0000000000..a36ebbbfc3
--- /dev/null
+++ b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+//! [script]
+<script language="javascript">
+function createSubWidget( form )
+{
+ ParentWidget.createSubWidget( form.nameEdit.value );
+}
+
+function renameSubWidget( form )
+{
+ var SubWidget = ParentWidget.subWidget( form.nameEdit.value );
+ if ( !SubWidget ) {
+ alert( "No such widget " + form.nameEdit.value + "!" );
+ return;
+ }
+ SubWidget.label = form.labelEdit.value;
+ form.nameEdit.value = SubWidget.label;
+}
+
+function setFont( form )
+{
+ ParentWidget.font = form.fontEdit.value;
+}
+</script>
+
+<p>
+This widget can have many children!
+</p>
+<object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c"
+CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+<input type="edit" ID="nameEdit" value="&lt;enter object name&gt;" />
+<input type="button" value="Create" onClick="createSubWidget(this.form)" />
+<input type="edit" ID="labelEdit" />
+<input type="button" value="Rename" onClick="renameSubWidget(this.form)" />
+<br />
+<input type="edit" ID="fontEdit" value="MS Sans Serif" />
+<input type="button" value = "Set Font" onClick="setFont(this.form)" />
+</form>
+//! [script]
diff --git a/doc/src/examples/activeqt/hierarchy-demo.qdocinc b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
index e7cb56ef65..86bfd87632 100644
--- a/doc/src/examples/activeqt/hierarchy-demo.qdocinc
+++ b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
@@ -1,5 +1,4 @@
\raw HTML
-//! [0]
<script language="javascript">
function createSubWidget( form )
{
@@ -39,5 +38,4 @@ CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
<input type="edit" ID="fontEdit" value="MS Sans Serif" />
<input type="button" value = "Set Font" onClick="setFont(this.form)" />
</form>
-//! [0]
\endraw
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
index eb6cc71809..791af1fb34 100644
--- a/doc/src/examples/activeqt/hierarchy.qdoc
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-hierarchy.html
\title Qt Widget Hierarchy
@@ -84,5 +84,5 @@
your WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \snippet examples/activeqt/hierarchy-demo.qdocinc 0
+ \snippet examples/activeqt/hierarchy-demo-snippet.qdoc script
*/
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
index bb22f83b78..5e9cc9ae5a 100644
--- a/doc/src/examples/arrowpad.qdoc
+++ b/doc/src/examples/arrowpad.qdoc
@@ -66,7 +66,7 @@
context: it is the context of the texts in the \c ArrowPad class.
The \c Q_OBJECT macro defines \c tr(x) in \c ArrowPad like this:
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
Knowing which class each source text appears in enables \e {Qt
Linguist} to group texts that are logically related together, e.g.
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
index 818547cce9..57295de527 100644
--- a/doc/src/examples/containerextension.qdoc
+++ b/doc/src/examples/containerextension.qdoc
@@ -138,7 +138,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_containerextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_containerextension.pro 0
The container extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc
index f972500130..5b6aab697b 100644
--- a/doc/src/examples/customwidgetplugin.qdoc
+++ b/doc/src/examples/customwidgetplugin.qdoc
@@ -89,7 +89,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index 042b7451cf..5edc91be54 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -131,14 +131,14 @@
In the case shown in the diagram, the piece of information represented
by \bold{a} can be obtained using the standard model/view API:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 0
Since each items holds pieces of data for each column in a given row,
there can be many model indexes that map to the same \c TreeItem object.
For example, the information represented by \bold{b} can be obtained
using the following code:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 1
The same underlying \c TreeItem would be accessed to obtain information
for the other model indexes in the same row as \bold{b}.
diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc
index b8a09e8a02..09c1d947f4 100644
--- a/doc/src/examples/fademessage.qdoc
+++ b/doc/src/examples/fademessage.qdoc
@@ -29,13 +29,9 @@
\example effects/fademessage
\title Fade Message Effect Example
- \raw HTML
- <div style="text-align: center">
- \endraw
+ \div { style="text-align: center"}
\inlineimage fademessageeffect-example.png
\inlineimage fademessageeffect-example-faded.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
*/
diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc
index b46903d508..bc30988ecb 100644
--- a/doc/src/examples/fancybrowser.qdoc
+++ b/doc/src/examples/fancybrowser.qdoc
@@ -26,8 +26,8 @@
****************************************************************************/
/*!
- \example webkit/fancybrowser
- \title Fancy Browser Example
+ \example webkit/fancybrowser
+ \title Fancy Browser Example
The Fancy Browser example shows how to use jQuery with QtWebKit to
create a web browser with special effects and content
diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc
index 4629801beb..224a3a74f9 100644
--- a/doc/src/examples/globalVariables.qdoc
+++ b/doc/src/examples/globalVariables.qdoc
@@ -101,48 +101,25 @@
The \c xmlpatterns command loads and parses \c globals.gccxml,
runs the XQuery \c reportGlobals.xq, and generates this report:
- \raw HTML
-<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
- <head>
- <title>Global variables report for globals.gccxml</title>
- </head>
- <style type="text/css">
- .details
- {
- text-align: left;
- font-size: 80%;
- color: blue
- }
- .variableName
- {
- font-family: courier;
- color: blue
- }
- </style>
- <body>
- <p class="details">Start report: 2008-12-16T13:43:49.65Z</p>
- <p>Global variables with complex types:</p>
- <ol>
- <li>
- <span class="variableName">mutableComplex1</span> in globals.cpp at line 14</li>
- <li>
- <span class="variableName">mutableComplex2</span> in globals.cpp at line 15</li>
- <li>
- <span class="variableName">constComplex1</span> in globals.cpp at line 16</li>
- <li>
- <span class="variableName">constComplex2</span> in globals.cpp at line 17</li>
- </ol>
- <p>Mutable global variables with primitives types:</p>
- <ol>
- <li>
- <span class="variableName">mutablePrimitive1</span> in globals.cpp at line 1</li>
- <li>
- <span class="variableName">mutablePrimitive2</span> in globals.cpp at line 2</li>
- </ol>
- <p class="details">End report: 2008-12-16T13:43:49.65Z</p>
- </body>
-</html>
- \endraw
+ \div {class="details"}
+ Start report: 2008-12-16T13:43:49.65Z
+ \enddiv
+
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
+
+ Mutable global variables with primitives types:
+ \list 1
+ \o \span {class="variableName"} {mutablePrimitive1} in globals.cpp at line 1
+ \o \span {class="variableName"} {mutablePrimitive2} in globals.cpp at line 2
+ \endlist
+
+ \div {class="details"} End report: 2008-12-16T13:43:49.65Z \enddiv
\section1 XQuery Code Walk-Through
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index 4210859401..3966bf4b8d 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -147,8 +147,8 @@
render the other six mode/state combinations, QIcon uses the
search algorithm described in the table below:
- \table
- \header \o{2,1} Requested Pixmap \o{8,1} Preferred Alternatives (mode/state)
+ \table 100%
+ \header \o{2,1} Requested Pixmap \o {8,1} Preferred Alternatives (mode/state)
\header \o Mode \o State \o 1 \o 2 \o 3 \o 4 \o 5 \o 6 \o 7 \o 8
\row \o{1,2} Normal \o Off \o \bold N0 \o A0 \o N1 \o A1 \o D0 \o S0 \o D1 \o S1
\row \o On \o N1 \o \bold A1 \o N0 \o A0 \o D1 \o S1 \o D0 \o S0
@@ -278,7 +278,7 @@
If the application is built in debug mode, the \c Q_ASSERT()
macro will expand to
- \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_icons.cpp 0
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
index 70f71c80a1..f1d02c3abc 100644
--- a/doc/src/examples/imageviewer.qdoc
+++ b/doc/src/examples/imageviewer.qdoc
@@ -149,7 +149,7 @@
\{QWidget::adjustSize()}{adjustSize()} to achieve this, which is
essentially the same as
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 0
In the \c print() slot, we first make sure that an image has been
loaded into the application:
@@ -160,7 +160,7 @@
If the application is built in debug mode, the \c Q_ASSERT() macro
will expand to
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 1
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
@@ -318,7 +318,7 @@
Whenever we zoom in or out, we need to adjust the scroll bars in
consequence. It would have been tempting to simply call
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 4
but this would make the top-left corner the focal point, not the
center. Therefore we need to take into account the scroll bar
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 3439b09290..68deae71e9 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -29,7 +29,7 @@
\title Animation: Basics Example
\example declarative/animation/basics
- This example shows how to create and combine \l{QML Animation}{animations} in QML.
+ This example shows how to create and combine \l{QML Animation and Transitions}{animations} in QML.
\table
\row
@@ -50,16 +50,16 @@
\title Animation: Behavior Examples
\example declarative/animation/behaviors
- This example shows how to use QML behaviors.
+ This example shows how to use QML behaviors.
\image qml-behaviors-example.png
*/
/*!
- \title Animation: Easing Example
+ \title Animation: Easing Example
\example declarative/animation/easing
- This example shows the different easing modes available for \l{QML Animation}{animations}.
+ This example shows the different easing modes available for \l{QML Animation and Transitions}{animations}.
\image qml-easing-example.png
*/
@@ -122,9 +122,9 @@
\page declarative-cppextensions-reference.html
\title C++ Extensions: Reference examples
- These examples show how QML can be extended from C++ in various ways.
-
- The code for these examples is used throughout the \l {Extending QML in C++} reference
+ These examples show how QML can be extended from C++ in various ways.
+
+ The code for these examples is used throughout the \l {Extending QML Functionalities using C++} reference
documentation, which highlights the main principles demonstrated in each example.
Furthermore, here are additional pages that discuss each example in detail:
@@ -160,7 +160,7 @@
\title LayoutItem Example
\example declarative/cppextensions/qgraphicslayouts/layoutitem
- This example show how to use the LayoutItem element to integrate QML items into an existing
+ This example show how to use the LayoutItem element to integrate QML items into an existing
\l{Graphics View Framework}{Graphics View}-based application.
\image qml-layoutitem-example.png
@@ -169,7 +169,7 @@
\title QGraphicsGridLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout
- This example shows how to use QGraphicsGridLayout to lay out QML items. This is
+ This example shows how to use QGraphicsGridLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
@@ -179,10 +179,10 @@
\title QGraphicsLinearLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout
- This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
+ This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
-
+
\image qml-qgraphicslinearlayout-example.png
*/
/*!
@@ -198,7 +198,7 @@
\o \l{declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout}{QGraphicsLinearLayout}
\endlist
- Also see \l {Integrating QML with existing Qt UI code} for information on using QML
+ Also see \l {Integrating QML Code with Existing Qt UI Code} for information on using QML
in Qt applications that use the Graphics View framework or ordinary QWidget-based views.
*/
@@ -215,7 +215,7 @@
\title C++ Extensions: Image Provider Example
\example declarative/cppextensions/imageprovider
- This examples shows how to use QDeclarativeImageProvider to serve images
+ This examples shows how to use QDeclarativeImageProvider to serve images
to QML image elements.
\image qml-imageprovider-example.png
@@ -232,6 +232,7 @@
/*!
\title Internationalization Example
\example declarative/i18n
+ \ingroup internationalization
This example shows how to enable text translation in QML.
@@ -567,7 +568,7 @@
\example declarative/toys/clocks
This example displays a set of clocks with different times for different cities.
- Each clock is created by combining \l Image elements with \l Rotation transforms
+ Each clock is created by combining \l Image elements with \l Rotation transforms
and \l SpringAnimation behaviors.
\image qml-clocks-example.png
@@ -615,13 +616,6 @@
*/
/*!
- \title Touch Interaction: Gestures Example
- \example declarative/touchinteraction/gestures
-
- This example shows how to use the GestureArea element.
-*/
-
-/*!
\title Touch Interaction: MouseArea Example
\example declarative/touchinteraction/mousearea
diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc
index f2b4f36882..3ee6c9574f 100644
--- a/doc/src/examples/qtscriptcustomclass.qdoc
+++ b/doc/src/examples/qtscriptcustomclass.qdoc
@@ -46,7 +46,7 @@
scripting environment, \c{ByteArray} objects can be constructed like
so:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 0
\c{ByteArray} objects behave similar to normal \c{Array} objects. Every \c{ByteArray} object has
a \c{length} property, that holds the length of the array. If a new value is assigned to the \c{length}
@@ -55,22 +55,22 @@
Use normal array operations to read or write bytes in the array. The following code sets all the
bytes of an array to a certain value:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 1
When assigning a value to an array element, the value is truncated to eight bits:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 2
Like normal \c{Array} objects, if the array index is greater than the current length
of the array, the array is resized accordingly:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 3
Property names that aren't valid array indexes are treated
like normal object properties (again, the same is the case for normal \c{Array} objects);
in other words, it's perfectly fine to do something like this:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 4
The above assignment won't affect the contents of the array, but will rather assign a value
to the object property named "foo".
@@ -78,7 +78,7 @@
\c{ByteArray} objects have a set of methods: chop(), equals(), left(), mid(), toBase64() and so on.
These map directly onto the corresponding methods in QByteArray.
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 5
\section1 ByteArray Class Implementation
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index 94539ad0ec..4df0910f60 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -190,8 +190,8 @@
\snippet examples/statemachine/rogue/movementtransition.h 2
When \c onTransition() is invoked, we know that we have a
- \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, i.e., the event
- is already unwrapped.
+ \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, and can ask \c
+ Window to move the player.
\section1 The Roguelike Tradition
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
index ea380bdcbd..9b4d80ec8a 100644
--- a/doc/src/examples/simpledommodel.qdoc
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -53,7 +53,7 @@
snippet reads the contents of a file into a QDomDocument object and traverses the
document, reading all the plain text that can be found:
- \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.cpp 0
In principle, the functions provided by QDomNode can be used to navigate from any
given starting point in a document to the piece of data requested by another component.
diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc
index 0200c2f847..b557b8b6bd 100644
--- a/doc/src/examples/taskmenuextension.qdoc
+++ b/doc/src/examples/taskmenuextension.qdoc
@@ -139,7 +139,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.pro 0
The task menu extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
index e92bb98aaa..f5f41d72b7 100644
--- a/doc/src/examples/textfinder.qdoc
+++ b/doc/src/examples/textfinder.qdoc
@@ -70,7 +70,7 @@
QtUiTools module library. This is done in the \c{textfinder.pro} file
that contains the following lines:
- \snippet doc/src/snippets/code/doc_src_examples_textfinder.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_textfinder.pro 0
\section1 TextFinder Class Definition
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index 3a77a714df..a93811e890 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -132,12 +132,12 @@
second argument "two-sided" in the appropriate \c tr() calls to the
first pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
and add the second argument "colors" in the appropriate \c tr() calls
for the second pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
Now run \c lupdate and open \c trollprint_pt.ts with \e {Qt Linguist}. You
should now see two changes.
@@ -177,7 +177,7 @@
the translations. This can be achieved by using a \c TRANSLATOR comment
in the source code:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
Try adding these comments to some source files, particularly to
dialog classes, describing the navigation necessary to reach the
@@ -192,7 +192,7 @@
correct. Comments that provide good navigation information can save
them time:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
\section1 Troll Print 1.1
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index c5bc279210..65104bd921 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -199,8 +199,7 @@
\snippet examples/tools/undoframework/commands.cpp 8
- \c undo() removes the item from the scene. We need to update the
- scene as ...(ask Andreas)
+ \c undo() removes the item from the scene.
\snippet examples/tools/undoframework/commands.cpp 9
diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc
index 61a214c23c..8a1700432d 100644
--- a/doc/src/examples/worldtimeclockplugin.qdoc
+++ b/doc/src/examples/worldtimeclockplugin.qdoc
@@ -176,7 +176,7 @@
is searched by \QD. We do this by specifying a target path for the project
and adding it to the list of items to install:
- \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 7639324671..1abeae994d 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -455,6 +455,31 @@
*/
/*!
+ \externalpage https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words
+ \title JavaScript Reserved Words
+*/
+
+/*!
\externalpage http://publicsuffix.org/
\title publicsuffix.org
*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/index.php/Capabilities
+ \title Symbian Capabilities
+*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/
+ \title Forum Nokia Wiki
+*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/index.php/UID_Q&As_(Symbian_Signed)
+ \title UID Q&As (Symbian Signed)
+*/
+
+/*!
+ \externalpage http://www.symbiansigned.com
+ \title Symbian Signed
+*/
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index ecf343d643..35e6a9086f 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -130,7 +130,7 @@
In the application, this resource would be registered with code like this:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_resources.cpp 4
\section2 Compiled-In Resources
@@ -205,7 +205,7 @@
Q_INIT_RESOURCE() with the base name of the \c .qrc file. For
example:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_resources.cpp 5
Similarly, if you must unload a set of resources explicitly
(because a plugin is being unloaded or the resources are not valid
diff --git a/doc/src/frameworks-technologies/accessible.qdoc b/doc/src/frameworks-technologies/accessible.qdoc
index 1d15dbd43f..3f63353162 100644
--- a/doc/src/frameworks-technologies/accessible.qdoc
+++ b/doc/src/frameworks-technologies/accessible.qdoc
@@ -52,12 +52,12 @@
An application does not usually communicate directly with
assistive tools but through an assistive technology, which is a
bridge for exchange of information between the applications and
- the tools. Information about user interface elements, such
- as buttons and scroll bars, is exposed to the assistive technologies.
- Qt supports Microsoft Active Accessibility (MSAA) on Windows and
- Mac OS X Accessibility on Mac OS X.
- On Unix/X11, support is preliminary. The individual technologies
- are abstracted from Qt, and there is only a single interface to
+ the tools. Information about user interface elements, such as
+ buttons and scroll bars, is exposed to the assistive technologies.
+ Qt supports Microsoft Active Accessibility (MSAA) on Windows, Mac
+ OS X Accessibility on Mac OS X, and AT-SPI on Unix/X11. On
+ Unix/X11, support is preliminary. The individual technologies are
+ abstracted from Qt, and there is only a single interface to
consider. We will use MSAA throughout this document when we need
to address technology related issues.
@@ -256,7 +256,7 @@
variable set to 1. For example, this is set in the following way with
the bash shell:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc environment
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp environment
Accessibility features are built into Qt by default when the libraries
are configured and built.
@@ -333,10 +333,16 @@
\section2 QAccessibleWidget Example
Instead of creating a custom widget and implementing an interface
- for it, we will show how accessibility can be implemented for one of
- Qt's standard widgets: QSlider. Making this widget accessible
- demonstrates many of the issues that need to be faced when making
- a custom widget accessible.
+ for it, we will show how accessibility is implemented for one of
+ Qt's standard widgets: QSlider. The accessible interface,
+ QAccessibleSlider, inherits from QAccessibleAbstractSlider, which
+ in turn inherits QAccessibleWidget. You do not need to examine the
+ QAccessibleAbstractSlider class to read this section. If you want
+ to take a look, the code for all of Qt's accessible interfaces are
+ found in src/plugins/accessible/widgets. Here is the
+ QAccessibleSlider's constructor:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 0
The slider is a complex control that functions as a
\l{QAccessible::}{Controller} for its accessible children.
@@ -346,8 +352,6 @@
using a controlling signal, which is a mechanism provided by
QAccessibleWidget. We do this in the constructor:
- \snippet doc/src/snippets/accessibilityslidersnippet.cpp 0
-
The choice of signal shown is not important; the same principles
apply to all signals that are declared in this way. Note that we
use QLatin1String to ensure that the signal name is correctly
@@ -507,10 +511,10 @@
plugin template, and the library containing the plugin must be
placed on a path where Qt searches for accessible plugins.
- We will go through the implementation of \c SliderPlugin, which is an
- accessible plugin that produces interfaces for the
- QAccessibleSlider we implemented in the \l{QAccessibleWidget Example}.
- We start with the \c key() function:
+ We will go through the implementation of \c SliderPlugin, which is
+ an accessible plugin that produces the QAccessibleSlider interface
+ from the \l{QAccessibleWidget Example}. We start with the \c key()
+ function:
\snippet doc/src/snippets/accessibilitypluginsnippet.cpp 0
@@ -521,13 +525,12 @@
\snippet doc/src/snippets/accessibilitypluginsnippet.cpp 1
- We check whether the interface requested is for the QSlider; if it
- is, we create and return an interface for it. Note that \c object
- will always be an instance of \c classname. You must return 0 if
- you do not support the class.
- \l{QAccessible::}{updateAccessibility()} checks with the
- available accessibility plugins until it finds one that does not
- return 0.
+ We check whether the interface requested is for QSlider; if it is,
+ we create and return an interface for it. Note that \c object will
+ always be an instance of \c classname. You must return 0 if you do
+ not support the class. \l{QAccessible::}{updateAccessibility()}
+ checks with the available accessibility plugins until it finds one
+ that does not return 0.
Finally, you need to include macros in the cpp file:
@@ -536,9 +539,9 @@
The Q_EXPORT_PLUGIN2 macro exports the plugin in the \c
SliderPlugin class into the \c acc_sliderplugin library. The first
argument is the name of the plugin library file, excluding the
- file suffix, and the second is the class name. For more information
- on plugins, consult the plugins \l{How to Create Qt
- Plugins}{overview document}.
+ file suffix, and the second is the class name. For more
+ information on plugins, you can consult the plugins \l{How to
+ Create Qt Plugins}{overview document}.
You can omit the first macro unless you want the plugin
to be statically linked with the application.
@@ -555,7 +558,7 @@
\l{QAccessiblePlugin::}{create()} - a QString and a QObject. It
also works the same way. You install the factory with the
\l{QAccessible::}{installFactory()} function. We give an example
- of how to create a factory for the \c SliderPlugin class:
+ of how to create a factory for the \c QAccessibleSlider interface:
\snippet doc/src/snippets/accessibilityfactorysnippet.cpp 0
\dots
diff --git a/doc/src/frameworks-technologies/activeqt-container.qdoc b/doc/src/frameworks-technologies/activeqt-container.qdoc
index 436f3754b9..862408b92a 100644
--- a/doc/src/frameworks-technologies/activeqt-container.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-container.qdoc
@@ -67,7 +67,7 @@
To build Qt applications that can host COM objects and ActiveX controls
link the application against the QAxContainer module by adding
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 0
to your application's \c .pro file.
@@ -128,7 +128,7 @@
want to use, or integrate it into the build system by adding the type
libraries to the \c TYPELIBS variable in your application's \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 1
Note that \l dumpcpp might not be able to expose all APIs in the type
library.
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index 9af2b65367..77cacf8d10 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -60,10 +60,10 @@
An out-of-process executable server is generated from a \c .pro
file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 0
To build an in-process server, use a \c .pro file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 1
The files \c qaxserver.rc and \c qaxserver.def are part of the
framework and can be used from their usual location (specify a
@@ -91,7 +91,7 @@
Additionally you can specify a version number using the \c VERSION
variable, e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 2
The version number specified will be used as the version of the type
library and of the server when registering.
@@ -186,12 +186,12 @@
or any existing QObject subclass. If the class is a subclass of QWidget,
the COM object will be an ActiveX control.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 3
The Q_OBJECT macro is required to provide the meta object information
about the widget to the ActiveQt framework.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 4
Use the Q_CLASSINFO() macro to specify the COM identifiers for the COM
object. \c ClassID and \c InterfaceID are required, while \c EventsID is
@@ -201,7 +201,7 @@
You can specify additional attributes for each of your classes; see
\l{Class Information and Tuning} for details.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 5
Use the Q_PROPERTY() macro to declare properties for the ActiveX control.
@@ -216,7 +216,7 @@
your implementation of QAxFactory::create.
\endfootnote
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 6
The ActiveQt framework will expose properties and public slots as ActiveX
properties and methods, and signals as ActiveX events, and convert between
@@ -428,7 +428,7 @@
To make the properties bindable for the ActiveX client, use multiple
inheritance from the QAxBindable class:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 7
When implementing the property write functions, use the
QAxBindable class's requestPropertyChange() and propertyChanged()
@@ -453,7 +453,7 @@
an implementation of a QAxFactory. The easist way to do this is to use a set
of macros:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 8
This will export \c MyWidget and \c MyWidget2 as COM objects that can be
created by COM clients, and will register \c MySubType as a type that can
@@ -470,7 +470,7 @@
server. Use QAxFactory::isServer() to create and run a standard
application interface, or to prevent a stand-alone execution:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 9
This is however not necessary as ActiveQt provides a default implementation
of a main function. The default implemenation calls QAxFactory::startServer(),
@@ -512,7 +512,7 @@
macro, the QAxFactory subclass had no appropriate constructor.
Provide a public class constructor like
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 10
for your factory class.
@@ -560,7 +560,7 @@
your installer process, resolve the \c DllRegisterServer symbol and
call the function:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 11
\section3 Distributing Servers over the Internet
@@ -766,7 +766,7 @@
own API, and is available in the "Insert Objects" dialog of Microsoft
Office applications.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 15
\section2 Developing Licensed Components
@@ -782,7 +782,7 @@
To mark a Qt class as licensed specify a "LicenseKey" using the
Q_CLASSINFO() macro.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 16
The key is required to be able to create an instance of \c MyLicensedControl
on a machine that is not licensed itself. The licensed developer can now
@@ -805,12 +805,12 @@
Create a new subclass of QAxAggregated and use multiple inheritance
to subclass additional COM interface classes.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 17
Reimplement the QAxAggregated::queryInterface() function to
support the additional COM interfaces.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 18
Since \c ISomeCOMInterface is a subclass of \c IUnknown you will
have to implement the \c QueryInterface(), \c AddRef(), and \c
@@ -820,7 +820,7 @@
returned by the QAxAggregated::controllingUnknown() function,
e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 19
Do not support the \c IUnknown interface itself in your
\l{QAxAggregated::queryInterface()}{queryInterface()}
@@ -833,5 +833,5 @@
QAxBindable::createAggregate() to return a new object of the
QAxAggregated subclass.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 20
*/
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 991588e01c..f28e5dcd3b 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -205,7 +205,7 @@
Here's an example custom data type that meets the requirement of
an assignable data type:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 0
If we don't provide a copy constructor or an assignment operator,
C++ provides a default implementation that performs a
@@ -306,7 +306,7 @@
Here's a typical loop for iterating through all the elements of a
QList<QString> in order and printing them to the console:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 1
It works as follows: The QList to iterate over is passed to the
QListIterator constructor. At that point, the iterator is located
@@ -319,7 +319,7 @@
Here's how to iterate backward in a QList:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 2
The code is symmetric with iterating forward, except that we
start by calling \l{QListIterator::toBack()}{toBack()}
@@ -358,7 +358,7 @@
QMutableListIterator. Here's an example where we remove all
odd numbers from a QList<int> using QMutableListIterator:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 3
The next() call in the loop is made every time. It jumps over the
next item in the list. The
@@ -368,13 +368,13 @@
the iterator, so it is safe to continue using it. This works just
as well when iterating backward:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 4
If we just want to modify the value of an existing item, we can
use \l{QMutableListIterator::setValue()}{setValue()}. In the code
below, we replace any value larger than 128 with 128:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 5
Just like \l{QMutableListIterator::remove()}{remove()},
\l{QMutableListIterator::setValue()}{setValue()} operates on the
@@ -387,7 +387,7 @@
operations, we don't even need
\l{QMutableListIterator::setValue()}{setValue()}:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 6
As mentioned above, QLinkedList's, QVector's, and QSet's iterator
classes have exactly the same API as QList's. We will now turn to
@@ -410,7 +410,7 @@
The following example removes all (capital, country) pairs where
the capital's name ends with "City":
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 7
QMapIterator also provides a key() and a value() function that
operate directly on the iterator and that return the key and
@@ -418,7 +418,7 @@
example, the following code copies the contents of a QMap into a
QHash:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 8
If we want to iterate through all the items with the same
value, we can use \l{QMapIterator::findNext()}{findNext()}
@@ -426,7 +426,7 @@
Here's an example where we remove all the items with a particular
value:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 9
\section2 STL-Style Iterators
@@ -473,7 +473,7 @@
Here's a typical loop for iterating through all the elements of a
QList<QString> in order and converting them to lowercase:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 10
Unlike \l{Java-style iterators}, STL-style iterators point
directly at items. The begin() function of a container returns an
@@ -493,7 +493,7 @@
decrement the iterator \e before we access the item. This
requires a \c while loop:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 11
In the code snippets so far, we used the unary \c * operator to
retrieve the item (of type QString) stored at a certain iterator
@@ -504,7 +504,7 @@
For read-only access, you can use const_iterator, constBegin(),
and constEnd(). For example:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 12
The following table summarizes the STL-style iterators' API:
@@ -536,7 +536,7 @@
value() function to retrieve the value. For example, here's how
we would print all items in a QMap to the console:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 13
Thanks to \l{implicit sharing}, it is very inexpensive for a
function to return a container per value. The Qt API contains
@@ -545,7 +545,7 @@
using an STL iterator, you should always take a copy of the
container and iterate over the copy. For example:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 14
This problem doesn't occur with functions that return a const or
non-const reference to a container.
@@ -567,35 +567,35 @@
statement. For example, here's how to use \c foreach to iterate
over a QLinkedList<QString>:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 15
The \c foreach code is significantly shorter than the equivalent
code that uses iterators:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 16
Unless the data type contains a comma (e.g., \c{QPair<int,
int>}), the variable used for iteration can be defined within the
\c foreach statement:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 17
And like any other C++ loop construct, you can use braces around
the body of a \c foreach loop, and you can use \c break to leave
the loop:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 18
With QMap and QHash, \c foreach accesses the value component of
the (key, value) pairs. If you want to iterate over both the keys
and the values, you can use iterators (which are fastest), or you
can write code like this:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 19
For a multi-valued map:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 20
Qt automatically takes a copy of the container when it enters a
\c foreach loop. If you modify the container as you are
@@ -611,12 +611,12 @@
In addition to \c foreach, Qt also provides a \c forever
pseudo-keyword for infinite loops:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 21
If you're worried about namespace pollution, you can disable
these macros by adding the following line to your \c .pro file:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 22
\section1 Other Container-Like Classes
@@ -736,7 +736,7 @@
Consider the following code, which builds a QString from another
QString:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 23
We build the string \c out dynamically by appending one character
to it at a time. Let's assume that we append 15000 characters to
diff --git a/doc/src/frameworks-technologies/dbus-adaptors.qdoc b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
index 7494f2dd3b..82545dbda3 100644
--- a/doc/src/frameworks-technologies/dbus-adaptors.qdoc
+++ b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
@@ -85,14 +85,14 @@
using an adaptor.
A sample usage of QDBusAbstractAdaptor is as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 0
The code above would create an interface that could be represented more or less in the following
canonical representation:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 1
This adaptor could be used in the application's main function as follows
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 2
Break-down analysis:
\tableofcontents
@@ -100,7 +100,7 @@
\section1 The header
The header of the example is:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 3
The code does the following:
\list
@@ -112,10 +112,10 @@
\section1 The properties
The properties are declared as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 4
And are implemented as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 5
The code declares three properties: one of them is a read-write property called "caption" of
string type. The other two are read-only, also of the string type.
@@ -129,7 +129,7 @@
\section1 The constructor
The constructor:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 6
The constructor does the following:
\list
@@ -149,7 +149,7 @@
\section1 Slots/methods
The public slots in the example (which will be exported as D-Bus methods) are the following:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 7
This snippet of code defines 4 methods with different properties each:
\list 1
@@ -176,7 +176,7 @@
\section1 Signals
The signals in this example are defined as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 8
However, signal definition isn't enough: signals have to be emitted. One simple way of emitting
signals is to connect another signal to them, so that Qt's signal handling system chains them
@@ -187,7 +187,7 @@
When simple signal-to-signal connection isn't enough, one can use a private slot do do some
work. This is what was done for the mainWindowHasFocus signal:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 9
This private slot (which will not be exported as a method via D-Bus) was connected to the
\c focusChanged signal in the adaptor's constructor. It is therefore able to shape the
@@ -291,7 +291,7 @@
\l{QDBusMessage::setDelayedReply()}{QDBusMessage::setDelayedReply(true)}
that the response will be sent later.
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 10
The use of
\l{QDBusConnection::send()}{QDBusConnection::sessionBus().send(data->reply)}
@@ -303,7 +303,7 @@
using the \c QDBusMessage object that was obtained. In our example, the
reply code could be something as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 11
As can be seen in the example, when a delayed reply is in place,
the return value(s) from the slot will be ignored by QtDBus. They
@@ -473,7 +473,7 @@
You can use this macro in your own adaptors by placing it before your method's return value
(which must be "void") in the class declaration, as shown in the example:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 12
Its presence in the method implementation (outside the class declaration) is optional.
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index f6894460d0..1903df57b7 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -95,7 +95,7 @@
descending stacking order (i.e., the first returned item is topmost,
and the last item is bottom-most).
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 0
QGraphicsScene's event propagation architecture schedules scene events
for delivery to items, and also manages propagation between items. If
@@ -126,7 +126,7 @@
enable OpenGL support, you can set a QGLWidget as the viewport by
calling QGraphicsView::setViewport().
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 1
The view receives input events from the keyboard and mouse, and
translates these to scene events (converting the coordinates used
@@ -333,7 +333,7 @@
Here is an example of how to implement zoom and rotate slots in a
subclass of QGraphicsView:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 2
The slots could be connected to \l{QToolButton}{QToolButtons} with
\l{QAbstractButton::autoRepeat}{autoRepeat} enabled.
@@ -353,7 +353,7 @@
a QPainter to either of the rendering functions. This example shows
how to print the whole scene into a full page, using QPrinter.
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 3
The difference between the scene and view rendering functions is that
one operates in scene coordinates, and the other in view coordinates.
@@ -364,7 +364,7 @@
is to render the exact contents of the viewport using the provided
painter.
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 4
When the source and target areas' sizes do not match, the source
contents are stretched to fit into the target area. By passing a
@@ -390,7 +390,7 @@
so in mousePressEvent() or mouseMoveEvent(), you can get the
originating widget pointer from the event. For example:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 5
To intercept drag and drop events for the scene, you reimplement
QGraphicsScene::dragEnterEvent() and whichever event handlers your
@@ -449,7 +449,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 6
\section2 Item Groups
diff --git a/doc/src/frameworks-technologies/implicit-sharing.qdoc b/doc/src/frameworks-technologies/implicit-sharing.qdoc
index 8938d9ef53..46567e9432 100644
--- a/doc/src/frameworks-technologies/implicit-sharing.qdoc
+++ b/doc/src/frameworks-technologies/implicit-sharing.qdoc
@@ -109,7 +109,7 @@
data in all member functions that change the internal data.
Code fragment:
- \snippet doc/src/snippets/code/doc_src_groups.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_groups.cpp 0
\section1 List of Classes
@@ -124,7 +124,7 @@
concern for the copying overhead.
Example:
- \snippet doc/src/snippets/code/doc_src_groups.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_groups.cpp 1
In this example, \c p1 and \c p2 share data until QPainter::begin()
is called for \c p2, because painting a pixmap will modify it.
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 92067b988b..58b51e5660 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -32,7 +32,7 @@
/*!
\page model-view-programming.html
- \ingroup qt-basic-concepts
+ \ingroup qt-basic-concepts
\title Model/View Programming
\brief A guide to Qt's extensible model/view architecture.
@@ -328,7 +328,7 @@
contain a pointer to the model that created them, and this prevents
confusion when working with more than one model.
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 0
Model indexes provide \e temporary references to pieces of information, and
can be used to retrieve or modify data via the model. Since models may
@@ -355,7 +355,7 @@
item by specifying its row and column numbers to the model, and we receive
an index that represents the item:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 1
Models that provide interfaces to simple, single level data structures like
lists and tables do not need any other information to be provided but, as
@@ -371,7 +371,7 @@
index that refers to an item of data by passing the relevant row and
column numbers to the model.
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 2
Top level items in a model are always referenced by specifying
\c QModelIndex() as their parent item. This is discussed in the next
@@ -392,7 +392,7 @@
about the item's parent. Outside the model, the only way to refer to an
item is through a model index, so a parent model index must also be given:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 3
\table
\row \i \inlineimage modelview-treemodel.png
@@ -403,12 +403,12 @@
Items "A" and "C" are represented as top-level siblings in the model:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 4
Item "A" has a number of children. A model index for item "B" is
obtained with the following code:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 5
\endtable
\section3 Item roles
@@ -423,7 +423,7 @@
corresponding to the item, and by specifying a role to obtain the type
of data we want:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 6
\table
\row \i \inlineimage modelview-roles.png
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 1456eae6f3..9eb56ea0f1 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -165,7 +165,7 @@
The \c .pro file for a project needs the following line to be added:
- \snippet doc/src/snippets/code/doc_src_phonon.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_phonon.pro 0
Phonon comes with several widgets that provide functionality
commonly associated with multimedia players - notably SeekSlider
diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc
index b332d57aad..15b154753a 100644
--- a/doc/src/frameworks-technologies/plugins-howto.qdoc
+++ b/doc/src/frameworks-technologies/plugins-howto.qdoc
@@ -109,12 +109,12 @@
straightforward, here is the class definition (\c
mystyleplugin.h):
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 0
Ensure that the class implementation is located in a \c .cpp file
(including the class definition):
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 1
(Note that QStylePlugin is case insensitive, and the lower-case
version of the key is used in our
@@ -127,7 +127,7 @@
you might want to set a style explicitly in code. To apply a
style, use code like this:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 2
Some plugin classes require additional functions to be
implemented. See the class documentation for details of the
@@ -284,12 +284,12 @@
the required plugins to your build using \c QTPLUGIN.
For example, in your \c main.cpp:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 4
In the \c .pro file for your application, you need the following
entry:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.pro 5
It is also possible to create your own static plugins, by
following these steps:
diff --git a/doc/src/frameworks-technologies/qthelp.qdoc b/doc/src/frameworks-technologies/qthelp.qdoc
index 42bc482987..f4d75b693e 100644
--- a/doc/src/frameworks-technologies/qthelp.qdoc
+++ b/doc/src/frameworks-technologies/qthelp.qdoc
@@ -218,7 +218,7 @@
we get the actual help contents by calling fileData() and display
the document to the user.
- \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qthelp.cpp 6
For further information on how to use the API, have a look at
the QHelpEngine class reference.
diff --git a/doc/src/frameworks-technologies/richtext.qdoc b/doc/src/frameworks-technologies/richtext.qdoc
index 089f84de2c..313cf460f9 100644
--- a/doc/src/frameworks-technologies/richtext.qdoc
+++ b/doc/src/frameworks-technologies/richtext.qdoc
@@ -145,11 +145,11 @@
Although QTextEdit makes it easy to display and edit rich text, documents
can also be used independently of any editor widget, for example:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 0
Alternatively, they can be extracted from an existing editor:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 1
This flexibility enables applications to handle multiple rich text
documents without the overhead of multiple editor widgets, or requiring
@@ -728,24 +728,24 @@
A text editor widget can be constructed and used to display HTML in the
following way:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 2
By default, the text editor contains a document with a root frame, inside
which is an empty text block. This document can be obtained so that it can
be modified directly by the application:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 3
The text editor's cursor may also be used to edit a document:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 4
Although a document can be edited using many cursors at once, a QTextEdit
only displays a single cursor at a time. Therefore, if we want to update the
editor to display a particular cursor or its selection, we need to set the
editor's cursor after we have modified the document:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 5
\section1 Selecting Text
@@ -833,7 +833,7 @@
We give an example of the latter technique from the list. We assume that
the text edit is visible.
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 6
\omit
Ideas for other sections:
diff --git a/doc/src/frameworks-technologies/unicode.qdoc b/doc/src/frameworks-technologies/unicode.qdoc
index b4a9347a78..d2a6500276 100644
--- a/doc/src/frameworks-technologies/unicode.qdoc
+++ b/doc/src/frameworks-technologies/unicode.qdoc
@@ -125,12 +125,12 @@
QString provides implicit casting from \c{const char *}
so that things like
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 0
will work. There is also a function, QObject::tr(), that provides
translation support, like this:
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 1
QObject::tr() maps from \c{const char *} to a Unicode string, and
uses installable QTranslator objects to do the mapping.
@@ -151,11 +151,11 @@
fast functions for mapping to and from them. For example, to open an
application's icon one might do this:
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 2
or
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 3
Regarding output, Qt will do a best-effort conversion from
Unicode to whatever encoding the system and fonts provide.
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 48a5fca6e3..9366259b6b 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -39,7 +39,7 @@
\l{Qt Examples} and are used to highlight certain features of
Qt.
- \table
+ \table
\header
\o {2,1} Getting an Overview
\row
@@ -54,6 +54,17 @@
If you are new to Qt, and want to start developing applications,
you should probably start by going through the \l{Tutorials}.
+ \keyword qt-mobile-demos
+ \section1 Mobile Applications
+ These are demonstrations of some of the capabilities of \l{Qt Quick} and
+ \l{external: Qt Mobility Manual}{Mobility} to create feature rich mobile
+ applications.
+ \list
+ \o \l{Guitar Tuner Example}{Guitar Tuner} - a guitar tuner made with a QML frontend and a Mobility based backend
+ \o \l{Quick Hit Demo}{Quick Hit} - a game that uses multimedia and Qt Quick
+ \o \l{Qt Bubble Level Example}{Qt Bubble Level} - a game that utilizes hardware sensors for effects
+ \o \l{QCamera Example}{QCamera} - a camera application that accesses mobile contacts and networking
+ \endlist
\section1 Painting
\list
@@ -105,19 +116,19 @@
\list
\o \l{demos/mainwindow}{Main Window} shows Qt's extensive support for main window
features, such as tool bars, dock windows, and menus.
- \o \l{demos/macmainwindow}{Mac Main Window} shows how to create main window applications that has
+ \o \l{demos/macmainwindow}{Mac Main Window} shows how to create main window applications that has
the same appearance as other Mac OS X applications.
\endlist
\section1 Graphics View
\list
- \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to
- efficiently display a large number of individual graphical items on
- a scrolling canvas and highlighting features including rotation,
+ \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to
+ efficiently display a large number of individual graphical items on
+ a scrolling canvas and highlighting features including rotation,
zooming, level of detail control, and item selection.
- \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's
- \e{Widgets on the Canvas} feature by embedding several
+ \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's
+ \e{Widgets on the Canvas} feature by embedding several
fully-functional dialogs in a scene.
\o \l{demos/boxes}{Boxes} showcases Qt's OpenGL support and the
integration with the \l{Graphics View Framework}.
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 296e032944..9a8fcaaec0 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -36,7 +36,8 @@
You can run the examples from the \l{Examples and Demos Launcher}
application (except see \l{QML Examples and Demos} {QML Examples}
- for special instructions for running those examples).
+ for special instructions for running those examples). In addition,
+ Qt Creator can directly run these examples through the Welcome Page.
The examples are listed below by functional area. Each example
listed in a particular functional area is meant to illustrate how
@@ -56,8 +57,14 @@
These examples are provided under the terms of the
\l{New and Modified BSD Licenses}{Modified BSD License}.
+ \section1 Qt Quick Example Code
+ The \l{QML Examples and Demos} site has a dedicated page for QML examples.
- \section1 Examples by Functional Area
+ \section1 Qt Mobility Example Code
+ The \l{external: Qt Mobility Examples}{Qt Mobility Examples} page lists
+ examples that show how the Qt Mobility APIs might be used.
+
+ \section1 Qt Examples by Module or Technology
\generatelist{related}
*/
@@ -697,6 +704,7 @@
/*!
\page examples-linguist.html
\ingroup all-examples
+ \ingroup internationalization
\title Qt Linguist Examples
\brief Using Qt Linguist to internationalize your Qt application.
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index ccb97712d5..8054fc8af9 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -631,7 +631,7 @@
Now that we have our text editor layout, we may now implement the text editor
functionalities in C++. Using QML with C++ enables us to create our application
logic using Qt. We can create a QML context in a C++ application using the
- \l {Using QML in C++ Applications}{Qt's Declarative} classes and display the QML
+ \l {Using QML Bindings in C++ Applications}{Qt's Declarative} classes and display the QML
elements using a Graphics Scene. Alternatively, we can export our C++ code into
a plugin that the \l {QML Viewer}{qmlviewer} tool can read. For our application,
we shall implement the load and save functions in C++ and export it as a plugin.
diff --git a/doc/src/getting-started/gettingstartedqt.qdoc b/doc/src/getting-started/gettingstartedqt.qdoc
index 2800be0913..18f85f1e1b 100644
--- a/doc/src/getting-started/gettingstartedqt.qdoc
+++ b/doc/src/getting-started/gettingstartedqt.qdoc
@@ -105,12 +105,13 @@
This will leave an executable in the \c part1 directory (note that
on Windows, you may have to use \c nmake instead of \c make. Also,
- the executable will be placed in part1/debug or part1/release). \c
- qmake is Qt's build tool, which takes a configuration file. \c
- qmake generates this for us when given the \c{-project} argument.
- Given the configuration file (suffixed .pro), \c qmake produces a
- \c make file that will build the program for you. We will look
- into writing our own \c .pro files later.
+ the executable will be placed in part1\\debug or part1\\release
+ (these directories are created when you run \c make). \c qmake is
+ Qt's build tool, which takes a configuration file. \c qmake
+ generates this for us when given the \c{-project} argument. Given
+ the configuration file (suffixed .pro), \c qmake produces a \c
+ make file that will build the program for you. We will look into
+ writing our own \c .pro files later.
\section2 Learn More
@@ -245,28 +246,28 @@
parameter types and invoke it.
Line 13 declares the slot \c quit(). This is easy using the \c
- slots macro. The \c quit() slot can now be connected to signals
- with a matching signature (any signal that takes no parameters).
+ slots macro. The \c quit() slot can now be connected to signals.
+ We will do that later.
Instead of setting up the GUI and connecting the slot in the \c
main() function, we now use \c{Notepad}'s constructor.
\code
- Notepad::Notepad()
- {
- textEdit = new QTextEdit;
- quitButton = new QPushButton(tr("Quit"));
-
- connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
-
- QVBoxLayout *layout = new QVBoxLayout;
- layout->addWidget(textEdit);
- layout->addWidget(quitButton);
-
- setLayout(layout);
-
- setWindowTitle(tr("Notepad"));
- }
+20 Notepad::Notepad()
+21 {
+22 textEdit = new QTextEdit;
+23 quitButton = new QPushButton(tr("Quit"));
+24
+25 connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
+26
+27 QVBoxLayout *layout = new QVBoxLayout;
+28 layout->addWidget(textEdit);
+29 layout->addWidget(quitButton);
+30
+31 setLayout(layout);
+32
+33 setWindowTitle(tr("Notepad"));
+34 }
\endcode
As you saw in the class definition, we use pointers to our \l
@@ -277,7 +278,9 @@
visible strings. This function is necessary when you want to
provide your application in more than one language (e.g. English
and Chinese). We will not go into details here, but you can follow
- the \c {Qt Linguist} link from the learn more table.
+ the \c {Qt Linguist} link from the learn more table. We will not
+ look at the implementation of \c quit() slot and the \c main()
+ function, but you can check out the source code if you want to.
\section2 Learn More
@@ -305,9 +308,9 @@
using \c qmake's \c -project option.
\code
- HEADERS = notepad.h
- SOURCES = notepad.cpp \
- main.cpp
+ 1 HEADERS = notepad.h
+ 2 SOURCES = notepad.cpp \
+ 3 main.cpp
\endcode
The following shell commands build the example.
@@ -330,29 +333,29 @@
Let us look at the new \c Notepad class definition.
\code
- #include <QtGui>
-
- class Notepad : public QMainWindow
- {
- Q_OBJECT
-
- public:
- Notepad();
-
- private slots:
- void open();
- void save();
- void quit();
-
- private:
- QTextEdit *textEdit;
-
- QAction *openAction;
- QAction *saveAction;
- QAction *exitAction;
-
- QMenu *fileMenu;
- };
+ 2 #include <QtGui>
+ 3
+ 4 class Notepad : public QMainWindow
+ 5 {
+ 6 Q_OBJECT
+ 7
+ 8 public:
+ 9 Notepad();
+10
+11 private slots:
+12 void open();
+13 void save();
+14 void quit();
+15
+16 private:
+17 QTextEdit *textEdit;
+18
+19 QAction *openAction;
+20 QAction *saveAction;
+21 QAction *exitAction;
+22
+23 QMenu *fileMenu;
+24 };
\endcode
We include two more slots that can save and open a document. We
@@ -369,27 +372,27 @@
GUI.
\code
- Notepad::Notepad()
- {
- saveAction = new QAction(tr("&Open"), this);
- saveAction = new QAction(tr("&Save"), this);
- exitAction = new QAction(tr("E&xit"), this);
-
- connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
- connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
-
- fileMenu = menuBar()->addMenu(tr("&File"));
- fileMenu->addAction(openAction);
- fileMenu->addAction(saveAction);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAction);
-
- textEdit = new QTextEdit;
- setCentralWidget(textEdit);
-
- setWindowTitle(tr("Notepad"));
- }
+25 Notepad::Notepad()
+26 {
+27 saveAction = new QAction(tr("&Open"), this);
+28 saveAction = new QAction(tr("&Save"), this);
+29 exitAction = new QAction(tr("E&xit"), this);
+30
+31 connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
+32 connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
+33 connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+34
+35 fileMenu = menuBar()->addMenu(tr("&File"));
+36 fileMenu->addAction(openAction);
+37 fileMenu->addAction(saveAction);
+38 fileMenu->addSeparator();
+39 fileMenu->addAction(exitAction);
+40
+41 textEdit = new QTextEdit;
+42 setCentralWidget(textEdit);
+43
+44 setWindowTitle(tr("Notepad"));
+45 }
\endcode
\l{QAction}s are created with the text that should appear on the
@@ -426,28 +429,29 @@
We will start with the \c open() slot:
\code
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
- tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
-
- if (fileName != "") {
- QFile file(fileName);
- if (!file.open(QIODevice::ReadOnly)) {
- QMessageBox::critical(this, tr("Error"),
- tr("Could not open file"));
- return;
- }
- QString contents = file.readAll().constData();
- textEdit->setPlainText(contents);
- file.close();
- }
+48 void Notepad::open()
+49 {
+50 QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
+51 tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+52
+53 if (fileName != "") {
+54 QFile file(fileName);
+55 if (!file.open(QIODevice::ReadOnly)) {
+56 QMessageBox::critical(this, tr("Error"), tr("Could not open file"));
+57 return;
+58 }
+59 QTextStream in(&file);
+60 textEdit->setText(in.readAll());
+61 file.close();
+62 }
+63 }
\endcode
The first step is asking the user for the name of the file to
open. Qt comes with QFileDialog, which is a dialog from which the
user can select a file. The image above shows the dialog on
Kubuntu. The static \l{QFileDialog::}{getOpenFileName()} function
- displays a modal file dialog, and does not return until the user
- has selected a file. It returns the file path of the file
+ displays a modal file dialog. It returns the file path of the file
selected, or an empty string if the user canceled the dialog.
If we have a file name, we try to open the file with
@@ -458,38 +462,38 @@
message (see the QMessageBox class description for further
details).
- Actually reading in the data is trivial using the
- \l{QIODevice::}{readAll()} function, which returns all data in the
- file in a QByteArray. The \l{QByteArray::}{constData()} returns all
- data in the array as a const char*, which QString has a
- constructor for. The contents can then be displayed in the text
+ Actually reading in the data is trivial using the QTextStream
+ class, which wraps the QFile object. The
+ \l{QTextStream::}{readAll()} function returns the contents of the
+ file as a QString. The contents can then be displayed in the text
edit. We then \l{QIODevice::}{close()} the file to return the file
descriptor back to the operating system.
Now, let us move on to the the \c save() slot.
\code
- QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "",
- tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
-
- if (fileName != "") {
- QFile file(fileName);
- if (!file.open(QIODevice::WriteOnly)) {
- // error message
- } else {
- QTextStream stream(&file);
- stream << textEdit->toPlainText();
- stream.flush();
- file.close();
- }
- }
+65 void Notepad::save()
+66 {
+67 QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "",
+68 tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+69
+70 if (fileName != "") {
+71 QFile file(fileName);
+72 if (!file.open(QIODevice::WriteOnly)) {
+73 // error message
+74 } else {
+75 QTextStream stream(&file);
+76 stream << textEdit->toPlainText();
+77 stream.flush();
+78 file.close();
+79 }
+80 }
+81 }
\endcode
When we write the contents of the text edit to the file, we use
- the QTextStream class, which wraps the QFile object. The text
- stream can write QStrings directly to the file; QFile only accepts
- raw data (char*) with the \l{QIODevice::}{write()} functions of
- QIODevice.
+ the QTextStream class again. QTextStream can also write
+ \l{QString}s to the file with the << operator.
\section2 Learn More
diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc
index 239c8a114d..8d9508b1b2 100644
--- a/doc/src/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/getting-started/how-to-learn-qt.qdoc
@@ -51,7 +51,7 @@
key overviews to deepen your understanding of Qt: The Qt \l{Object
Model} and \l{Signals and Slots}.
- \div{float-left}
+ \div {class="float-left"}
\inlineimage qtdemo-small.png
\enddiv
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 6d0256e88e..26ccf88c2f 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -1009,78 +1009,113 @@ We hope you will enjoy using Qt.
\image x11_dependencies.png Qt for X11 Dependencies
- \raw HTML
- <style type="text/css" id="colorstyles">
- #QtGuiColor { background-color: #98fd00; color: black }
- #QtCoreColor { background-color: #9c9cff; color: black }
- #DefaultColor { background-color: #f6f6dc; color: black }
- #FreetypeColor { background-color: #e6e6fa; color: black }
- #GLColor { background-color: #ffc0cb; color: black }
- #PthreadColor { background-color: #bdb76b; color: black }
- #OptionalColor { background-color: #cae1ff; color: black }
- #SMColor { background-color: #c2fafa; color: black }
- #MiscColor { background-color: #f0f9ff; color: black }
- #GlibColor { background-color: #b3b3b3; color: black }
- </style>
- \endraw
-
The QtGui module and the QtCore module, which provides the non-GUI features required
by QtGui, depend on the libraries described in the following table. To build
Qt from its source code, you will also need to install the development
packages for these libraries for your system.
- \raw HTML
- <table class="generic">
- <thead><tr class="qt-style topAlign"><th>Name</th><th>Library</th><th>Notes</th><th>Configuration options</th><th>Minimum working version
- <tr id="OptionalColor">
- <td> XRender </td><td> libXrender </td><td> X Rendering Extension; used for anti-aliasing</td>
- <td><tt>-xrender</tt> or auto-detected</td><td>0.9.0</td>
- </tr><tr id="OptionalColor">
- <td> Xrandr </td><td> libXrandr </td><td> X Resize and Rotate Extension</td>
- <td><tt>-xrandr</tt> or auto-detected</td><td>1.0.2</td>
- </tr><tr id="OptionalColor">
- <td> Xcursor </td><td> libXcursor </td><td> X Cursor Extension</td>
- <td><tt>-xcursor</tt> or auto-detected</td><td>1.1.4</td>
- </tr><tr id="OptionalColor">
- <td> Xfixes </td><td> libXfixes </td><td> X Fixes Extension</td>
- <td><tt>-xfixes</tt> or auto-detected</td><td>3.0.0</td>
- </tr><tr id="OptionalColor">
- <td> Xinerama </td><td> libXinerama </td><td> Multi-head support</td>
- <td><tt>-xinerama</tt> or auto-detected</td><td>1.1.0</td>
-
- </tr><tr id="OptionalColor">
- <td> Fontconfig </td><td> libfontconfig </td><td> Font customization and configuration</td>
- <td><tt>-fontconfig</tt> or auto-detected</td><td>2.1</td>
- </tr><tr id="OptionalColor">
- <td> FreeType </td><td> libfreetype </td><td> Font engine</td>
- <td></td><td>2.1.3</td>
-
- </tr><tr id="DefaultColor">
- <td> Xi </td><td> libXi </td><td> X11 Input Extensions</td>
- <td><tt>-xinput</tt> or auto-detected</td><td>1.3.0</td>
- </tr><tr id="DefaultColor">
- <td> Xt </td><td> libXt </td><td> Xt Intrinsics</td><td></td><td>0.99</td>
- </tr><tr id="DefaultColor">
- <td> Xext </td><td> libXext </td><td> X Extensions</td><td></td><td>6.4.3</td>
- </tr><tr id="DefaultColor">
- <td> X11 </td><td> libX11 </td><td> X11 Client-Side Library</td><td></td><td>6.2.1</td>
-
- </tr><tr id="SMColor">
- <td> SM </td><td> libSM </td><td> X Session Management</td>
- <td><tt>-sm</tt> or auto-detected</td><td>6.0.4</td>
- </tr><tr id="SMColor">
- <td> ICE </td><td> libICE </td><td> Inter-Client Exchange</td>
- <td><tt>-sm</tt> or auto-detected</td><td>6.3.5</td>
-
- </tr><tr id="GlibColor">
- <td> glib </td><td> libglib-2.0 </td><td> Common event loop handling</td>
- <td><tt>-glib</tt> or auto-detected</td><td>2.8.3</td>
- </tr><tr id="PthreadColor">
- <td> pthread </td><td> libpthread </td><td> Multithreading</td>
- <td></td><td>2.3.5</td>
- </tr></th></tr></thead>
- </table>
- \endraw
+ \table 100%
+ \header
+ \o Name
+ \o Library
+ \o Notes
+ \o Configuration options
+ \o Minimum working version
+ \row {id="OptionalColor"}
+ \o XRender
+ \o libXrender
+ \o X Rendering Extension; used for anti-aliasing
+ \o \tt{-xrender} or auto-detected
+ \o 0.9.0
+ \row {id="OptionalColor"}
+ \o Xrandr
+ \o libXrandr
+ \o X Resize and Rotate Extension
+ \o \tt{-xrandr} or auto-detected
+ \o 1.0.2
+ \row {id="OptionalColor"}
+ \o Xcursor
+ \o libXcursor
+ \o X Cursor Extension
+ \o \tt{-xcursor} or auto-detected
+ \o 1.1.4
+ \row {id="OptionalColor"}
+ \o Xfixes
+ \o libXfixes
+ \o X Fixes Extension
+ \o \tt{-xfixes} or auto-detected
+ \o 3.0.0
+ \row {id="OptionalColor"}
+ \o Xinerama
+ \o libXinerama
+ \o Multi-head support
+ \o \tt{-xinerama} or auto-detected
+ \o 1.1.0
+
+ \row {id="OptionalColor"}
+ \o Fontconfig
+ \o libfontconfig
+ \o Font customization and configuration
+ \o \tt{-fontconfig} or auto-detected
+ \o 2.1
+ \row {id="OptionalColor"}
+ \o FreeType
+ \o libfreetype
+ \o Font engine
+ \o
+ \o 2.1.3
+
+ \row {id="DefaultColor"}
+ \o Xi
+ \o libXi
+ \o X11 Input Extensions
+ \o \tt{-xinput} or auto-detected
+ \o 1.3.0
+ \row {id="DefaultColor"}
+ \o Xt
+ \o libXt
+ \o Xt Intrinsics
+ \o
+ \o 0.99
+ \row {id="DefaultColor"}
+ \o Xext
+ \o libXext
+ \o X Extensions
+ \o
+ \o 6.4.3
+ \row {id="DefaultColor"}
+ \o X11
+ \o libX11
+ \o X11 Client-Side Library
+ \o
+ \o 6.2.1
+
+ \row {id="SMColor"}
+ \o SM
+ \o libSM
+ \o X Session Management
+ \o \tt{-sm} or auto-detected
+ \o 6.0.4
+ \row {id="SMColor"}
+ \o ICE
+ \o libICE
+ \o Inter-Client Exchange
+ \o \tt{-sm} or auto-detected
+ \o 6.3.5
+
+ \row {id="GlibColor"}
+ \o glib
+ \o libglib-2.0
+ \o Common event loop handling
+ \o \tt{-glib} or auto-detected
+ \o 2.8.3
+ \row {id="PthreadColor"}
+ \o pthread
+ \o libpthread
+ \o Multithreading
+ \o
+ \o 2.3.5
+ \endtable
\note You must compile with XRender support to get alpha transparency
support for pixmaps and images.
@@ -1142,7 +1177,7 @@ We hope you will enjoy using Qt.
\brief Setting up the Windows CE environment for Qt.
\previouspage General Qt Requirements
- Qt is known to work with Visual Studio 2005/2008 and the following SDKs for
+ Qt is known to work with Visual Studio 2005/2008/2010 and the following SDKs for
Windows CE development on Windows XP and Windows Vista:
\list
@@ -1180,14 +1215,37 @@ We hope you will enjoy using Qt.
\endlist
\endtable
-
Device manufacturers may prefer to make their own customized version of
Windows CE using Platform Builder. In order for Qt for Windows CE to
support a custom SDK, a build specification needs to be created. More
information on Windows CE Customization can be found
\l{Windows CE - Working with Custom SDKs}{here}.
- \sa {Known Issues}
+ \section3 Requirements
+ \list
+ \o Development environment:
+ \list
+ \o Microsoft Visual Studio 2005 (Standard Edition) or higher
+ \o ActivePerl
+ \endlist
+ \o Footprint
+ \list
+ \o Lean configuration - 4.8 MB
+ \o Full configuration - 8.4 MB
+ \endlist
+ \o Operating Systems
+ \list
+ \o Windows CE 5 or higher
+ \o Windows Mobile 5 or higher
+ \endlist
+ \o Hardware Platform
+ \list
+ \o Supported on ARM, x86
+ \o (Compiles on SH4 and MIPS)
+ \endlist
+ \endlist
+
+ \sa {Known Issues}
*/
/*!
@@ -1332,7 +1390,7 @@ We hope you will enjoy using Qt.
load those that have a matching <key>. \o
\row \o \c {-release } \o Compile and link Qt with debugging turned off. \o
\row \o \c {-debug } \o Compile and link Qt with debugging turned on.
- \o Defualt value.
+ \o Default value.
\row \o \c {-debug-and-release} \o Compile and link two Qt libraries,
with and without debugging turned on. \o This option denotes a default
value and needs to be evaluated. If the evaluation succeeds, the
@@ -1343,28 +1401,28 @@ We hope you will enjoy using Qt.
of Qt. \o
\row \o \c {-developer-build} \o Compile and link Qt with Qt developer
options including auto-tests exporting) \o
- \row \o \c {-shared} \o Create and use shared Qt libraries. \o Defualt
+ \row \o \c {-shared} \o Create and use shared Qt libraries. \o Default
value.
\row \o \c {-static} \o Create and use static Qt libraries. \o
\row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release
builds only.
- \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Defualt
+ \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Default
value.
\row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for
- all project files. \o Defualt value.
+ all project files. \o Default value.
\row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for
library and subdirectory targets. \o All other Makefiles are created as
wrappers which will in turn run qmake.
\row \o \c {-no-exceptions} \o Disable exceptions on platforms that support
it. \o
\row \o \c {-exceptions} \o Enable exceptions on platforms that support it.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-accessibility} \o Do not compile Windows Active
Accessibility support. \o
\row \o \c {-accessibility} \o Compile Windows Active Accessibility
- support. \o Defualt value.
+ support. \o Default value.
\row \o \c {-no-stl} \o Do not compile STL support. \o
- \row \o \c {-stl} \o Compile STL support. \o Defualt value.
+ \row \o \c {-stl} \o Compile STL support. \o Default value.
\row \o \c {-no-sql-<driver>} \o Disable SQL <driver> entirely, by default
none are turned on. \o
\row \o \c {-qt-sql-<driver>} \o Enable a SQL <driver> in the Qt Library.
@@ -1380,14 +1438,14 @@ We hope you will enjoy using Qt.
version. \o Available values for <api>: desktop - Enable support for
Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common
Profile, es2 - Enable support for OpenGL ES 2.0.
- \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Defualt value.
+ \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Default value.
\row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL
support, typically supplied by an OpenGL or other graphics
implementation.
\row \o \c {-platform <spec> } \o The operating system and compiler you
are building on. \o The default value is %QMAKESPEC%.
\row \o \c {-xplatform <spec> } \o The operating system and compiler you
- are cross compiling to. \o See the README file for a list of supported
+ are cross compiling for. \o See the README file for a list of supported
operating systems and compilers.
\row \o \c {-qtnamespace <namespace>} \o Wraps all Qt library code in
'namespace name {..} \o
@@ -1399,7 +1457,7 @@ We hope you will enjoy using Qt.
\row \o \c {-L <librarypath>} \o Add an explicit library path. \o
\row \o \c {-l <libraryname>} \o Add an explicit library name, residing
in a librarypath. \o
- \row \o \c {-graphicssystem <sys>} \o Specify which graphicssystem should
+ \row \o \c {-graphicssystem <sys>} \o Specify which graphics system should
be used. \o Available values for <sys>: * raster - Software rasterizer,
opengl - Using OpenGL acceleration, experimental!, openvg - Using
OpenVG acceleration, experimental!
@@ -1428,7 +1486,7 @@ We hope you will enjoy using Qt.
succeeds, the feature is included.
\row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o
\row \o \c {-system-libmng} \o Use libmng from the operating system.
- \o See See http://www.libmng.com
+ \o See http://www.libmng.com
\row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option
denotes a default value and needs to be evaluated. If the evaluation
succeeds, the feature is included.
@@ -1450,10 +1508,10 @@ We hope you will enjoy using Qt.
\header \o Option \o Description \o Note
\row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o
\row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc".
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o
\row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform
- "win32-msvc.net". \o Defualt value.
+ "win32-msvc.net". \o Default value.
\row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution
commands to custom build steps. \o
\row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands
@@ -1464,14 +1522,14 @@ We hope you will enjoy using Qt.
If the evaluation succeeds, the feature is included.
\row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o
\row \o \c {-plugin-manifests} \o Embed manifests in plugins.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-qmake} \o Do not compile qmake. \o
- \row \o \c {-qmake} \o Compile qmake. \o Defualt value
+ \row \o \c {-qmake} \o Compile qmake. \o Default value
\row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This
will override -no-fast if specified. \o
- \row \o \c {-process} \o Generate Makefiles/Project files. \o Defualt value.
+ \row \o \c {-process} \o Generate Makefiles/Project files. \o Default value.
\row \o \c {-no-rtti} \o Do not compile runtime type information. \o
- \row \o \c {-rtti} \o Compile runtime type information. \o Defualt value.
+ \row \o \c {-rtti} \o Compile runtime type information. \o Default value.
\row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o
\row \o \c {-mmx} \o Compile with use of MMX instructions \o This option
denotes a default value and needs to be evaluated. If the evaluation
@@ -1506,9 +1564,9 @@ We hope you will enjoy using Qt.
\row \o \c {-no-phonon-backend} \o Do not compile the platform-specific
Phonon backend-plugin \o
\row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon
- backend-plugin \o Defualt value.
+ backend-plugin \o Default value.
\row \o \c {-no-multimedia} \o Do not compile the multimedia module \o
- \row \o \c {-multimedia} \o Compile in multimedia module \o Defualt value.
+ \row \o \c {-multimedia} \o Compile in multimedia module \o Default value.
\row \o \c {-no-audio-backend} \o Do not compile in the platform audio
backend into QtMultimedia \o
\row \o \c {-audio-backend} \o Compile in the platform audio backend into
@@ -1536,7 +1594,7 @@ We hope you will enjoy using Qt.
\row \o \c {-no-declarative-debug} \o Do not build the declarative debugging
support \o
\row \o \c {-declarative-debug} \o Build the declarative debugging support
- \o Defualt value.
+ \o Default value.
\row \o \c {-arch <arch>} \o Specify an architecture. \o Available values for
<arch>: * windows, windowsce, symbian, boundschecker, generic.
\row \o \c {-no-style-<style>} \o Disable <style> entirely. \o
@@ -1547,9 +1605,9 @@ We hope you will enjoy using Qt.
\row \o \c {-no-native-gestures} \o Do not use native gestures on Windows 7.
\o
\row \o \c {-native-gestures} \o Use native gestures on Windows 7.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-mp} \o Do not use multiple processors for compiling with MSVC
- \o Defualt value.
+ \o Default value.
\row \o \c {-mp} \o Use multiple processors for compiling with MSVC (-MP) \o
\row \o \c {-loadconfig <config>} \o Run configure with the parameters from file
configure_<config>.cache. \o
@@ -1566,7 +1624,7 @@ We hope you will enjoy using Qt.
for Qt for Windows CE on Arm only. This option denotes a default value and
needs to be evaluated. If the evaluation succeeds, the feature is included.
\row \o \c {-no-crt} \o Do not add the C runtime to default deployment rules.
- \o Defualt value.
+ \o Default value.
\row \o \c {-qt-crt} \o Qt identifies C runtime during project generation \o
\row \o \c {-crt <path>} \o Specify path to C runtime used for project
generation. \o
@@ -1576,20 +1634,20 @@ We hope you will enjoy using Qt.
succeeds, the feature is included.
\row \o \c {-signature <file>} \o Use file for signing the target project \o
\row \o \c {-phonon-wince-ds9} \o Enable Phonon Direct Show 9 backend for
- Windows CE \o Defualt value
+ Windows CE \o Default value
\endtable
\section2 Qt for Symbian OS only:
\table
\header \o Option \o Description \o Note
\row \o \c {-no-freetype} \o Do not compile in Freetype2 support.
- \o Defualt value.
+ \o Default value.
\row \o \c {-qt-freetype} \o Use the libfreetype bundled with Qt. \o
\row \o \c {-fpu <flags>} \o VFP type on ARM, supported options:
softvfp(default) |vfpv2 | softvfp+vfpv2 \o
\row \o \c {-no-s60} \o Do not compile in S60 support. \o
\row \o \c {-s60} \o Compile with support for the S60 UI Framework
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-usedeffiles} \o Disable the usage of DEF files. \o
\row \o \c {-usedeffiles} \o Enable the usage of DEF files. \o
\endtable
diff --git a/doc/src/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc
index 5cde056c87..2849870840 100644
--- a/doc/src/getting-started/tutorials.qdoc
+++ b/doc/src/getting-started/tutorials.qdoc
@@ -36,78 +36,106 @@
\nextpage Qt Examples
- A collection of tutorials and "walkthrough" guides are provided with Qt to
+ A collection of tutorials and \e walkthrough guides are provided with Qt to
help new users get started with Qt development. These documents cover a
range of topics, from basic use of widgets to step-by-step tutorials that
show how an application is put together.
- \table
- \row
- \o{2,1} \l{Widgets Tutorial}{\bold Widgets}
- \o{2,1} \l{Address Book Tutorial}{\bold {Address Book}}
- \row
- \o \image widget-examples.png Widgets
- \o
- A beginner's guide to getting started with widgets and layouts to create
- GUI applications.
+ For demonstrations on how to use different Qt technologies, visit the
+ \l{Qt Examples} page.
- \o \image addressbook-tutorial.png AddressBook
- \o
- A seven part guide to creating a fully-functioning address book
- application. This tutorial is also available with
- \l{Tutoriel "Carnet d'adresses"}{French explanation}.
+ \section1 Qt Creator Tutorial
+ Qt Creator is the development environment for Qt.
+ \list
+ \o \l{external: Qt Creator Manual}{Qt Creator Manual} - The manual contains
+ information on how to achieve development tasks
+ These are excerpts from the manual:
+ \list
+ \o \l{external: Creating Qt Projects in Creator}{Creating Qt Projects in Creator}
+ \o \l{external: Developing Qt Quick Applications with Creator}{Developing Qt Quick Applications with Creator}
+ \o \l{external: Building and Running Applications in Creator}{Building and Running Applications in Creator}
+ \o \l{external: Debugging Applications in Creator}{Debugging Applications in Creator}
+ \o \l{external: Publishing Applications to Ovi Store}{Publishing Applications to Ovi Store}
+ \endlist
+ \endlist
- \row
- \o{2,1} \l{A Quick Start to Qt Designer}{\bold{Qt Designer}}
- \o{2,1} \l{Qt Linguist Manual: Programmers#Tutorials}{\bold {Qt Linguist}}
- \row
- \o \image designer-examples.png QtDesigner
- \o
- A quick guide through \QD showing the basic steps to create a
- form with this interactive tool.
+ \section1 Qt Essentials
+ The basic concepts and technologies in Qt are introduced in these essential
+ tutorials.
+ \list
+ \o \l{Getting Started Programming with Qt}{Qt Text Editor} - A simple
+ tutorial detailing the creation of a basic Qt application
+ Introduces the use of slots and signals, file operations, and widgets.
+ \o \l{Address Book Tutorial}{Address Book} - A beginner's guide to
+ widgets, container classes, and layouts. This tutorial is also available
+ with
+ \l{Tutoriel "Carnet d'adresses"}{French version}.
+ \image addressbook-tutorial.png AddressBook
+ \o \l{modelview.html}{ModelView} - This tutorial gives an introduction to
+ ModelView programming using the Qt cross-platform framework
+ \o\l{thread-basics.html}{Threads} - A short tutorial about thread concepts
+ in general and basic Qt classes to handle threads
+ \endlist
- \o \image linguist-examples.png QtLinguist
- \o
- A guided tour through the translations process, explaining the
- tools provided for developers, translators and release managers.
+ \section1 Qt Quick Essentials
+ Qt Quick and QML features are covered in several tutorials, ranging from
+ easy introductions to advanced tutorials that mix QML with C++ and
+ JavaScript.
+ \list
+ \o \l{QML Tutorial}{Hello World} - A very simple QML example that
+ demonstrates the basic QML features
+ \o \l{Getting Started Programming with QML}{QML Text Editor} - An
+ intermediate QML tutorial that covers many QML features such as states,
+ plugins, and C++ development
+ \o \l{QML Advanced Tutorial}{SameGame} - A walkthrough of creating a
+ simple game using QML for the interface and JavaScript for the game
+ logic
+ \image qml-samegame-demo-small.png Samegame
+ \endlist
+ \section1 QtWebKit
+ \list
+ \o \l{QtWebKit Guide} - An introductory guide to the features of QtWebKit
+ and HTML5.
+ \list
+ \o \l{QtWebKit Guide - Level 3 CSS}{CSS Chapter} - Covers what is
+ possible with CSS3 and QtWebKit.
+ \o \l{Canvas Graphics}{HTML5 Canvas Chapter} - Covers the basics of
+ integrating the <canvas> element into web applications.
+ \o \l{QtWebKit Guide - Client Storage}{Client Storage Chapter} -
+ Describes the basics of storing information on the client side.
+ \endlist
+ \endlist
- \row
- \o{2,1} \l{modelview.html}{\bold{ModelView}}
- \o{2,1}
-
- \row
- \o \image treeview_sml.png ModelView
- \o This tutorial gives an introduction to ModelView programming using the Qt cross-platform framework
+ \section1 Qt Utilities
+ \list
+ \o \l{QTestLib Tutorial}{QTestLib} - This tutorial gives a short
+ introduction to how to use some of the features of Qt's unit-testing
+ framework, QTestLib. It is divided into four chapters.
+ \o \l{qmake Tutorial}{qmake} - This tutorial teaches you how to use \c
+ qmake. We recommend that you read the \l{qmake Manual}{qmake user guide}
+ after completing this tutorial.
+ \o \l{Qt Linguist Manual: Programmers#Tutorials}{Qt Linguist} - A guided
+ tour through the translations process, explaining the tools provided for
+ developers, translators and release managers.
+ \image linguist-examples.png QtLinguist
+ \endlist
- \o
- \o
-
- \row
- \o{2,1} \l{QML Tutorial}{\bold QML Tutorial}
- \o{2,1} \l{QML Advanced Tutorial}{\bold SameGame}
- \row
- \o{2,1}
- This tutorial provides a very basic introduction to QML.
- \o \image qml-samegame-demo-small.png Samegame
- \o
- This tutorial walks through creating a complete application with QML,
- in this case a simple game. It is recommended that you complete the basic QML
- tutorial first.
+ \section1 Online Learning Materials
+ These online materials provide further tutorials and developer
+ presentations.
- \row
- \o{2,1} \l{QTestLib Tutorial}{\bold QTestLib}
- \o{2,1} \l{qmake Tutorial}{\bold qmake}
- \row
- \o{2,1}
- This tutorial gives a short introduction to how to use some of the
- features of Qt's unit-testing framework, QTestLib. It is divided into
- four chapters.
+ \note The videos presented in these sites are not supported by the
+ Qt Creator browser and must be viewed in a web browser.
- \o{2,1}
- This tutorial teaches you how to use \c qmake. We recommend that
- you read the \l{qmake Manual}{qmake user guide} after completing
- this tutorial.
-
- \endtable
+ \list
+ \o \l{Qt eLearning} - The Qt eLearning team provides training and Qt
+ certification. Many of their learning content are hosted online.
+ \list
+ \o \l{Qt eLearning Training Materials} - Additional training material
+ are available as videos, downloadable code, and PDF files.
+ \o \l{Qt Developer Days 2010} - The presentation slides and videos from
+ Qt Developer Days are available for viewing.
+ \endlist
+ \endlist
*/
diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc
index 86934bc213..6d86b22c69 100644
--- a/doc/src/howtos/appicon.qdoc
+++ b/doc/src/howtos/appicon.qdoc
@@ -62,7 +62,7 @@
Finally, assuming you are using \c qmake to generate your
makefiles, add this line to your \c myapp.pro file:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 1
Regenerate your makefile and your application. The \c .exe file
will now be represented with your icon in Explorer.
@@ -96,7 +96,7 @@
if the name of your icon file is \c{myapp.icns}, and your project
file is \c{myapp.pro}, add this line to \c{myapp.pro}:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 2
This will ensure that \c qmake puts your icons in the proper
place and creates an \c{Info.plist} entry for the icon.
@@ -213,6 +213,6 @@
icon file is \c{myapp.svg}, and your project file is \c{myapp.pro},
add this line to \c{myapp.pro}:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 5
*/
diff --git a/doc/src/howtos/developmentsteps.qdoc b/doc/src/howtos/developmentsteps.qdoc
new file mode 100644
index 0000000000..078de8073e
--- /dev/null
+++ b/doc/src/howtos/developmentsteps.qdoc
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+/*!
+\page qtdevelopment-steps.html
+\title Qt Development: The Steps from Challenge to Achievement
+
+\section1 The Challenge
+
+One day, your boss runs into your cubicle and exclaims to you, "The board blew
+millions on a new enterprise HelloWorld application. The new one does not work
+and we need a solution quickly before this disaster brings down the company! I'm
+putting you in charge of the whole project while I go on vacation -- see you in
+2 weeks."
+
+\section1 Brainstorming Ideas - It is time to play!
+
+Never one to shy away from a challenge (especially when your job might be on the
+line), you first set out try come up with an idea about what your options are.
+
+You ask around a bit and discover that the broken application was intended to
+replace one that has been living on a dusty mainframe for the past 25 years. The
+machine is nearing end of life and, rather than invest in replacement hardware
+to run a legacy HelloWorld program, the board decided to invest in new software
+that could be run on desktops, web, mobile devices and embedded into the
+company's main product line -- a pocket size device with a small LCD screen,
+which flashes the message "Hello World" every full moon.
+
+The vendor that was chosen to handle this task was a well known multinational
+company that specialized in enterprise CRM/ERP systems. The project missed
+several delivery deadlines over a 2 year period, and was 500% over budget. There
+was not going to be much margin for error trying to fix the problem, and there
+would likely be no budget either.
+
+You begin researching dozens of possible possible approaches to the problem. One
+of the biggest challenges is that there are very few options that will allow you
+to create native applications that use the same framework for targeting
+\l{qt-creator-configure-target}{multiple platforms}.
+
+Some years ago you had coded a small desktop application using the Qt framework,
+without realizing that it also can be used for targeting the web, mobile devices
+and embedded devices. Since that time, Qt has added a new feature called \l{Qt
+Quick}, which provides the ability to easily design applications with intuitive,
+modern-looking, fluid user interfaces.
+
+\section1 Creating an Objective
+
+You quickly realize that you might need two, three, or more interfaces for your
+application -- one for each of the target platforms you are aiming for.
+Thankfully Qt has options well suited for each of them.
+
+For your mobile application the choice seems obvious enough. The new Qt Quick
+technology looks very promising, but you do not know QML; the declarative
+language that helps define the interface in a Qt Quick program. You still want
+to give it a try, but worry that you might not have something complete before
+your boss returns from vacation in two weeks. You also wonder if Qt Quick is
+applicable to desktop and embedded targets -- and then of course there is the
+need for something targeting the web. You decide to give Qt Quick a try first
+and \l{QML Examples and Demos}{see where it takes you}.
+
+\section1 Developing Plans
+
+One thing you realize after reading up on \l{Qt Quick} is that things are very
+different from the desktop when designing an interface. Qt Quick doesn't contain
+ready made UI 'chrome'; the widgets and other design elements that define the
+application interface. A new technology, called Qt Quick Components, looks like
+a promising solution, but the components will only be available at a later date.
+For now you'll have to come up with something on your own -- but you are keen to
+give your design skills a work out, and learning to use Qt Quick seems to be a
+great way to do it.
+
+Not knowing a better place to start, you begin by taking a cue from web design
+and plan a wireframe, which helps
+\l{external: Developing Qt Quick Applications}{define the application layout},
+content and user interaction. You decide on breaking the field of the screen
+space into three roughly equal size parts. There will be one section across the
+top, which will span the width of the screen, and two sections in the lower
+have, which will be approximately as tall as the top section is wide (when in
+portrait mode).
+
+The top section will be a simple text representation of the phrase "Hello World"
+in English. In the lower left you would like to place some kind of audio
+playback feature that repeats back the phrase in the top section of the screen.
+Finally, in the lower right hand side of the screen will be four links to
+similar views for additional languages -- Mandarin Chinese, Brazilian
+Portuguese, Arabic, and Russian. When the user clicks one of the links the text
+at the top is then translated, and the playback corresponds to the appropriate
+language.
+
+While the wireframe is effective in dealing with one part of the design
+challenge, it does not cover visual aspects other than layout and content. This
+means that you still need to define colours, white space, and typography (among
+other things). This is where a style guide would come in handy, if your company
+already had one that is. In the absence of one you decide to again get some
+inspiration from the web, and you mimic some of the company's website design
+into your application -- a sans-serif font for white text on a blue field across
+the top, black text on white for the bottom two sections, and a small company
+logo to the left of the "Hello World" message.
+
+
+\section1 Execution: The Coding Begins!
+
+At long last you sit down to \l{qt-technologies}{implement} your plans and
+designs. The first few steps go according to plan, and creating the basic layout
+and text goes fairly smoothly -- but you run into a few challenges quite
+quickly:
+
+Devising a user friendly interface to audio playback is not as intuitive as you
+first thought. Since there exist a ready made component for
+\l{external: Mobility Multimedia}{multimedia},
+you remove the bottom left field and now have the screen split in two. You add
+textual links for each of the five target languages, and when the user clicks
+one of them the message text changes and the appropriate audio plays back. It is
+a small sacrifice to make for now, and you are sure there is a solution to be
+found once you have become more proficient with QML.
+
+The next challenge you run into is that \l{qt-deployment}{deploying} the
+application to a Symbian phone is not as clearly understood as you expected.
+Again you are sure there is something you are missing, but for the time being
+you manually copy the .sis file to the "Installs" directory on the phone
+(connected to the development machine by USB) and then install it through the
+Application Manager.
+
+When you finally manage to install the application on the device you notice
+something that looks rather peculiar, and something you had not thought of. When
+the phone is turned into landscape mode, your text remains at the same absolute
+coordinates as when it was in portrait mode. You had not realized you needed to
+anchor it in order to achieve the centering you wanted. There was an
+\l{qt-testing}{easy fix} for this, but you were glad you saw this earlier rather
+than later.
+
+
+\section1 Innovating
+
+After the ups and downs of learning to develop a basic application
+using Qt Quick, you start to see greater possibilities for using Qt technologies
+for your current and future projects:
+
+\list
+\o Extending HTML5 based applications that tie Javascript to a Qt C++ back end
+using \l{Qt WebKit}
+\o An \l{qt-rendering-painting-system}{OpenGL} based UI for embedded platforms
+\o \l{Gestures Programming}{Touch} screen support
+\o \l{external: Mobility Location}{Location} based applications
+\o \l{qt-technologies}{Much, much more}
+\endlist
+
+
+\section1 The Achievement
+
+After your boss returned from vacation you presented him with the finished Qt
+Quick application, demonstrating it on both a mobile device as well as desktop
+(it happened to work well on both with little modification). You also provided
+him a presentation that detailed your road map for taking things to the next
+level -- targeting other platforms, such as the web, as well as improving on the
+existing application you just completed.
+
+Even though the final product did not turn out the way you originally planned,
+your boss was still sufficiently impressed. Not only was the go ahead given for
+future projects, but ramping up a small team of developers and designers was
+also suggested to help support your efforts.
+
+*/
diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc
index c4b5ebc38d..b3795d65d8 100644
--- a/doc/src/howtos/exceptionsafety.qdoc
+++ b/doc/src/howtos/exceptionsafety.qdoc
@@ -100,8 +100,9 @@
if any allocation fails. Allocations can fail if the system runs out of memory or
doesn't have enough continuous memory to allocate the requested size.
- Exceptions to that rule are documented. As an example, \l QImage::create()
- returns false if not enough memory exists instead of throwing an exception.
+ Exceptions to that rule are documented. As an example, QImage constructors will
+ create a \l{QImage::isNull()}{null} image if not enough memory exists instead
+ of throwing an exception.
\section1 Recovering from exceptions
diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc
new file mode 100644
index 0000000000..246c4e4c87
--- /dev/null
+++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page qml-best-practices-coding.html
+\ingroup qml-best-practices
+\contentspage QML Best Practices Guides
+\previouspage QML Best Practices Guides
+\startpage QML Best Practices Guides
+\title QML Best Practices: Coding Conventions
+
+\brief QML Coding Conventions and Importing Files
+
+There are many different ways to code using QML. These are a set of
+guidelines to help your code look better and consistent.
+
+\section1 Coding Conventions
+
+The official QML Coding Conventions may be found at
+\l {QML Coding Conventions}. This is the recommended convention that will be
+used throughout the QML documentation.
+
+In addition, Qt's official code style may be found at the \l {Qt Coding Style}.
+
+\section1 Importing Files into QML
+
+To import items such as directories, use the "import" keyword, similar to
+the way the \c {import QtQuick 1.0} statement is used.
+
+\snippet doc/src/snippets/declarative/imports/best-practices.qml imports
+
+To facilitate the import of QML components, it is best to begin the QML
+file with an uppercase character. This way, the user can simply declare the
+component using the file name as the component name. For example, if a QML
+component is in a file named \c Button.qml, then the user may import the
+component by declaring a \c {Button {}}. Note that this method only works if
+the QML files are in the same directory.
+
+It is also possible to import QML files which have file names that begin in
+lower case or files in a different directory by using a \c qmldir file.
+
+A \c qmldir file tells your QML application which QML components, plugins,
+or directories to import. The \c qmldir file must reside in an imported
+directory. By using the \c qmldir file, users may import any QML file and assign any
+valid QML component name to the component.
+
+For more information, read the section on
+\l{qml-loading-components}{Loading a Component}.
+
+\section1 Commenting Code
+
+Commenting code allows others to read the source code better. As well, comments
+allow the programmer to think about his or her code; a confusing comment may
+mean the code is confusing.
+
+Similar to JavaScript or C++, there are two ways of commenting QML code:
+\list
+\o Single line comments start with \c{//} and finish at the end of the line
+\o Multiline comments start with \c{/*} and finish with *\/
+\endlist
+
+\section1 Group Properties
+
+Many QML properties are \l{attached-properties}{attached} or
+\l {qml-grouped-properties}{group} properties. For convenience, you may treat
+them as another element when dealing with multiple properties belonging to the
+same group.
+
+\snippet doc/src/snippets/declarative/bestpractices/group.qml not grouped
+Treating groups of properties as a block can ease confusion and help relate the
+properties with other properties.
+\snippet doc/src/snippets/declarative/bestpractices/group.qml grouped
+*/
diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc
new file mode 100644
index 0000000000..0f6d74bf1a
--- /dev/null
+++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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$
+** 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 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$
+**
+****************************************************************************/
+/*!
+ \page qml-best-practices-datatypes.html
+ \ingroup qml-best-practices
+ \contentspage QML Best Practices Guides
+ \previouspage QML Best Practices Guides
+ \startpage QML Best Practices Guides
+ \title QML Best Practices: Data Types
+
+ \brief Using Basic Data Types and Custom Types in QML
+
+ QML supports many basic data types, Qt data types, and custom data types.
+
+ \section1 Basic Data Types
+
+ \section1 Qt Data Types
+
+ \section1 Exporting Qt Types to QML
+
+ Programmers may create C++ data structures and expose them to QML, making
+ data accessible from QML.
+
+ \section2 Using QStringLists in QML
+*/
diff --git a/doc/src/howtos/scalabilityintro.qdoc b/doc/src/howtos/scalabilityintro.qdoc
new file mode 100644
index 0000000000..b1d9c19840
--- /dev/null
+++ b/doc/src/howtos/scalabilityintro.qdoc
@@ -0,0 +1,324 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \title Scalability
+ \page scalability.html
+ \preliminary
+
+ \omit preliminary docs for next SDK release \endomit
+ \omit Somewhere I need to mention applications with more than
+ one page (top-level layouts). \endomit
+
+ A scalable application is an application that can run on more than
+ one form factor. In particular, it can cope with different screen
+ sizes, DPI, and aspect ratios. You need to consider scalability
+ when:
+
+ \list
+ \o your application will be deployed to more than one device
+ handset, or more than one device form factor.
+ \o your application will be deployed for a long period of time,
+ so that new device handsets might appear on the market after
+ your initial deployment.
+ \endlist
+
+ This document discusses how scalable applications can be created.
+
+ \section1 Developing Scalable UIs
+
+ This section shows the basics of how we advice scalable
+ applications to be implemented using QML. We recommend that you
+ follow these techniques:
+
+ \list
+ \o Create separate top-level layout
+ definitions for each form factor.
+ \o Keep the layouts small and let components
+ scale relative to their immediate parent.
+ \o Define device independent measurements, such as dp
+ (device independent pixels), and use
+ these to scale components and for layout measurement.
+ \o Define layouts in a
+ proportional way using the built-in layout features of QML.
+ \endlist
+
+ Using small top-level layouts makes your codebase smaller and
+ easier to maintain. Also, components that scales relative to their
+ parent are more reusable. The layouts should be children of the
+ application's root item. You can change between them by, for
+ instance, using the opacity property of Item; that is, if your
+ application has more tham one top-level layout. Such a top-level
+ layout is also often referred to as a page, i.e., a layout that
+ uses the entire screen. For instance, an organizer application
+ will typically have separate pages for showing the calender and
+ editing todo items.
+
+ You should define the measurements separate from the UI, for
+ instance by using a JavaScript object that you fill in with a
+ script on application start up.
+
+ QML provides several ways of laying out components, e.g, using
+ anchor based layout, the more classic Grid; Column; and Row
+ elements, and by setting the dimensions of Items directly. When
+ laying out components in scalable applications, you should
+ generally prefer using anchors and set width and height based on
+ parent size where possible. Layouts are not only relevant to
+ top-level layouts; components often contain child Items.
+
+ The following sections describe in more detail the different
+ aspects of scalability that should be considered in order to
+ achieve the desired level of flexibility within your application.
+
+ \section1 Implementing the Top-Level Layouts
+
+ As mentioned, each application should use separate top-level
+ layout QML definitions to support separate layout configurations /
+ form factors.
+
+ Consider an application that has to be deployed to at least two
+ devices, which both have very different screen sizes and DPI
+ values. The two form factors of the application will share many
+ common components and attributes, and will most likely connect to
+ the same data model.
+
+ Therefore, the top-level definitions should be quite
+ straightforward and short, with the majority of the functionality
+ refactored into contained Components. It is important to try to
+ avoid unnecessary duplication between these top-level definitions,
+ in order to improve maintainability.
+
+ There are some patterns that you might consider when designing
+ your top level layouts:
+
+ \list
+ \o In some cases, the contents of an entire page in a smaller
+ handset could form a component element of a layout in a
+ larger device. Therefore, consider making that a separate
+ component (i.e. defined in a separate QML file), and in the
+ smaller handset, the Page will simply contain an instance of
+ that component. On the larger device, there may be enough
+ space to show two separate items. For example, in an email
+ viewer, if the screen is large enough, it may be possible to
+ show the email list view, and the email reader view side by
+ side.
+ \o In some cases, the contents of a view might be quite similar
+ on all screen sizes, but with an expanded content area. In
+ this case, it may be possible to re-use the same layout
+ definition, if defined appropriately using anchors.
+ \endlist
+
+ The \l{Loader} component can be used to load separate QML files
+ based on some criteria, such as Device Profile (configuration of
+ screen pixel resolution and DPI density). In the case of form
+ factor, this information will not change during the application's
+ lifetime, therefore there is no issue with memory usage or
+ performance.
+
+ \section1 Defining Measurements
+
+ When you are defining the measurements within an application or
+ component layout, there are a number aspects to consider:
+
+ \list
+ \o The layout structure, the high-level relationship between
+ items. Which item is the parent? How are the items arranged
+ relatively on the screen? Are they in a grid or column?
+ \o The layout measurements. How big is an item, or a margin
+ inside the edge of an item, or an anchor between items?
+ \o The implicit size of contained items. Some child items will
+ require a certain amount of space, such as a button
+ containing a text. That may also depend on the current
+ platform and style. How do you ensure that you leave enough
+ space, and what happens if your children change size?
+ \endlist
+
+ These aspects combine together to resolve the final layout for a
+ given Device Profile. However, although there are dependencies
+ between them, it is important to manage and control the different
+ aspects separately.
+
+ It is strongly recommended that Layout measurements should be
+ stored in a separate place from the component layout structure
+ definition files. The reason for this is that layout structure,
+ for a given form factor, can be re-used for different Device
+ Profiles. However, measurements will almost always vary between
+ Device Profiles or Device Categories.
+
+ If the opposite approach (complete duplication of entire QML
+ files) was taken, then all of the layout states and structure
+ definitions would be duplicated between the copied QML files, and
+ only the measurement values would change.
+
+ The main benefit of using separate measurement definition files
+ are:
+
+ \list
+ \o To reduce the amount of duplication, and hence increase
+ maintainability.
+ \o It becomes much easier to change the layout structure,
+ perhaps due to subsequent specification changes. In that
+ case, the layout structure can be modified once, and many or
+ all of the layout measurements would remain unchanged.
+ \o It becomes much easier to add support for additional Device
+ Profiles, simply by adding another measurement definition
+ file.
+ \endlist
+
+ \section1 Using QML's Layout Features
+
+ For a given form factor, top-level Layouts structure definitions,
+ or component layout structure definitions, should in general be
+ defined in a proportional way using a combination of
+
+ \list
+ \o \l{Item::anchors.top}{anchors} within an Item
+ \o \l{Row} / \l{Column} / \l{Grid}
+ \o simple JavaScript expressions such as width: Math.round(parent.width / 3.0).
+ \endlist
+
+ These basic building blocks, along with the powerful evaluation
+ capabilities of JavaScript expressions within every QML binding,
+ are designed to allow the majority of the layout structure
+ definition to be defined in a Device Profile independent way.
+
+ There are some limitations of the basic grid type layouts. They
+ are designed to accommodate a number of Items, but use the current
+ sizes of those items. There is a similar issue with the basic
+ anchor type layout. In particular, it can be difficult to spread a
+ number of child items proportionately across an area of their
+ container.
+
+ By combining the features of the layout managers with simple
+ JavaScript expressions, a richer variety of designs can be
+ expressed, without having to resort to additional layout
+ measurement parameters or measurement values.
+
+ Here are some things not to do with layouts:
+
+ \list
+ \o Don't define complex JavaScript functions that are regularly
+ evaluated. This will cause poor performance, particularly
+ during animated transitions.
+ \o Don't define all of your layouts using x, y, width and
+ height. Reserve this for items that cannot easily be defined
+ using anchors (anchors are evaluated in a more efficient
+ way).
+ \o Don't make assumptions about the container size, or about
+ the size of child items. Try to make flexible layout
+ definitions that can absorb changes in the available space.
+ \endlist
+
+ \section1 Orientation Switches
+
+ Application top-level page definitions, and reusable component
+ definitions, should use one QML layout definition for the layout
+ structure. This single definition should include the layout design
+ for separate Device Orientations and Aspect Ratios. The reason for
+ this is that performance during an orientation switch is critical,
+ and it is therefore a good idea to ensure that all of the
+ components needed by both orientations are loaded when the
+ orientation changes.
+
+ On the contrary, you should perform thorough tests if you choose
+ to use a \l{Loader} to load additional QML that is needed in separate
+ orientations, as this will affect the performance of the
+ orientation change.
+
+ In order to enable layout animations between the orientations, the
+ anchor definitions must reside within the same containing
+ component. Therefore the structure of a page or a component
+ should consist of a common set of child components, a common set
+ of anchor definitions, and a collection of states (defined in a
+ StateGroup) representing the different aspect ratios supported by
+ the component. (However note that orientation change animations
+ are not possible on Symbian due to compatibility support for S60
+ applications).
+
+ If a component contained within a page needs to be
+ hosted in numerous different form factor definitions, then the
+ layout states of the view should depend on the aspect ratio of the
+ page (its immediate container). Similarly, different instances of
+ a component might be situated within numerous different containers
+ in a UI, and so its layout states should be determined by the
+ aspect ratio of its parent. The conclusion is that layout states
+ should always follow the aspect ratio of the direct container (not
+ the "orientation" of the current device screen).
+
+ Within each layout \l{State}, you should define the relationships
+ between items using native QML layout definitions. See below for
+ more information. During transitions between the states (triggered
+ by the top level orientation change), in the case of anchor
+ layouts, AnchorAnimation elements can be used to control the
+ transitions. In some cases, you can also use a NumberAnimation on
+ e.g. the width of an item. Remember to avoid complex JavaScript
+ calculations during each frame of animation. Using simple anchor
+ definitions and anchor animations can help with this in the
+ majority of cases.
+
+ There are a few additional cases to consider:
+
+ \list
+ \o What if you have a single page that looks completely
+ different between landscape and portrait, i.e. all of the
+ child items are different? For each page, have two child
+ components, with separate layout definitions, and make one
+ or other of the items have zero opacity in each state. You
+ can use a cross-fade animation by simply applying a
+ NumberAnimation transition to the opacity.
+ \o What if you have a single page that shares 30% or more of
+ the same layout contents between portrait and landscape? In
+ that case, consider having one component with landscape and
+ portrait states, and a collection of separate child items
+ whose opacity (or position) depends on the orientation
+ state. This will enable you to use layout animations for the
+ items that are shared between the orientations, whilst the
+ other items are either faded in/out, or animated on/off
+ screen.
+ \o What if you have two pages on a handheld device that need to
+ be on screen at the same time, for example on a larger form
+ factor device? In this case, notice that your view component
+ will no longer be occupying the full screen. Therefore it's
+ important to remember in all components (in particular, list
+ delegate items) should depend on the size of the containing
+ component width, not on the screen width. It may be
+ necessary to set the width in a Component.onCompleted()
+ handler in this case, to ensure that the list item delegate
+ has been constructed before the value is set.
+ \o What if the two orientations take up too much memory to have
+ them both in memory at once? Use a \l{Loader} if necessary, if
+ you cannot keep both versions of the view in memory at once,
+ but beware performance on the cross-fade animation during
+ layout switch. One solution could be to have two "splash
+ screen" items that are children of the Page, then you cross
+ fade between those during rotation. Then you can use a
+ \l{Loader} to load another child component that loads the actual
+ model data to another child Item, and cross-fade to that
+ when the \l{Loader} has completed.
+ \endlist
+ */
+
diff --git a/doc/src/howtos/unix-signal-handlers.qdoc b/doc/src/howtos/unix-signal-handlers.qdoc
index 2fa558ec02..20beb38165 100644
--- a/doc/src/howtos/unix-signal-handlers.qdoc
+++ b/doc/src/howtos/unix-signal-handlers.qdoc
@@ -59,7 +59,7 @@
sigaction(2) man pages before plowing through the following code
snippets.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 0
In the MyDaemon constructor, use the socketpair(2) function to
initialize each file descriptor pair, and then create the
@@ -68,24 +68,24 @@
appropriate slot function, which effectively converts the Unix
signal to the QSocketNotifier::activated() signal.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 1
Somewhere else in your startup code, you install your Unix signal
handlers with sigaction(2).
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 2
In your Unix signal handlers, you write a byte to the \e write end
of a socket pair and return. This will cause the corresponding
QSocketNotifier to emit its activated() signal, which will in turn
cause the appropriate Qt slot function to run.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 3
In the slot functions connected to the
QSocketNotifier::activated() signals, you \e read the byte. Now
you are safely back in Qt with your signal, and you can do all the
Qt stuff you weren'tr allowed to do in the Unix signal handler.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 4
*/
diff --git a/doc/src/images/guide.png b/doc/src/images/guide.png
new file mode 100644
index 0000000000..f4b0df12fb
--- /dev/null
+++ b/doc/src/images/guide.png
Binary files differ
diff --git a/doc/src/images/listview-decorations.png b/doc/src/images/listview-decorations.png
new file mode 100644
index 0000000000..445c64819a
--- /dev/null
+++ b/doc/src/images/listview-decorations.png
Binary files differ
diff --git a/doc/src/images/listview-section.png b/doc/src/images/listview-section.png
new file mode 100644
index 0000000000..a3664fc55e
--- /dev/null
+++ b/doc/src/images/listview-section.png
Binary files differ
diff --git a/doc/src/images/listview-setup.png b/doc/src/images/listview-setup.png
new file mode 100644
index 0000000000..5293d0517f
--- /dev/null
+++ b/doc/src/images/listview-setup.png
Binary files differ
diff --git a/doc/src/images/mobile.png b/doc/src/images/mobile.png
new file mode 100644
index 0000000000..af460e203b
--- /dev/null
+++ b/doc/src/images/mobile.png
Binary files differ
diff --git a/doc/src/images/qcameraexample.png b/doc/src/images/qcameraexample.png
new file mode 100644
index 0000000000..cdf7d4ee31
--- /dev/null
+++ b/doc/src/images/qcameraexample.png
Binary files differ
diff --git a/doc/src/images/qml-dial.png b/doc/src/images/qml-dial.png
deleted file mode 100644
index da5c031c40..0000000000
--- a/doc/src/images/qml-dial.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-guitartuner-example.png b/doc/src/images/qml-guitartuner-example.png
new file mode 100644
index 0000000000..2f13e8d995
--- /dev/null
+++ b/doc/src/images/qml-guitartuner-example.png
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors1.png b/doc/src/images/qml-intro-anchors1.png
deleted file mode 100644
index fdb301ea22..0000000000
--- a/doc/src/images/qml-intro-anchors1.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors2.png b/doc/src/images/qml-intro-anchors2.png
deleted file mode 100644
index 84f43bd3df..0000000000
--- a/doc/src/images/qml-intro-anchors2.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors3.png b/doc/src/images/qml-intro-anchors3.png
deleted file mode 100644
index 21ae97baf7..0000000000
--- a/doc/src/images/qml-intro-anchors3.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-helloa.png b/doc/src/images/qml-intro-helloa.png
deleted file mode 100644
index 00b34b0208..0000000000
--- a/doc/src/images/qml-intro-helloa.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-listview-snippet.png b/doc/src/images/qml-listview-snippet.png
deleted file mode 100644
index 0ee0ffcd0e..0000000000
--- a/doc/src/images/qml-listview-snippet.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-qtbubblelevel-demo.png b/doc/src/images/qml-qtbubblelevel-demo.png
new file mode 100644
index 0000000000..9d5bc4b07d
--- /dev/null
+++ b/doc/src/images/qml-qtbubblelevel-demo.png
Binary files differ
diff --git a/doc/src/images/qml.png b/doc/src/images/qml.png
new file mode 100644
index 0000000000..b1e4ab6645
--- /dev/null
+++ b/doc/src/images/qml.png
Binary files differ
diff --git a/doc/src/images/qmldesigner-visual-editor.png b/doc/src/images/qmldesigner-visual-editor.png
new file mode 100644
index 0000000000..9cd4b8b2dc
--- /dev/null
+++ b/doc/src/images/qmldesigner-visual-editor.png
Binary files differ
diff --git a/doc/src/images/qt-logo_large.png b/doc/src/images/qt-logo_large.png
new file mode 100644
index 0000000000..4e230bd0ee
--- /dev/null
+++ b/doc/src/images/qt-logo_large.png
Binary files differ
diff --git a/doc/src/images/qtcreator-target-selector.png b/doc/src/images/qtcreator-target-selector.png
new file mode 100644
index 0000000000..1f2613811d
--- /dev/null
+++ b/doc/src/images/qtcreator-target-selector.png
Binary files differ
diff --git a/doc/src/images/roaming-states.png b/doc/src/images/roaming-states.png
new file mode 100644
index 0000000000..bc61cac219
--- /dev/null
+++ b/doc/src/images/roaming-states.png
Binary files differ
diff --git a/doc/src/images/thread_clock.png b/doc/src/images/thread_clock.png
new file mode 100644
index 0000000000..b8a8aa0a39
--- /dev/null
+++ b/doc/src/images/thread_clock.png
Binary files differ
diff --git a/doc/src/images/threads-examples.png b/doc/src/images/threads-examples.png
new file mode 100644
index 0000000000..b6e4bcc85e
--- /dev/null
+++ b/doc/src/images/threads-examples.png
Binary files differ
diff --git a/doc/src/images/threadvisual-example.png b/doc/src/images/threadvisual-example.png
new file mode 100644
index 0000000000..2a49874719
--- /dev/null
+++ b/doc/src/images/threadvisual-example.png
Binary files differ
diff --git a/doc/src/images/tools.png b/doc/src/images/tools.png
new file mode 100644
index 0000000000..4d717b5a81
--- /dev/null
+++ b/doc/src/images/tools.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_arcTo.png b/doc/src/images/webkit-guide/canvas_arcTo.png
new file mode 100644
index 0000000000..6bc187175a
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_arcTo.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_arcTo2.png b/doc/src/images/webkit-guide/canvas_arcTo2.png
new file mode 100644
index 0000000000..5f9d32d8d3
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_arcTo2.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_clip-complex.png b/doc/src/images/webkit-guide/canvas_clip-complex.png
new file mode 100644
index 0000000000..cb582bad41
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_clip-complex.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_clip.png b/doc/src/images/webkit-guide/canvas_clip.png
new file mode 100644
index 0000000000..c397f5e860
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_clip.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_clip_aqu.png b/doc/src/images/webkit-guide/canvas_clip_aqu.png
new file mode 100644
index 0000000000..d0696d6708
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_clip_aqu.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_closepath.gif b/doc/src/images/webkit-guide/canvas_closepath.gif
new file mode 100644
index 0000000000..e32024a049
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_closepath.gif
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_composite.png b/doc/src/images/webkit-guide/canvas_composite.png
new file mode 100644
index 0000000000..6e20efac0d
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_composite.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_context.gif b/doc/src/images/webkit-guide/canvas_context.gif
new file mode 100644
index 0000000000..f18e52ca05
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_context.gif
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_lineStrokeTo.gif b/doc/src/images/webkit-guide/canvas_lineStrokeTo.gif
new file mode 100644
index 0000000000..e05aa00257
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_lineStrokeTo.gif
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_linecap.png b/doc/src/images/webkit-guide/canvas_linecap.png
new file mode 100644
index 0000000000..72ecce5313
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_linecap.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_math.png b/doc/src/images/webkit-guide/canvas_math.png
new file mode 100644
index 0000000000..c039a38532
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_math.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_math_rotate.png b/doc/src/images/webkit-guide/canvas_math_rotate.png
new file mode 100644
index 0000000000..e80cc09eae
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_math_rotate.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_pattern.png b/doc/src/images/webkit-guide/canvas_pattern.png
new file mode 100644
index 0000000000..6b593bcf0e
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_pattern.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_rectangles.gif b/doc/src/images/webkit-guide/canvas_rectangles.gif
new file mode 100644
index 0000000000..3b44cc5551
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_rectangles.gif
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_rotate.png b/doc/src/images/webkit-guide/canvas_rotate.png
new file mode 100644
index 0000000000..20947fda49
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_rotate.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_scale.png b/doc/src/images/webkit-guide/canvas_scale.png
new file mode 100644
index 0000000000..3b26fde871
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_scale.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_scalex.png b/doc/src/images/webkit-guide/canvas_scalex.png
new file mode 100644
index 0000000000..d4e76aa932
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_scalex.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_scaley.png b/doc/src/images/webkit-guide/canvas_scaley.png
new file mode 100644
index 0000000000..61462b9adc
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_scaley.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_skewx.png b/doc/src/images/webkit-guide/canvas_skewx.png
new file mode 100644
index 0000000000..c9bcb6715c
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_skewx.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_skewy.png b/doc/src/images/webkit-guide/canvas_skewy.png
new file mode 100644
index 0000000000..594ac842a4
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_skewy.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_startAngle.png b/doc/src/images/webkit-guide/canvas_startAngle.png
new file mode 100644
index 0000000000..f81562e5e4
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_startAngle.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_text.png b/doc/src/images/webkit-guide/canvas_text.png
new file mode 100644
index 0000000000..6983047bbe
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_text.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_translate.png b/doc/src/images/webkit-guide/canvas_translate.png
new file mode 100644
index 0000000000..7bb3ae7560
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_translate.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/canvas_translatey.png b/doc/src/images/webkit-guide/canvas_translatey.png
new file mode 100644
index 0000000000..9196bf5919
--- /dev/null
+++ b/doc/src/images/webkit-guide/canvas_translatey.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/mask0.png b/doc/src/images/webkit-guide/mask0.png
new file mode 100644
index 0000000000..f9764b54aa
--- /dev/null
+++ b/doc/src/images/webkit-guide/mask0.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/mask1.png b/doc/src/images/webkit-guide/mask1.png
new file mode 100644
index 0000000000..5ca7798a17
--- /dev/null
+++ b/doc/src/images/webkit-guide/mask1.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_accord.png b/doc/src/images/webkit-guide/scr_anim_accord.png
new file mode 100644
index 0000000000..4295e15e49
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_accord.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_demo-rotate.png b/doc/src/images/webkit-guide/scr_anim_demo-rotate.png
new file mode 100644
index 0000000000..d18bf164f4
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_demo-rotate.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_demo-scale.png b/doc/src/images/webkit-guide/scr_anim_demo-scale.png
new file mode 100644
index 0000000000..8d32d1c28c
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_demo-scale.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_demo-skew.png b/doc/src/images/webkit-guide/scr_anim_demo-skew.png
new file mode 100644
index 0000000000..15fc0faef2
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_demo-skew.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_gallery.png b/doc/src/images/webkit-guide/scr_anim_gallery.png
new file mode 100644
index 0000000000..aa32583319
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_gallery.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_panel.png b/doc/src/images/webkit-guide/scr_anim_panel.png
new file mode 100644
index 0000000000..ceff3930a6
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_panel.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_pulse.png b/doc/src/images/webkit-guide/scr_anim_pulse.png
new file mode 100644
index 0000000000..afa9ff833c
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_pulse.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_skew.png b/doc/src/images/webkit-guide/scr_anim_skew.png
new file mode 100644
index 0000000000..819a3a1560
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_skew.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_slide1.png b/doc/src/images/webkit-guide/scr_anim_slide1.png
new file mode 100644
index 0000000000..8fdf79fe3b
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_slide1.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_anim_tabbedSkew.png b/doc/src/images/webkit-guide/scr_anim_tabbedSkew.png
new file mode 100644
index 0000000000..fd07fd7ea0
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_anim_tabbedSkew.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_backgrounds.png b/doc/src/images/webkit-guide/scr_css3_backgrounds.png
new file mode 100644
index 0000000000..96fec39a92
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_backgrounds.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_border-img.png b/doc/src/images/webkit-guide/scr_css3_border-img.png
new file mode 100644
index 0000000000..9242b4cf69
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_border-img.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_grad-radial.png b/doc/src/images/webkit-guide/scr_css3_grad-radial.png
new file mode 100644
index 0000000000..e520f8af80
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_grad-radial.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_gradientBack.png b/doc/src/images/webkit-guide/scr_css3_gradientBack.png
new file mode 100644
index 0000000000..22f80af138
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_gradientBack.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_gradientBackStop.png b/doc/src/images/webkit-guide/scr_css3_gradientBackStop.png
new file mode 100644
index 0000000000..ff12a1122c
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_gradientBackStop.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_gradientButton.png b/doc/src/images/webkit-guide/scr_css3_gradientButton.png
new file mode 100644
index 0000000000..b3ba62e735
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_gradientButton.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_mask-grad.png b/doc/src/images/webkit-guide/scr_css3_mask-grad.png
new file mode 100644
index 0000000000..bb539e6220
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_mask-grad.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_mask-img.png b/doc/src/images/webkit-guide/scr_css3_mask-img.png
new file mode 100644
index 0000000000..62157391a4
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_mask-img.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_multicol.png b/doc/src/images/webkit-guide/scr_css3_multicol.png
new file mode 100644
index 0000000000..775d685a75
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_multicol.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_reflect.png b/doc/src/images/webkit-guide/scr_css3_reflect.png
new file mode 100644
index 0000000000..94e58c39e1
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_reflect.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_scroll.png b/doc/src/images/webkit-guide/scr_css3_scroll.png
new file mode 100644
index 0000000000..d11e05e38c
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_scroll.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_sel-nth.png b/doc/src/images/webkit-guide/scr_css3_sel-nth.png
new file mode 100644
index 0000000000..fe8d26c049
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_sel-nth.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_text-overflow.png b/doc/src/images/webkit-guide/scr_css3_text-overflow.png
new file mode 100644
index 0000000000..084a52e455
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_text-overflow.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_text-shadow.png b/doc/src/images/webkit-guide/scr_css3_text-shadow.png
new file mode 100644
index 0000000000..e23e8fa061
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_text-shadow.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_css3_text-stroke.png b/doc/src/images/webkit-guide/scr_css3_text-stroke.png
new file mode 100644
index 0000000000..5fb3f0d309
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_css3_text-stroke.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_form_tapper.png b/doc/src/images/webkit-guide/scr_form_tapper.png
new file mode 100644
index 0000000000..3a00060bf3
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_form_tapper.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_form_toggler.png b/doc/src/images/webkit-guide/scr_form_toggler.png
new file mode 100644
index 0000000000..c03d2598c2
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_form_toggler.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_layout_link-fmt.png b/doc/src/images/webkit-guide/scr_layout_link-fmt.png
new file mode 100644
index 0000000000..68e8d72fce
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_layout_link-fmt.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_layout_tbl-keyhole.png b/doc/src/images/webkit-guide/scr_layout_tbl-keyhole.png
new file mode 100644
index 0000000000..d90fcd8b93
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_layout_tbl-keyhole.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_mob_condjs.png b/doc/src/images/webkit-guide/scr_mob_condjs.png
new file mode 100644
index 0000000000..4793f806d9
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_mob_condjs.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_mob_layout.png b/doc/src/images/webkit-guide/scr_mob_layout.png
new file mode 100644
index 0000000000..f3c40ede1c
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_mob_layout.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_mob_mediaquery.png b/doc/src/images/webkit-guide/scr_mob_mediaquery.png
new file mode 100644
index 0000000000..c51aec7441
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_mob_mediaquery.png
Binary files differ
diff --git a/doc/src/images/webkit-guide/scr_storage.png b/doc/src/images/webkit-guide/scr_storage.png
new file mode 100644
index 0000000000..d71156fe4f
--- /dev/null
+++ b/doc/src/images/webkit-guide/scr_storage.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index be59c2f612..2d404004a1 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -26,94 +26,133 @@
****************************************************************************/
/*!
- \page index.html
- \keyword Qt Reference Documentation
+\page index.html
+\keyword Qt Reference Documentation
- \div {indexbox guide}
- \div {heading}
- Qt Developer Guide
- \enddiv
- \div {indexboxcont indexboxbar}
- \div {section indexIcon} \emptyspan
- \enddiv
- \div {section}
- Qt is a cross-platform application and UI
- framework. Using Qt, you can write web-enabled
- applications once and deploy them across desktop,
- mobile and embedded operating systems without
- rewriting the source code.
- \enddiv
- \div {section sectionlist}
- \list
- \o \l{Getting Started Guides}{Getting started}
- \o \l{Installation}{Installation}
- \o \l{how-to-learn-qt.html}{How to learn Qt}
- \o \l{tutorials.html}{Tutorials}
- \o \l{Qt Examples}{Examples}
- \o \l{qt4-7-intro.html}{What's new in Qt 4.7}
- \endlist
- \enddiv
+\div {class="indexbox tools"}
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ What is Qt
\enddiv
- \enddiv
- \div {indexbox api}
- \div {heading}
- Qt API
- \enddiv
- \div {indexboxcont indexboxbar }
- \div {sectionlist tricol}
- \list
- \o \l{All Classes}{All Classes}
- \o \l{All Functions}{All Functions}
- \o \l{All Modules}{All Modules}
- \o \l{All Namespaces}{All Namespaces}
- \o \l{Global Qt Declarations}{Global Declarations}
- \o \l{Qt Licenses and Credits}{Licenses and Credits}
- \endlist
- \enddiv
- \div {sectionlist tricol}
- \list
- \o \l{Programming with Qt}
- \o \l{UI Design with Qt}
- \o \l{Cross-Platform and Platform-Specific Development}
- \o \l{Qt and Key Technologies}
- \o \l{Best Practice Guides}
- \endlist
- \enddiv
- \div {sectionlist}
- \list
- \o \l{qtquick.html}{Qt Quick}
- \o \l{qdeclarativeintroduction.html}{Introduction to QML}
- \o \l{qdeclarativeelements.html}{QML Elements}
- \o \l{qdeclarativeexamples.html}{QML Examples and Demos}
- \endlist
- \enddiv
+ \list
+ \o \l{Qt Whitepaper}{Qt C++ Framework}
+ \o \l{Intro to Qt Quick}{Qt Quick}
+ \o \l{external: Qt Mobility Manual}{Qt Mobility}
+ \o \l{Qt WebKit}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \list
+ \o \l{external: Qt SDK Manual}{Qt SDK}
+ \o \l{Qt Creator Whitepaper}{Qt Creator}
+ \o \l{external: Qt Simulator Manual}{Qt Simulator}
+ \endlist
+ \list
+ \o \l{Supported Platforms}{Platform Support}
+ \o \l{What's New in Qt 4.7} - latest release
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Qt in Action
\enddiv
- \enddiv
- \div {indexbox tools}
- \div {heading}
- Qt Tools
- \enddiv
- \div {indexboxcont}
- \div {section indexIcon} \emptyspan
- \enddiv
- \div {section}
- Qt offers a selection of development tools for
- different tasks. Use Qt Creator for project and code
- management as well as building powerfull UIs.
- \enddiv
- \div {section sectionlist}
- \list
- \o \l{http://doc.qt.nokia.com/qtcreator-2.0/index.html}{Qt Creator}
- \o \l{designer-manual.html}{Qt Designer}
- \o \l{linguist-manual.html}{Qt Linguist}
- \o \l{assistant-manual.html}{Qt Assistant}
- \o \l{qmake-manual.html}{Qt qmake}
- \o \l{http://doc.qt.nokia.com/qtsimulator-1.0/index.html}{Qt Simulator}
- \o \l{http://qt.nokia.com/developer/eclipse-integration}{Eclipse Integration}
- \o \l{http://qt.nokia.com/products/appdev}{Add-On Products and Services}
- \o \l{qvfb.html}{Virtual Framebuffer}
- \endlist
- \enddiv
+ \list
+ \o \l{Qt Demonstrations}{Application Gallery}
+ \o \l{Tutorials}{Step-by-Step Tutorials}
+ \o \l{Qt Examples}{Qt Example Code}
+ \o \l{QML Examples and Demos}
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
+\div {class="indexbox tools"}
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Develop with Qt
\enddiv
- \enddiv
+ \list
+ \o \l{Develop with Qt}{Steps to Programming Qt Applications}
+ \o \l{qt-creator-configure-target}{Configure Qt and Creator for Platforms}
+ \o \l{qt-technologies}{Qt Features and Technologies}
+ \o \l{qt-utilities}{Utilities and Testing}
+ \o \l{qt-deployment}{Deploying and Publishing Applications to Ovi Store}
+ \endlist
+ \list
+ \o \l{Getting Started Guides}{Qt and Qt Quick Programming Tutorials}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ UI Creation with Qt
+ \enddiv
+
+ \list
+ \o \l{qt-ui-creation}{Create UI with Qt}
+ \o \l{qt-rendering-painting-system}{Qt's Rendering and Painting Systems}
+ \o \l{Qt Quick} - develop fluid UIs with QML
+ \o \l{Widgets and Layouts} - elements for C++ interfaces
+ \o \l{external: Designer in Creator}{Designing UI in Creator}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Featured Articles
+ \enddiv
+ \list
+ \o \l{Scalability}{How to Create Scalable Applications}
+ \o \l{external: Setting Up Development Environment for Symbian}{Setting Up Development Environment for Symbian}
+ \o \l{external: Setting Up Development Environment for Maemo}{Setting Up Development Environment for Maemo}
+ \o \l{qt-mobile-demos}{Mobile Applications and Demos}
+ \o \l{QtWebKit Guide}{QtWebKit Developer Guide}
+ \endlist
+ \list
+ \o \l{Qt Development: The Steps from Challenge to Achievement}{The Steps from Challenge to Achievement}
+ A case analysis of a business development problem and a search for
+innovative solutions using Qt.
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
+\div {class="indexbox tools"}
+ \div {class="heading"}
+ Reference
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Qt API
+ \enddiv
+ \list
+ \o \l{All Classes}{All Classes}
+ \o \l{All Functions}{All Functions}
+ \o \l{All Modules}{All Modules}
+ \o \l{All Namespaces}{All Namespaces}
+ \o \l{Global Qt Declarations}{Global Declarations}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \list
+ \o \l{QML Elements}
+ \o \l{external: Qt Mobility Manual}{Qt Mobility APIs}
+ \o \l{external: Qt Mobility QML Plugins}{Mobility QML Plugins}
+ \endlist
+ \list
+ \o \l{Qt Licenses and Credits}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Qt Manuals
+ \enddiv
+ \list
+ \o \l{external: Qt Creator Manual}{Qt Creator}
+ \o \l{external: Qt Simulator Manual}{Qt Simulator}
+ \o \l{linguist-manual.html}{Qt Linguist}
+ \o \l{assistant-manual.html}{Qt Assistant}
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
*/
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index e22f953939..f58a9a597e 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -34,13 +34,13 @@
*/
/*!
- \page internationalization.html
\title Internationalization with Qt
\brief Information about Qt's support for internationalization and multiple languages.
\nextpage Writing Source Code for Translation
\ingroup qt-basic-concepts
-
+ \group internationalization
+
\keyword internationalization
\keyword i18n
@@ -192,7 +192,7 @@
to achieve this is to use QObject::tr(). For example, assuming the
\c LoginWidget is a subclass of QWidget:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 0
This accounts for 99% of the user-visible strings you're likely to
write.
@@ -202,7 +202,7 @@
appropriate class, or the QCoreApplication::translate() function
directly:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 1
If you need to have translatable text completely
outside a function, there are two macros to help: QT_TR_NOOP()
@@ -212,11 +212,11 @@
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 2
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 3
If you disable the \c{const char *} to QString automatic
conversion by compiling your software with the macro \c
@@ -244,13 +244,13 @@
The QString::arg() functions offer a simple means for substituting
arguments:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 4
In some languages the order of arguments may need to change, and this
can easily be achieved by changing the order of the % arguments. For
example:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 5
produces the correct output in English and Norwegian:
\snippet doc/src/snippets/code/doc_src_i18n.qdoc 6
@@ -325,7 +325,7 @@
Typically, your application's \c main() function will look like
this:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 8
Note the use of QLibraryInfo::location() to locate the Qt translations.
Developers should request the path to the translations at run-time by
@@ -346,7 +346,7 @@
need to output Cyrillic in the ISO 8859-5 encoding. Code for this
would be:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 9
For converting Unicode to local 8-bit encodings, a shortcut is
available: the QString::toLocal8Bit() function returns such 8-bit
@@ -360,7 +360,7 @@
demonstrated by this conversion from ISO 8859-5 Cyrillic to Unicode
conversion:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 10
Ideally Unicode I/O should be used as this maximizes the portability
of documents between users around the world, but in reality it is
@@ -392,7 +392,7 @@
formats. Such localizations can be accomplished using appropriate tr()
strings.
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 11
In the example, for the US we would leave the translation of
"AMPM" as it is and thereby use the 12-hour clock branch; but in
@@ -417,7 +417,7 @@
the text displayed by widgets using the \l{QObject::tr()}{tr()} function
in the usual way. For example:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 12
All other change events should be passed on by calling the default
implementation of the function.
@@ -511,7 +511,7 @@
/*!
\page i18n-source-translation.html
\title Writing Source Code for Translation
- \ingroup i18n
+ \ingroup internationalization
\previouspage Internationalization with Qt
\contentspage Internationalization with Qt
\nextpage Translation Rules for Plurals
@@ -708,7 +708,7 @@
Typically, your application's \c main() function will look like
this:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 8
Note the use of QLibraryInfo::location() to locate the Qt translations.
Developers should request the path to the translations at run-time by
@@ -723,7 +723,7 @@
/*!
\page i18n-plural-rules.html
\title Translation Rules for Plurals
- \ingroup i18n
+ \ingroup internationalization
\previouspage Writing Source Code for Translation
\contentspage Internationalization with Qt
\brief A summary of the translation rules for plurals produced by Qt's i18n tools.
diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
index 1f413f9eb4..7932fe8717 100644
--- a/doc/src/internationalization/linguist-manual.qdoc
+++ b/doc/src/internationalization/linguist-manual.qdoc
@@ -29,6 +29,7 @@
\page linguist-manual.html
\title Qt Linguist Manual
\ingroup qttools
+ \ingroup internationalization
\startpage {index.html}{Qt Reference Documentation}
\nextpage Qt Linguist Manual: Release Manager
@@ -46,10 +47,10 @@
at the person with overall responsibility for the release of the
application. They will typically coordinate the work of the
software engineers and the translator. The chapter describes the
- use of two tools. The \l{lupdate} tool is used to synchronize
- source code and translations. The \l{lrelease} tool is used to
- create run-time translation files for use by the released
- application.
+ use of two tools. The \l{linguist-manager.html#lupdate}{lupdate}
+ tool is used to synchronize source code and translations. The
+ \l{linguist-manager.html#lrelease}{lrelease} tool is used to create
+ run-time translation files for use by the released application.
The \l{linguist-translators.html}{Translators} chapter is for
translators. It describes the use of the \QL tool.
@@ -77,7 +78,7 @@
programmer is able to add additional context information to phrases
when necessary. The release manager generates a set of translation
files that are produced from the source files and passes these to the
- translator. The translator opens the translation files using \QL,
+ translator. The translator opens the translation files using \QL,
enters their translations and saves the results back into
the translation files, which they pass back to the release manager.
The release manager then generates fast compact versions of these
@@ -144,25 +145,22 @@
/*!
\page linguist-manager.html
\title Qt Linguist Manual: Release Manager
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual
\nextpage Qt Linguist Manual: Translators
- \keyword lupdate
- \keyword lrelease
-
Two tools are provided for the release manager, \l lupdate and \l
lrelease. These tools can process \l qmake project files, or operate
directly on the file system.
\section1 Qt Project Files
- The easiest method to use \l{#lupdate} {lupdate} and \l{#lrelease}
- {lrelease} is by specifying a \c .pro Qt project file. There must
- be an entry in the \c TRANSLATIONS section of the project file for
- each language that is additional to the native language. A typical
- entry looks like this:
+ The easiest method to use \l lupdate and \l lrelease is by specifying
+ a \c .pro Qt project file. There must be an entry in the \c TRANSLATIONS
+ section of the project file for each language that is additional to
+ the native language. A typical entry looks like this:
\snippet examples/linguist/arrowpad/arrowpad.pro 1
@@ -173,8 +171,8 @@
An example of a complete \c .pro file with four translation source
files:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 0
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 0
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 1
QTextCodec::setCodecForTr() makes it possible to choose a 8-bit
encoding for literal strings that appear within \c tr() calls.
@@ -186,14 +184,14 @@
application, \QL needs you to set the \c CODECFORTR
entry in the \c .pro file as well. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 1
Also, if your compiler uses a different encoding for its runtime
system as for its source code and you want to use non-ASCII
characters in string literals, you will need to set the \c
CODECFORSRC. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 2
Microsoft Visual Studio 2005 .NET appears to be the only compiler
for which this is necessary. However, if you want to write
@@ -201,9 +199,8 @@
in your source files. You can still specify non-ASCII characters
portably using escape sequences, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 3
- \target lupdate manual
\section1 lupdate
Usage: \c {lupdate myproject.pro}
@@ -238,8 +235,8 @@
can also process Localization Interchange File Format (XLIFF)
format files; files in this format typically have file names that
end with the \c .xlf suffix.
-
- \note The minimum supported version for XLIFF format files is
+
+ \note The minimum supported version for XLIFF format files is
1.1. XLIFF 1.0 version files are not supported.
Pass the \c -help option to \c lupdate to obtain the list of
@@ -271,7 +268,7 @@
are available the application will detect them and use them
automatically.
- Note that lrelease will only incorporate translations that are
+ Note that \l lrelease will only incorporate translations that are
marked as "finished". Otherwise the original text will be used
instead.
@@ -285,12 +282,13 @@
Both \l lupdate and \l lrelease may be used with TS
translation source files which are incomplete. Missing
translations will be replaced with the native language phrases at
- runtime.
+ runtime.
*/
/*!
\page linguist-translators.html
\title Qt Linguist Manual: Translators
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Release Manager
@@ -315,7 +313,7 @@
arranged around a central \l{The Translation Area} {translation
area}. The \l{Context Window} {context list} is normally shown
on the left, and the \l{Sources and Forms Window} {source code},
- \l{Strings Window} {string list}, and either the \l{Phrases and
+ \l{Strings Window} {string list}, and either the \l{Phrases and
Guesses Window} {phrases and guesses}, or the \l{Warnings Window}
{warnings} are shown above and below the \l{The Translation Area}
{translations area}.
@@ -331,9 +329,9 @@
\key{tick mark} button on the toolbar, or click the icon to the
left of the selected source string in the string list. Repeat this
process until all strings in the string list are marked with
- \inlineimage linguist-check-on.png
+ \inlineimage linguist-check-on.png
or
- \inlineimage linguist-check-warning.png
+ \inlineimage linguist-check-warning.png
. Then select the next context and continue.
Translation options are shown in the \l{Phrases and Guesses
@@ -389,17 +387,17 @@
that aren't in a subclass of QObject.
To the left of the \e{Context} column is a column labeled
- \inlineimage linguist-check-obsolete.png
+ \inlineimage linguist-check-obsolete.png
. This column uses the following list of icons to summarize the
current translation state for each context:
\list
- \o \inlineimage linguist-check-on.png
+ \o \inlineimage linguist-check-on.png
All strings in the context have been translated, and all the
translations passed the \l{Validation Tests} {validation tests}.
- \o \inlineimage linguist-check-warning.png
+ \o \inlineimage linguist-check-warning.png
All strings in the context have been translated or marked as
translated, but at least one translation failed the \l{Validation
Tests} {validation tests}.
@@ -427,19 +425,19 @@
selected. Its \e{Items} entry shows \bold{18/18}, which means it
has 18 translatable strings and all 18 strings currently have
translations. However, the context has been marked with the
- \inlineimage linguist-check-warning.png
- icon, which means that at least one of the current translations
- failed a \l{Validation Tests} {validation test}. In the
- \l{Strings Window} {strings window} to the right, we see that one
- of the strings is indeed marked with the
- \inlineimage linguist-check-warning.png
+ \inlineimage linguist-check-warning.png
+ icon, which means that at least one of the current translations
+ failed a \l{Validation Tests} {validation test}. In the
+ \l{Strings Window} {strings window} to the right, we see that one
+ of the strings is indeed marked with the
+ \inlineimage linguist-check-warning.png
icon.
The context window is a dockable window. It can be dragged to
another position in the main window, or dragged out of the main
window to be a separate window. If you move the context window,
\QL remembers the new position and puts the context window there
- whenever you start the program. If the context window has been
+ whenever you start the program. If the context window has been
closed, it can be restored by pressing \key{F6}.
\section2 Strings Window
@@ -475,16 +473,16 @@
\o The source string has a translation (possibly empty); the user
has accepted the translation, and the translation passes all the
\l{Validation Tests} {validation tests}. If the translation is
- empty, the user has chosen to leave it empty. Click the icon to
- revoke acceptance of the translation and decrement the number of
+ empty, the user has chosen to leave it empty. Click the icon to
+ revoke acceptance of the translation and decrement the number of
accepted translations in the \e{Items} column of the \l{Context
- Window} {context list} by 1. The state is reset to
- \inlineimage linguist-check-off.png
+ Window} {context list} by 1. The state is reset to
+ \inlineimage linguist-check-off.png
if the string has a translation, or to
\inlineimage linguist-check-empty.png
- if the string's translation is empty. If \c{lupdate} changes the
- contents of a string, its acceptance state is automatically reset
- to \inlineimage linguist-check-off.png
+ if the string's translation is empty. If \c{lupdate} changes the
+ contents of a string, its acceptance state is automatically reset
+ to \inlineimage linguist-check-off.png
.
\row
@@ -493,44 +491,44 @@
\o The user has accepted the translation, but the translation does
not pass all the \l{Validation Tests} {validation tests}. The
validation test failures are shown in the \l{Warnings Window}
- {warnings window}. Click the icon to revoke acceptance of the
- translation. The state is reset to \inlineimage linguist-danger.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is decremented by 1.
+ {warnings window}. Click the icon to revoke acceptance of the
+ translation. The state is reset to \inlineimage linguist-danger.png
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is decremented by 1.
\row
\o Not Accepted
\o \inlineimage linguist-check-off.png
- \o The string has a non-empty translation that passes all the
- \l{Validation Tests} {validation tests}, but the user has not yet
+ \o The string has a non-empty translation that passes all the
+ \l{Validation Tests} {validation tests}, but the user has not yet
accepted the translation. Click the icon or press \key{Ctrl+Enter}
- to accept the translation. The state is reset to
+ to accept the translation. The state is reset to
\inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is incremented by 1.
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is incremented by 1.
\row
\o No Translation
\o \inlineimage linguist-check-empty.png
- \o The string does not have a translation. Click the icon to
- accept the empty translation anyway. The state is reset to
+ \o The string does not have a translation. Click the icon to
+ accept the empty translation anyway. The state is reset to
\inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
+ , and the number of accepted translations in the \e{Items} column
of the \l{Context Window} {context list} is incremented by 1.
\row
\o Validation Failures
\o \inlineimage linguist-danger.png
- \o The string has a translation, but the translation does not
- pass all the \l{Validation Tests} {validation tests}. Validation
- test failures are shown in the \l{Warnings Window} {warnings}
- window. Click on the icon or press \key{Ctrl+Return} to accept
- the translation even with validation failures. The state is
+ \o The string has a translation, but the translation does not
+ pass all the \l{Validation Tests} {validation tests}. Validation
+ test failures are shown in the \l{Warnings Window} {warnings}
+ window. Click on the icon or press \key{Ctrl+Return} to accept
+ the translation even with validation failures. The state is
reset to \inlineimage linguist-check-warning.png
- . We recommended editing the translation to fix the causes of
+ . We recommended editing the translation to fix the causes of
the validation failures. The state will reset automatically to
\inlineimage linguist-check-off.png
- , when all the failures have been fixed.
+ , when all the failures have been fixed.
\row
\o Obsolete
@@ -558,12 +556,12 @@
If the developer provides a \l{QObject::tr()} {disambiguating
comment}, it will appear below the source text area, under the
- label \menu{Developer comments}.
+ label \menu{Developer comments}.
Below the source text and optional developer comments are two text
entry widgets for the translator, one for entering the translation
of the current string, and one for the translator to enter an
- optional comment to be read by other translators.
+ optional comment to be read by other translators.
When \l{Translating Multiple Languages Simultaneously} {multiple
languages} are being translated, this sequence of fields is
@@ -578,7 +576,7 @@
translation(s) will be listed in this window. If the current
string is the same as, or similar to, another string that has
already been translated, that other string and its translation
- will also be listed in this window.
+ will also be listed in this window.
To use a translation from the Phrases and Guesses Window, you can
double click the translation, and it will be copied into the
@@ -607,7 +605,7 @@
If the source context shows the wrong source line, it probably
means the translation file is out of sync with the source files.
To re-sync the translation file with the source files, see the
- \l{lupdate manual} {lupdate manual}.
+ \l{linguist-manager.html#lupdate}{lupdate} manual.
The Sources and Forms window is a dockable window. If it has been
closed, it can be made visible again by pressing the \e{Sources
@@ -638,12 +636,12 @@
and you are given an application's Polish translation file and
asked to update the application's Japanese translation file. You
are more comfortable translating Polish to Japanese than you are
- translating English to Japanese.
+ translating English to Japanese.
Below is the UI snapshot shown earlier, but this time with both
\e{Polish} and \e{Japanese} translation files loaded.
- \image linguist-linguist_2.png
+ \image linguist-linguist_2.png
The first thing to notice is that the \l{The Translation Area}
{translation area} has text editing areas for both Polish and
@@ -662,18 +660,18 @@
selected in the snapshot shown above. Recall that in the first UI
snapshot (Polish only), the numbers for this context were
\e{18/18}, meaning 18 translatable strings had been found in the
- context, and all 18 strings had accepted translations. In the UI
+ context, and all 18 strings had accepted translations. In the UI
snapshot above, the numbers for the \bold{MessageEditor} context
are now \e{1/18}, meaning that both languages have 18 translatable
strings for that context, but for Japanese, only 1 of the 18
- strings has an accepted translation. The
- \inlineimage linguist-check-off.png
+ strings has an accepted translation. The
+ \inlineimage linguist-check-off.png
icon in the Japanese column means that at least one string in the
- context doesn't have an accepted Japanese translation yet. In fact,
- 17 of the 18 strings don't have accepted Japanese translations yet.
- We will see \e{18/18} in the \e{Items} column when all 18 strings
- have accepted translations for all the loaded translation files,
- e.g., both Polish and Japanese in the snapshot.
+ context doesn't have an accepted Japanese translation yet. In fact,
+ 17 of the 18 strings don't have accepted Japanese translations yet.
+ We will see \e{18/18} in the \e{Items} column when all 18 strings
+ have accepted translations for all the loaded translation files,
+ e.g., both Polish and Japanese in the snapshot.
\section1 Common Tasks
@@ -726,7 +724,7 @@
key in the translation text ("File") precede it with an ampersand,
e.g. \e{\&File}. If a string to be translated has an ampersand in
it, then the translation for that string should also have an
- ampersand in it, preferably in front of the same character.
+ ampersand in it, preferably in front of the same character.
The meaning of an Alt key accelerator can be determined from the
phrase in which the ampersand is embedded. The translator can
@@ -810,7 +808,7 @@
If the translated text is similar to the source text, choose the
\e {Copy from source text} entry in the \menu Translation menu (press
- \key{Ctrl+B}) which will copy the source text into the
+ \key{Ctrl+B}) which will copy the source text into the
\l{The Translation Area} {translation area}.
\QL automatically lists possible translations from any open
@@ -839,9 +837,9 @@
A \QL phrase book is a set of source phrases, target
(translated) phrases, and optional definitions. Typically one phrase book
- will be created per language and family of applications. Phrase books
- are used to provide a common set of translations to help ensure consistency.
- They can also be used to avoid duplication of effort since the translations
+ will be created per language and family of applications. Phrase books
+ are used to provide a common set of translations to help ensure consistency.
+ They can also be used to avoid duplication of effort since the translations
for a family of applications can be produced once in the phrase book.
If the translator reaches an non-translated phrase that is the same as a
source phrase in a phrase book, \QL will show the
@@ -861,25 +859,25 @@
The phrase book contents can be displayed and changed by selecting
\menu{Phrase|Edit Phrase Book}, and then activating the phrase book you
want to work on. This will pop up the Phrase Book Dialog as shown
- in the image above. To add a new phrase click the \gui{New Phrase}
- button (or press Alt+N) and type in a new source phrase. Press Tab and
- type in the translation. Optionally press Tab and enter a definition --
- this is useful to distinguish different translations of the same source
- phrase. This process may be repeated as often as necessary. You can delete
+ in the image above. To add a new phrase click the \gui{New Phrase}
+ button (or press Alt+N) and type in a new source phrase. Press Tab and
+ type in the translation. Optionally press Tab and enter a definition \mdash
+ this is useful to distinguish different translations of the same source
+ phrase. This process may be repeated as often as necessary. You can delete
a phrase by selecting it in the phrases list and clicking
- Remove Phrase. Click the \gui Close button (press Esc) once you've finished
+ Remove Phrase. Click the \gui Close button (press Esc) once you've finished
adding (and removing) phrases.
\section2 Shortcuts for Editing Phrase Books
You can also create a new phrase book entry directly out of the translation you
are working on: Clicking \menu{Phrases|Add to Phrase Book} or pressing
- \key{Ctrl+T} will add the source text and the content of the first translation
+ \key{Ctrl+T} will add the source text and the content of the first translation
field to the current phrase book. If multiple phrase books are loaded,
you have to specify the phrase book to add the entry to in a dialogue.
- If you detect an error in a phrase book entry that is shown in the
- \l{Phrases and Guesses Window}, you can also edit it in place by right
- clicking on the entry, and selecting \menu{Edit}. After fixing the error
+ If you detect an error in a phrase book entry that is shown in the
+ \l{Phrases and Guesses Window}, you can also edit it in place by right
+ clicking on the entry, and selecting \menu{Edit}. After fixing the error
press \key{Return} to leave the editing mode.
\section2 Batch Translation
@@ -890,7 +888,7 @@
translate source texts that are also in a phrase book. Selecting
\menu{Tools|Batch Translation} will show you the batch translation dialog,
which let you configure which phrase books to use in what order during the
- batch translation process. Furthermore you can set whether only entries
+ batch translation process. Furthermore you can set whether only entries
with no present translation should be considered, and whether batch translated
entries should be set to finished (see also \l {String Translation States}).
@@ -929,7 +927,7 @@
Forms created by \e{Qt Designer} are stored in special UI files.
\QL can make use of these UI files to show the translations
done so far on the form itself. This of course requires access to the UI
- files during the translation process. Activate
+ files during the translation process. Activate
\menu{Tools|Open/Refresh Form Preview} to open the window shown above.
The list of UI files \QL has detected are displayed in the Forms
List on the left hand. If the path to the files has changed, you can load
@@ -947,17 +945,18 @@
\list
\o TS \e {translation source files} \BR are human-readable XML
files containing source phrases and their translations. These files are
- usually created and updated by \l lupdate and are specific to an
- application.
+ usually created and updated by \l{linguist-manager.html#lupdate}{lupdate}
+ and are specific to an application.
\o \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere
to the international XML Localization Interchange File Format. \QL
- can be used to edit XLIFF files generated by other programs. However, for
- standard Qt projects, only the TS file format is used. \note The minimum
- supported version for XLIFF format files is 1.1. XLIFF 1.0 version files
+ can be used to edit XLIFF files generated by other programs. However, for
+ standard Qt projects, only the TS file format is used. \note The minimum
+ supported version for XLIFF format files is 1.1. XLIFF 1.0 version files
are not supported.
\o QM \e {Qt message files} \BR are binary files that contain
translations used by an application at run-time. These files are
- generated by \l lrelease, but can also be generated by \QL.
+ generated by \l{linguist-manager.html#lrelease}{lrelease}, but can also
+ be generated by \QL.
\o \c .qph \e {Qt phrase book files} \BR are human-readable XML
files containing standard phrases and their translations. These files
are created and updated by \QL and may be used by any
@@ -982,13 +981,15 @@
name, format and/or put in a different location.
\o \gui {Release} \BR create a Qt message QM file with the same base
name as the current translation source file. The release manager's
- command line tool \l lrelease performs the same function on
- \e all of an application's translation source files.
+ command line tool \l{linguist-manager.html#lrelease}{lrelease}
+ performs the same function on \e all of an application's translation
+ source files.
\o \gui {Release As...} \BR pops up a save as file dialog. The
filename entered will be a Qt message QM file of the translation
based on the current translation source file. The release manager's
- command line tool \l lrelease performs the same function on
- \e all of an application's translation source files.
+ command line tool \l{linguist-manager.html#lrelease}{lrelease}
+ performs the same function on \e all of an application's translation
+ source files.
\o \gui {Print... Ctrl+P} \BR pops up a print dialog. If you click
OK the translation source and the translations will be printed.
\o \gui {Exit Ctrl+Q} \BR closes \QL.
@@ -1018,10 +1019,10 @@
Source phrases, translations and comments may be searched.
\o \gui {Find Next F3} \BR finds the next occurrence of the text that
was last entered in the Find dialog.
- \o \gui {Search and Translate...} \BR pops up the Search and
+ \o \gui {Search and Translate...} \BR pops up the Search and
Replace Dialog. Use this dialog to translate the same text in multiple items.
\o \gui {Translation File Settings...} \BR let you configure the target
- language and the country/region of a translation source file.
+ language and the country/region of a translation source file.
\endlist
\o \gui {Translation}
@@ -1123,7 +1124,7 @@
\o \gui {Manual F1} \BR opens this manual.
\o \gui {About Qt Linguist} \BR Shows information about \QL.
\o \gui {About Qt} \BR Shows information about \e{Qt}.
- \o \gui {What's This? Shift+F1} \BR Click on one item in the main window
+ \o \gui {What's This? Shift+F1} \BR Click on one item in the main window
to get additional information about it.
\endlist
@@ -1219,6 +1220,7 @@
/*!
\page linguist-programmers.html
\title Qt Linguist Manual: Programmers
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Translators
@@ -1262,28 +1264,31 @@
Translation files are created as follows:
\list 1
- \o Run \l lupdate initially to generate the first set of TS
- translation source files with all the user-visible text but no
- translations.
+ \o Run \l {linguist-manager.html#lupdate}{lupdate} initially to
+ generate the first set of TS translation source files with all the
+ user-visible text but no translations.
\o The TS files are given to the translator who adds translations
using \QL. \QL takes care of any changed
or deleted source text.
- \o Run \l lupdate to incorporate any new text added to the
- application. \l lupdate synchronizes the user-visible text from the
- application with the translations; it does not destroy any data.
+ \o Run \l{linguist-manager.html#lupdate}{lupdate} to incorporate any new
+ text added to the application. \l{linguist-manager.html#lupdate}{lupdate}
+ synchronizes the user-visible text from the application with the
+ translations; it does not destroy any data.
\o Steps 2 and 3 are repeated as often as necessary.
- \o When a release of the application is needed \l lrelease is run to
+ \o When a release of the application is needed
+ \l{linguist-manager.html#lrelease}{lrelease} is run to
read the TS files and produce the QM files used by the
application at runtime.
\endlist
- For \l lupdate to work successfully, it must know which translation
- files to produce. The files are simply listed in the application's \c
- .pro Qt project file, for example:
+ For \l{linguist-manager.html#lupdate}{lupdate} to work successfully,
+ it must know which translation files to produce. The files are simply
+ listed in the application's \c .pro Qt project file, for example:
\snippet examples/linguist/arrowpad/arrowpad.pro 1
- If your sources contain genuine non-Latin1 strings, \l lupdate needs
+ If your sources contain genuine non-Latin1 strings,
+ \l{linguist-manager.html#lupdate}{lupdate} needs
to be told about it in the \c .pro file by using, for example,
the following line:
@@ -1291,7 +1296,8 @@
CODECFORTR = UTF-8
\endcode
- See the \l lupdate and \l lrelease sections.
+ See the \l{linguist-manager.html#lupdate}{lupdate} and
+ \l{linguist-manager.html#lrelease}{lrelease} sections.
\section2 Loading Translations
@@ -1333,11 +1339,11 @@
User-visible strings are marked as translation targets by wrapping them
in a \c tr() call, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 6
would become
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 7
All QObject subclasses that use the \c Q_OBJECT macro implement
the \c tr() function.
@@ -1346,29 +1352,29 @@
usually called as a member function of a QObject subclass, in
other cases an explicit class name can be supplied, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 8
or
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 9
\section2 Distinguishing Between Identical Translatable Strings
- The \l lupdate program automatically provides a \e context for every
- source text. This context is the class name of the class that contains
- the \c tr() call. This is sufficient in the vast majority of cases.
- Sometimes however, the translator will need further information to
- uniquely identify a source text; for example, a dialog that contained
- two separate frames, each of which contained an "Enabled" option would
- need each identified because in some languages the translation would
- differ between the two. This is easily achieved using the
+ The \l{linguist-manager.html#lupdate}{lupdate} program automatically
+ provides a \e context for every source text. This context is the class
+ name of the class that contains the \c tr() call. This is sufficient in
+ the vast majority of cases. Sometimes however, the translator will need
+ further information to uniquely identify a source text; for example,
+ a dialog that contained two separate frames, each of which contained an
+ "Enabled" option would need each identified because in some languages the
+ translation would differ between the two. This is easily achieved using the
two argument form of the \c tr() call, e.g.
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 10
and
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 11
Ctrl key accelerators are also translatable:
@@ -1385,44 +1391,46 @@
solved by adding a comment using the keyword \e TRANSLATOR which
describes the navigation steps to reach the text in question; e.g.
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 12
These comments are particularly useful for widget classes.
\section2 Handling Plural Forms
- Qt includes a \c tr() overload that will make it very easy to
- write "plural-aware" internationalized applications. This overload
+ Qt includes a \c tr() overload that will make it very easy to
+ write "plural-aware" internationalized applications. This overload
has the following signature:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 17
- Depending on the value of \c n, the \c tr() function will return a different
- translation, with the correct grammatical number for the target language.
+ Depending on the value of \c n, the \c tr() function will return a different
+ translation, with the correct grammatical number for the target language.
Also, any occurrence of \c %n is replaced with \c{n}'s value. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 18
- If a French translation is loaded, this will expand to "0 item
- remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
- remplac\unicode{233}s", etc., depending on \c{n}'s value.
- And if no translation is loaded, the original string is used, with \c %n
+ If a French translation is loaded, this will expand to "0 item
+ remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
+ remplac\unicode{233}s", etc., depending on \c{n}'s value.
+ And if no translation is loaded, the original string is used, with \c %n
replaced with count's value (e.g., "6 item(s) replaced").
- To handle plural forms in the native language, you need to load a
- translation file for this language, too. \l lupdate has the
+ To handle plural forms in the native language, you need to load a
+ translation file for this language, too.
+ \l{linguist-manager.html#lupdate}{lupdate} has the
\c -pluralonly command line option, which allows the creation of
TS files containing only entries with plural forms.
- See the \l{http://doc.qt.nokia.com/qq/}{Qt Quarterly} Article
+ See the \l{http://doc.qt.nokia.com/qq/}{Qt Quarterly} Article
\l{http://doc.qt.nokia.com/qq/qq19-plurals.html}{Plural Forms in Translations}
for further details on this issue.
\section2 Coping With C++ Namespaces
C++ namespaces and the \c {using namespace} statement can confuse
- \l lupdate. It will interpret \c MyClass::tr() as meaning just
- that, not as \c MyNamespace::MyClass::tr(), even if \c MyClass is
+ \l{linguist-manager.html#lupdate}{lupdate}. It will interpret
+ \c MyClass::tr() as meaning just that, not as
+ \c MyNamespace::MyClass::tr(), even if \c MyClass is
defined in the \c MyNamespace namespace. Runtime translation of
these strings will fail because of that.
@@ -1430,7 +1438,7 @@
comment at the beginning of the source files that use \c
MyClass::tr():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 13
After the comment, all references to \c MyClass::tr() will be
understood as meaning \c MyNamespace::MyClass::tr().
@@ -1443,20 +1451,21 @@
use either the tr() function of an appropriate class, or the
QCoreApplication::translate() function directly:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 14
\section3 Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()
If you need to have translatable text completely outside a function,
there are two macros to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP().
- These macros merely mark the text for extraction by \l{lupdate}.
+ These macros merely mark the text for extraction by
+ \l{linguist-manager.html#lupdate}{lupdate}.
The macros expand to just the text (without the context).
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 15
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 16
\section1 Tutorials
@@ -1484,8 +1493,9 @@
applications for translation.
At the beginning of a project add the translation source files to be
- used to the project file and add calls to \l lupdate and \l lrelease to
- the makefile.
+ used to the project file and add calls to
+ \l{linguist-manager.html#lupdate}{lupdate} and
+ \l{linguist-manager.html#lrelease}{lrelease} to the Makefile.
During the project all the programmer must do is wrap any user-visible
text in \c tr() calls. They should also use the two argument form for
@@ -1498,6 +1508,7 @@
/*!
\page linguist-ts-file-format.html
\title Qt Linguist Manual: TS File Format
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Programmers
@@ -1508,5 +1519,5 @@
may change in future Qt releases.
\quotefile tools/linguist/shared/ts.dtd
-
+
*/
diff --git a/doc/src/ja_JP/development/qmake-manual.qdoc b/doc/src/ja_JP/development/qmake-manual.qdoc
index a6cfe3d44d..3b908f7ba6 100644
--- a/doc/src/ja_JP/development/qmake-manual.qdoc
+++ b/doc/src/ja_JP/development/qmake-manual.qdoc
@@ -58,16 +58,16 @@
新しい行を作り、\c{SOURCES +=}、続いて hello.cpp を入力します。
つまり、以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 108
これを以下のようになるまでプロジェクトの各ソースファイルに対して行います:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 109
make に似たシンタックスを使いたい場合は、
以下のように改行をエスケープしてすべてのファイルを 1 行に書きます:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 110
ソースファイルの一覧をプロジェクトファイルに追加しました。
次にヘッダファイルを追加します。
@@ -77,7 +77,7 @@
これを終えると、プロジェクトファイルは以下のようになるでしょう:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 111
ターゲットの名前は自動的に設定され、
プロジェクトファイルと同じ名前になります。
@@ -86,7 +86,7 @@
ターゲットは Windows では \c hello.exe 、Unix では \c hello になります。
プロジェクトファイルで別の名前を指定することもできます:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 112
最後に \l{qmake Variable Reference#CONFIG}{CONFIG} 変数を設定します。
このアプリケーションは Qt アプリケーションなので \c CONFIG に
@@ -96,19 +96,19 @@
最終的なプロジェクトファイルは以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 113
\c qmake を使って、このアプリケーションのための Makefile を生成します。
プロジェクトのディレクトリでコマンドラインに次のように入力します:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 114
そして、使用するコンパイラによって \c make または \c nmake を入力します。
Visual Studio ユーザの場合、\c qmake は、以下のように
\c .dsp ファイルまたは \c .vcproj ファイルも作成できます:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 115
\section1 アプリケーションをデバッグできるようにする
@@ -119,7 +119,7 @@
たとえば:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 116
直前の例と同様に、Makefile を生成するには \c qmake を使います。
アプリケーションをデバッグ環境で実行する際に役に立つ情報を得られるようになります。
@@ -137,7 +137,7 @@
Windows 用のファイルを追加するシンプルなスコープは以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 117
\c qmake が Windows 上で実行されると、ソースファイルのリストに
\c hellowin.cpp が追加されます。
@@ -146,7 +146,7 @@
これを終えると、プロジェクトファイルは以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 118
これまでと同様に、Makefile を生成するには \c qmake を使います。
@@ -159,13 +159,13 @@
使い方はスコープの条件をこれらの関数で置き換えるだけです。
\c main.cpp ファイルの確認は以下のようになります :
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 119
記号 \c{!} はテストを否定します。
つまり \c{exists( main.cpp )} はファイルが存在する場合に真になり、
\c{!exists( main.cpp )} はファイルが存在しない場合に真になります。
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 120
前と同様に、\c qmake を実行して Makefile を生成します。
仮に \c main.cpp の名前を変更すると、上記のメッセージが表示され、
@@ -185,12 +185,12 @@
まず 1 つのスコープを作成し、その中にもう 1 つスコープを作成します。
そして 2 つのスコープの中に設定を書きます。例えば:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 121
ネストされたスコープはコロンを使ってつなぐことができます。
最終的なプロジェクトファイルは以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 122
以上です。\c qmake のチュートリアルが終了しました。
それでは、あなたの開発プロジェクトのプロジェクトファイルを作成してみましょう。
diff --git a/doc/src/ja_JP/development/qtestlib.qdoc b/doc/src/ja_JP/development/qtestlib.qdoc
index c1001dc62e..3ff1f36db7 100644
--- a/doc/src/ja_JP/development/qtestlib.qdoc
+++ b/doc/src/ja_JP/development/qtestlib.qdoc
@@ -71,7 +71,7 @@
次に、テスト関数を実装します。実装は以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 8
\l QVERIFY() マクロは、引数として渡される式を評価します。
式が真と評価されるとテスト関数の実行が継続されます。
@@ -131,7 +131,7 @@
これまでは、テストデータをテスト関数にハードコードしていました。
この場合、テストデータを追加した関数は以下のようになります:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 11
関数が繰り返しを行うコードによって分散するのを防ぐために、
QTestLib はテストデータのテスト関数への追加をサポートします。
diff --git a/doc/src/ja_JP/examples/arrowpad.qdoc b/doc/src/ja_JP/examples/arrowpad.qdoc
index 90856543f4..56f14a11b5 100644
--- a/doc/src/ja_JP/examples/arrowpad.qdoc
+++ b/doc/src/ja_JP/examples/arrowpad.qdoc
@@ -71,7 +71,7 @@
\c Q_OBJECT のマクロは、以下の内容で
\c ArrowPad に \c tr(x) を定義します:
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
各ソーステキストが表示されるクラスを把握しておくと、
\e {Qt Linguist} で論理的に関連のある文字列をグループ化することが出来ます。
diff --git a/doc/src/ja_JP/examples/trollprint.qdoc b/doc/src/ja_JP/examples/trollprint.qdoc
index dfe7eaa817..ddc68809aa 100644
--- a/doc/src/ja_JP/examples/trollprint.qdoc
+++ b/doc/src/ja_JP/examples/trollprint.qdoc
@@ -136,12 +136,12 @@
変更すべき行は4行あります。
ラジオボタンの最初のペアの \c tr() 呼び出しに、2つ目の引数 "two-sided"(両面) をに追加します:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
そして、ラジオボタンの2番目のペアの \c tr() 呼び出しに、
2つ目の引数 "colors"(色) を追加します。
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
ここで、\c lupdate を実行し、\e {Qt Linguist} で
\c trollprint_pt.ts を開きます。2 つの変更個所がわかるはずです。
@@ -184,7 +184,7 @@
これは、ソースコードで \c TRANSLATOR
コメントを使用して行います:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
一部のソースファイル、特にダイアログクラスのコメントに
ダイアログに到達するまでに必要な操作を記述します。
@@ -201,7 +201,7 @@
コメントは役立つナビゲーション情報を提供するため、
翻訳に要する時間を節約できます:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
\section1 Troll Print 1.1
diff --git a/doc/src/legal/qtquicklicense.qdoc b/doc/src/legal/qtquicklicense.qdoc
new file mode 100644
index 0000000000..aa9e201891
--- /dev/null
+++ b/doc/src/legal/qtquicklicense.qdoc
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \page qtquicklicense.html
+ \title Qt Quick Licensing Information
+ \ingroup licensing
+ \brief Qt Quick and QtDeclarative Licensing Information.
+
+
+Applications created using Qt Quick are subject to the terms and conditions of the GNU Lesser General Public License as Qt Quick includes dependencies to QtScript and JavaScriptCore which are licensed under the terms of the GNU Library General Public License ("LGPL"). Qt Commercial Edition licensees that wish to distribute applications that use the Qt Quick need to be aware of their obligations under the LGPL. Individual contributor names and copyright dates can be found inline in the code. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+On the Qt web site, you can find a
+\l{Qt Licensing Overview} and information on \l{Qt License Pricing}
+for commercial editions of Qt and other Qt-related products.
+*/
diff --git a/doc/src/mainpage.qdoc b/doc/src/mainpage.qdoc
new file mode 100644
index 0000000000..f7f048600b
--- /dev/null
+++ b/doc/src/mainpage.qdoc
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+\page gettingstarted-develop.html
+\title Develop with Qt
+\ingroup gettingstarted
+
+\div {class = "indexboxcont indexboxbar"}
+Developing a Qt application involves many different steps and stages. From
+configuring Creator to distributing binaries to different platforms, Qt provides
+many options along the way.
+\image quick_screens.png
+\enddiv
+
+\div {class = "indexboxcont indexboxbar normallist"}
+\keyword qt-creator-configure-target
+\section1 Configuring Qt and Creator Targets
+Qt and Creator are configurable to compile applications on many platform targets
+and multiple platforms.
+
+\section2 Configuring Creator for Qt Development:
+Creator is the integrated development environment for developing Qt applications.
+Creator encompasses every step of application development from interface design
+to application testing and deployment.
+\list
+\o \l{external: Creating Qt Projects in Creator}{Creating Qt Projects}
+\o \l{external: Building and Running Applications in Creator}{Building and Running Applications}
+ \list
+ \o \l{external: Set Compiler Targets in Creator}{Targets} - edit and set compiler targets
+ \o \l{external: Build Settings in Creator}{Build Settings} - edit and set build configurations
+ \o \l{external: Run Settings in Creator}{Run Settings} - edit and set application run settings
+ \endlist
+\o \l{external: Setting Up Development Environment for Symbian}{Setting Up Development Environment for Symbian}
+\o \l{external: Setting Up Development Environment for Maemo}{Setting Up Development Environment for Maemo}
+\endlist
+
+\keyword qt-platform-support
+\section2 Qt Platform Support
+Alternatively, Qt may be installed on its own without the Nokia Qt SDK.
+
+Information regarding Qt Support on Different Platforms:
+\list
+\o \l{Installing Qt for the Symbian platform}{Symbian and Mobile Development}
+\o \l{Support for Windows}{Microsoft Windows}
+\o \l{Support for Windows CE and Windows Mobile}{Microsoft Windows CE}
+\o \l{Support for Mac OS X}{Apple Mac OS X}
+\o \l{Support for Linux/X11}{Linux and X11 Platforms}
+\o \l{Support for Embedded Linux}{Qt for Embedded Linux}
+\endlist
+For more information about the platforms supported
+and their installation pages, view the \l {Supported Platforms} and the
+\l {Cross-Platform and Platform-Specific Development} pages.
+\enddiv
+
+\div {class = "indexboxcont indexboxbar normallist"}
+\keyword qt-technologies
+\section1 Qt Technologies
+
+Qt introduces an innovative alternative for inter-object communication, called
+"signals and slots", that replaces the old and unsafe callback technique used in
+many legacy frameworks. Qt also provides a conventional event model for handling
+mouse clicks, key presses, and other user input. Qt's cross-platform GUI
+applications can support all the user interface functionality required by modern
+applications, such as menus, context menus, drag and drop, and dockable
+toolbars. Desktop integration features provided by Qt can be used to extend
+applications into the surrounding desktop environment, taking advantage of some
+of the services provided on each platform.
+
+The \l{All Modules}{Qt Modules} page has a listing of the technology modules offered by Qt.
+
+\keyword qt-desktop-meta-object-system
+\section2 Qt's Meta-Object System
+Qt offers a unique event system based on meta-objects, signals and slots, and property systems.
+\list
+\o \l{The Meta-Object System}{Qt's Meta-Object System} - Qt's mechanism for signals and slots, inter-object communication, run-time type information, and dynamic property system
+\o \l{The Event System}{Event System} - event handling and delivery
+\o \l{The Property System}{Property System} - dynamic object properties
+\endlist
+
+\keyword qt-ui-creation
+\section2 UI Creation
+Qt offers several options with regards to user interface creation: widget based
+applications using layouts and Qt Quick interfaces with QML.
+\list
+\o \l{Qt Quick} - create UIs using QML
+ \list
+ \o \l{external: Developing Qt Quick Applications}{Creator's QML Design Mode} - design Qt Quick interfaces using Creator's design mode
+ \endlist
+\o \l{Widgets and Layouts} - primary elements for C++ based interfaces
+ \list
+ \o \l{external: Designer in Creator}{Creator's Designer} - design interfaces using Qt Designer
+ \endlist
+\o \l{UI Design with Qt} - covers many Qt features for UI creation
+\endlist
+
+\section2 Inter-Process Communication, Threading, and Networking
+In addition to \l{qt-desktop-meta-object-system}{Qt's Meta-Object System}, Qt has several technologies
+that deal with inter-process communication.
+\list
+\o \l{Inter-Process Communication in Qt}{Inter-Process Communication} - various overviews of protocols implemented in Qt
+\o \l{Network programming with Qt}{Network Programming} - various overviews to network APIs
+\o \l{D-Bus} - D-Bus implementation in Qt
+\o \l{Thread Support in Qt}{Thread Support} - overview of threading APIs and concurrent programming topics
+\endlist
+
+\keyword qt-rendering-painting-system
+\section2 Rendering and Paint System
+Qt has various support for different rendering and painting methods.
+\list
+\o \l{Coordinate System} - Information about the coordinate system used by the paint system
+\o \l{Graphics View Framework} - manages a large number of 2D items and visualizes the items
+\o \l{Paint System} - A system for painting on the screen or on print devices using the same API
+\o \l{QtSvg Module} - module for displaying and creating SVG files
+\o Rendering APIs:
+ \list
+ \o \l{QtOpenGL Module} - module for rendering with the OpenGL API
+ \o \l{OpenVG Rendering in Qt}{QtOpenVG Module} - provides support for OpenVG painting
+ \endlist
+\o \l{Printing with Qt} - A guide to producing printed output with Qt's paint system and widgets
+\endlist
+
+\keyword qt-webkit
+\section2 QtWebKit Module
+Web applications are increasing in importance and abundance and Qt has
+\l{WebKit Open Source Project}{WebKit} support.
+\list
+\o \l{WebKit in Qt} - WebKit Module
+\endlist
+
+\keyword qt-utilities
+\section2 Utilities
+Qt supports many utilities that work on multiple platforms.
+\list
+\o \l{Container Classes}{Containers} - Qt's implementation of various data structures such as linked lists and hash maps
+\o \l{Rich Text Processing} - for manipulating structured rich text documents
+\o \l{XML Processing} - high level manipulation of XML data using different interfaces
+\o \l{Making Applications Scriptable} - provides Qt applications with ECMAScript processor
+\o \l{Qt Linguist Manual}{Qt Linguist} - for translating applications into local languages
+\endlist
+For more information, visit the \l{Qt's Tools}{Qt Tools} page.
+\enddiv
+\div {class = "indexboxcont indexboxbar normallist"}
+\keyword qt-testing
+\section1 Testing Qt Applications
+Testing and debugging are part of the development process and Qt offers the
+developer multiple methods of testing their code.
+\list
+\o \l{external: Debugging Applications in Creator}{Debugging Applications in Creator} - various debugging options in Creator
+\o \l{Debugging Techniques} - essential techniques for debugging Qt code
+\o \l{external: Qt Simulator Manual}{Simulator} - testing mobile applications by simulating a mobile environment
+\o \l{QML Viewer} - an executable that is able to run QML files
+\o \l{QTestLib Manual}{QTestLib} - a unit testing framework built into Qt
+\endlist
+\enddiv
+
+\div {class = "indexboxcont indexboxbar normallist"}
+\keyword qt-deployment
+\section1 Deployment
+Symbian phones, Maemo devices, desktop environments, embedded Linux devices -- Qt applications are deployable to many environments.
+To deploy Qt applications onto multiple platforms, there are special
+considerations that each platform introduce.
+\list
+\o \l{Deploying Qt Applications}{Deploying Qt Libraries} - compares static versus shared libraries and deploying Qt libraries
+\o \l{Deploying Qt Applications#licensing}{Deploying Third Party Libraries} - deployment of libraries that are not under Qt's dual-license model.
+\o Platform-Specific Deployment:
+ \list
+ \o \l{Deploying an Application on X11 Platforms}{X11} - deploying Qt applications on X11 platforms
+ \o \l{Deploying an Application on Windows}{Windows} - deploying Qt applications on Windows operating systems
+ \o \l{Deploying an Application on Mac OS X}{Mac OS X} - deploying Qt applications on Mac OS X
+ \o \l{Deploying Qt for Embedded Linux Applications}{Embedded Linux} - deploying Qt applications on embedded Linux
+ \o \l{Deploying an Application on the Symbian Platform}{Symbian} - deploying Qt applications on the Symbian platform
+ \endlist
+\o \l{external: Symbian Deployment in Creator}{Symbian Deployment in Creator} - Symbian application deployment built into Creator
+\o \l{external: Maemo Deployment in Creator}{Deploying Qt Applications on Maemo Devices}
+\endlist
+
+\section1 Ovi Store Publishing
+Creator can publish applications to Ovi Store directly.
+\list
+\o \l{external: Publishing Applications to Ovi Store}{Publishing Qt Applications to Ovi Store}
+\endlist
+For additional information, visit the \l{Cross-Platform and Platform-Specific Development}
+and the \l {Supported Platforms} page.
+
+\enddiv
+\div {class = "indexboxcont indexboxbar normallist"}
+\section1 Where to Go from Here
+
+Qt Demos and Examples
+\list
+\o \l{Qt Demonstrations}{Application Gallery}
+\o \l{Tutorials}
+\o \l {Qt Examples}
+\o \l {QML Examples and Demos}
+\endlist
+
+Qt Information
+\list
+\o \l{Programming with Qt}
+\o \l{UI Design with Qt}
+\o \l{Cross-platform and Platform-specific Development}
+\o \l{Qt and Key Technologies}
+\o \l{Best Practice Guides}
+\o \l{Qt Licenses and Credits}{Licenses and Credits}
+\endlist
+\enddiv
+*/
+
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 38a7a8bb9f..30b0f16709 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -70,7 +70,7 @@
modules are included by default. To link only against QtCore, add
the following line to your \c .pro file:
- \snippet doc/src/snippets/code/doc_src_modules.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_modules.pro 0
On Windows, if you do not use \l qmake
or other build tools such as CMake, you also need to link against
@@ -91,7 +91,7 @@
All other Qt modules rely on this module. To include the
definitions of the module's classes, use the following directive:
- \snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtcore.cpp 0
*/
@@ -105,7 +105,7 @@
To include the definitions of both modules' classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtgui.pro 0
*/
/*!
@@ -118,12 +118,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtmultimedia.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtmultimedia.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtmultimedia.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtmultimedia.pro 0
The functionality provided by the \l{Phonon Module} is on a higher level
and in many cases more suitable for application developers.
@@ -140,12 +140,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.pro 0
*/
/*!
@@ -175,12 +175,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtopengl.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtopengl.pro 1
The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later),
@@ -266,11 +266,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 0
To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscript.pro 1
For detailed information on how to make your application
scriptable with QtScript, see \l{Making Applications
@@ -323,11 +323,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscripttools.cpp 0
To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscripttools.pro 1
*/
/*!
@@ -338,12 +338,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtsql.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtsql.pro 1
See the \l{SQL Programming} guide for information about using this
module in your applications.
@@ -362,12 +362,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtsvg.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtsvg.pro 1
\section1 License Information
@@ -412,12 +412,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtxml.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtxml.pro 1
Further XML support is provided by the \l{Qt Solutions} group who
provide, for example, classes that support SOAP and MML with the
@@ -437,12 +437,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.pro 1
\section1 Further Reading
@@ -523,7 +523,7 @@
The following declaration in a \c qmake project file ensures that
an application is compiled and linked appropriately:
- \snippet doc/src/snippets/code/doc_src_phonon.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_phonon.pro 0
\section1 Qt Backends
@@ -586,12 +586,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt3support.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt3support.pro 1
\note Since this module provides compatibility classes for
diverse parts of the Qt 3 API, it has dependencies on the QtCore,
@@ -615,12 +615,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 0
To link against the module, add this line to your \c qmake .pro
file:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.pro 1
*/
/*!
@@ -640,7 +640,7 @@
in a \c qmake project file to ensure that the application is compiled
and linked appropriately.
- \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.pro 0
A form loader object, provided by the QUiLoader class, is used to
construct the user interface. This user interface can
@@ -652,7 +652,7 @@
To include the definitions of the module's classes, use the following
directive:
- \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.cpp 1
\sa{Calculator Builder Example}, {World Time Clock Builder Example}
*/
@@ -672,7 +672,7 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qthelp.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
@@ -731,12 +731,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qttest.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qttest.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qttest.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qttest.pro 1
See the \l{QTestLib Manual} for a detailed introduction on how to use
Qt's unit testing features with your applications.
@@ -865,13 +865,13 @@
To use this module, use the following code in your application:
- \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtdbus.cpp 0
If you're using qmake to build your application, you can add this
line to your .pro file to make it link against the QtDBus
libraries:
- \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtdbus.pro 1
\note The source code for this module is located in the \c{src/qdbus}
directory. When installing Qt from source, this module is built when Qt's
diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc
index ba677b97ca..cb63c17ab1 100644
--- a/doc/src/objectmodel/objecttrees.qdoc
+++ b/doc/src/objectmodel/objecttrees.qdoc
@@ -77,7 +77,7 @@
behavior applies. Normally, the order of destruction still doesn't
present a problem. Consider the following snippet:
- \snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_objecttrees.cpp 0
The parent, \c window, and the child, \c quit, are both \l {QObject}
{QObjects} because QPushButton inherits QWidget, and QWidget inherits
@@ -91,7 +91,7 @@
But now consider what happens if we swap the order of construction, as
shown in this second snippet:
- \snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_objecttrees.cpp 1
In this case, the order of destruction causes a problem. The parent's
destructor is called first because it was created last. It then calls
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index 7d1ececad5..92c182e0b9 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -46,12 +46,12 @@
To declare a property, use the \l {Q_PROPERTY()} {Q_PROPERTY()}
macro in a class that inherits QObject.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 0
Here are some typical examples of property declarations taken from
class QWidget.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 1
A property behaves like a class data member, but it has additional
features accessible through the \l {Meta-Object System}.
@@ -83,6 +83,10 @@
existing signal in that class that is emitted whenever the value
of the property changes.
+ \o A \c REVISION number is optional. If included, it defines the
+ the property and its notifier signal to be used in a particular
+ revision of the API that is exposed to QML.
+
\o The \c DESIGNABLE attribute indicates whether the property
should be visible in the property editor of GUI design tool (e.g.,
\l {Qt Designer}). Most properties are \c DESIGNABLE (default
@@ -131,7 +135,7 @@
be a user-defined type. In this example, class QDate is considered
to be a user-defined type.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 2
Because QDate is user-defined, you must include the \c{<QDate>}
header file with the property declaration.
@@ -152,7 +156,7 @@
the code snippet below, the call to QAbstractButton::setDown() and
the call to QObject::setProperty() both set property "down".
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 3
Accessing a property through its \c WRITE accessor is the better
of the two, because it is faster and gives better diagnostics at
@@ -162,7 +166,7 @@
can \e discover a class's properties at run time by querying its
QObject, QMetaObject, and \l {QMetaProperty} {QMetaProperties}.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 4
In the above snippet, QMetaObject::property() is used to get \l
{QMetaProperty} {metadata} about each property defined in some
@@ -189,7 +193,7 @@
for the \c READ and \c WRITE functions. The declaration of MyClass
then might look like this:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 5
The \c READ function is const and returns the property type. The
\c WRITE function returns void and has exactly one parameter of
@@ -200,7 +204,7 @@
QObject that is an instance of MyClass, we have two ways to set
its priority property:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 6
In the example, the enumeration type that is the property type is
declared in MyClass and registered with the \l{Meta-Object System}
@@ -262,7 +266,7 @@
Q_CLASSINFO(), that can be used to attach additional
\e{name}--\e{value} pairs to a class's meta-object, for example:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 7
Like other meta-data, class information is accessible at run-time
through the meta-object; see QMetaObject::classInfo() for details.
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 4c018b54fc..8b52df5b1a 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -440,7 +440,7 @@
You can even use both mechanisms in the same project. Just add the
following line to your qmake project (.pro) file.
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 22
It tells Qt not to define the moc keywords \c{signals}, \c{slots},
and \c{emit}, because these names will be used by a 3rd party
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
index f51e3209e9..eb9b2be8a4 100644
--- a/doc/src/overviews.qdoc
+++ b/doc/src/overviews.qdoc
@@ -42,8 +42,8 @@
Qt is a cross-platform application and UI framework for writing
web-enabled applications for desktop, mobile, and embedded
operating systems. This page contains links to articles and overviews
- explaining key components and techniques used in Qt development.
-
+ explaining key components and techniques used in Qt development.
+
\generatelist {related}
*/
@@ -62,7 +62,7 @@
/*!
\group qt-graphics
- \ingroup qt-basic-concepts
+ \ingroup qt-basic-concepts
\title Qt Graphics and Printing
\brief The Qt components for doing graphics.
@@ -112,7 +112,7 @@
\ingroup technology-apis
\ingroup best-practices
\ingroup qt-basic-concepts
-
+
These pages document Qt's API's for using SQL database systems
in Qt applications.
@@ -133,7 +133,7 @@
\generatelist{related}
*/
-/*!
+/*!
\group licensing
\title Qt Licenses and Credits
@@ -146,3 +146,56 @@
\generatelist {related}
*/
+
+/*!
+ \group qml-best-practices
+ \title QML Best Practices Guides
+
+ \brief QML Programming Best Practices Guides
+
+ These documents provide guidelines and best practices for using QML and Qt
+ to solve specific technical problems.
+
+ \generatelist {related}
+*/
+/*!
+ \group qml-features
+ \title QML Features
+
+ \brief Features of the QML Language
+
+These are overviews of the many features of the QML language and \l{Qt Quick}.
+
+\list
+\o \l{QML Basic Elements}{Basic Elements}
+\o \l{QML Basic Types}{Data Types}
+\o \l{Property Binding}
+\o \l{Using QML Positioner and Repeater Items}{Component Layouts}
+\o \l{Anchor-based Layout in QML}{Layouts using Anchors}
+\o \l{QML Mouse Events}{Mouse Events}
+\o \l{QML Text Handling and Validators}{Text Handling and Validators}
+\o \l{Keyboard Focus in QML}{Keyboard Focus}
+\o \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+\o \l{Importing Reusable Components}
+\o \l{QML States}{States}
+\o \l{QML Animation and Transitions}{Animation and Transitions}
+\o \l{QML Data Models}{Structuring Data with Models}
+\o \l{Presenting Data with Views}
+\o \l{Extending QML Functionalities using C++}
+\o \l{Using QML Bindings in C++ Applications}
+\o \l{Integrating QML Code with Existing Qt UI Code}
+\o \l{Dynamic Object Management in QML}{Dynamic Object Management}
+\o \l{Network Transparency}{Loading Resources in QML}
+\o \l{QML Internationalization}{Internationalization}
+\endlist
+*/
+/*!
+ \group qml-architecture
+ \title QML Architecture
+
+ \brief QML Architecture
+
+ These are overviews of the architecture of QML and Qt Declarative Module.
+
+ \generatelist {related}
+*/
diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
index 252159ed41..d0906d82a1 100644
--- a/doc/src/painting-and-printing/coordsys.qdoc
+++ b/doc/src/painting-and-printing/coordsys.qdoc
@@ -97,10 +97,10 @@
\row
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 0
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 1
\endtable
When rendering with a pen with an even number of pixels, the
@@ -163,10 +163,10 @@
\row
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 2
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 3
\endtable
\section1 Transformations
@@ -319,7 +319,7 @@
-50) to (50, 50) with (0, 0) in the center by calling the
QPainter::setWindow() function:
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 4
Now, the logical coordinates (-50,-50) correspond to the paint
device's physical coordinates (0, 0). Independent of the paint
@@ -333,7 +333,7 @@
viewport and "window" maintain the same aspect ratio to prevent
deformation:
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 5
If we make the logical coordinate system a square, we should also
make the viewport a square using the QPainter::setViewport()
diff --git a/doc/src/platforms/emb-performance.qdoc b/doc/src/platforms/emb-performance.qdoc
index 1ae35bca76..6c96921456 100644
--- a/doc/src/platforms/emb-performance.qdoc
+++ b/doc/src/platforms/emb-performance.qdoc
@@ -103,7 +103,7 @@
operators. Improved memory allocation and performance may be
gained by re-implementing these functions:
- \snippet doc/src/snippets/code/doc_src_emb-performance.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_emb-performance.cpp 1
The example above shows the necessary code to switch to the plain
C memory allocators.
diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc
index b580077293..941cba28d6 100644
--- a/doc/src/platforms/emb-pointer.qdoc
+++ b/doc/src/platforms/emb-pointer.qdoc
@@ -144,7 +144,7 @@
its headers using -L and -I options in the \c qmake.conf file in
your \c mkspec. Also it can be helpful to add a -rpath-link:
- \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.pro 7
In order to use this mouse driver, tslib must also be correctly
installed on the target machine. This includes providing a \c
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index 251e900108..1f71270016 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -99,7 +99,7 @@
If you use \c qmake and Makefiles, use the \c QMAKE_LFLAGS_SONAME setting:
- \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_mac-differences.pro 0
Alternatively, you can modify the install name using the
install_name_tool(1) on the command line. See its manpage for more
@@ -165,7 +165,7 @@
the bundle resides on the disk. The following code returns the
path of the application bundle:
- \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_mac-differences.cpp 1
Note: When OS X is set to use Japanese, a bug causes this sequence
to fail and return an empty string. Therefore, always test the
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index b58d1d7574..f1e80042c9 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -26,10 +26,688 @@
****************************************************************************/
/*!
+ \page windows-support.html
+ \title Support for Windows
+ \brief Platform support for Windows.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Windows
+
+ Qt is a comprehensive application and UI framework for developing Windows
+ applications that can also be deployed across many other desktop and
+ embedded operating systems without rewriting the source code. Use the
+ code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported Windows versions and other platforms}.
+
+ \section1 Getting Started on Windows
+
+ \list
+ \o \l{Supported Platforms}{Supported Windows platforms} - Qt
+ supports a wide range of Windows platforms.
+ \o \l{Qt for Windows Requirements}{Qt for Windows Requirements}
+ - Requirements for developing with Qt on Windows.
+ \o \l{Installing Qt for Windows}{Installing Qt for Windows}
+ - Build Qt for Windows development.
+ \o \l{Platform and Compiler Notes - Windows}{Platform and Compiler Notes - Windows}
+ - Windows platform specific notes.
+ \o \l{Getting Started Guides}{Getting started} - Getting started developing for Windows
+ \endlist
+
+ \section1 Key Features for Windows Development
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL}
+ or Direct3D
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed
+ development on the Windows platform.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Visual Studio Add-in.
+
+ The Qt Visual Studio Add-in allows programmers to create, build, debug
+ and run Qt applications from within Microsoft Visual Studio 2005, 2008
+ and 2010. The add-in contains project wizards, Qt project import/export
+ support, integrated Qt resource manager and automated build setup for
+ the Qt Meta-Object Compiler, User Interface Compiler, and Resource
+ Compiler.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
+ \page linuxX11-support.html
+ \title Support for Linux/X11
+ \brief Platform support for Linux/X11.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Linux/X11
+
+ Qt is a comprehensive application and UI framework for developing
+ Linux/X11 applications that can also be deployed across many other
+ desktop and embedded operating systems without rewriting the source code.
+ Use the code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported X11 versions and other platforms}.
+
+ \section1 Getting Started on Linux/X11
+
+ \list
+ \o \l{Supported Platforms}{Supported Linux/X11 platforms} - Qt
+ supports a wide range of Linux/X11 platforms.
+ \o \l{Qt for X11 Requirements}{Qt for X11 Requirements}
+ - Software required to run Qt on Linux/X11.
+ \o \l{Installing Qt for X11 Platforms}{Installing Qt for X11 Platforms}
+ - Build Qt for Linux/X11 development.
+ \o \l{Platform and Compiler Notes - X11}{Platform and Compiler Notes - X11}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Linux/X11 Development
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed development
+ on X11 platforms.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \o Integration with
+ \l{http://doc.qt.nokia.com/qt-eclipse-1.6/index.html}{Eclipse}
+ and KDevelop IDEs are also available.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL
+ integration}
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section2 Qt is the Foundation of KDE
+
+ Qt is best known in the Linux community as the basis for the KDE
+ desktop environment. Almost everything in KDE is based on Qt, and
+ Qt forms the foundation for thousands of open source KDE applications
+ developed by community members worldwide.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+
+/*!
+ \page mac-support.html
+ \title Support for Mac OS X
+ \brief Platform support for Mac OS X.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Mac OS X
+
+ Qt is a comprehensive application and UI framework for developing Mac
+ applications that can also be deployed across many other desktop and
+ embedded operating systems without rewriting the source code. Use the
+ code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported Windows versions and other platforms}.
+
+ \section1 Getting Started on Mac
+
+ \list
+ \o \l{Supported Platforms}{Supported Mac OS X platforms} - Qt supports
+ a wide range of Mac platform variants.
+ \o \l{Qt for Mac OS X Requirements}{Qt for Mac OS X Requirements}
+ - Software required to run Qt on Mac OS X.
+ \o \l{Installing Qt for X11 Platforms}{Installing Qt for X11 Platforms}
+ - Build Qt for Mac OS X development.
+ \o \l{Platform and Compiler Notes - Mac OS X}{Platform and Compiler Notes - Mac OS X}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Mac OS X Development
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed development
+ on the Mac platform.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL
+ integration}
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section3 Supports Intel Hardware and Universal Binaries
+
+ Qt is written without making assumptions about the number representation,
+ endianness or architecture of the underlying processor. To support Intel
+ hardware on the Apple platforms, Qt customers simply need to recompile
+ their apps.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+ \note Qt also provides support for 64-bit applications on top of Cocoa APIs.
+*/
+/*!
+ \page windowsCE-Mobile-support.html
+ \title Support for Windows CE and Windows Mobile
+ \brief Platform support for Windows CE and Windows Mobile.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Windows CE and Windows Mobile
+
+ Qt is a C++ application and UI framework. You can use Qt to write
+ rich and high performance applications using an intuitive API
+ available for a wide range of devices. Use the code from one single
+ code-base and rebuild for all \l{Supported Platforms}{supported
+ Windows CE/Mobile versions as well as other other platforms}.
+
+ Supporting most existing Windows CE configurations and with minimal
+ hardware dependencies, Qt is easy to build even for custom hardware
+ configurations. Unused components and features can even be compiled out.
+
+ \section1 Getting Started on Windows CE/Mobile
+
+ \list
+ \o \l{Supported Platforms}{Supported Windows CE/Mobile platforms}
+ - Qt supports a wide range of Windows CE/Mobile platform variants.
+ \o \l{Qt for Windows CE Requirements}{Qt for Windows CE/Mobile
+ Requirements} - Software required to run Qt on Windows CE/Mobile.
+ \o \l{Installing Qt for Windows CE}{Installing Qt for
+ Windows CE/Mobile Platforms} - Build Qt for Windows CE/Mobile
+ development.
+ \o \l{Platform and Compiler Notes - Windows CE}{Platform and
+ Compiler Notes - Windows CE/Mobile} - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Windows CE/Mobile Development
+
+ On top of all the tools and API and class libraries that Qt offers,
+ Qt for Windows CE provides you with added functionality for an
+ optimized embedded development environment.
+
+ \section2 Native and Customizable Look and Feel
+
+ Windows Mobile and Windows CE styles are available with Qt. At runtime,
+ Qt applications will detect which style to use. The look and feel of
+ your applications can also be easily customized in a fraction of
+ the time and lines of code required for traditional UI styling with
+ Qt Style Sheets.
+
+ \section2 Advanced Text Layout Engine
+
+ Qt for Windows CE supports TrueType and raster fonts. Qt also has
+ extended Unicode support and right-to-left languages. Qts rich text
+ engine adds capabilities for complex text layouts including tables,
+ path tracing and text which flows around shapes.
+
+ \section2 Qt for Windows CE/Mobile also provide support for:
+
+ \list
+ \o Graphics Acceleration using \l{Qt for Windows CE and OpenGL
+ ES}{OpenGL ES}
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items.
+ \o \l{Qt Designer Manual}{Qt Designer} for GUI layout and
+ forms builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \endlist
+
+ Applications created with Qt for Windows CE/Mobile can be ported to
+ Symbian, Maemo and any other OS that Qt supports.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+
+/*!
+ \page embeddedLinux-support.html
+ \title Support for Embedded Linux
+ \brief Platform support for Embedded Linux.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Embedded Linux
+
+ Qt is the leading application and UI framework for devices powered
+ by embedded Linux. You can use Qt to create highly memory efficient
+ devices and applications that have completely unique user experiences.
+
+ Qt runs anywhere Linux runs. Qts intuitive API means fewer lines of
+ code and higher level functionality in less time. Use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}.
+
+ \section1 Getting Started on Embedded Linux
+
+ \list
+ \o \l{Supported Platforms}{Supported Linux platforms}
+ - Qt supports a wide range of Linux platform variants.
+ \o \l{Qt for Embedded Linux Requirements}{Qt for Embedded Linux
+ Requirements} - Software required to run Qt on Embedded Linux.
+ \o \l{Installing Qt for Embedded Linux}{Installing Qt for Embedded
+ Linux} - Build Qt for development on Embedded Linux.
+ \o \l{Platform and Compiler Notes - Embedded Linux}{Platform and
+ Compiler Notes - Embedded Linux} - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Embedded Linux Development
+
+ On top of all the tools and API and class libraries that Qt offers,
+ such as WebKit, Qt for Embedded Linux provides you with key components
+ for an optimized embedded development environment.
+
+ \section2 Compact and Efficient Windowing System \l{Qt for Embedded Linux Classes}{QWS}
+
+ Qt builds on the standard API for embedded Linux devices with its own
+ compact window system. Qt-based applications write directly to the
+ Linux framebuffer, eliminating the need for the X11 windowing system.
+
+ \section2 Virtual Frame Buffer (QVFb)
+
+ Qt for Embedded Linux provides a \l{The Virtual Framebuffer}{virtual
+ frame buffer} that will match the physical device display, pixel for
+ pixel. This gives the developer a realistic testing infrastructure
+ testing on the desktop where the frame buffer simulates the physical
+ device displays width, height and color depth.
+
+ \section2 Inter-Process Communication (IPC)
+
+ IPC allows for creation of rich multi-application user experiences.
+ Two main concepts define inter-process communication: channels and
+ messages.
+
+ \section2 Extended Font Format
+
+ Qt supports a wide range of font formats on embedded Linux including:
+ TrueType, Postscript Type1 and Qt pre-rendered fonts. Qt has
+ extended Unicode support including automatic data extraction at build
+ time and automatic update at runtime.
+
+ Plug-ins for custom font formats are also available allowing new font
+ engines to be easily added at runtime. Font sharing capabilities
+ between applications allow for increased memory efficiency.
+
+ Applications created with Qt for Embedded Linux can be ported to
+ Windows CE and any other OS that Qt supports.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+/*!
+ \page symbian-support.html
+ \title Support for Symbian
+ \brief Platform support for Symbian.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Symbian
+
+ Qt provides support for the Symbian platform with integration
+ to the S60 framework. If you are developing apps for the Symbian,
+ Maemo or MeeGo platforms in most cases, you can use Qt under the
+ free LGPL licensing option. Qt is cross-platform, and that means
+ that you can use the code from one single code-base and rebuild
+ for all \l{Supported Platforms}{supported platforms}.
+
+ \section1 Getting Started on Symbian
+
+ \list
+ \o \l{Supported Platforms}{Supported platform}
+ - Details on the Qt support for Symbian.
+ \o \l{Qt for the Symbian platform Requirements}{Qt for the
+ Symbian platform Requirements} - Software required to run Qt
+ on Symbian.
+ \o \l{Installing Qt for the Symbian platform}{Installing Qt
+ for the Symbian platform} - Build Qt for Symbian development.
+ \o \l{Platform and Compiler Notes - Symbian}{Platform Notes - Symbian}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Symbian Development
+
+ On top of all the tools and the API and class libraries that Qt
+ offers, Qt provides you with added functionality for an optimized
+ Symbian development experience.
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the phone is running and applies the
+ style at runtime to your Qt application. The look and feel of your
+ applications can also be easily customized in a fraction of the
+ time and lines of code required for traditional UI styling with
+ Qt Style Sheets.
+
+ \section2 Graphics Features
+
+ Qt for Symbian contains a powerful paint engine that provides
+ features such as anti, aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. It
+ is already targeting future device technology by supporting hardware
+ acceleration using OpenVG.
+
+ \section2 Device Configurations
+
+ Using Qt for Symbian all supported Symbian devices provides automatic
+ support for swiching between landscape and portrait mode, different
+ screen resolutions as well as touch screen and key pad input.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section3 Licensing
+
+ Qt for Symbian is available under the Qt Commercial License, the LGPL
+ v. 2.1 "LGPL") and the GPL v. 3.0. Symbian currently licenses their
+ software products under either the Symbian Foundation License or the
+ Eclipse Public License ("EPL"). While the LGPL and the EPL are not
+ compatible and may not be combined on a file-by-file basis, they may
+ be used in a common environment provided that the interaction between
+ Qt and Symbian is limited to: dynamic linking, inter-process
+ communication and data exchange. Therefore, most Symbian developers
+ can use Qt for Symbian under the LGPL.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+/*!
+ \page maemo-support.html
+ \title Support for Maemo
+ \brief Platform support for Maemo.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Maemo
+
+ Qt is a comprehensive application and UI framework for developing
+ Maemo applications that can also be deployed across major
+ device and desktop operating systems without rewriting the source code.
+ If you are developing apps for the Symbian, Mameo platforms
+ in most cases, you can use Qt under the free LGPL licensing option.
+ Qt is cross-platform, and that means that you can use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}. Maemo 6 is now MeeGo.
+
+ \section1 Getting Started on Maemo
+ \list
+ \o \l{Supported Platforms}{Supported Maemo platforms}
+ - Qt support for Maemo versions.
+ \omit
+ \o \l{Qt for Maemo Requirements}{Qt for Maemo
+ Requirements} - Software required to run Qt on Maemo.
+ \o \l{Installing Qt for Maemo}{Installing Qt for
+ Maemo} - Build Qt for Maemo development.
+ \o \l{Platform and Compiler Notes - Maemo}{Platform and
+ Compiler Notes - Maemo} - Platform specific notes.
+ \endomit
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Maemo Development
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the device is running and applies the
+ style at runtime to your Qt application. Widgets are optimized
+ for touch screen usage.
+
+ \section2 Graphics Features
+
+ Qt for Maemo provides a powerful paint engine that cotain
+ features such as anti aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. Qt
+ for Maemo also supports hardware acceleration using ARM NEON
+ and OpenGL ES 2.0.
+
+ \section2 Device Configurations
+
+ Applications developed with Qt for Maemo will across all
+ supported Maemo devices provide automatic support for switching
+ between landscape and portrait mode. They will support input methods,
+ including predictive text input and on-screen keyboard. The
+ applications will also have support for one finger touch events and
+ gestures, and have configurable kinetic scrolling.
+
+ \section2 Maemo - Linux/X11
+
+ Qt supports a wide range of X11 platform variants, such as: Solaris,
+ AIX, HP-UX, Maemo 5 and MeeGo. Qt for Maemo contains all Qt modules
+ and features the same functionality as the Qt on X11 version.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
+
+ \page meego-support.html
+ \title Support for MeeGo
+ \brief Platform support for MeeGo.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on MeeGo
+
+ Qt is a comprehensive application and UI framework for developing
+ MeeGo applications that can also be deployed across major
+ device and desktop operating systems without rewriting the source code.
+ If you are developing apps for the Symbian, MeeGo platforms
+ in most cases, you can use Qt under the free LGPL licensing option.
+ Qt is cross-platform, and that means that you can use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}.
+
+ \section1 Getting Started on MeeGo
+
+ \list
+ \o \l{Supported Platforms}{Supported MeeGo platforms}
+ - Qt support for MeeGo versions.
+ \omit
+ \o \l{Qt for MeeGo Requirements}{Qt for MeeGo
+ Requirements} - Software required to run Qt on MeeGo.
+ \o \l{Installing Qt for MeeGo}{Installing Qt for
+ MeeGo} - Build Qt for MeeGo development.
+ \o \l{Platform and Compiler Notes - MeeGo}{Platform and
+ Compiler Notes - MeeGo} - Platform specific notes.
+ \endomit
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for MeeGo Development
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the device is running and applies the
+ style at runtime to your Qt application. Widgets are optimized
+ for touch screen usage.
+
+ \section2 Graphics Features
+
+ Qt for MeeGo provides a powerful paint engine that cotain
+ features such as anti aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. Qt
+ for MeeGo also supports hardware acceleration using ARM NEON, x86,
+ and OpenGL ES 2.0.
+
+ \section2 Device Configurations
+
+ Qt is the foundation of MeeGo UI and application development and
+ therefore Qt will be present in all upcoming MeeGo devices. Qt
+ can provide automatic support for:
+ \list
+ \o Switching between landscape and portrait mode
+ \o Input Methods, including predictive text input and on-screen
+ keyboard
+ \o Configurable kinetic scrolling
+ \endlist
+
+ \section2 Maemo - Linux/X11
+
+ Qt supports a wide range of X11 platform variants, such as: Solaris,
+ AIX, HP-UX, Maemo 5 and MeeGo. Qt for MeeGo contains all Qt modules
+ and features the same functionality as the Qt on X11 version.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
\page supported-platforms.html
\title Supported Platforms
\brief The platforms supported by Nokia for Qt.
\ingroup platform-specific
+ \group platform-details
+
+ Qt is a cross-platform application and UI framework. Using Qt,
+ you can write web-enabled applications once and deploy them
+ across desktop, mobile and embedded operating systems without
+ rewriting the source code.
+
+ \section1 Qt is Available for the Following Platforms
+
+ \table
+ \header
+ \o {2,1} Qt Cross Platform Support
+ \header
+ \o {1,1} Desktop
+ \o {1,1} Mobile/Embedded
+ \row
+ \o \l{Support for Windows}{Windows}
+ \o \l{Support for Windows CE and Windows Mobile}{Windows CE and Windows Mobile}
+ \row
+ \o \l{Support for Linux/X11}{Linux/X11}
+ \o \l{Support for Embedded Linux}{Embedded Linux}
+ \row
+ \o \l{Support for Mac OS X}{Mac OS X}
+ \o \l{Support for Symbian}{Symbian}
+ \row
+ \o\l{Support for MeeGo}{MeeGo}
+ \o\l{Support for Maemo}{Maemo}
+ \endtable
+
+ \section1 Supported Platform Details
The Qt team strives to provide support for the platforms most
frequently used by Qt users. We have designed our internal testing procedure to
@@ -70,7 +748,7 @@
\o MSVC 2008
\row \o Microsoft Windows 7
\o MSVC 2008
- \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \row \o Apple Mac OS X 10.6 "Snow Leopard"
\o As provided by Apple
\row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Cocoa 32 and 64bit)
\o As provided by Apple
@@ -78,6 +756,10 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
+ \row \o Maemo 5(Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o MeeGo (Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Symbian (Symbian/S60 5.0)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
@@ -85,9 +767,9 @@
\section1 Tier 2 Platforms
Tier 2 platforms are subject to ad hoc and internal testing. However, Qt users
- should note that errors may be present in released product versions for Tier 2
- platforms and, subject to resource availability, known errors in Tier 2 platforms
- may or may not be corrected prior to new version releases.
+ should note that errors may be present in released product versions for Tier 2
+ platforms and, subject to resource availability, known errors in Tier 2 platforms
+ may or may not be corrected prior to new version releases.
\table
\header \o Platform
@@ -116,15 +798,13 @@
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
\row \o Windows Embedded CE 6.0 (ARMv4i, x86, MIPS)
\o MSVC 2008 WinCE Embedded 6.0 Professional
- \row \o Maemo 5(Linux, ARM, X11)
- \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Symbian (Symbian/S60 3.1, 3.2)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
- \note The PPC architecture on Mac has been downgraded from tier 1 to tier 2 for 4.7.
-
- \section1 Tier 3 Platforms (Not supported by Nokia)
+ \note The PPC architecture on Mac has been downgraded from tier 1 to tier 2 for 4.7.
+
+ \section1 Tier 3 Platforms (Not Supported by Nokia)
All platforms not specifically listed above are not supported by Nokia. Nokia does
not run its unit test suite or perform any other internal tests on platforms not
@@ -147,7 +827,7 @@
warranties and conditions, either express or implied, including, but not limited to,
implied warranties of merchantability, fitness for a particular purpose, title and
non-infringement with regard to the Licensed Software.
-
+
\section1 Planned Changes for Qt 4.8
The following changes to the list of supported platforms are at time of publishing
diff --git a/doc/src/platforms/wince-customization.qdoc b/doc/src/platforms/wince-customization.qdoc
index a59dd6fb80..49ba852ed4 100644
--- a/doc/src/platforms/wince-customization.qdoc
+++ b/doc/src/platforms/wince-customization.qdoc
@@ -146,7 +146,7 @@
application that attempts to dynamically load the Qt for Windows CE
libraries using \c LoadLibrary. The following code can be used for this:
- \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_wince-customization.cpp 9
Once you have compiled and deployed the application as well as the Qt
libraries, start a remote debugger. The debugger will then print the
diff --git a/doc/src/porting/porting-qsa.qdoc b/doc/src/porting/porting-qsa.qdoc
index ea83e97fbf..e831583d5a 100644
--- a/doc/src/porting/porting-qsa.qdoc
+++ b/doc/src/porting/porting-qsa.qdoc
@@ -64,7 +64,7 @@
can have named properties. For instance to create an point object with
the properties x and y one would write the following Qt Script code:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 0
The object \c point in this case is constructed as a plain object and
we assign two properties, \c x and \c y, to it with the values 12 and
@@ -73,17 +73,17 @@
global namespace of the script engine. Similarly, global functions are
named properties of the global object; for example:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 1
An equivalent construction that illustrates that the function is a
property of the global object is the following assignment:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 2
Since functions are objects, they can be assigned to objects as
properties, becoming member functions:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 3
In the code above, we see the first subtle difference between
QSA and Qt Script. In QSA one would write the point class like this:
@@ -99,7 +99,7 @@
All the code above runs with QSA except the assignment of a function
to \c{point.manhattanLength}, which we repeat here for clarity:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 5
This is because, in QSA, the value of \c this is decided based on
the location of the declaration of the function it is used in. In the
@@ -129,7 +129,7 @@
function with the newly created object as the \c this pointer.
So, in a sense, it is equivalent to:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 8
This is similar to the manhattenLength() example above. Again, the
main difference between QSA and Qt Script is that one has to
@@ -149,7 +149,7 @@
one could write this in Qt Script as:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 10
In QSA, the member functions were part of the class declaration,
and were therefore shared between all instances of a given class.
@@ -173,7 +173,7 @@
To make the \c toString() function part of the prototype, we write
code like this:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 11
Here, we made the \c toString() function part of the prototype so
that, when we call \c{car.toString()} it will be resolved via the
@@ -195,7 +195,7 @@
without any special members, but it is possible to replace this
object with another prototype object.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 13
In the code above, we have a constructor, \c{GasolineCar}, which
calls the "base class" implementation of the constructor to
@@ -223,7 +223,7 @@
as static members as properties of the constructor function. For
example:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 15
Note that in QSA, static member variables were also accessible in
instances of the given class. In Qt Script, with the approach
@@ -374,7 +374,7 @@
the interpreter using their object names as the names of the
variables.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 16
The code above adds the button to the global namespace under the name
"button". One obvious limitation here is that there is potential for
@@ -382,7 +382,7 @@
provides a more flexible way of adding QObjects to the scripting
environment.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 17
In the code above we create a QPushButton and wrap it in a script
value using the function, QScriptEngine::newQObject(). This gives us
@@ -404,14 +404,14 @@
Below is listed some code from the filter example in the QSA
package.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 18
The equivalent in Qt Script is written in much the same way as
constructors are written in scripts. We register a callback C++
function under the name "ImageSource" in the global namespace and
return the QObject from this function:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 19
In the Qt Script case we use the same approach that we use to expose
a QObject, namely via QScriptEngine::newQObject(). This function also
diff --git a/doc/src/porting/porting4-canvas.qdoc b/doc/src/porting/porting4-canvas.qdoc
index 445f66d352..1e20384d8e 100644
--- a/doc/src/porting/porting4-canvas.qdoc
+++ b/doc/src/porting/porting4-canvas.qdoc
@@ -152,7 +152,7 @@
\row \o Q3Canvas::onCanvas() \o The is no equivalent to this
function in Graphics View. However, you can combine
QGraphicsScene::sceneRect() and QRectF::intersects():
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 0
\row \o Q3Canvas::rect() \o The equivalent,
QGraphicsScene::sceneRect(), returns a QRectF (double
@@ -251,7 +251,7 @@
out the public tile API can then be declared as new members of
this class. Here is one example of how to implement tile support:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 1
Depending on how your scene uses tiles, you may be able to
simplify this approach. In this example, we will try to mimic the behavior
@@ -264,30 +264,30 @@
two-dimensional vector of ints to keep track of what tiles should
be used at what parts of the scene.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 2
In setTiles(), we store the pixmap and tile properties as
members of the class. Then we resize the tiles vector
to match the width and height of our tile grid.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 3
The setTile() function updates the tiles index, and then
updates the corresponding rect in the scene by calling
tileRect().
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 4
The first tileRect() function returns a QRect for the tile at
position (x, y).
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 5
The second tileRect() function returns a QRect for a tile number.
With these functions in place, we can implement the drawBackground()
function.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 6
In drawBackground(), we redraw all tiles that have been
exposed by intersecting each tile rect with the exposed background
@@ -522,7 +522,7 @@
For compatibility, you may want to shift the ellipse up and to the
left to keep the ellipse centered. Example:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 7
Note: QGraphicsEllipseItem uses QAbstractGraphicsShapeItem::pen()
for outlines, whereas Q3CanvasEllipse did not use
@@ -588,7 +588,7 @@
QPainterPath::moveTo() and QPainterPath::cubicTo(). Here is how
you can convert a bezier curve Q3PointArray to a QPainterPath:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 8
Note: QGraphicsPathItem uses QAbstractGraphicsShapeItem::pen() for
outlines, whereas Q3CanvasSpline did not use
@@ -653,7 +653,7 @@
functionality using Graphics View, you can load the images by
using QDir:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 9
\section2 Q3CanvasText
diff --git a/doc/src/porting/porting4-designer.qdoc b/doc/src/porting/porting4-designer.qdoc
index d84af3f732..ef3e746dc1 100644
--- a/doc/src/porting/porting4-designer.qdoc
+++ b/doc/src/porting/porting4-designer.qdoc
@@ -104,7 +104,7 @@
For example, here's the \c uic output for a simple \c
helloworld.ui form (some details were removed for simplicity):
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 0
In this case, the main container was specified to be a QWidget
(or any subclass of QWidget). Had we started with a QMainWindow
@@ -116,7 +116,7 @@
an instance of the main container (a plain QWidget), and call \c
setupUi():
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 1
The second approach is to inherit from both the \c Ui::HelloWorld
class and the main container, and to call \c setupUi() in the
@@ -124,7 +124,7 @@
its subclasses, e.g. QDialog) must appear first in the base class
list so that \l{moc} picks it up correctly. For example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 2
This second method is useful when porting Qt 3 forms to Qt 4. \c
HelloWorldWidget is a class whose instance is the actual form
@@ -212,7 +212,7 @@
them to the widgets in the form after calling \c setupUi(). For
example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 5
A quick and dirty way to port forms containing custom signals and
slots is to generate the code using \c uic3, rather than \c uic. Since
@@ -233,7 +233,7 @@
\tt{\e{signalName}}, then this signal will be connected to the
main container's slot. For example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 6
Because of the naming convention, \c setupUi() automatically
connects \c pushButton's \c clicked() signal to \c
@@ -257,14 +257,14 @@
Next, we add the resource file to our \c .pro file:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.pro 8
When \c qmake is run, it will create the appropriate Makefile
rules to call \c rcc on the resource file, and compile and link
the result into the application. The icons may be accessed as
follows:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 9
In each case, the leading colon tells Qt to look for the file in
the virtual file tree defined by the set of resource files
diff --git a/doc/src/porting/porting4-dnd.qdoc b/doc/src/porting/porting4-dnd.qdoc
index 92b9fc17c4..993b8d2d15 100644
--- a/doc/src/porting/porting4-dnd.qdoc
+++ b/doc/src/porting/porting4-dnd.qdoc
@@ -54,7 +54,7 @@
\l{Q3DragObject::}{drag()} function is called, and it receives no information
about how the operation ended.
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 0
Similarly, in Qt 4, drag operations are also initiated when a QDrag object
is constructed and its \l{QDrag::}{exec()} function is called. In contrast,
@@ -94,7 +94,7 @@
indicating success or failure of these checks via the event's
\l{QDragEnterEvent::}{accept()} function, as shown in this simple example:
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 1
In Qt 4, you can examine the MIME type describing the data to determine
whether the widget should accept the event or, for common data types, you
@@ -113,7 +113,7 @@
accept dropped data in the form of text or images might provide an
implementation of \l{QWidget::}{dropEvent()} that looks like the following:
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 2
In Qt 4, the event is handled in a similar way:
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index 862d22bae9..ec2886b677 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -760,7 +760,7 @@
function. The solution is to reimplement QWidget::paintEvent() in
your QAbstractButton subclass as follows:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 0
\table
\header \o Q3Button function \o QAbstractButton equivalent
@@ -860,11 +860,11 @@
\o QMemArray::at() returned a non-const reference, whereas the
new QByteArray::at() returns a const value. Code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 1
will no longer compile. Instead, use QByteArray::operator[]:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 2
\o The QMemArray::contains(char) function has been renamed
QByteArray::count(char). In addition, there now exists a
@@ -935,11 +935,11 @@
function returns \c void and either adds it to the cache or
deletes it right away. Old code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 3
becomes
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 4
\o The new QCache class \e always takes ownership of the items
it stores (i.e. auto-delete is always on). If you use Q3Cache
@@ -950,11 +950,11 @@
pointers, not the objects that the pointers refer to. For
example,
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 5
becomes
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 6
An alternative is to stick to using Q3Cache.
\endlist
@@ -1051,7 +1051,7 @@
you can simply replace colorGroup() with palette():
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 7
\section1 QColorDrag
@@ -1089,7 +1089,7 @@
'\\0' issue is handled by having QByteArray allocate one extra
byte that it always sets to '\\0'. For example:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 8
The Qt3Support library contains a class called
Q3CString that inherits from the new QByteArray class and that
@@ -1416,26 +1416,26 @@
\header \o Q3Dict idiom \o QMultiHash idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 9
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 10
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 11
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 12
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 13
(also called from Q3Dict's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 14
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 15
However, it may lead to crashes if \c hash is referenced from
the value type's destructor, because \c hash contains
@@ -1471,11 +1471,11 @@
Be aware that QHashIterator has a different way of iterating than
Q3DictIterator. A typical loop with Q3DictIterator looks like this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 16
Here's the equivalent QHashIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 17
See \l{Java-style iterators} for details.
@@ -2377,7 +2377,7 @@
Use QObject::findChildren() (or qFindChildren() if you need MSVC 6
compatibility) instead of QObject::queryList(). For example:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 18
QObject::killTimers() has been removed because it was unsafe to
use in subclass. (A subclass normally doesn't know whether the
@@ -2712,48 +2712,48 @@
\header \o QPtrList idiom \o QList idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 19
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 20
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 21
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 22
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 23
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 24
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 25
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 26
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 27
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 28
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 29
(removes the current item)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 30
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 31
(also called from QPtrList's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 32
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 33
However, it may lead to crashes if \c list is referenced from
the value type's destructor, because \c list contains
@@ -2790,11 +2790,11 @@
Be aware that QListIterator has a different way of iterating than
QPtrList. A typical loop with QPtrList looks like this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 34
Here's the equivalent QListIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 35
Finally, QPtrListIterator<T> must also be ported. There are no
fewer than four iterator classes that can be used as a
@@ -2821,11 +2821,11 @@
iterating than QPtrList. A typical loop with QPtrList looks like
this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 36
Here's the equivalent QListIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 37
Finally, QPtrListStdIterator<T> must also be ported. This is
easy, because QList also provides STL-style iterators
@@ -2864,26 +2864,26 @@
\header \o QPtrQueue idiom \o QQueue idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 38
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 39
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 40
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 41
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 42
(also called from QPtrQueue's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 43
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 44
However, it may lead to crashes if \c queue is referenced
from the value type's destructor, because \c queue contains
@@ -2923,26 +2923,26 @@
\header \o QPtrStack idiom \o QStack idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 45
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 46
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 47
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 48
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 49
(also called from QPtrStack's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 50
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 51
However, it may lead to crashes if \c stack is referenced
from the value type's destructor, because \c stack contains
@@ -3024,36 +3024,36 @@
\header \o QPtrVector idiom \o QVector idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 52
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 53
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 54
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 55
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 56
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 57
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 58
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 59
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 60
(also called from QPtrVector's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 61
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 62
However, it may lead to crashes if \c vect is referenced from
the value type's destructor, because \c vect contains
@@ -3193,7 +3193,7 @@
An easy way of porting to Qt 4 is to include this class into your
project and to use it instead of \c QShared:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63
If possible, we recommend that you use QSharedData and
QSharedDataPointer instead. They provide thread-safe reference
@@ -3217,11 +3217,11 @@
Previously, you would do the following with Q3SimpleRichText:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63a
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63a
However, with QTextDocument, you use the following code instead:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63b
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63b
See \l{Rich Text Processing} for an overview of the Qt 4 rich
text classes.
@@ -3233,7 +3233,7 @@
The slider's rect can now be retrieved using the code snippet below:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63c
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63c
In addition, the direction of a vertical QSlider has changed,
i.e. the bottom is now the minimum, and the top the maximum. You
@@ -3454,7 +3454,7 @@
byte array; you should avoid taking a pointer to the data
contained in temporary objects.
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 64
In the above example, the \c goodData pointer is valid for the lifetime
of the \c asciiData byte array. If you need to keep a copy of the data
@@ -3464,11 +3464,11 @@
\o QString::at() returned a non-const reference, whereas the
new QString::at() returns a const value. Code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 65
will no longer compile. Instead, use QString::operator[]:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 66
\o The QString::contains(\e x) function (where \e x is a
character or a string) has been renamed QString::count(\e x).
diff --git a/doc/src/porting/qt3to4.qdoc b/doc/src/porting/qt3to4.qdoc
index 336601f250..3c95b4c2c2 100644
--- a/doc/src/porting/qt3to4.qdoc
+++ b/doc/src/porting/qt3to4.qdoc
@@ -122,7 +122,7 @@
In some cases, you might get compiler errors because of identifiers
in the global namespace (e.g., \c CTRL). Adding
- \snippet doc/src/snippets/code/doc_src_qt3to4.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt3to4.cpp 2
at the beginning of the source file that contains
the indentifier solves the problem.
diff --git a/doc/src/porting/qt4-accessibility.qdoc b/doc/src/porting/qt4-accessibility.qdoc
index 6e56942cbd..2d9e8c3fbb 100644
--- a/doc/src/porting/qt4-accessibility.qdoc
+++ b/doc/src/porting/qt4-accessibility.qdoc
@@ -68,7 +68,7 @@
variable set to 1. For example, this is set in the following way with
the bash shell:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc environment
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp environment
Accessibility features are built into Qt by default when the libraries
are configured and built.
@@ -132,17 +132,17 @@
information for a custom widget. We can use QAccessibleWidget as
a base class and reimplement various functions:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 0
Here's how we would implement the
\l{QAccessibleInterface::doAction()}{doAction()} function to call
a function named click() on the wrapped MyWidget object when the
user invokes the object's default action or "presses" it.
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 1
To export the widget interface as a plugin, we must subclass
QAccessibleFactory:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 2
*/
diff --git a/doc/src/porting/qt4-arthur.qdoc b/doc/src/porting/qt4-arthur.qdoc
index 434aa292fe..460a0486d3 100644
--- a/doc/src/porting/qt4-arthur.qdoc
+++ b/doc/src/porting/qt4-arthur.qdoc
@@ -119,7 +119,7 @@
Setting a linear gradient brush is done by creating a QLinearGradient
object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 0
The code shown above produces a pattern as show in the following
pixmap:
@@ -130,7 +130,7 @@
focal point. Setting a radial brush is done by creating a QRadialGradient
object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 1
The code shown above produces a pattern as shown in the following
pixmap:
@@ -141,7 +141,7 @@
angle. Setting a conical brush is done by creating a
QConicalGradient object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 2
The code shown above produces a pattern as shown in the following
pixmap:
@@ -156,7 +156,7 @@
transparent color, while 255 represents a fully opaque color. For
example:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 3
The code shown above produces the following output:
@@ -180,7 +180,7 @@
provide the option of turning on anti-aliased edges when drawing
graphics primitives.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 4
This produces the following output:
@@ -221,7 +221,7 @@
first add a rectangle, which becomes a closed subpath. We then add
two bezier curves, and finally draw the entire path.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 5
The code above produces the following output:
@@ -236,18 +236,18 @@
painting to an off-screen pixmap then copying the pixmap to the
screen. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 6
Since the double-buffering is handled by QWidget internally this
now becomes:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 7
Double-buffering is turned on by default, but can be turned off for
individual widgets by setting the widget attribute
Qt::WA_PaintOnScreen.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 8
\section2 Pen and Brush Transformation
@@ -270,7 +270,7 @@
possible to specify both texture and gradient fills for both
text and outlines.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 9
The code above produces the following output:
@@ -290,7 +290,7 @@
Painting on an image is as simple as drawing on any other paint device.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 10
\section2 SVG Rendering Support
diff --git a/doc/src/porting/qt4-mainwindow.qdoc b/doc/src/porting/qt4-mainwindow.qdoc
index 1eff2c25ed..ebfbc8d2d5 100644
--- a/doc/src/porting/qt4-mainwindow.qdoc
+++ b/doc/src/porting/qt4-mainwindow.qdoc
@@ -86,7 +86,7 @@
the first time it is called. You can also call
QMainWindow::setMenuBar() to use a custom menu bar in the main window.
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 0
\dots
\snippet examples/mainwindows/menus/mainwindow.cpp 5
\dots
@@ -110,7 +110,7 @@
\snippet examples/mainwindows/sdi/mainwindow.cpp 0
\dots
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 1
In this example, the toolbar is restricted to the top and bottom
toolbar areas of the main window, and is initially placed in the
@@ -132,7 +132,7 @@
required, the default can be changed with the
QMainWindow::setCorner() function:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 2
The following diagram shows the configuration produced by the above code.
Note that the left and right dock widgets will occupy the top and bottom
@@ -143,7 +143,7 @@
Once all of the main window components have been set up, the central widget
is created and installed by using code similar to the following:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 3
The central widget can be any subclass of QWidget.
@@ -217,17 +217,17 @@
constructed using the general QMenu class.
Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 4
Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 5
Toolbars follow the same pattern as menus, with the new, more
consistent behavior:
Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 6
Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 7
The behavior of dock widgets is now configured through the member
functions of QDockWidget. For example, compare the old and new ways
@@ -235,7 +235,7 @@
main window.
In Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 8
In Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 9
*/
diff --git a/doc/src/porting/qt4-sql.qdoc b/doc/src/porting/qt4-sql.qdoc
index bafaacb6b7..2a5a206825 100644
--- a/doc/src/porting/qt4-sql.qdoc
+++ b/doc/src/porting/qt4-sql.qdoc
@@ -104,12 +104,12 @@
The simplest way to present data from a database is to simply
combine a QSqlQueryModel with a QTableView:
- \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.cpp 0
To present the contents of a single table, we can use
QSqlTableModel instead:
- \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.cpp 1
In practice, it's common that we need to customize the rendering
of a field in the database. In that case, we can create our own
diff --git a/doc/src/porting/qt4-styles.qdoc b/doc/src/porting/qt4-styles.qdoc
index 76b0b1cbdf..7422f0641c 100644
--- a/doc/src/porting/qt4-styles.qdoc
+++ b/doc/src/porting/qt4-styles.qdoc
@@ -90,7 +90,7 @@
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 0
For performance reasons, there are few member functions and the
access to the variables is direct. This "low-level" feel makes
@@ -108,7 +108,7 @@
The following code snippet illustrates how to use QStyle to
draw the focus rectangle from a custom widget's paintEvent():
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 1
The next example shows how to derive from an existing style to
customize the look of a graphical element:
@@ -130,11 +130,11 @@
For example, here's the signature of the QStyle::drawControl()
function in Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 2
Here's the signature of the same function in Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 3
In Qt 3, some of the information required to draw a graphical
element was stored in a QStyleOption parameter, while the rest
diff --git a/doc/src/porting/qt4-tulip.qdoc b/doc/src/porting/qt4-tulip.qdoc
index 161c373c07..c78ff96542 100644
--- a/doc/src/porting/qt4-tulip.qdoc
+++ b/doc/src/porting/qt4-tulip.qdoc
@@ -80,16 +80,16 @@
addition to the C++ language that is implemented using the standard
C++ preprocessor. The syntax is:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 0
Example:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 1
The iterator variable can also be defined outside the loop. For
example:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 2
Just like standard \c for loops, foreach supports braces, \c
break, \c continue, and nested loops. Qt makes a copy of the
@@ -124,25 +124,25 @@
Traversing a container using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 3
Modifying items using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 4
Removing items using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 5
Iterating over items with a particular value using STL-style vs.
Java-style iterators:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 6
Modifying and removing items using STL-style vs. Java-style
iterators:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 7
The next group of examples show the API of the container classes
themselves. The API is similar to the QTL classes of Qt 3, but is nicer
@@ -151,16 +151,16 @@
Iterating over a QList using an index (which is fast even for large
lists, because QList is implemented as an array-list):
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 8
Retrieving a value from a map, using a default value if the key
doesn't exist:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 9
Getting all the values for a particular key in a QMultiMap or QMultiHash:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 10
\section1 Comparison with Qt 3
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 5a3bfc93d3..9097a38048 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -24,228 +24,297 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
/*!
\externalpage http://qt.nokia.com/
\title Qt website
*/
-
/*!
\externalpage http://qt.nokia.com/
\title Qt Homepage
*/
-
/*!
\externalpage http://bugreports.qt.nokia.com
\title Qt Bug Tracker
*/
-
/*!
\externalpage http://bugreports.qt.nokia.com
\title Bug Report Form
*/
-
/*!
\externalpage http://qt.nokia.com/services-partners/partners/partner-directory
\title Partner Directory
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products
\title Qt Solutions
*/
-
/*!
\externalpage http://qt.nokia.com/developer/books
\title Books about Qt Programming
*/
-
/*!
\externalpage http://qt.nokia.com/developer/books/3
\title GUI Programming with Qt 3
*/
-
/*!
\externalpage http://qt.nokia.com/about
\title About Qt
*/
-
/*!
\externalpage http://qt.nokia.com/products/developer-tools
\title Visual Studio Integration
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Widgets/qtcalendarwidget/
\title Calendar Widget
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Widgets/qtwizard/
\title QtWizard
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Utilities/qtcorba/
\title CORBA Framework
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Widgets/qtwindowlistmenu/
\title Window Menu
*/
-
/*!
\externalpage http://qt.nokia.com/qt-in-use
\title Customer Success Stories
*/
-
/*!
\externalpage http://qt.nokia.com/developer
\title Developer Zone
*/
-
/*!
\externalpage http://qt.nokia.com/downloads
\title Downloads
*/
-
/*!
\externalpage http://qt.nokia.com/developer/faqs/
\title FAQs
*/
-
/*!
\externalpage http://qt.nokia.com/developer/faqs/licensing/
\title License FAQ
*/
-
/*!
\externalpage http://qt.nokia.com/products/licensing/
\title Free Software and Contributions
*/
-
/*!
\externalpage http://qt.nokia.com/products/licensing/
\title Qt Licensing Overview
*/
-
/*!
\externalpage http://qt.nokia.com/products/pricing/
\title Qt License Pricing
*/
-
/*!
\externalpage http://qt.nokia.com/about/contact-us
\title How to Order
*/
-
/*!
\externalpage http://doc.qt.nokia.com/supported-platforms.html
\title Platform Support Policy
*/
-
/*!
\externalpage http://qt.nokia.com/products/
\title Product Overview
*/
-
/*!
\externalpage http://doc.qt.nokia.com/supported-platforms.html
\title Qt 4 Platforms Overview
*/
-
/*!
\externalpage http://www.qtextended.org/
\title Qt Extended
*/
-
/*!
\externalpage http://doc.qt.nokia.com/qq/
\title Qt Quarterly
*/
-
/*!
\externalpage http://bugreports.qt.nokia.com
\title Task Tracker
*/
-
/*!
\externalpage http://lists.trolltech.com
\title Qt Mailing Lists
*/
-
/*!
\externalpage http://qt.nokia.com/products/files/pdf/
\title Whitepapers
*/
-
/*!
\externalpage http://doc.qt.nokia.com/qtcanvas
\title QtCanvas
*/
-
/*!
\externalpage http://labs.qt.nokia.com/page/Projects/Itemview/Modeltest
\title ModelTest
*/
-
/*!
\externalpage http://labs.qt.nokia.com/page/Projects/Accessibility/QDBusBridge
\title D-Bus Accessibility Bridge
*/
-
/*!
\externalpage http://labs.qt.nokia.com/blogs/2008/12/05/qtestlib-now-with-nice-graphs-pointing-upwards/
\title qtestlib-tools Announcement
*/
-
/*!
\externalpage http://qt.nokia.com/products/library/modular-class-library#info_scripting
\title Qt Script for Applications (QSA)
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Utilities/qtsharedmemory/
\title QtSharedMemory
*/
-
/*!
\externalpage http://qt.nokia.com/qq/qq21-portingcanvas.html
\title Porting to Qt 4.2's Graphics View
*/
-
/*!
\externalpage http://qt.nokia.com/products/add-on-products/catalog/4/Windows/qtwinforms/
\title QtWinForms Solution
*/
-
/*!
\externalpage http://qt.nokia.com/developer/faqs/qt/installation
\title Installation FAQ
*/
-
/*!
\externalpage http://qt.gitorious.org
\title Public Qt Repository
*/
-
/*!
\externalpage http://get.qt.nokia.com/nokiasmartinstaller/
\title Smart Installer
*/
-
/*!
\externalpage http://qt.gitorious.org/qt-labs/qtestlib-tools
\title qtestlib-tools
*/
-
/*!
\externalpage http://labs.qt.nokia.com
\title Qt Labs
*/
/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-qml-application.html
+ \title external: Developing Qt Quick Applications with Creator
+*/
+/*!
\externalpage http://qt.gitorious.org/qt/pages/QtCodingStyle
\title Qt Coding Style
*/
+/*!
+ \externalpage http://developer.qt.nokia.com/wiki/QtCreatorWhitepaper
+ \title Qt Creator Whitepaper
+*/
+/*!
+ \externalpage http://developer.qt.nokia.com/wiki/QtWhitepaper
+ \title Qt Whitepaper
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-visual-editor.html
+ \title external: Developing Qt Quick Applications
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-publish-ovi.html
+ \title external: Publishing Applications to Ovi Store
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/index.html
+ \title external: Qt Creator Manual
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-developing-symbian.html
+ \title external: Setting Up Development Environment for Symbian
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-developing-maemo.html
+ \title external: Setting Up Development Environment for Maemo
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtmobility/index.html
+ \title external: Qt Mobility Manual
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtmobility/qml-plugins.html
+ \title external: Qt Mobility QML Plugins
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtsimulator/index.html
+ \title external: Qt Simulator Manual
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/nokia-qtsdk-latest/index.html
+ \title external: Qt SDK Manual
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-project-managing.html
+ \title external: Creating Qt Projects in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-building-running.html
+ \title external: Building and Running Applications in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-running-targets.html
+ \title external: Set Compiler Targets in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-build-settings.html
+ \title external: Build Settings in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-run-settings.html
+ \title external: Run Settings in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-using-qt-designer.html
+ \title external: Designer in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-debugging.html
+ \title external: Debugging Applications in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-deployment-symbian.html
+ \title external: Symbian Deployment in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator/creator-deployment-maemo.html
+ \title external: Maemo Deployment in Creator
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtmobility/multimedia.html
+ \title external: Mobility Multimedia
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtmobility/location-overview.html
+ \title external: Mobility Location
+*/
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/training/training-day-at-developer-days-2009/
+ \title Training Day at Qt Developer Days 2009
+*/
+/*!
+ \externalpage http://doc.qt.nokia.com/qtmobility/all-examples.html
+ \title external: Qt Mobility Examples
+*/
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/training
+ \title Qt eLearning
+*/
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/training
+ \title Qt eLearning Training Materials
+*/
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/talks/developerdays2010
+ \title Qt Developer Days 2010
+*/
+
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 3cabb1cd26..41848e9c89 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -241,7 +241,9 @@
\section1 Build System
Unlike previous Qt releases, Qt 4 is a collection of smaller
- libraries:
+ libraries. A complete list of libraries in the current release
+ of Qt can be found on the \l{All Modules} page. The following
+ table describes the initial set of libraries released with Qt 4.
\table
\header \o Library \o Description
@@ -276,11 +278,11 @@
link your application against QtCore and QtGui. To remove the
dependency upon QtGui, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 0
to your .pro file. To enable the other libraries, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 1
Another change to the build system is that moc now understands
preprocessor directives. qmake automatically passes the defines set
@@ -290,21 +292,21 @@
To compile code that uses UI files, you will also need this line in
the .pro file:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 2
\section1 Include Syntax
The syntax for including Qt class definitions has become
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 3
For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 4
This is guaranteed to work for any public Qt class. The old syntax,
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 5
still works, but we encourage you to switch to the new syntax.
@@ -318,7 +320,7 @@
To include the definitions for all the classes in a library, simply
specify the name of that library. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 6
\section1 Namespaces
@@ -330,7 +332,7 @@
to access a constant that is part of the Qt namespace, prefix it
with \c{Qt::} (e.g., \c{Qt::yellow}), or add the directive
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 7
at the top of your source files, after your \c #include
directives. If you use the \c{using namespace} syntax you don't
@@ -360,7 +362,7 @@
\list
\o Code that used it looked confusing, for example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 8
\c label1 is a QLabel that displays the text "Hello"; \c
label2 is a QLabel with no text, with the object name
@@ -370,7 +372,7 @@
they blindly followed Qt's convention and provided a "const
char *name" in their subclasses's constructors. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 9
\o The name parameter was in Qt since version 1, and it always
was documented as: "It is not very useful in the current
@@ -405,12 +407,12 @@
Here's the Qt 3 idiom to cast a type to a subtype:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 10
The Qt 4 idiom is both cleaner and safer, because typos will always
result in compiler errors:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 11
\section1 QPointer<T>
@@ -421,7 +423,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 12
QPointer<T> is more or less the same as the old QGuardedPtr<T> class,
except that it is now implemented in a much more lightweight manner
@@ -461,7 +463,7 @@
To enable the Qt 3 support classes and functions, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 13
to your \c .pro file.
@@ -469,18 +471,18 @@
in a compiler warning (e.g., "'find' is deprecated"). If you want to turn
off that warning, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 14
to your \c .pro file.
If you want to use compatibility functions but don't want to link
against the Qt3Support library, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 15
or
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 16
to your \c .pro file, depending on whether you want compatibility
function calls to generate compiler warnings or not.
diff --git a/doc/src/scripting/qtscriptextensions.qdoc b/doc/src/scripting/qtscriptextensions.qdoc
index 888cf73020..431adb05db 100644
--- a/doc/src/scripting/qtscriptextensions.qdoc
+++ b/doc/src/scripting/qtscriptextensions.qdoc
@@ -68,7 +68,7 @@
An example of a simple \c{__init__.js}:
- \snippet doc/src/snippets/code/doc_src_qtscriptextensions.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscriptextensions.js 0
QScriptEngine will look for a QScriptExtensionPlugin that provides
the relevant extension by querying each plugin for its keys()
diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc
index 79fed97412..f882da0539 100644
--- a/doc/src/scripting/scripting.qdoc
+++ b/doc/src/scripting/scripting.qdoc
@@ -144,7 +144,7 @@
script function. In the following example a script signal handler is
defined that will handle the QLineEdit::textChanged() signal:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 47
The first two arguments to qScriptConnect() are the same
as you would pass to QObject::connect() to establish a normal C++
@@ -155,7 +155,7 @@
("slot") itself. The following example shows how the \c this argument
can be put to use:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 48
We create two QLineEdit objects and define a single signal handler
function. The connections use the same handler function, but the
@@ -179,13 +179,13 @@
In this form of connection, the argument to \c{connect()} is the
function to connect to the signal.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 2
The argument can be a Qt Script function, as in the above
example, or it can be a QObject slot, as in
the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 3
When the argument is a QObject slot, the argument types of the
signal and slot do not necessarily have to be compatible;
@@ -196,7 +196,7 @@
\c{disconnect()} function, passing the function to disconnect
as argument:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 4
When a script function is invoked in response to a signal, the
\c this object will be the Global Object.
@@ -214,11 +214,11 @@
\c{clicked} signal; passing the form as the \c this object
makes sense in such a case.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 5
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 6
\section3 Signal to Named Member Function Connections
@@ -234,11 +234,11 @@
Note that the function is resolved when the connection is made, not
when the signal is emitted.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 7
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 8
\section3 Error Handling
@@ -247,14 +247,14 @@
You can obtain an error message from the resulting \c{Error} object.
Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 9
\section3 Emitting Signals from Scripts
To emit a signal from script code, you simply invoke the signal
function, passing the relevant arguments:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 10
It is currently not possible to define a new signal in a script;
i.e., all signals must be defined by C++ classes.
@@ -267,13 +267,13 @@
\c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following
script code will behave reasonably:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 11
You can specify a particular overload by using array-style property access
with the \l{QMetaObject::normalizedSignature()}{normalized signature} of
the C++ function as the property name:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 12
If the overloads have different number of arguments, QtScript will
pick the overload with the argument count that best matches the
@@ -291,11 +291,11 @@
property will automatically be invoked. For example, if your
C++ class has a property declared as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 13
then script code can do things like the following:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 14
\section2 Accessing Child QObjects
@@ -306,12 +306,12 @@
\c{"okButton"}, you can access this object in script code through
the expression
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 15
Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
the name in script code to, for example, rename an object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 16
You can also use the functions \c{findChild()} and \c{findChildren()}
to find children. These two functions behave identically to
@@ -320,7 +320,7 @@
For example, we can use these functions to find objects using strings
and regular expressions:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 17
You typically want to use \c{findChild()} when manipulating a form
that uses nested layouts; that way the script is isolated from the
@@ -367,7 +367,7 @@
For example, a constructor function that constructs QObjects
only to be used in the script environment is a good candidate:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 18
\section3 Auto-Ownership
@@ -638,7 +638,7 @@
For example, the following class definition enables scripting only for
certain functions:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 19
In the example above, aNonScriptableFunction() is not declared as a
slot, so it will not be available in QtScript. The other three
@@ -649,7 +649,7 @@
It is possible to make any function script-invokable by specifying
the \c{Q_INVOKABLE} modifier when declaring the function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 20
Once declared with \c{Q_INVOKABLE}, the method can be invoked from
QtScript code just as if it were a slot. Although such a method is
@@ -657,19 +657,25 @@
call to \c{connect()} in script code; \c{connect()} accepts both
native and non-native functions as targets.
+ As discussed in \l{Default Conversion from Qt Script to C++}, Qt
+ Script handles conversion for many C++ types. If your function takes
+ arguments for which Qt Script does not handle conversion, you need
+ to supply conversion functions. This is done using the
+ qScriptRegisterMetaType() function.
+
\section2 Making C++ Class Properties Available in QtScript
In the previous example, if we wanted to get or set a property using
QtScript we would have to write code like the following:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 21
Scripting languages often provide a property syntax to modify and
retrieve properties (in our case the enabled state) of an
object. Many script programmers would want to write the above code
like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 22
To make this possible, you must define properties in the C++ QObject
subclass. For example, the following \c MyObject class declaration
@@ -677,7 +683,7 @@
\c{setEnabled(bool)} as its setter function and \c{isEnabled()} as its
getter function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 23
The only difference from the original code is the use of the macro
\c{Q_PROPERTY}, which takes the type and name of the property, and
@@ -688,7 +694,7 @@
declaring the property; by default, the \c{SCRIPTABLE} attribute is
\c true. For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 24
\section2 Reacting to C++ Objects Signals in Scripts
@@ -703,14 +709,14 @@
regardless of whether the signal will be connected to a slot in C++
or in QtScript.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 25
The only change we have made to the code in the previous section is
to declare a signals section with the relevant signal. Now, the
script writer can define a function and connect to the object like
this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 26
\section2 Design of Application Objects
@@ -752,7 +758,7 @@
still allowing pointers to your custom objects to flow seamlessly
between C++ and scripts. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 43
\section1 Function Objects and Native Functions
@@ -778,23 +784,23 @@
result. The following script defines a Qt Script object that has a
toKelvin() function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 90
The toKelvin() function takes a temperature in Kelvin as argument, and
returns the temperature converted to Celsius. The following snippet shows
how the toKelvin() function might be obtained and called from C++:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 91
If a script defines a global function, you can access the function as a
property of QScriptEngine::globalObject(). For example, the following script
defines a global function add():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 56
C++ code might call the add() function as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 92
As already mentioned, functions are just values in Qt Script; a function by
itself is not "tied to" a particular object. This is why you have to specify
@@ -816,7 +822,7 @@
is invoked determines the \c this object when the function body is executed,
as the following script example illustrates:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 49
An important thing to note is that in Qt Script, unlike C++ and Java, the
\c this object is not part of the execution scope. This means that
@@ -824,14 +830,14 @@
use the \c this keyword to access the object's properties. For example,
the following script probably doesn't do what you want:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 50
You will get a reference error saying that 'a is not defined' or, worse,
two totally unrelated global variables \c a and \c b will be used to
perform the computation, if they exist. Instead, the script should look
like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 51
Accidentally omitting the \c this keyword is a typical source of
error for programmers who are used to the scoping rules of C++ and Java.
@@ -844,7 +850,7 @@
your function as if it were a "normal" script function. Here is how the
previous \c{getProperty()} function can be written in C++:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 52
Call QScriptEngine::newFunction() to wrap the function. This will
produce a special type of function object that carries a pointer to
@@ -905,7 +911,7 @@
script would normally define an \c{add()} function that takes two
arguments, adds them together and returns the result:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 56
When a script function is defined with formal parameters, their
names can be viewed as mere aliases of properties of the \c
@@ -914,12 +920,12 @@
variable. This means that the \c{add()} function can equivalently be
written like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 57
This latter form closely matches what a native implementation
typically looks like:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 58
\section3 Checking the Number of Arguments
@@ -930,13 +936,13 @@
really needs two arguments in order to do something useful. This
can be expressed by the script definition as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 59
This would result in an error being thrown if a script invokes
\c{add()} with anything other than two arguments. The native
function can be modified to perform the same check:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 62
\section3 Checking the Types of Arguments
@@ -954,7 +960,7 @@
stricter semantics (namely, that it should only add numeric
operands), the argument types can be tested:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 60
Then an invocation like \c{add("foo", new Array())} will
cause an error to be thrown.
@@ -962,12 +968,12 @@
The C++ version can call QScriptValue::isNumber() to perform similar
tests:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 63
A less strict script implementation might settle for performing an
explicit to-number conversion before applying the \c{+} operator:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 61
In a native implementation, this is equivalent to calling
QScriptValue::toNumber() without performing any type test first,
@@ -1000,21 +1006,21 @@
\c{concat("Qt", " ", "Script ", 101)} would return "Qt Script 101".
A script definition of \c{concat()} might look like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 64
Here is an equivalent native implementation:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 65
A second use case for a variable number of arguments is to implement
optional arguments. Here's how a script definition typically does
it:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 66
And here's the native equivalent:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 67
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 67
A third use case for a variable number of arguments is to simulate
C++ overloads. This involves checking the number of arguments and/or
@@ -1043,7 +1049,7 @@
call to another function. In script code, this is what it
typically looks like:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 68
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 68
For example, \c{foo(10, 20, 30)} would result in the \c{foo()} function
executing the equivalent of \c{bar(10, 20, 30)}. This is useful if
@@ -1054,7 +1060,7 @@
function that has the exact same "signature". In C++, the forwarding
function might look like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 69
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 69
\o The arguments object can serve as input to a QScriptValueIterator,
providing a generic way to iterate over the arguments. A debugger
@@ -1072,7 +1078,7 @@
Some script functions are constructors; they are expected to initialize
new objects. The following snippet is a small example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 75
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 75
There is nothing special about constructor functions. In fact, any
script function can act as a constructor function (i.e., any function
@@ -1118,7 +1124,7 @@
The following example implements a constructor function that always
creates and initializes a new object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 76
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 76
Given this constructor, scripts would be able to use either the
expression \c{new Person("Bob")} or \c{Person("Bob")} to create a
@@ -1154,7 +1160,7 @@
returns the function object being invoked. The following example
shows how this might be used:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 55
\section2 Native Functions as Arguments to Functions
@@ -1163,13 +1169,13 @@
naturally. As an example, here's a native comparison function
that compares its two arguments numerically:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 53
The above function can be passed as argument to the standard
\c{Array.prototype.sort} function to sort an array numerically,
as the following C++ code illustrates:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 54
Note that, in this case, we are truly treating the native function
object as a value \mdash i.e., we don't store it as a property of the
@@ -1204,7 +1210,7 @@
itself. This technique is typically used in conjunction with
QScriptEngine::pushContext(), as in the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 77
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 77
We create a temporary execution context, create a local variable
for it, evaluate the script, and finally restore the old context.
@@ -1227,7 +1233,7 @@
define a native combined getter/setter that transforms the value
slightly:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 78
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 78
The example uses the internal data of the object to store and
retrieve the transformed value. Alternatively, the property
@@ -1240,12 +1246,12 @@
The following C++ code shows how an object property can be defined
in terms of the native getter/setter:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 79
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 79
When the property is accessed, like in the following script, the
getter/setter does its job behind the scenes:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 80
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 80
\note It is important that the setter function, not just the getter,
returns the value of the property; i.e., the setter should \e{not}
@@ -1266,7 +1272,7 @@
Property getters and setters can be defined and installed by script
code as well, as in the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 81
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 81
Getters and setters can only be used to implement "a priori
properties"; i.e., the technique can't be used to react to an access
@@ -1342,7 +1348,7 @@
including the \c{hasOwnProperty()} function and \c{toString()}
function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 27
The \c{toString()} function itself is not defined in \c{o} (since we
did not assign anything to \c{o.toString}), so instead the
@@ -1382,7 +1388,7 @@
The following code defines a simple constructor function for a class
called \c{Person}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 28
Next, you want to set up \c{Person.prototype} as your prototype
object; i.e., define the interface that should be common to all
@@ -1397,19 +1403,19 @@
\c{Object.prototype}, to give your \c{Person} objects a more
appropriate string representation:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 29
This resembles the process of reimplementing a virtual function
in C++. Henceforth, when the property named \c{toString} is
looked up in a \c{Person} object, it will be resolved in
\c{Person.prototype}, not in \c{Object.prototype} as before:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 30
There are also some other interesting things we can learn about a
\c{Person} object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 31
The \c{hasOwnProperty()} function is not inherited from
\c{Person.prototype}, but rather from \c{Object.prototype}, which is
@@ -1426,13 +1432,13 @@
following example shows how one can create a subclass of \c{Person}
called \c{Employee}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 32
Again, you can use the \c{instanceof} to verify that the
class relationship between \c{Employee} and \c{Person} has been
correctly established:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 33
This shows that the prototype chain of \c{Employee} objects is the
same as that of \c{Person} objects, but with \c{Employee.prototype}
@@ -1477,25 +1483,25 @@
preceding section can be implemented in terms of the Qt Script API.
We begin with the native constructor function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 34
Here's the native equivalent of the \c{Person.prototype.toString}
function we saw before:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 35
The \c{Person} class can then be initialized as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 36
The implementation of the \c{Employee} subclass is similar. We
use QScriptValue::call() to call the super-class (Person) constructor:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 37
The \c{Employee} class can then be initialized as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 38
When implementing the prototype object of a class, you may want to use
the QScriptable class, as it enables you to define the API of your
@@ -1521,7 +1527,7 @@
modify the underlying C++ value, lets you modify the actual value
contained in the script value (and not a copy of it).
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 39
\section2 Implementing Constructors for Value-based Types
@@ -1529,7 +1535,7 @@
by wrapping a native factory function. For example, the following
function implements a simple constructor for QPoint:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 44
In the above code we simplified things a bit, e.g. we didn't check
the argument count to decide which QPoint C++ constructor to use.
@@ -1564,16 +1570,16 @@
The following snippet shows a constructor function that constructs
QXmlStreamReader objects that are stored using QSharedPointer:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 93
Prototype functions can use qscriptvalue_cast() to cast the \c this object
to the proper type:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 94
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 94
The prototype and constructor objects are set up in the usual way:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 95
Scripts can now construct QXmlStreamReader objects by calling the \c
XmlStreamReader constructor, and when the Qt Script object is
@@ -1643,12 +1649,12 @@
somewhere else. The following code shows a custom print() that adds
text to a QPlainTextEdit.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 45
The following code shows how the custom print() function may be
initialized and used.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 46
A pointer to the QPlainTextEdit is stored as an internal property
of the script function itself, so that it can be retrieved when
@@ -1680,7 +1686,7 @@
function. Essentially all that is necessary to achieve this is to use
the qsTr() script function. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 82
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 82
This accounts for 99% of the user-visible strings you're likely to write.
@@ -1689,7 +1695,7 @@
unique in your project, you should use the qsTranslate() function and pass a
suitable context as the first argument. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 83
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 83
If you need to have translatable text completely outside a function, there
are two functions to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP(). They merely
@@ -1698,18 +1704,18 @@
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 84
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 84
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 85
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 85
\section2 Use String.prototype.arg() for Dynamic Text
The String.prototype.arg() function (which is modeled after QString::arg())
offers a simple means for substituting arguments:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 86
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 86
\section2 Produce Translations
@@ -1804,7 +1810,7 @@
This property has the QScriptValue::Undeletable flag set.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 40
\i \c{Object.prototype.__defineGetter__} \br
This function installs a
@@ -1814,7 +1820,7 @@
\c this object will be the object whose property is accessed.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 41
\i \c{Object.prototype.__defineSetter__} \br
This function installs a
@@ -1824,7 +1830,7 @@
\c this object will be the object whose property is accessed.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 42
\i \c{Function.prototype.connect} \br
This function connects
diff --git a/doc/src/snippets/accessibilityfactorysnippet.cpp b/doc/src/snippets/accessibilityfactorysnippet.cpp
index a378db7e6d..6dc6b2a3cd 100644
--- a/doc/src/snippets/accessibilityfactorysnippet.cpp
+++ b/doc/src/snippets/accessibilityfactorysnippet.cpp
@@ -45,9 +45,8 @@ QAccessibleInterface *sliderFactory(const QString &classname, QObject *object)
{
QAccessibleInterface *interface = 0;
- if (classname == "QSlider" && object && object->isWidgetType())
- interface = new SliderInterface(classname,
- static_cast<QWidget *>(object));
+ if (classname == QLatin1String("QSlider") && object && object->isWidgetType())
+ interface = new QAccessibleSlider(static_cast<QWidget *>(object));
return interface;
}
diff --git a/doc/src/snippets/accessibilitypluginsnippet.cpp b/doc/src/snippets/accessibilitypluginsnippet.cpp
index a7e25f0ff0..5c28468654 100644
--- a/doc/src/snippets/accessibilitypluginsnippet.cpp
+++ b/doc/src/snippets/accessibilitypluginsnippet.cpp
@@ -52,7 +52,7 @@ public:
//! [0]
QStringList SliderPlugin::keys() const
{
- return QStringList() << "QSlider";
+ return QStringList() << QLatin1String("QSlider");
}
//! [0]
@@ -61,8 +61,8 @@ QAccessibleInterface *SliderPlugin::create(const QString &classname, QObject *ob
{
QAccessibleInterface *interface = 0;
- if (classname == "QSlider" && object && object->isWidgetType())
- interface = new AccessibleSlider(classname, static_cast<QWidget *>(object));
+ if (classname == QLatin1String("QSlider") && object && object->isWidgetType())
+ interface = new QAccessibleSlider(static_cast<QWidget *>(object));
return interface;
}
diff --git a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp
index 0c29b1c4ad..0c29b1c4ad 100644
--- a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc
+++ b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp
diff --git a/doc/src/snippets/code/doc_src_appicon.pro b/doc/src/snippets/code/doc_src_appicon.pro
new file mode 100644
index 0000000000..176b4583f3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_appicon.pro
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+RC_FILE = myapp.rc
+#! [1]
+
+
+#! [2]
+ICON = myapp.icns
+#! [2]
+
+
+#! [5]
+ICON = myapp.svg
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_appicon.qdoc b/doc/src/snippets/code/doc_src_appicon.qdoc
index 06bf86192b..8dd30a4ff9 100644
--- a/doc/src/snippets/code/doc_src_appicon.qdoc
+++ b/doc/src/snippets/code/doc_src_appicon.qdoc
@@ -43,16 +43,6 @@ IDI_ICON1 ICON DISCARDABLE "myappico.ico"
//! [0]
-//! [1]
-RC_FILE = myapp.rc
-//! [1]
-
-
-//! [2]
-ICON = myapp.icns
-//! [2]
-
-
//! [3]
kde-config --path icon
//! [3]
@@ -61,7 +51,3 @@ kde-config --path icon
//! [4]
gnome-config --datadir
//! [4]
-
-//! [5]
-ICON = myapp.svg
-//! [5]
diff --git a/doc/src/snippets/code/doc_src_containers.qdoc b/doc/src/snippets/code/doc_src_containers.cpp
index fa300f916b..fa300f916b 100644
--- a/doc/src/snippets/code/doc_src_containers.qdoc
+++ b/doc/src/snippets/code/doc_src_containers.cpp
diff --git a/doc/src/snippets/code/doc_src_coordsys.qdoc b/doc/src/snippets/code/doc_src_coordsys.cpp
index 1ebb215941..1ebb215941 100644
--- a/doc/src/snippets/code/doc_src_coordsys.qdoc
+++ b/doc/src/snippets/code/doc_src_coordsys.cpp
diff --git a/doc/src/snippets/code/doc_src_debug.qdoc b/doc/src/snippets/code/doc_src_debug.cpp
index 40a5ac2ace..40a5ac2ace 100644
--- a/doc/src/snippets/code/doc_src_debug.qdoc
+++ b/doc/src/snippets/code/doc_src_debug.cpp
diff --git a/doc/src/snippets/code/doc_src_deployment.cpp b/doc/src/snippets/code/doc_src_deployment.cpp
new file mode 100644
index 0000000000..e7f7511e6f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_deployment.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [9]
+qApp->addLibraryPath("/some/other/path");
+//! [9]
+
+
+//! [19]
+qApp->addLibraryPath("C:\some\other\path");
+//! [19]
+
+
+//! [49]
+QDir dir(QApplication::applicationDirPath());
+dir.cdUp();
+dir.cd("plugins");
+QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
+//! [49]
diff --git a/doc/src/snippets/code/doc_src_deployment.pro b/doc/src/snippets/code/doc_src_deployment.pro
new file mode 100644
index 0000000000..b9fdd540b3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_deployment.pro
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [8]
+DESTDIR = /path/to/Qt/plugandpaint/plugins
+#! [8]
+
+
+#! [21]
+CONFIG += embed_manifest_exe
+#! [21]
+
+
+#! [23]
+CONFIG-=embed_manifest_dll
+#! [23]
+
+
+#! [26]
+CONFIG-=app_bundle
+#! [26]
+
+
+#! [51]
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
+#! [51]
+
+#! [53]
+QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
+CONFIG+=x86 ppc
+#! [53]
+
+#! [56]
+vendorinfo = \
+ "%{\"Example Localized Vendor\"}" \
+ ":\"Example Vendor\""
+
+my_deployment.pkg_prerules = vendorinfo
+DEPLOYMENT += my_deployment
+#! [56]
+
+#! [57]
+supported_platforms = \
+ "; This demo only supports S60 5.0" \
+ "[0x1028315F],0,0,0,{\"S60ProductID\"}"
+
+default_deployment.pkg_prerules -= pkg_platform_dependencies
+my_deployment.pkg_prerules += supported_platforms
+DEPLOYMENT += my_deployment
+#! [57]
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
index c5f4644152..760bd8f119 100644
--- a/doc/src/snippets/code/doc_src_deployment.qdoc
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -96,20 +96,10 @@ dirname=$PWD/$dirname
fi
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
-$dirname/$appname $*
+$dirname/$appname "$@"
//! [7]
-//! [8]
-DESTDIR = /path/to/Qt/plugandpaint/plugins
-//! [8]
-
-
-//! [9]
-qApp->addLibraryPath("/some/other/path");
-//! [9]
-
-
//! [10]
ldd ./application
//! [10]
@@ -164,11 +154,6 @@ plugins\pnp_extrafilters.dll
//! [18]
-//! [19]
-qApp->addLibraryPath("C:\some\other\path");
-//! [19]
-
-
//! [20]
embed_manifest_dll
embed_manifest_exe
@@ -411,14 +396,6 @@ install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
//! [48]
-//! [49]
-QDir dir(QApplication::applicationDirPath());
-dir.cdUp();
-dir.cd("plugins");
-QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
-//! [49]
-
-
//! [50]
otool -L MyApp.app/Contents/MacOS/MyApp
//! [50]
@@ -483,4 +460,4 @@ make release-gcce
//! [59]
make installer_sis
-//! [59] \ No newline at end of file
+//! [59]
diff --git a/doc/src/snippets/code/doc_src_designer-manual.qdoc b/doc/src/snippets/code/doc_src_designer-manual.cpp
index 90e34a43f1..a261818965 100644
--- a/doc/src/snippets/code/doc_src_designer-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_designer-manual.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-CONFIG += uitools
-//! [0]
-
-
//! [1]
#include <QtUiTools>
//! [1]
@@ -53,27 +48,6 @@ void on_<object name>_<signal name>(<signal parameters>);
//! [2]
-//! [3]
-CONFIG += release
-//! [3]
-
-
-//! [4]
-target.path = $$[QT_INSTALL_PLUGINS]/designer
-INSTALLS += target
-//! [4]
-
-
-//! [5]
-QT += script
-//! [5]
-
-
-//! [6]
-widget.text = 'Hi - I was built ' + new Date().toString();
-//! [6]
-
-
//! [7]
class MyExtension: public QObject,
public QdesignerContainerExtension
diff --git a/doc/src/snippets/code/doc_src_designer-manual.js b/doc/src/snippets/code/doc_src_designer-manual.js
new file mode 100644
index 0000000000..074b47e53c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_designer-manual.js
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [6]
+widget.text = 'Hi - I was built ' + new Date().toString();
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_designer-manual.pro b/doc/src/snippets/code/doc_src_designer-manual.pro
new file mode 100644
index 0000000000..4b14a14466
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_designer-manual.pro
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+CONFIG += uitools
+#! [0]
+
+
+#! [3]
+CONFIG += release
+#! [3]
+
+
+#! [4]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+#! [4]
+
+
+#! [5]
+QT += script
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_dnd.qdoc b/doc/src/snippets/code/doc_src_dnd.cpp
index d5dc721c1e..d5dc721c1e 100644
--- a/doc/src/snippets/code/doc_src_dnd.qdoc
+++ b/doc/src/snippets/code/doc_src_dnd.cpp
diff --git a/doc/src/snippets/code/doc_src_emb-performance.cpp b/doc/src/snippets/code/doc_src_emb-performance.cpp
new file mode 100644
index 0000000000..5a465a9674
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-performance.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [1]
+void *operator new[](size_t size)
+{
+ return malloc(size);
+}
+
+void *operator new(size_t size)
+{
+ return malloc(size);
+}
+
+void operator delete[](void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete[](void *ptr, size_t)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr, size_t)
+{
+ free(ptr);
+}
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_emb-performance.qdoc b/doc/src/snippets/code/doc_src_emb-performance.qdoc
index 8c129fd38d..9abf8d1399 100644
--- a/doc/src/snippets/code/doc_src_emb-performance.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-performance.qdoc
@@ -41,36 +41,3 @@
//! [0]
./configure -static
//! [0]
-
-
-//! [1]
-void *operator new[](size_t size)
-{
- return malloc(size);
-}
-
-void *operator new(size_t size)
-{
- return malloc(size);
-}
-
-void operator delete[](void *ptr)
-{
- free(ptr);
-}
-
-void operator delete[](void *ptr, size_t)
-{
- free(ptr);
-}
-
-void operator delete(void *ptr)
-{
- free(ptr);
-}
-
-void operator delete(void *ptr, size_t)
-{
- free(ptr);
-}
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.pro b/doc/src/snippets/code/doc_src_emb-pointer.pro
new file mode 100644
index 0000000000..fed7d79bf1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-pointer.pro
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [7]
+....
+QMAKE_CFLAGS += -I<path to tslib headers>
+QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
+....
+#! [7]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
index 4ec13352d4..1fb6d8f1f4 100644
--- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -75,14 +75,6 @@ export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [6]
-//! [7]
-....
-QMAKE_CFLAGS += -I<path to tslib headers>
-QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
-....
-//! [7]
-
-
//! [8]
module_raw input
module linear
@@ -111,5 +103,3 @@ ls -l /dev/input/mouse0
//! [12]
chmod a+rw /dev/input/mouse0
//! [12]
-
-
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
new file mode 100644
index 0000000000..c834b9ff26
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+qApp->translate("ArrowPad", x)
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
index 933f419b7e..ee3c36784f 100644
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-qApp->translate("ArrowPad", x)
-//! [0]
-
-
//! [1]
lrelease arrowpad.pro
//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc b/doc/src/snippets/code/doc_src_examples_containerextension.pro
index 7fe0394bcf..cd86693201 100644
--- a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_containerextension.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro
index 7fe0394bcf..cd86693201 100644
--- a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
index a69a7bf772..a69a7bf772 100644
--- a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_icons.cpp b/doc/src/snippets/code/doc_src_examples_icons.cpp
new file mode 100644
index 0000000000..411c49fb8d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_icons.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+if (!condition)
+ qFatal("ASSERT: "condition" in file ...");
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc
index 7684224a01..8ca57511f7 100644
--- a/doc/src/snippets/code/doc_src_examples_icons.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_icons.qdoc
@@ -38,12 +38,6 @@
**
****************************************************************************/
-//! [0]
-if (!condition)
- qFatal("ASSERT: "condition" in file ...");
-//! [0]
-
-
//! [1]
qmake "CONFIG += debug" icons.pro
//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
new file mode 100644
index 0000000000..c86f8ace40
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+imageLabel->resize(imageLabel->pixmap()->size());
+//! [0]
+
+
+//! [1]
+if (!imageLabel->pixmap())
+ qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
+//! [1]
+
+
+//! [4]
+scrollBar->setValue(int(factor * scrollBar->value()));
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
index 84f822fe81..1870385de7 100644
--- a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
@@ -38,17 +38,6 @@
**
****************************************************************************/
-//! [0]
-imageLabel->resize(imageLabel->pixmap()->size());
-//! [0]
-
-
-//! [1]
-if (!imageLabel->pixmap())
- qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
-//! [1]
-
-
//! [2]
qmake "CONFIG += debug" foo.pro
//! [2]
@@ -57,8 +46,3 @@ qmake "CONFIG += debug" foo.pro
//! [3]
qmake "CONFIG += release" foo.pro
//! [3]
-
-
-//! [4]
-scrollBar->setValue(int(factor * scrollBar->value()));
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp
index b62236c216..b62236c216 100644
--- a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
index 1abcdc21cc..1abcdc21cc 100644
--- a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc b/doc/src/snippets/code/doc_src_examples_taskmenuextension.pro
index 7fe0394bcf..cd86693201 100644
--- a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_taskmenuextension.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc b/doc/src/snippets/code/doc_src_examples_textfinder.pro
index d99f8cec66..cdc2366b57 100644
--- a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_textfinder.pro
@@ -38,9 +38,9 @@
**
****************************************************************************/
-//! [0]
+#! [0]
CONFIG += uitools
HEADERS = textfinder.h
RESOURCES = textfinder.qrc
SOURCES = textfinder.cpp main.cpp
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
index 4b508e9b07..f7b8f48f3d 100644
--- a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
@@ -59,6 +59,7 @@ colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
belonging to MainWindow.
...
+*/
//! [2]
@@ -72,4 +73,5 @@ colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
checkbox and then click the Start Processing button. You should
now see a pop up window with the text "Error: Name too long!".
This window is a ZClientErrorDialog.
+*/
//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro
index 7fe0394bcf..cd86693201 100644
--- a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_graphicsview.qdoc b/doc/src/snippets/code/doc_src_graphicsview.cpp
index 00ebab3762..00ebab3762 100644
--- a/doc/src/snippets/code/doc_src_graphicsview.qdoc
+++ b/doc/src/snippets/code/doc_src_graphicsview.cpp
diff --git a/doc/src/snippets/code/doc_src_groups.qdoc b/doc/src/snippets/code/doc_src_groups.cpp
index 2d5fd97280..2d5fd97280 100644
--- a/doc/src/snippets/code/doc_src_groups.qdoc
+++ b/doc/src/snippets/code/doc_src_groups.cpp
diff --git a/doc/src/snippets/code/doc_src_i18n.cpp b/doc/src/snippets/code/doc_src_i18n.cpp
new file mode 100644
index 0000000000..cc85bd8a14
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_i18n.cpp
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+LoginWidget::LoginWidget()
+{
+ QLabel *label = new QLabel(tr("Password:"));
+ ...
+}
+//! [0]
+
+
+//! [1]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"), logwid);
+}
+//! [1]
+
+
+//! [2]
+QString FriendlyConversation::greeting(int type)
+{
+ static const char *greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[type]);
+}
+//! [2]
+
+
+//! [3]
+static const char *greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int type)
+{
+ return tr(greeting_strings[type]);
+}
+
+QString global_greeting(int type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[type]);
+}
+//! [3]
+
+
+//! [4]
+void FileCopier::showProgress(int done, int total,
+ const QString &currentFile)
+{
+ label.setText(tr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFile));
+}
+//! [4]
+
+
+//! [5]
+QString s1 = "%1 of %2 files copied. Copying: %3";
+QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
+
+qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
+qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
+//! [5]
+
+
+//! [8]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QTranslator qtTranslator;
+ qtTranslator.load("qt_" + QLocale::system().name(),
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ app.installTranslator(&qtTranslator);
+
+ QTranslator myappTranslator;
+ myappTranslator.load("myapp_" + QLocale::system().name());
+ app.installTranslator(&myappTranslator);
+
+ ...
+ return app.exec();
+}
+//! [8]
+
+
+//! [9]
+QString string = ...; // some Unicode text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QByteArray encodedString = codec->fromUnicode(string);
+//! [9]
+
+
+//! [10]
+QByteArray encodedString = ...; // some ISO 8859-5 encoded text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QString string = codec->toUnicode(encodedString);
+//! [10]
+
+
+//! [11]
+void Clock::setTime(const QTime &time)
+{
+ if (tr("AMPM") == "AMPM") {
+ // 12-hour clock
+ } else {
+ // 24-hour clock
+ }
+}
+//! [11]
+
+
+//! [12]
+void MyWidget::changeEvent(QEvent *event)
+{
+ if (e->type() == QEvent::LanguageChange) {
+ titleLabel->setText(tr("Document Title"));
+ ...
+ okPushButton->setText(tr("&OK"));
+ } else
+ QWidget::changeEvent(event);
+}
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc
index f54ce3789b..f8f8f02d1f 100644
--- a/doc/src/snippets/code/doc_src_i18n.qdoc
+++ b/doc/src/snippets/code/doc_src_i18n.qdoc
@@ -38,82 +38,6 @@
**
****************************************************************************/
-//! [0]
-LoginWidget::LoginWidget()
-{
- QLabel *label = new QLabel(tr("Password:"));
- ...
-}
-//! [0]
-
-
-//! [1]
-void some_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- LoginWidget::tr("Password:"), logwid);
-}
-
-void same_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- qApp->translate("LoginWidget", "Password:"), logwid);
-}
-//! [1]
-
-
-//! [2]
-QString FriendlyConversation::greeting(int type)
-{
- static const char *greeting_strings[] = {
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- };
- return tr(greeting_strings[type]);
-}
-//! [2]
-
-
-//! [3]
-static const char *greeting_strings[] = {
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
-};
-
-QString FriendlyConversation::greeting(int type)
-{
- return tr(greeting_strings[type]);
-}
-
-QString global_greeting(int type)
-{
- return qApp->translate("FriendlyConversation",
- greeting_strings[type]);
-}
-//! [3]
-
-
-//! [4]
-void FileCopier::showProgress(int done, int total,
- const QString &currentFile)
-{
- label.setText(tr("%1 of %2 files copied.\nCopying: %3")
- .arg(done)
- .arg(total)
- .arg(currentFile));
-}
-//! [4]
-
-
-//! [5]
-QString s1 = "%1 of %2 files copied. Copying: %3";
-QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
-
-qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
-qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
-//! [5]
-
-
//! [6]
5 of 10 files copied. Copying: somefile.txt
Kopierer nu somefile.txt. Av totalt 10 filer er 5 kopiert.
@@ -132,64 +56,3 @@ TRANSLATIONS = superapp_dk.ts \
superapp_no.ts \
superapp_se.ts
//! [7]
-
-
-//! [8]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QTranslator qtTranslator;
- qtTranslator.load("qt_" + QLocale::system().name(),
- QLibraryInfo::location(QLibraryInfo::TranslationsPath));
- app.installTranslator(&qtTranslator);
-
- QTranslator myappTranslator;
- myappTranslator.load("myapp_" + QLocale::system().name());
- app.installTranslator(&myappTranslator);
-
- ...
- return app.exec();
-}
-//! [8]
-
-
-//! [9]
-QString string = ...; // some Unicode text
-
-QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
-QByteArray encodedString = codec->fromUnicode(string);
-//! [9]
-
-
-//! [10]
-QByteArray encodedString = ...; // some ISO 8859-5 encoded text
-
-QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
-QString string = codec->toUnicode(encodedString);
-//! [10]
-
-
-//! [11]
-void Clock::setTime(const QTime &time)
-{
- if (tr("AMPM") == "AMPM") {
- // 12-hour clock
- } else {
- // 24-hour clock
- }
-}
-//! [11]
-
-
-//! [12]
-void MyWidget::changeEvent(QEvent *event)
-{
- if (e->type() == QEvent::LanguageChange) {
- titleLabel->setText(tr("Document Title"));
- ...
- okPushButton->setText(tr("&OK"));
- } else
- QWidget::changeEvent(event);
-}
-//! [12]
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
index 1a87566741..5aaa2b09eb 100644
--- a/doc/src/snippets/code/doc_src_installation.qdoc
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -250,12 +250,12 @@ export PATH
//! [38]
cd /home/user/qt/%VERSION%
-./configure -platform linux-g++ -xplatform symbian/linux-armcc
+./configure -platform linux-g++ -xplatform symbian-armcc
//! [38]
//! [39]
cd /home/user/qt/%VERSION%
-./configure -platform linux-g++ -xplatform symbian/linux-gcce -no-webkit
+./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit
//! [39]
//! [40]
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.cpp
index 47db36bb3a..47db36bb3a 100644
--- a/doc/src/snippets/code/doc_src_layout.qdoc
+++ b/doc/src/snippets/code/doc_src_layout.cpp
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.cpp b/doc/src/snippets/code/doc_src_linguist-manual.cpp
new file mode 100644
index 0000000000..7cb5b1ebde
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_linguist-manual.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [3]
+label->setText(tr("F\374r \310lise"));
+//! [3]
+
+
+void wrapInFunction()
+{
+//! [6]
+button = new QPushButton("&Quit", this);
+//! [6]
+
+
+//! [7]
+button = new QPushButton(tr("&Quit"), this);
+//! [7]
+
+
+//! [8]
+QPushButton::tr("&Quit")
+//! [8]
+
+
+//! [9]
+QObject::tr("&Quit")
+//! [9]
+
+
+//! [10]
+rbc = new QRadioButton(tr("Enabled", "Color frame"), this);
+//! [10]
+
+
+//! [11]
+rbh = new QRadioButton(tr("Enabled", "Hue frame"), this);
+//! [11]
+}
+
+
+//! [12]
+/*
+ TRANSLATOR FindDialog
+
+ Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
+ Find dialog.
+
+ ...
+*/
+//! [12]
+
+//! [13]
+/*
+ TRANSLATOR MyNamespace::MyClass
+
+ Necessary for lupdate.
+
+ ...
+*/
+//! [13]
+
+//! [14]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"),
+ logwid);
+}
+//! [14]
+
+
+//! [15]
+QString FriendlyConversation::greeting(int greet_type)
+{
+ static const char* greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[greet_type]);
+}
+//! [15]
+
+
+//! [16]
+static const char* greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int greet_type)
+{
+ return tr(greeting_strings[greet_type]);
+}
+
+QString global_greeting(int greet_type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[greet_type]);
+}
+//! [16]
+
+void wrapInFunction()
+{
+
+//! [17]
+QString tr(const char *text, const char *comment, int n);
+//! [17]
+
+//! [18]
+tr("%n item(s) replaced", "", count);
+//! [18]
+
+}
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.pro b/doc/src/snippets/code/doc_src_linguist-manual.pro
new file mode 100644
index 0000000000..3b19ba71a4
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_linguist-manual.pro
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+HEADERS = main-dlg.h \
+ options-dlg.h
+SOURCES = main-dlg.cpp \
+ options-dlg.cpp \
+ main.cpp
+FORMS = search-dlg.ui
+TRANSLATIONS = superapp_dk.ts \
+ superapp_fi.ts \
+ superapp_no.ts \
+ superapp_se.ts
+#! [0]
+
+
+#! [1]
+CODECFORTR = ISO-8859-5
+#! [1]
+
+
+#! [2]
+CODECFORSRC = UTF-8
+#! [2]
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
index 5975c9aa1c..34b5dcc811 100644
--- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
@@ -38,35 +38,6 @@
**
****************************************************************************/
-//! [0]
-HEADERS = main-dlg.h \
- options-dlg.h
-SOURCES = main-dlg.cpp \
- options-dlg.cpp \
- main.cpp
-FORMS = search-dlg.ui
-TRANSLATIONS = superapp_dk.ts \
- superapp_fi.ts \
- superapp_no.ts \
- superapp_se.ts
-//! [0]
-
-
-//! [1]
-CODECFORTR = ISO-8859-5
-//! [1]
-
-
-//! [2]
-CODECFORSRC = UTF-8
-//! [2]
-
-
-//! [3]
-label->setText(tr("F\374r \310lise"));
-//! [3]
-
-
//! [4]
Usage:
lupdate [options] [project-file]
@@ -116,118 +87,3 @@ Options:
-version
Display the version of lrelease and exit
//! [5]
-
-
-void wrapInFunction()
-{
-//! [6]
-button = new QPushButton("&Quit", this);
-//! [6]
-
-
-//! [7]
-button = new QPushButton(tr("&Quit"), this);
-//! [7]
-
-
-//! [8]
-QPushButton::tr("&Quit")
-//! [8]
-
-
-//! [9]
-QObject::tr("&Quit")
-//! [9]
-
-
-//! [10]
-rbc = new QRadioButton(tr("Enabled", "Color frame"), this);
-//! [10]
-
-
-//! [11]
-rbh = new QRadioButton(tr("Enabled", "Hue frame"), this);
-//! [11]
-}
-
-
-//! [12]
-/*
- TRANSLATOR FindDialog
-
- Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
- Find dialog.
-
- ...
-*/
-//! [12]
-
-//! [13]
-/*
- TRANSLATOR MyNamespace::MyClass
-
- Necessary for lupdate.
-
- ...
-*/
-//! [13]
-
-//! [14]
-void some_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- LoginWidget::tr("Password:"), logwid);
-}
-
-void same_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- qApp->translate("LoginWidget", "Password:"),
- logwid);
-}
-//! [14]
-
-
-//! [15]
-QString FriendlyConversation::greeting(int greet_type)
-{
- static const char* greeting_strings[] = {
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- };
- return tr(greeting_strings[greet_type]);
-}
-//! [15]
-
-
-//! [16]
-static const char* greeting_strings[] = {
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
-};
-
-QString FriendlyConversation::greeting(int greet_type)
-{
- return tr(greeting_strings[greet_type]);
-}
-
-QString global_greeting(int greet_type)
-{
- return qApp->translate("FriendlyConversation",
- greeting_strings[greet_type]);
-}
-//! [16]
-
-void wrapInFunction()
-{
-
-//! [17]
-QString tr(const char *text, const char *comment, int n);
-//! [17]
-
-//! [18]
-tr("%n item(s) replaced", "", count);
-//! [18]
-
-}
-
diff --git a/doc/src/snippets/code/doc_src_mac-differences.cpp b/doc/src/snippets/code/doc_src_mac-differences.cpp
new file mode 100644
index 0000000000..f261083ca5
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.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$
+**
+****************************************************************************/
+
+//! [1]
+#ifdef Q_WS_MAC
+ CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef,
+ kCFURLPOSIXPathStyle);
+ const char *pathPtr = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ qDebug("Path = %s", pathPtr);
+ CFRelease(appUrlRef);
+ CFRelease(macPath);
+#endif
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_mac-differences.pro b/doc/src/snippets/code/doc_src_mac-differences.pro
new file mode 100644
index 0000000000..3490bfe0bb
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_moc.cpp b/doc/src/snippets/code/doc_src_moc.cpp
new file mode 100644
index 0000000000..ec756e15dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_moc.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [3]
+#include "foo.moc"
+//! [3]
+
+
+//! [4]
+#ifndef Q_MOC_RUN
+ ...
+#endif
+//! [4]
+
+
+//! [5]
+class SomeTemplate<int> : public QFrame
+{
+ Q_OBJECT
+ ...
+
+signals:
+ void mySignal(int);
+};
+//! [5]
+
+
+//! [6]
+// correct
+class SomeClass : public QObject, public OtherClass
+{
+ ...
+};
+//! [6]
+
+
+//! [7]
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(void (*apply)(List *, void *), char *); // WRONG
+};
+//! [7]
+
+
+//! [8]
+typedef void (*ApplyFunction)(List *, void *);
+
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(ApplyFunction, char *);
+};
+//! [8]
+
+
+//! [9]
+class MyClass : public QObject
+{
+ Q_OBJECT
+
+ enum Error {
+ ConnectionRefused,
+ RemoteHostClosed,
+ UnknownError
+ };
+
+signals:
+ void stateChanged(MyClass::Error error);
+};
+//! [9]
+
+
+//! [10]
+#ifdef ultrix
+#define SIGNEDNESS(a) unsigned a
+#else
+#define SIGNEDNESS(a) a
+#endif
+
+class Whatever : public QObject
+{
+ Q_OBJECT
+
+signals:
+ void someSignal(SIGNEDNESS(int));
+};
+//! [10]
+
+
+//! [11]
+class A
+{
+public:
+ class B
+ {
+ Q_OBJECT
+
+ public slots: // WRONG
+ void b();
+ };
+};
+//! [11]
diff --git a/doc/src/snippets/code/doc_src_moc.qdoc b/doc/src/snippets/code/doc_src_moc.qdoc
index ef85b1b05f..74ab365543 100644
--- a/doc/src/snippets/code/doc_src_moc.qdoc
+++ b/doc/src/snippets/code/doc_src_moc.qdoc
@@ -56,109 +56,3 @@ foo.o: foo.moc
foo.moc: foo.cpp
moc $(DEFINES) $(INCPATH) -i $< -o $@
//! [2]
-
-
-//! [3]
-#include "foo.moc"
-//! [3]
-
-
-//! [4]
-#ifndef Q_MOC_RUN
- ...
-#endif
-//! [4]
-
-
-//! [5]
-class SomeTemplate<int> : public QFrame
-{
- Q_OBJECT
- ...
-
-signals:
- void mySignal(int);
-};
-//! [5]
-
-
-//! [6]
-// correct
-class SomeClass : public QObject, public OtherClass
-{
- ...
-};
-//! [6]
-
-
-//! [7]
-class SomeClass : public QObject
-{
- Q_OBJECT
-
-public slots:
- void apply(void (*apply)(List *, void *), char *); // WRONG
-};
-//! [7]
-
-
-//! [8]
-typedef void (*ApplyFunction)(List *, void *);
-
-class SomeClass : public QObject
-{
- Q_OBJECT
-
-public slots:
- void apply(ApplyFunction, char *);
-};
-//! [8]
-
-
-//! [9]
-class MyClass : public QObject
-{
- Q_OBJECT
-
- enum Error {
- ConnectionRefused,
- RemoteHostClosed,
- UnknownError
- };
-
-signals:
- void stateChanged(MyClass::Error error);
-};
-//! [9]
-
-
-//! [10]
-#ifdef ultrix
-#define SIGNEDNESS(a) unsigned a
-#else
-#define SIGNEDNESS(a) a
-#endif
-
-class Whatever : public QObject
-{
- Q_OBJECT
-
-signals:
- void someSignal(SIGNEDNESS(int));
-};
-//! [10]
-
-
-//! [11]
-class A
-{
-public:
- class B
- {
- Q_OBJECT
-
- public slots: // WRONG
- void b();
- };
-};
-//! [11]
diff --git a/doc/src/snippets/code/doc_src_model-view-programming.qdoc b/doc/src/snippets/code/doc_src_model-view-programming.cpp
index 05c2e1d934..05c2e1d934 100644
--- a/doc/src/snippets/code/doc_src_model-view-programming.qdoc
+++ b/doc/src/snippets/code/doc_src_model-view-programming.cpp
diff --git a/doc/src/snippets/code/doc_src_modules.qdoc b/doc/src/snippets/code/doc_src_modules.pro
index 643a94d8bd..587154077c 100644
--- a/doc/src/snippets/code/doc_src_modules.qdoc
+++ b/doc/src/snippets/code/doc_src_modules.pro
@@ -38,6 +38,6 @@
**
****************************************************************************/
-//! [0]
+#! [0]
QT -= gui
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_objecttrees.qdoc b/doc/src/snippets/code/doc_src_objecttrees.cpp
index cd92a49eea..cd92a49eea 100644
--- a/doc/src/snippets/code/doc_src_objecttrees.qdoc
+++ b/doc/src/snippets/code/doc_src_objecttrees.cpp
diff --git a/doc/src/snippets/code/doc_src_phonon-api.qdoc b/doc/src/snippets/code/doc_src_phonon-api.cpp
index d7a989b49e..d7a989b49e 100644
--- a/doc/src/snippets/code/doc_src_phonon-api.qdoc
+++ b/doc/src/snippets/code/doc_src_phonon-api.cpp
diff --git a/doc/src/snippets/code/doc_src_phonon.pro b/doc/src/snippets/code/doc_src_phonon.pro
new file mode 100644
index 0000000000..24cc7bdff9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_phonon.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+QT += phonon
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.cpp b/doc/src/snippets/code/doc_src_plugins-howto.cpp
new file mode 100644
index 0000000000..06bf903626
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+class MyStylePlugin : public QStylePlugin
+{
+public:
+ QStringList keys() const;
+ QStyle *create(const QString &key);
+};
+//! [0]
+
+
+//! [1]
+#include "mystyleplugin.h"
+
+QStringList MyStylePlugin::keys() const
+{
+ return QStringList() << "MyStyle";
+}
+
+QStyle *MyStylePlugin::create(const QString &key)
+{
+ if (key.toLower() == "mystyle")
+ return new MyStyle;
+ return 0;
+}
+
+Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
+//! [1]
+
+
+//! [2]
+QApplication::setStyle(QStyleFactory::create("MyStyle"));
+//! [2]
+
+
+//! [4]
+#include <QApplication>
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN(qjpeg)
+Q_IMPORT_PLUGIN(qgif)
+Q_IMPORT_PLUGIN(qkrcodecs)
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.pro b/doc/src/snippets/code/doc_src_plugins-howto.pro
new file mode 100644
index 0000000000..eb0ec28649
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.pro
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [3]
+CONFIG += release
+#! [3]
+
+
+#! [5]
+QTPLUGIN += qjpeg \
+ qgif \
+ qkrcodecs
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.qdoc b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
index e80faee0f0..b03dfedb93 100644
--- a/doc/src/snippets/code/doc_src_plugins-howto.qdoc
+++ b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
@@ -38,69 +38,6 @@
**
****************************************************************************/
-//! [0]
-class MyStylePlugin : public QStylePlugin
-{
-public:
- QStringList keys() const;
- QStyle *create(const QString &key);
-};
-//! [0]
-
-
-//! [1]
-#include "mystyleplugin.h"
-
-QStringList MyStylePlugin::keys() const
-{
- return QStringList() << "MyStyle";
-}
-
-QStyle *MyStylePlugin::create(const QString &key)
-{
- if (key.toLower() == "mystyle")
- return new MyStyle;
- return 0;
-}
-
-Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
-//! [1]
-
-
-//! [2]
-QApplication::setStyle(QStyleFactory::create("MyStyle"));
-//! [2]
-
-
-//! [3]
-CONFIG += release
-//! [3]
-
-
-//! [4]
-#include <QApplication>
-#include <QtPlugin>
-
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-Q_IMPORT_PLUGIN(qkrcodecs)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- ...
- return app.exec();
-}
-//! [4]
-
-
-//! [5]
-QTPLUGIN += qjpeg \
- qgif \
- qkrcodecs
-//! [5]
-
-
//! [6]
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.debug
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.false
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.cpp b/doc/src/snippets/code/doc_src_porting-qsa.cpp
new file mode 100644
index 0000000000..f9b9c6b643
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting-qsa.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [16]
+QPushButton *button = new QPushButton();
+button->setObjectName("button");
+interpreter->addTransientObject(button);
+//! [16]
+
+
+//! [17]
+QPushButton *button = new QPushButton();
+QScriptValue scriptButton = engine.newQObject(button);
+engine.globalObject().setProperty("button", scriptButton);
+//! [17]
+
+
+//! [18]
+ModuleFactory::ModuleFactory()
+{
+ registerClass( "ImageSource", &ImgSource::staticMetaObject);
+ ...
+}
+
+QObject *ModuleFactory::create( const QString &type,
+ const QVariantList &,
+ QObject * )
+{
+ if ( type == "ImageSource" )
+ return new ImgSource();
+ ...
+}
+
+...
+
+interpreter.addObjectFactory(new ModuleFactory());
+//! [18]
+
+
+//! [19]
+QScriptValue construct_QPushButton(QScriptContext *, QScriptEngine *engine) {
+ return engine->newQObject(new QPushButton());
+}
+
+...
+
+QScriptValue constructor = engine.newFunction(construct_QPushButton);
+QScriptValue value =
+ engine.newQMetaObject(&QPushButton::staticMetaObject,
+ constructor);
+engine.globalObject().setProperty("QPushButton", value);
+//! [19]
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.js b/doc/src/snippets/code/doc_src_porting-qsa.js
new file mode 100644
index 0000000000..e58f5b7010
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting-qsa.js
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+point = new Object();
+point.x = 12;
+point.y = 35;
+//! [0]
+
+
+//! [1]
+function manhattanLength(point) {
+ return point.x + point.y;
+}
+//! [1]
+
+
+//! [2]
+manhattanLength = function(point) {
+ return point.x + point.y;
+}
+//! [2]
+
+
+//! [3]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [3]
+
+
+//! [5]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [5]
+
+
+//! [8]
+var car = new Object();
+car.constructor = function(regnr) {
+ // ...
+}
+car.constructor();
+//! [8]
+
+
+//! [10]
+function Car(regnr) {
+ this.regNumber = regnr;
+ this.toString = function() { return this.regNumber; }
+}
+//! [10]
+
+
+//! [11]
+function Car(regnr) {
+ this.regNumber = regnr;
+}
+Car.prototype.toString = function() { return this.regNumber; }
+//! [11]
+
+
+//! [13]
+function GasolineCar(regnr) {
+ Car(regnr);
+}
+GasolineCar.prototype = new Car();
+GasolineCar.prototype.toString = function() {
+ return "GasolineCar(" + this.regNumber + ")";
+}
+//! [13]
+
+
+//! [15]
+Car.globalCount = 0;
+print(Car.globalCount);
+//! [15]
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.qdoc b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
index bb0b7fdd34..1846640191 100644
--- a/doc/src/snippets/code/doc_src_porting-qsa.qdoc
+++ b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
@@ -38,35 +38,6 @@
**
****************************************************************************/
-//! [0]
-point = new Object();
-point.x = 12;
-point.y = 35;
-//! [0]
-
-
-//! [1]
-function manhattanLength(point) {
- return point.x + point.y;
-}
-//! [1]
-
-
-//! [2]
-manhattanLength = function(point) {
- return point.x + point.y;
-}
-//! [2]
-
-
-//! [3]
-point.manhattanLength = function() {
- return this.x + this.y;
-}
-print(point.manhattanLength()); // prints 47
-//! [3]
-
-
//! [4]
class Point() {
var x;
@@ -76,14 +47,6 @@ class Point() {
//! [4]
-//! [5]
-point.manhattanLength = function() {
- return this.x + this.y;
-}
-print(point.manhattanLength()); // prints 47
-//! [5]
-
-
//! [6]
class Car {
var regNumber;
@@ -103,13 +66,6 @@ var car = new Car("ABC 123");
//! [7]
-//! [8]
-var car = new Object();
-car.constructor = function(regnr) { ... }
-car.constructor();
-//! [8]
-
-
//! [9]
class Car {
var regNumber;
@@ -123,22 +79,6 @@ class Car {
//! [9]
-//! [10]
-function Car(regnr) {
- this.regNumber = regnr;
- this.toString = function() { return this.regNumber; }
-}
-//! [10]
-
-
-//! [11]
-function Car(regnr) {
- this.regNumber = regnr;
-}
-Car.prototype.toString = function() { return this.regNumber; }
-//! [11]
-
-
//! [12]
class GasolineCar extends Car {
function GasolineCar(regnr) {
@@ -151,77 +91,9 @@ class GasolineCar extends Car {
//! [12]
-//! [13]
-function GasolineCar(regnr) {
- Car(regnr);
-}
-GasolineCar.prototype = new Car();
-GasolineCar.prototype.toString = function() {
- return "GasolineCar(" + this.regNumber + ")";
-}
-//! [13]
-
-
//! [14]
class Car {
static var globalCount = 0;
}
print(Car.globalCount);
//! [14]
-
-
-//! [15]
-Car.globalCount = 0;
-print(Car.globalCount);
-//! [15]
-
-
-//! [16]
-QPushButton *button = new QPushButton();
-button->setObjectName("button");
-interpreter->addTransientObject(button);
-//! [16]
-
-
-//! [17]
-QPushButton *button = new QPushButton();
-QScriptValue scriptButton = engine.newQObject(button);
-engine.globalObject().setProperty("button", scriptButton);
-//! [17]
-
-
-//! [18]
-ModuleFactory::ModuleFactory()
-{
- registerClass( "ImageSource", &ImgSource::staticMetaObject);
- ...
-}
-
-QObject *ModuleFactory::create( const QString &type,
- const QVariantList &,
- QObject * )
-{
- if ( type == "ImageSource" )
- return new ImgSource();
- ...
-}
-
-...
-
-interpreter.addObjectFactory(new ModuleFactory());
-//! [18]
-
-
-//! [19]
-QScriptValue construct_QPushButton(QScriptContext *, QScriptEngine *engine) {
- return engine->newQObject(new QPushButton());
-}
-
-...
-
-QScriptValue constructor = engine.newFunction(construct_QPushButton);
-QScriptValue value =
- engine.newQMetaObject(&QPushButton::staticMetaObject,
- constructor);
-engine.globalObject().setProperty("QPushButton", value);
-//! [19]
diff --git a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc b/doc/src/snippets/code/doc_src_porting4-canvas.cpp
index 8004163f49..8004163f49 100644
--- a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4-canvas.cpp
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.cpp b/doc/src/snippets/code/doc_src_porting4-designer.cpp
new file mode 100644
index 0000000000..1d73aae67c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-designer.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+namespace Ui {
+
+class HelloWorld
+{
+public:
+ QVBoxLayout *vboxLayout;
+ QPushButton *pushButton;
+
+ void setupUi(QWidget *HelloWorld)
+ {
+ HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));
+
+ vboxLayout = new QVBoxLayout(HelloWorld);
+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+
+ pushButton = new QPushButton(HelloWorld);
+ pushButton->setObjectName(QString::fromUtf8("pushButton"));
+
+ vboxLayout->addWidget(pushButton);
+
+ retranslateUi(HelloWorld);
+ }
+};
+
+}
+//! [0]
+
+
+//! [1]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QWidget w;
+ Ui::HelloWorld ui;
+ ui.setupUi(&w);
+
+ w.show();
+ return app.exec();
+}
+//! [1]
+
+
+//! [2]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0)
+ : QWidget(parent)
+ { setupUi(this); }
+};
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ HelloWorldWidget w;
+ w.show();
+ return app.exec();
+}
+//! [2]
+
+
+//! [5]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void mySlot();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ QObject::connect(pushButton, SIGNAL(clicked()),
+ this, SLOT(mySlot()));
+}
+
+void HelloWorldWidget::mySlot()
+{
+ ...
+}
+//! [5]
+
+
+//! [6]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void on_pushButton_clicked();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+
+void HelloWorldWidget::on_pushButton_clicked()
+{
+ ...
+}
+//! [6]
+
+
+//! [9]
+QFile file(":/icons/yes.png");
+QIcon icon(":/icons/no.png");
+QPixmap pixmap(":/icons/no.png");
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.pro b/doc/src/snippets/code/doc_src_porting4-designer.pro
new file mode 100644
index 0000000000..673e5932d6
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-designer.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [8]
+RESOURCES += icons.qrc
+#! [8]
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.qdoc b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
index 2c043f55b6..b5c686b575 100644
--- a/doc/src/snippets/code/doc_src_porting4-designer.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
@@ -38,81 +38,6 @@
**
****************************************************************************/
-//! [0]
-namespace Ui {
-
-class HelloWorld
-{
-public:
- QVBoxLayout *vboxLayout;
- QPushButton *pushButton;
-
- void setupUi(QWidget *HelloWorld)
- {
- HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));
-
- vboxLayout = new QVBoxLayout(HelloWorld);
- vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
-
- pushButton = new QPushButton(HelloWorld);
- pushButton->setObjectName(QString::fromUtf8("pushButton"));
-
- vboxLayout->addWidget(pushButton);
-
- retranslateUi(HelloWorld);
- }
-};
-
-}
-//! [0]
-
-
-//! [1]
-#include <QApplication>
-#include <QWidget>
-
-#include "ui_helloworld.h" // defines Ui::HelloWorld
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QWidget w;
- Ui::HelloWorld ui;
- ui.setupUi(&w);
-
- w.show();
- return app.exec();
-}
-//! [1]
-
-
-//! [2]
-#include <QApplication>
-#include <QWidget>
-
-#include "ui_helloworld.h" // defines Ui::HelloWorld
-
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0)
- : QWidget(parent)
- { setupUi(this); }
-};
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- HelloWorldWidget w;
- w.show();
- return app.exec();
-}
-//! [2]
-
-
//! [3]
uic3 myform.ui > myform.h
uic3 -impl myform.h myform.ui > myform.cpp
@@ -124,59 +49,6 @@ uic3 -convert myform3.ui > myform4.ui
//! [4]
-//! [5]
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0);
-
-public slots:
- void mySlot();
-};
-
-HelloWorldWidget::HelloWorldWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-
- QObject::connect(pushButton, SIGNAL(clicked()),
- this, SLOT(mySlot()));
-}
-
-void HelloWorldWidget::mySlot()
-{
- ...
-}
-//! [5]
-
-
-//! [6]
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0);
-
-public slots:
- void on_pushButton_clicked();
-};
-
-HelloWorldWidget::HelloWorldWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-}
-
-void HelloWorldWidget::on_pushButton_clicked()
-{
- ...
-}
-//! [6]
-
-
//! [7]
<RCC version="1.0">
<qresource prefix="/icons">
@@ -185,15 +57,3 @@ void HelloWorldWidget::on_pushButton_clicked()
</qresource>
</RCC>
//! [7]
-
-
-//! [8]
-RESOURCES += icons.qrc
-//! [8]
-
-
-//! [9]
-QFile file(":/icons/yes.png");
-QIcon icon(":/icons/no.png");
-QPixmap pixmap(":/icons/no.png");
-//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4.qdoc b/doc/src/snippets/code/doc_src_porting4.cpp
index 730f71f761..730f71f761 100644
--- a/doc/src/snippets/code/doc_src_porting4.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4.cpp
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.cpp
index 1238bc53cf..b5a103db0b 100644
--- a/doc/src/snippets/code/doc_src_properties.qdoc
+++ b/doc/src/snippets/code/doc_src_properties.cpp
@@ -44,6 +44,7 @@ Q_PROPERTY(type name
[WRITE setFunction]
[RESET resetFunction]
[NOTIFY notifySignal]
+ [REVISION int]
[DESIGNABLE bool]
[SCRIPTABLE bool]
[STORED bool]
diff --git a/doc/src/snippets/code/doc_src_q3asciidict.qdoc b/doc/src/snippets/code/doc_src_q3asciidict.cpp
index 4b32817113..4b32817113 100644
--- a/doc/src/snippets/code/doc_src_q3asciidict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3asciidict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3dict.qdoc b/doc/src/snippets/code/doc_src_q3dict.cpp
index 9c51cae956..9c51cae956 100644
--- a/doc/src/snippets/code/doc_src_q3dict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3dict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3intdict.qdoc b/doc/src/snippets/code/doc_src_q3intdict.cpp
index 0f15b6fe6e..0f15b6fe6e 100644
--- a/doc/src/snippets/code/doc_src_q3intdict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3intdict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3memarray.cpp b/doc/src/snippets/code/doc_src_q3memarray.cpp
new file mode 100644
index 0000000000..2c91050855
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3memarray.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <q3memarray.h>
+#include <stdio.h>
+
+Q3MemArray<int> fib( int num ) // returns fibonacci array
+{
+ Q_ASSERT( num > 2 );
+ Q3MemArray<int> f( num ); // array of ints
+
+ f[0] = f[1] = 1;
+ for ( int i = 2; i < num; i++ )
+ f[i] = f[i-1] + f[i-2];
+
+ return f;
+}
+
+int main()
+{
+ Q3MemArray<int> a = fib( 6 ); // get first 6 fibonaccis
+ for ( int i = 0; i < a.size(); i++ )
+ qDebug( "%d: %d", i, a[i] );
+
+ qDebug( "1 is found %d times", a.contains(1) );
+ qDebug( "5 is found at index %d", a.find(5) );
+
+ return 0;
+}
+//! [0]
+
+
+//! [2]
+// MyStruct may be padded to 4 or 8 bytes
+struct MyStruct
+{
+ short i; // 2 bytes
+ char c; // 1 byte
+};
+
+Q3MemArray<MyStruct> a(1);
+a[0].i = 5;
+a[0].c = 't';
+
+MyStruct x;
+x.i = '5';
+x.c = 't';
+int i = a.find( x ); // may return -1 if the pad bytes differ
+//! [2]
+
+
+//! [3]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+QDataStream s( a, IO_ReadOnly ); // open on a's data
+s >> <something>; // read raw bindata
+a.resetRawData( bindata, sizeof(bindata) ); // finished
+//! [3]
+
+
+//! [4]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a, b;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+a.resize( 8 ); // will crash
+b = a; // will crash
+a[2] = 123; // might crash
+// forget to resetRawData: will crash
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3memarray.qdoc b/doc/src/snippets/code/doc_src_q3memarray.qdoc
index 8e5e0082ea..a966e50b3f 100644
--- a/doc/src/snippets/code/doc_src_q3memarray.qdoc
+++ b/doc/src/snippets/code/doc_src_q3memarray.qdoc
@@ -38,36 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <q3memarray.h>
-#include <stdio.h>
-
-Q3MemArray<int> fib( int num ) // returns fibonacci array
-{
- Q_ASSERT( num > 2 );
- Q3MemArray<int> f( num ); // array of ints
-
- f[0] = f[1] = 1;
- for ( int i = 2; i < num; i++ )
- f[i] = f[i-1] + f[i-2];
-
- return f;
-}
-
-int main()
-{
- Q3MemArray<int> a = fib( 6 ); // get first 6 fibonaccis
- for ( int i = 0; i < a.size(); i++ )
- qDebug( "%d: %d", i, a[i] );
-
- qDebug( "1 is found %d times", a.contains(1) );
- qDebug( "5 is found at index %d", a.find(5) );
-
- return 0;
-}
-//! [0]
-
-
//! [1]
0: 1
1: 1
@@ -78,43 +48,3 @@ int main()
1 is found 2 times
5 is found at index 4
//! [1]
-
-
-//! [2]
-// MyStruct may be padded to 4 or 8 bytes
-struct MyStruct
-{
- short i; // 2 bytes
- char c; // 1 byte
-};
-
-Q3MemArray<MyStruct> a(1);
-a[0].i = 5;
-a[0].c = 't';
-
-MyStruct x;
-x.i = '5';
-x.c = 't';
-int i = a.find( x ); // may return -1 if the pad bytes differ
-//! [2]
-
-
-//! [3]
-static char bindata[] = { 231, 1, 44, ... };
-QByteArray a;
-a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
-QDataStream s( a, IO_ReadOnly ); // open on a's data
-s >> <something>; // read raw bindata
-a.resetRawData( bindata, sizeof(bindata) ); // finished
-//! [3]
-
-
-//! [4]
-static char bindata[] = { 231, 1, 44, ... };
-QByteArray a, b;
-a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
-a.resize( 8 ); // will crash
-b = a; // will crash
-a[2] = 123; // might crash
-// forget to resetRawData: will crash
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc b/doc/src/snippets/code/doc_src_q3ptrdict.cpp
index e64d8748d3..e64d8748d3 100644
--- a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3ptrdict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc b/doc/src/snippets/code/doc_src_q3ptrlist.cpp
index 4f97c65007..4f97c65007 100644
--- a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc
+++ b/doc/src/snippets/code/doc_src_q3ptrlist.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuelist.qdoc b/doc/src/snippets/code/doc_src_q3valuelist.cpp
index 38ee9f66a6..38ee9f66a6 100644
--- a/doc/src/snippets/code/doc_src_q3valuelist.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuelist.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuestack.qdoc b/doc/src/snippets/code/doc_src_q3valuestack.cpp
index 50827e6060..50827e6060 100644
--- a/doc/src/snippets/code/doc_src_q3valuestack.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuestack.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuevector.qdoc b/doc/src/snippets/code/doc_src_q3valuevector.cpp
index 8af15686b9..8af15686b9 100644
--- a/doc/src/snippets/code/doc_src_q3valuevector.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuevector.cpp
diff --git a/doc/src/snippets/code/doc_src_qalgorithms.qdoc b/doc/src/snippets/code/doc_src_qalgorithms.cpp
index 0438105865..0438105865 100644
--- a/doc/src/snippets/code/doc_src_qalgorithms.qdoc
+++ b/doc/src/snippets/code/doc_src_qalgorithms.cpp
diff --git a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc b/doc/src/snippets/code/doc_src_qaxcontainer.pro
index 93aa60bf3a..ff39e67ecf 100644
--- a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc
+++ b/doc/src/snippets/code/doc_src_qaxcontainer.pro
@@ -38,11 +38,11 @@
**
****************************************************************************/
-//! [0]
+#! [0]
CONFIG += qaxcontainer
-//! [0]
+#! [0]
-//! [1]
+#! [1]
TYPELIBS = file.tlb
-//! [1]
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.cpp b/doc/src/snippets/code/doc_src_qaxserver.cpp
new file mode 100644
index 0000000000..dc16776948
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxserver.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [3]
+#include <QWidget>
+
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+//! [3]
+
+
+//! [4]
+Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+//! [4]
+
+
+//! [5]
+Q_PROPERTY(int value READ value WRITE setValue)
+//! [5]
+
+
+//! [6]
+public:
+ MyActiveX(QWidget *parent = 0)
+ ...
+
+ int value() const;
+
+public slots:
+ void setValue(int v);
+ ...
+
+signals:
+ void valueChange(int v);
+ ...
+
+};
+//! [6]
+
+
+//! [7]
+#include <QAxBindable>
+#include <QWidget>
+
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+//! [7]
+
+
+//! [8]
+QAXFACTORY_BEGIN("{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
+ "{a8f21901-7ff7-4f6a-b939-789620c03d83}")
+ QAXCLASS(MyWidget)
+ QAXCLASS(MyWidget2)
+ QAXTYPE(MySubType)
+QAXFACTORY_END()
+//! [8]
+
+
+//! [9]
+#include <QApplication>
+#include <QAxFactory>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!QAxFactory::isServer()) {
+ // create and show main window
+ }
+ return app.exec();
+}
+//! [9]
+
+
+//! [10]
+MyFactory(const QUuid &, const QUuid &);
+//! [10]
+
+
+//! [11]
+HMODULE dll = LoadLibrary("myserver.dll");
+typedef HRESULT(__stdcall *DllRegisterServerProc)();
+DllRegisterServerProc DllRegisterServer =
+ (DllRegisterServerProc)GetProcAddress(dll, "DllRegisterServer");
+
+HRESULT res = E_FAIL;
+if (DllRegisterServer)
+ res = DllRegisterServer();
+if (res != S_OK)
+ // error handling
+//! [11]
+
+
+//! [15]
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("Version", "2.0")
+ Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
+ Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
+ Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
+ Q_CLASSINFO("Insertable", "yes")
+ Q_CLASSINFO("ToSuperClass", "MyActiveX")
+ Q_PROPERTY(...)
+
+public:
+ MyActiveX(QWidget *parent = 0);
+
+ ...
+};
+//! [15]
+
+
+//! [16]
+class MyLicensedControl : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("LicenseKey", "<key string>")
+ ...
+};
+//! [16]
+
+
+//! [17]
+class AxImpl : public QAxAggregated, public ISomeCOMInterface
+{
+public:
+ AxImpl() {}
+
+ long queryInterface(const QUuid &iid, void **iface);
+
+ // IUnknown
+ QAXAGG_IUNKNOWN
+
+ // ISomeCOMInterface
+ ...
+}
+//! [17]
+
+
+//! [18]
+long AxImpl::queryInterface(const QUuid &iid, void **iface)
+{
+ *iface = 0;
+ if (iid == IID_ISomeCOMInterface)
+ *iface = (ISomeCOMInterface *)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+//! [18]
+
+
+//! [19]
+HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
+{
+ return controllingUnknown()->QueryInterface(iid, iface);
+}
+//! [19]
+
+
+//! [20]
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+
+public:
+ MyActiveX(QWidget *parent);
+
+ QAxAggregated *createAggregate()
+ {
+ return new AxImpl();
+ }
+};
+//! [20]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.pro b/doc/src/snippets/code/doc_src_qaxserver.pro
new file mode 100644
index 0000000000..18d66f30df
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxserver.pro
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+TEMPLATE = app
+CONFIG += qaxserver
+
+RC_FILE = qaxserver.rc
+...
+#! [0]
+
+
+#! [1]
+TEMPLATE = lib
+CONFIG += qaxserver dll
+
+DEF_FILE = qaxserver.def
+RC_FILE = qaxserver.rc
+...
+#! [1]
+
+
+#! [2]
+TEMPLATE = lib
+VERSION = 2.5
+...
+#! [2]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.qdoc b/doc/src/snippets/code/doc_src_qaxserver.qdoc
index c5906e9d92..2fd79e3918 100644
--- a/doc/src/snippets/code/doc_src_qaxserver.qdoc
+++ b/doc/src/snippets/code/doc_src_qaxserver.qdoc
@@ -38,126 +38,6 @@
**
****************************************************************************/
-//! [0]
-TEMPLATE = app
-CONFIG += qaxserver
-
-RC_FILE = qaxserver.rc
-...
-//! [0]
-
-
-//! [1]
-TEMPLATE = lib
-CONFIG += qaxserver dll
-
-DEF_FILE = qaxserver.def
-RC_FILE = qaxserver.rc
-...
-//! [1]
-
-
-//! [2]
-TEMPLATE = lib
-VERSION = 2.5
-...
-//! [2]
-
-
-//! [3]
-#include <QWidget>
-
-class MyActiveX : public QWidget
-{
- Q_OBJECT
-//! [3]
-
-
-//! [4]
-Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
-Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
-Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
-//! [4]
-
-
-//! [5]
-Q_PROPERTY(int value READ value WRITE setValue)
-//! [5]
-
-
-//! [6]
-public:
- MyActiveX(QWidget *parent = 0)
- ...
-
- int value() const;
-
-public slots:
- void setValue(int v);
- ...
-
-signals:
- void valueChange(int v);
- ...
-
-};
-//! [6]
-
-
-//! [7]
-#include <QAxBindable>
-#include <QWidget>
-
-class MyActiveX : public QWidget, public QAxBindable
-{
- Q_OBJECT
-//! [7]
-
-
-//! [8]
-QAXFACTORY_BEGIN("{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
- "{a8f21901-7ff7-4f6a-b939-789620c03d83}")
- QAXCLASS(MyWidget)
- QAXCLASS(MyWidget2)
- QAXTYPE(MySubType)
-QAXFACTORY_END()
-//! [8]
-
-
-//! [9]
-#include <QApplication>
-#include <QAxFactory>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- if (!QAxFactory::isServer()) {
- // create and show main window
- }
- return app.exec();
-}
-//! [9]
-
-
-//! [10]
-MyFactory(const QUuid &, const QUuid &);
-//! [10]
-
-
-//! [11]
-HMODULE dll = LoadLibrary("myserver.dll");
-typedef HRESULT(__stdcall *DllRegisterServerProc)();
-DllRegisterServerProc DllRegisterServer =
- (DllRegisterServerProc)GetProcAddress(dll, "DllRegisterServer");
-
-HRESULT res = E_FAIL;
-if (DllRegisterServer)
- res = DllRegisterServer();
-if (res != S_OK)
- // error handling
-//! [11]
-
-
//! [12]
cabarc N simpleax.cab simpleax.exe simple.inf
//! [12]
@@ -175,89 +55,3 @@ cabarc N simpleax.cab simpleax.exe simple.inf
<param name="name" value="value">
<\object>
//! [14]
-
-
-//! [15]
-class MyActiveX : public QWidget
-{
- Q_OBJECT
- Q_CLASSINFO("Version", "2.0")
- Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
- Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
- Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
- Q_CLASSINFO("Insertable", "yes")
- Q_CLASSINFO("ToSuperClass", "MyActiveX")
- Q_PROPERTY(...)
-
-public:
- MyActiveX(QWidget *parent = 0);
-
- ...
-};
-//! [15]
-
-
-//! [16]
-class MyLicensedControl : public QWidget
-{
- Q_OBJECT
- Q_CLASSINFO("LicenseKey", "<key string>")
- ...
-};
-//! [16]
-
-
-//! [17]
-class AxImpl : public QAxAggregated, public ISomeCOMInterface
-{
-public:
- AxImpl() {}
-
- long queryInterface(const QUuid &iid, void **iface);
-
- // IUnknown
- QAXAGG_IUNKNOWN
-
- // ISomeCOMInterface
- ...
-}
-//! [17]
-
-
-//! [18]
-long AxImpl::queryInterface(const QUuid &iid, void **iface)
-{
- *iface = 0;
- if (iid == IID_ISomeCOMInterface)
- *iface = (ISomeCOMInterface *)this;
- else
- return E_NOINTERFACE;
-
- AddRef();
- return S_OK;
-}
-//! [18]
-
-
-//! [19]
-HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
-{
- return controllingUnknown()->QueryInterface(iid, iface);
-}
-//! [19]
-
-
-//! [20]
-class MyActiveX : public QWidget, public QAxBindable
-{
- Q_OBJECT
-
-public:
- MyActiveX(QWidget *parent);
-
- QAxAggregated *createAggregate()
- {
- return new AxImpl();
- }
-};
-//! [20]
diff --git a/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/src/snippets/code/doc_src_qcache.cpp
index 81fa3cf279..81fa3cf279 100644
--- a/doc/src/snippets/code/doc_src_qcache.qdoc
+++ b/doc/src/snippets/code/doc_src_qcache.cpp
diff --git a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc b/doc/src/snippets/code/doc_src_qdbusadaptors.cpp
index abb31a1fe2..749e64bff3 100644
--- a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc
+++ b/doc/src/snippets/code/doc_src_qdbusadaptors.cpp
@@ -39,82 +39,82 @@
****************************************************************************/
//! [0]
- class MainApplicationAdaptor: public QDBusAbstractAdaptor
- {
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
- Q_PROPERTY(QString caption READ caption WRITE setCaption)
- Q_PROPERTY(QString organizationName READ organizationName)
- Q_PROPERTY(QString organizationDomain READ organizationDomain)
-
- private:
- QApplication *app;
-
- public:
- MainApplicationAdaptor(QApplication *application)
- : QDBusAbstractAdaptor(application), app(application)
- {
- connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
- connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
- SLOT(focusChangedSlot(QWidget*, QWidget*)));
- }
-
- QString caption()
- {
- if (app->hasMainWindow())
- return app->mainWindow()->caption();
- return QString(""); // must not return a null QString
- }
-
- void setCaption(const QString &newCaption)
- {
- if (app->hasMainWindow())
- app->mainWindow()->setCaption(newCaption);
- }
-
- QString organizationName()
- {
- return app->organizationName();
- }
-
- QString organizationDomain()
- {
- return app->organizationDomain();
- }
-
- public slots:
- Q_NOREPLY void quit()
- { app->quit(); }
-
- void reparseConfiguration()
- { app->reparseConfiguration(); }
-
- QString mainWindowObject()
- {
- if (app->hasMainWindow())
- return QString("/%1/mainwindow").arg(app->applicationName());
- return QString();
- }
-
- void setSessionManagement(bool enable)
- {
- if (enable)
- app->enableSessionManagement();
- else
- app->disableSessionManagement();
- }
-
- private slots:
- void focusChangedSlot(QWidget *, QWidget *now)
- {
- if (now == app->mainWindow())
- emit mainWindowHasFocus();
- }
-
- signals:
- void aboutToQuit();
- void mainWindowHasFocus();
- };
+class MainApplicationAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+
+private:
+ QApplication *app;
+
+public:
+ MainApplicationAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+ {
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+ }
+
+ QString caption()
+ {
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString(""); // must not return a null QString
+ }
+
+ void setCaption(const QString &newCaption)
+ {
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+ }
+
+ QString organizationName()
+ {
+ return app->organizationName();
+ }
+
+ QString organizationDomain()
+ {
+ return app->organizationDomain();
+ }
+
+public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+
+private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+
+signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+};
//! [0]
diff --git a/doc/src/snippets/code/doc_src_qiterator.qdoc b/doc/src/snippets/code/doc_src_qiterator.cpp
index 82b1bd3429..82b1bd3429 100644
--- a/doc/src/snippets/code/doc_src_qiterator.qdoc
+++ b/doc/src/snippets/code/doc_src_qiterator.cpp
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.cpp b/doc/src/snippets/code/doc_src_qmake-manual.cpp
new file mode 100644
index 0000000000..4f60e1d95b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qmake-manual.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [104]
+// Add C includes here
+
+#if defined __cplusplus
+// Add C++ includes here
+#include <stdlib>
+#include <iostream>
+#include <vector>
+#include <QApplication> // Qt includes
+#include <QPushButton>
+#include <QLabel>
+#include "thirdparty/include/libmain.h"
+#include "my_stable_class.h"
+...
+#endif
+//! [104]
+
+
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.pro
index fb71e39992..e5b749e16d 100644
--- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_qmake-manual.pro
@@ -38,569 +38,569 @@
**
****************************************************************************/
-//! [0]
+#! [0]
make all
-//! [0]
+#! [0]
-//! [1]
+#! [1]
CONFIG += qt thread debug
-//! [1]
+#! [1]
-//! [2]
+#! [2]
CONFIG += qt
QT += network xml
-//! [2]
+#! [2]
-//! [3]
+#! [3]
QT = network xml # This will omit the core and gui modules.
-//! [3]
+#! [3]
-//! [4]
+#! [4]
QT -= gui # Only the core module is used.
-//! [4]
+#! [4]
-//! [5]
+#! [5]
CONFIG += link_pkgconfig
PKGCONFIG += ogg dbus-1
-//! [5]
+#! [5]
-//! [6]
+#! [6]
LIBS += -L/usr/local/lib -lmath
-//! [6]
+#! [6]
-//! [7]
+#! [7]
INCLUDEPATH = c:/msdev/include d:/stl/include
-//! [7]
+#! [7]
-//! [8]
+#! [8]
qmake [mode] [options] files
-//! [8]
+#! [8]
-//! [9]
+#! [9]
qmake -makefile [options] files
-//! [9]
+#! [9]
-//! [10]
+#! [10]
qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro
-//! [10]
+#! [10]
-//! [11]
+#! [11]
qmake "CONFIG+=test" test.pro
-//! [11]
+#! [11]
-//! [12]
+#! [12]
qmake -project [options] files
-//! [12]
+#! [12]
-//! [13]
+#! [13]
qmake -spec macx-g++
-//! [13]
+#! [13]
-//! [14]
+#! [14]
QMAKE_LFLAGS += -F/path/to/framework/directory/
-//! [14]
+#! [14]
-//! [15]
+#! [15]
LIBS += -framework TheFramework
-//! [15]
+#! [15]
-//! [16]
+#! [16]
TEMPLATE = lib
CONFIG += lib_bundle
-//! [16]
+#! [16]
-//! [17]
+#! [17]
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
-//! [17]
+#! [17]
-//! [18]
+#! [18]
CONFIG += x86 ppc
-//! [18]
+#! [18]
-//! [19]
+#! [19]
qmake -spec macx-xcode project.pro
-//! [19]
+#! [19]
-//! [20]
+#! [20]
qmake -tp vc
-//! [20]
+#! [20]
-//! [21]
+#! [21]
qmake -tp vc -r
-//! [21]
+#! [21]
-//! [22]
+#! [22]
CONFIG -= embed_manifest_exe
-//! [22]
+#! [22]
-//! [23]
+#! [23]
CONFIG -= embed_manifest_dll
-//! [23]
+#! [23]
-//! [24]
+#! [24]
make all
-//! [24]
+#! [24]
-//! [25]
+#! [25]
build_pass:CONFIG(debug, debug|release) {
unix: TARGET = $$join(TARGET,,,_debug)
else: TARGET = $$join(TARGET,,,d)
}
-//! [25]
+#! [25]
-//! [26]
+#! [26]
CONFIG += qt console newstuff
...
newstuff {
SOURCES += new.cpp
HEADERS += new.h
}
-//! [26]
+#! [26]
-//! [27]
+#! [27]
DEFINES += USE_MY_STUFF QT_DLL
-//! [27]
+#! [27]
-//! [28]
+#! [28]
myFiles.sources = path\*.png
DEPLOYMENT += myFiles
-//! [28]
+#! [28]
-//! [29]
+#! [29]
myFiles.sources = path\file1.ext1 path2\file2.ext1 path3\*
myFiles.path = \some\path\on\device
someother.sources = C:\additional\files\*
someother.path = \myFiles\path2
DEPLOYMENT += myFiles someother
-//! [29]
+#! [29]
-//! [30]
+#! [30]
DESTDIR = ../../lib
-//! [30]
+#! [30]
-//! [31]
+#! [31]
DISTFILES += ../program.txt
-//! [31]
+#! [31]
-//! [32]
+#! [32]
FORMS = mydialog.ui \
mywidget.ui \
myconfig.ui
-//! [32]
+#! [32]
-//! [33]
+#! [33]
FORMS3 = my_uic3_dialog.ui \
my_uic3_widget.ui \
my_uic3_config.ui
-//! [33]
+#! [33]
-//! [34]
+#! [34]
HEADERS = myclass.h \
login.h \
mainwindow.h
-//! [34]
+#! [34]
-//! [35]
+#! [35]
INCLUDEPATH = c:/msdev/include d:/stl/include
-//! [35]
+#! [35]
-//! [36]
+#! [36]
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
INSTALLS += target
-//! [36]
+#! [36]
-//! [37]
+#! [37]
LEXSOURCES = lexer.l
-//! [37]
+#! [37]
-//! [38]
+#! [38]
unix:LIBS += -L/usr/local/lib -lmath
win32:LIBS += c:/mylibs/math.lib
-//! [38]
+#! [38]
-//! [39]
+#! [39]
CONFIG += no_lflags_merge
-//! [39]
+#! [39]
-//! [40]
+#! [40]
unix:MOC_DIR = ../myproject/tmp
win32:MOC_DIR = c:/myproject/tmp
-//! [40]
+#! [40]
-//! [41]
+#! [41]
unix:OBJECTS_DIR = ../myproject/tmp
win32:OBJECTS_DIR = c:/myproject/tmp
-//! [41]
+#! [41]
-//! [42]
+#! [42]
app {
# Conditional code for 'app' template here
}
-//! [42]
+#! [42]
-//! [43]
+#! [43]
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
-//! [43]
+#! [43]
-//! [44]
+#! [44]
QMAKE_BUNDLE_EXTENSION = .myframework
-//! [44]
+#! [44]
-//! [45]
+#! [45]
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
-//! [45]
+#! [45]
-//! [46]
+#! [46]
QMAKE_UIC = uic -L /path/to/plugin
-//! [46]
+#! [46]
-//! [47]
+#! [47]
QT -= gui # Only the core module is used.
-//! [47]
+#! [47]
-//! [48]
+#! [48]
unix:RCC_DIR = ../myproject/resources
win32:RCC_DIR = c:/myproject/resources
-//! [48]
+#! [48]
-//! [49]
+#! [49]
SOURCES = myclass.cpp \
login.cpp \
mainwindow.cpp
-//! [49]
+#! [49]
-//! [50]
+#! [50]
SUBDIRS = kernel \
tools
-//! [50]
+#! [50]
-//! [51]
+#! [51]
CONFIG += ordered
-//! [51]
+#! [51]
-//! [52]
+#! [52]
TEMPLATE = app
TARGET = myapp
SOURCES = main.cpp
-//! [52]
+#! [52]
-//! [53]
+#! [53]
TEMPLATE = lib
SOURCES = main.cpp
TARGET = mylib
-//! [53]
+#! [53]
-//! [54]
+#! [54]
unix:UI_DIR = ../myproject/ui
win32:UI_DIR = c:/myproject/ui
-//! [54]
+#! [54]
-//! [55]
+#! [55]
unix:UI_HEADERS_DIR = ../myproject/ui/include
win32:UI_HEADERS_DIR = c:/myproject/ui/include
-//! [55]
+#! [55]
-//! [56]
+#! [56]
unix:UI_SOURCES_DIR = ../myproject/ui/src
win32:UI_SOURCES_DIR = c:/myproject/ui/src
-//! [56]
+#! [56]
-//! [57]
+#! [57]
VERSION = 1.2.3
-//! [57]
+#! [57]
-//! [58]
+#! [58]
YACCSOURCES = moc.y
-//! [58]
+#! [58]
-//! [59]
+#! [59]
FILE = /etc/passwd
FILENAME = $$basename(FILE) #passwd
-//! [59]
+#! [59]
-//! [60]
+#! [60]
CONFIG = debug
CONFIG += release
CONFIG(release, debug|release):message(Release build!) #will print
CONFIG(debug, debug|release):message(Debug build!) #no print
-//! [60]
+#! [60]
-//! [61]
+#! [61]
contains( drivers, network ) {
# drivers contains 'network'
message( "Configuring for network build..." )
HEADERS += network.h
SOURCES += network.cpp
}
-//! [61]
+#! [61]
-//! [62]
+#! [62]
error(An error has occurred in the configuration process.)
-//! [62]
+#! [62]
-//! [63]
+#! [63]
exists( $(QTDIR)/lib/libqt-mt* ) {
message( "Configuring for multi-threaded Qt..." )
CONFIG += thread
}
-//! [63]
+#! [63]
-//! [64]
+#! [64]
MY_VAR = one two three four
MY_VAR2 = $$join(MY_VAR, " -L", -L) -Lfive
MY_VAR3 = $$member(MY_VAR, 2) $$find(MY_VAR, t.*)
-//! [64]
+#! [64]
-//! [65]
+#! [65]
LIST = 1 2 3
for(a, LIST):exists(file.$${a}):message(I see a file.$${a}!)
-//! [65]
+#! [65]
-//! [66]
+#! [66]
include( shared.pri )
OPTIONS = standard custom
!include( options.pri ) {
message( "No custom build options specified" )
OPTIONS -= custom
}
-//! [66]
+#! [66]
-//! [67]
+#! [67]
isEmpty( CONFIG ) {
CONFIG += qt warn_on debug
}
-//! [67]
+#! [67]
-//! [68]
+#! [68]
message( "This is a message" )
-//! [68]
+#! [68]
-//! [69]
+#! [69]
!build_pass:message( "This is a message" )
-//! [69]
+#! [69]
-//! [70]
+#! [70]
This is a test.
-//! [70]
+#! [70]
-//! [71]
+#! [71]
system(ls /bin):HAS_BIN=FALSE
-//! [71]
+#! [71]
-//! [72]
+#! [72]
UNAME = $$system(uname -s)
contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
-//! [72]
+#! [72]
-//! [73]
+#! [73]
ARGS = 1 2 3 2 5 1
ARGS = $$unique(ARGS) #1 2 3 5
-//! [73]
+#! [73]
-//! [74]
+#! [74]
qmake -set VARIABLE VALUE
-//! [74]
+#! [74]
-//! [75]
+#! [75]
qmake -query VARIABLE
qmake -query #queries all current VARIABLE/VALUE pairs..
-//! [75]
+#! [75]
-//! [76]
+#! [76]
qmake -query "1.06a/VARIABLE"
-//! [76]
+#! [76]
-//! [77]
+#! [77]
qmake -query "QT_INSTALL_PREFIX"
-//! [77]
+#! [77]
-//! [78]
+#! [78]
QMAKE_VERS = $$[QMAKE_VERSION]
-//! [78]
+#! [78]
-//! [79]
+#! [79]
documentation.path = /usr/local/program/doc
documentation.files = docs/*
-//! [79]
+#! [79]
-//! [80]
+#! [80]
INSTALLS += documentation
-//! [80]
+#! [80]
-//! [81]
+#! [81]
unix:documentation.extra = create_docs; mv master.doc toc.doc
-//! [81]
+#! [81]
-//! [82]
+#! [82]
target.path = /usr/local/myprogram
INSTALLS += target
-//! [82]
+#! [82]
-//! [83]
+#! [83]
CONFIG += create_prl
-//! [83]
+#! [83]
-//! [84]
+#! [84]
CONFIG += link_prl
-//! [84]
+#! [84]
-//! [85]
+#! [85]
QMAKE_EXT_MOC = .mymoc
-//! [85]
+#! [85]
-//! [86]
+#! [86]
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2
mytarget2.commands = @echo Building $$mytarget.target
-//! [86]
+#! [86]
-//! [87]
+#! [87]
QMAKE_EXTRA_TARGETS += mytarget mytarget2
-//! [87]
+#! [87]
-//! [88]
+#! [88]
new_moc.output = moc_${QMAKE_FILE_BASE}.cpp
new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
new_moc.depend_command = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
new_moc.input = NEW_HEADERS
QMAKE_EXTRA_COMPILERS += new_moc
-//! [88]
+#! [88]
-//! [89]
+#! [89]
TARGET = myapp
-//! [89]
+#! [89]
-//! [90]
+#! [90]
DEFINES += QT_DLL
-//! [90]
+#! [90]
-//! [91]
+#! [91]
DEFINES -= QT_DLL
-//! [91]
+#! [91]
-//! [92]
+#! [92]
DEFINES *= QT_DLL
-//! [92]
+#! [92]
-//! [93]
+#! [93]
DEFINES ~= s/QT_[DT].+/QT
-//! [93]
+#! [93]
-//! [94]
+#! [94]
EVERYTHING = $$SOURCES $$HEADERS
message("The project contains the following files:")
message($$EVERYTHING)
-//! [94]
+#! [94]
-//! [95]
+#! [95]
win32:DEFINES += QT_DLL
-//! [95]
+#! [95]
-//! [96]
+#! [96]
win32:xml {
message(Building for Windows)
SOURCES += xmlhandler_win.cpp
@@ -609,146 +609,128 @@ win32:xml {
} else {
message("Unknown configuration")
}
-//! [96]
+#! [96]
-//! [97]
+#! [97]
MY_VARIABLE = value
-//! [97]
+#! [97]
-//! [98]
+#! [98]
MY_DEFINES = $$DEFINES
-//! [98]
+#! [98]
-//! [99]
+#! [99]
MY_DEFINES = $${DEFINES}
-//! [99]
+#! [99]
-//! [100]
+#! [100]
TARGET = myproject_$${TEMPLATE}
-//! [100]
+#! [100]
-//! [101]
+#! [101]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [101]
+#! [101]
-//! [102]
+#! [102]
defineReplace(functionName){
#function code
}
-//! [102]
+#! [102]
-//! [103]
+#! [103]
CONFIG += myfeatures
-//! [103]
-
-
-//! [104]
-// Add C includes here
-
-#if defined __cplusplus
-// Add C++ includes here
-#include <stdlib>
-#include <iostream>
-#include <vector>
-#include <QApplication> // Qt includes
-#include <QPushButton>
-#include <QLabel>
-#include "thirdparty/include/libmain.h"
-#include "my_stable_class.h"
-...
-#endif
-//! [104]
+#! [103]
-//! [105]
+#! [105]
PRECOMPILED_HEADER = stable.h
-//! [105]
+#! [105]
-//! [106]
+#! [106]
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
DEFINES += USING_PCH
}
-//! [106]
+#! [106]
-//! [107]
+#! [107]
PRECOMPILED_HEADER = window.h
SOURCES = window.cpp
-//! [107]
+#! [107]
-//! [108]
+#! [108]
SOURCES += hello.cpp
-//! [108]
+#! [108]
-//! [109]
+#! [109]
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [109]
+#! [109]
-//! [110]
+#! [110]
SOURCES = hello.cpp \
main.cpp
-//! [110]
+#! [110]
-//! [111]
+#! [111]
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [111]
+#! [111]
-//! [112]
+#! [112]
TARGET = helloworld
-//! [112]
+#! [112]
-//! [113]
+#! [113]
CONFIG += qt
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [113]
+#! [113]
-//! [114]
+#! [114]
qmake -o Makefile hello.pro
-//! [114]
+#! [114]
-//! [115]
+#! [115]
qmake -tp vc hello.pro
-//! [115]
+#! [115]
-//! [116]
+#! [116]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [116]
+#! [116]
-//! [117]
+#! [117]
win32 {
SOURCES += hellowin.cpp
}
-//! [117]
+#! [117]
-//! [118]
+#! [118]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -759,17 +741,17 @@ win32 {
unix {
SOURCES += hellounix.cpp
}
-//! [118]
+#! [118]
-//! [119]
+#! [119]
!exists( main.cpp ) {
error( "No main.cpp file found" )
}
-//! [119]
+#! [119]
-//! [120]
+#! [120]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -783,19 +765,19 @@ unix {
!exists( main.cpp ) {
error( "No main.cpp file found" )
}
-//! [120]
+#! [120]
-//! [121]
+#! [121]
win32 {
debug {
CONFIG += console
}
}
-//! [121]
+#! [121]
-//! [122]
+#! [122]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -812,10 +794,10 @@ unix {
win32:debug {
CONFIG += console
}
-//! [122]
+#! [122]
-//! [123]
+#! [123]
TEMPLATE = app
DESTDIR = c:/helloapp
HEADERS += hello.h
@@ -823,32 +805,32 @@ SOURCES += hello.cpp
SOURCES += main.cpp
DEFINES += QT_DLL
CONFIG += qt warn_on release
-//! [123]
+#! [123]
-//! [124]
+#! [124]
make all
-//! [124]
+#! [124]
-//! [125]
+#! [125]
make
-//! [125]
+#! [125]
-//! [126]
+#! [126]
make install
-//! [126]
+#! [126]
-//! [127]
+#! [127]
CONFIG(debug, debug|release) {
mac: TARGET = $$join(TARGET,,,_debug)
win32: TARGET = $$join(TARGET,,d)
}
-//! [127]
+#! [127]
-//! [128]
+#! [128]
customplugin.sources = customimageplugin.dll
customplugin.sources += c:\myplugins\othercustomimageplugin.dll
customplugin.path = imageformats
@@ -857,50 +839,50 @@ dynamiclibrary.path = \sys\bin
globalplugin.sources = someglobalimageplugin.dll
globalplugin.path = \resource\qt\plugins\imageformats
DEPLOYMENT += customplugin dynamiclibrary globalplugin
-//! [128]
+#! [128]
-//! [129]
+#! [129]
TARGET.EPOCALLOWDLLDATA = 1
-//! [129]
+#! [129]
-//! [130]
+#! [130]
TARGET.EPOCHEAPSIZE = 10000 10000000
TARGET.EPOCSTACKSIZE = 0x8000
-//! [130]
+#! [130]
-//! [131]
+#! [131]
QMAKE_CXXFLAGS.CW += -O2
QMAKE_CXXFLAGS.ARMCC += -O0
-//! [131]
+#! [131]
-//! [132]
+#! [132]
TARGET.UID2 = 0x00000001
TARGET.UID3 = 0x00000002
TARGET.SID = 0x00000003
TARGET.VID = 0x00000004
-//! [132]
+#! [132]
-//! [133]
+#! [133]
TARGET.CAPABILITY += AllFiles
-//! [133]
+#! [133]
-//! [134]
+#! [134]
TARGET.CAPABILITY = ALL -TCB -DRM -AllFiles
-//! [134]
+#! [134]
-//! [135]
+#! [135]
TARGET.EPOCHEAPSIZE = 10000 10000000
-//! [135]
+#! [135]
-//! [136]
+#! [136]
TARGET.EPOCSTACKSIZE = 0x8000
-//! [136]
+#! [136]
-//! [137]
+#! [137]
MMP_RULES += "DEFFILE hello.def"
-//! [137]
+#! [137]
-//! [138]
+#! [138]
myBlock = \
"START RESOURCE foo.rss" \
"TARGET bar" \
@@ -911,37 +893,37 @@ myBlock = \
"END"
MMP_RULES += myBlock
-//! [138]
+#! [138]
-//! [139]
+#! [139]
myIfdefBlock = \
"$${LITERAL_HASH}ifdef WINSCW" \
"DEFFILE hello_winscw.def" \
"$${LITERAL_HASH}endif"
MMP_RULES += myIfdefBlock
-//! [139]
+#! [139]
-//! [140]
+#! [140]
somelib.sources = somelib.dll
somelib.path = \sys\bin
somelib.pkg_prerules = "(0x12345678), 2, 2, 0, {\"Some Package\"}" \
"(0x87654321), 1, *, * ~ 2, 2, 0, {\"Some Other Package\"}"
justdep.pkg_prerules = "(0xAAAABBBB), 0, 2, 0, {\"My Framework\"}"
DEPLOYMENT += somelib justdep
-//! [140]
+#! [140]
-//! [141]
+#! [141]
default_deployment.pkg_prerules -= pkg_platform_dependencies
my_deployment.pkg_prerules = "[0x11223344],0,0,0,{\"SomeSpecificDeviceID\"}"
DEPLOYMENT += my_deployment
-//! [141]
+#! [141]
-//! [142]
+#! [142]
DEPLOYMENT_PLUGIN += qjpeg
-//! [142]
+#! [142]
-//! [143]
+#! [143]
myextension = \
"start extension myextension" \
"$${LITERAL_HASH}if defined(WINSCW)" \
@@ -950,28 +932,28 @@ myextension = \
"option MYOPTION bar" \
"end"
BLD_INF_RULES.prj_extensions += myextension
-//! [143]
+#! [143]
-//! [144]
+#! [144]
RSS_RULES += "hidden = KAppIsHidden;"
-//! [144]
+#! [144]
-//! [145]
+#! [145]
myrssrules = \
"hidden = KAppIsHidden;" \
"launch = KAppLaunchInBackground;" \
RSS_RULES += myrssrules
-//! [145]
+#! [145]
-//! [146]
+#! [146]
DEPLOYMENT.installer_header = 0x12345678
-//! [146]
+#! [146]
-//! [147]
+#! [147]
DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"My Application Installer\"},(0x12345678),1,0,0"
-//! [147]
+#! [147]
-//! [148]
+#! [148]
# Set conditional libraries
LIB.MARM = "LIBRARY myarm.lib"
LIB.WINSCW = "LIBRARY mywinscw.lib"
@@ -982,50 +964,50 @@ MYCONDITIONS = MARM WINSCW
MYVARIABLES = LIB
addMMPRules(MYCONDITIONS, MYVARIABLES)
-//! [148]
+#! [148]
-//! [149]
+#! [149]
SUBDIRS += my_executable my_library
my_executable.subdir = app
my_executable.depends = my_library
my_library.subdir = lib
-//! [149]
+#! [149]
-//! [150]
+#! [150]
symbian {
SUBDIRS += emulator_dll
emulator_dll.condition = WINSCW
}
-//! [150]
+#! [150]
-//! [151]
+#! [151]
RSS_RULES.service_list += "uid = 0x12345678; datatype_list = \{\}; opaque_data = r_my_icon;"
RSS_RULES.footer +="RESOURCE CAPTION_AND_ICON_INFO r_my_icon \{ icon_file =\"$$PWD/my_icon.svg\"; \}"
-//! [151]
+#! [151]
-//! [152]
+#! [152]
my_exports = \
"foo.h /epoc32/include/mylib/foo.h" \
"bar.h /epoc32/include/mylib/bar.h"
BLD_INF_RULES.prj_exports += my_exports
-//! [152]
+#! [152]
-//! [153]
+#! [153]
my_note.pkg_postrules.installer = "\"myinstallnote.txt\" - \"\", FILETEXT, TEXTCONTINUE"
DEPLOYMENT += my_note
-//! [153]
+#! [153]
-//! [154]
+#! [154]
DEPLOYMENT -= default_bin_deployment default_resource_deployment default_reg_deployment
-//! [154]
+#! [154]
-//! [155]
+#! [155]
default_bin_deployment.flags += FILERUN RUNINSTALL
dep_note.sources = install_note.txt
dep_note.flags = FILETEXT TEXTEXIT
DEPLOYMENT += dep_note
-//! [155]
+#! [155]
-//! [156]
+#! [156]
DEPLOYMENT.display_name = My Qt App
-//! [156]
+#! [156]
diff --git a/doc/src/snippets/code/doc_src_qnamespace.cpp b/doc/src/snippets/code/doc_src_qnamespace.cpp
new file mode 100644
index 0000000000..c512862325
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qnamespace.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [1]
+enum CustomEventPriority
+{
+ // An important event
+ ImportantEventPriority = Qt::HighEventPriority,
+
+ // A more important event
+ MoreImportantEventPriority = ImportantEventPriority + 1,
+
+ // A critical event
+ CriticalEventPriority = 100 * MoreImportantEventPriority,
+
+ // Not that important
+ StatusEventPriority = Qt::LowEventPriority,
+
+ // These are less important than Status events
+ IdleProcessingDoneEventPriority = StatusEventPriority - 1
+};
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qnamespace.qdoc b/doc/src/snippets/code/doc_src_qnamespace.qdoc
index a1bd0b7219..6b5ce6a41d 100644
--- a/doc/src/snippets/code/doc_src_qnamespace.qdoc
+++ b/doc/src/snippets/code/doc_src_qnamespace.qdoc
@@ -41,24 +41,3 @@
//! [0]
QObject::connect: Cannot queue arguments of type 'MyType'
//! [0]
-
-
-//! [1]
-enum CustomEventPriority
-{
- // An important event
- ImportantEventPriority = Qt::HighEventPriority,
-
- // A more important event
- MoreImportantEventPriority = ImportantEventPriority + 1,
-
- // A critical event
- CriticalEventPriority = 100 * MoreImportantEventPriority,
-
- // Not that important
- StatusEventPriority = Qt::LowEventPriority,
-
- // These are less important than Status events
- IdleProcessingDoneEventPriority = StatusEventPriority - 1
-};
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qpair.qdoc b/doc/src/snippets/code/doc_src_qpair.cpp
index a9a061e2c7..a9a061e2c7 100644
--- a/doc/src/snippets/code/doc_src_qpair.qdoc
+++ b/doc/src/snippets/code/doc_src_qpair.cpp
diff --git a/doc/src/snippets/code/doc_src_qplugin.qdoc b/doc/src/snippets/code/doc_src_qplugin.cpp
index fdacc08c3a..fdacc08c3a 100644
--- a/doc/src/snippets/code/doc_src_qplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_qplugin.cpp
diff --git a/doc/src/snippets/code/doc_src_qplugin.pro b/doc/src/snippets/code/doc_src_qplugin.pro
new file mode 100644
index 0000000000..f3444e273a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qplugin.pro
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [3]
+TEMPLATE = app
+QTPLUGIN += qjpeg qgif qmng # image formats
+#! [3]
diff --git a/doc/src/snippets/code/doc_src_qset.qdoc b/doc/src/snippets/code/doc_src_qset.cpp
index 4a4953d452..4a4953d452 100644
--- a/doc/src/snippets/code/doc_src_qset.qdoc
+++ b/doc/src/snippets/code/doc_src_qset.cpp
diff --git a/doc/src/snippets/code/doc_src_qsignalspy.qdoc b/doc/src/snippets/code/doc_src_qsignalspy.cpp
index 12462e2d74..12462e2d74 100644
--- a/doc/src/snippets/code/doc_src_qsignalspy.qdoc
+++ b/doc/src/snippets/code/doc_src_qsignalspy.cpp
diff --git a/doc/src/snippets/code/doc_src_qt3support.qdoc b/doc/src/snippets/code/doc_src_qt3support.cpp
index 9e0f682d3a..196efd4810 100644
--- a/doc/src/snippets/code/doc_src_qt3support.qdoc
+++ b/doc/src/snippets/code/doc_src_qt3support.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <Qt3Support>
//! [0]
-
-
-//! [1]
-QT += qt3support
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qt3support.pro b/doc/src/snippets/code/doc_src_qt3support.pro
new file mode 100644
index 0000000000..20fcc143cd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3support.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += qt3support
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qt3to4.cpp b/doc/src/snippets/code/doc_src_qt3to4.cpp
new file mode 100644
index 0000000000..d8eb5b4689
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3to4.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [2]
+using namespace Qt;
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc b/doc/src/snippets/code/doc_src_qt4-accessibility.cpp
index efbbc5aadb..efbbc5aadb 100644
--- a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-accessibility.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc b/doc/src/snippets/code/doc_src_qt4-arthur.cpp
index 6268309db6..6268309db6 100644
--- a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-arthur.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-intro.qdoc b/doc/src/snippets/code/doc_src_qt4-intro.cpp
index 45da7d01fa..76ed4a5edb 100644
--- a/doc/src/snippets/code/doc_src_qt4-intro.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-intro.cpp
@@ -38,21 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT -= gui
-//! [0]
-
-
-//! [1]
-QT += network opengl sql qt3support
-//! [1]
-
-
-//! [2]
-CONFIG += uic3
-//! [2]
-
-
//! [3]
#include <QClassName>
//! [3]
@@ -119,23 +104,3 @@ safeLabel->setText("Hello world!");
delete label;
// safeLabel is now 0, whereas label is a dangling pointer
//! [12]
-
-
-//! [13]
-QT += qt3support
-//! [13]
-
-
-//! [14]
-DEFINES += QT3_SUPPORT
-//! [14]
-
-
-//! [15]
-DEFINES += QT3_SUPPORT_WARNINGS
-//! [15]
-
-
-//! [16]
-DEFINES += QT3_SUPPORT
-//! [16]
diff --git a/doc/src/snippets/code/doc_src_qt4-intro.pro b/doc/src/snippets/code/doc_src_qt4-intro.pro
new file mode 100644
index 0000000000..40853b3285
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-intro.pro
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+QT -= gui
+#! [0]
+
+
+#! [1]
+QT += network opengl sql qt3support
+#! [1]
+
+
+#! [2]
+CONFIG += uic3
+#! [2]
+
+
+#! [13]
+QT += qt3support
+#! [13]
+
+
+#! [14]
+DEFINES += QT3_SUPPORT
+#! [14]
+
+
+#! [15]
+DEFINES += QT3_SUPPORT_WARNINGS
+#! [15]
+
+
+#! [16]
+DEFINES += QT3_SUPPORT
+#! [16]
diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
index d0c758e644..d0c758e644 100644
--- a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-sql.qdoc b/doc/src/snippets/code/doc_src_qt4-sql.cpp
index cbcfb2d8c5..cbcfb2d8c5 100644
--- a/doc/src/snippets/code/doc_src_qt4-sql.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-sql.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-styles.qdoc b/doc/src/snippets/code/doc_src_qt4-styles.cpp
index effe3cd561..effe3cd561 100644
--- a/doc/src/snippets/code/doc_src_qt4-styles.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-styles.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc b/doc/src/snippets/code/doc_src_qt4-tulip.cpp
index 83b1210a9b..83b1210a9b 100644
--- a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-tulip.cpp
diff --git a/doc/src/snippets/code/doc_src_qtcore.qdoc b/doc/src/snippets/code/doc_src_qtcore.cpp
index 35916eacf1..35916eacf1 100644
--- a/doc/src/snippets/code/doc_src_qtcore.qdoc
+++ b/doc/src/snippets/code/doc_src_qtcore.cpp
diff --git a/doc/src/snippets/code/doc_src_qtdbus.qdoc b/doc/src/snippets/code/doc_src_qtdbus.cpp
index 20ff513488..2143b5bb5e 100644
--- a/doc/src/snippets/code/doc_src_qtdbus.qdoc
+++ b/doc/src/snippets/code/doc_src_qtdbus.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtDBus>
//! [0]
-
-
-//! [1]
-QT += dbus
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtdbus.pro b/doc/src/snippets/code/doc_src_qtdbus.pro
new file mode 100644
index 0000000000..6607d7d754
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdbus.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += dbus
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtdesigner.qdoc b/doc/src/snippets/code/doc_src_qtdesigner.cpp
index a37b77ffcc..562002e228 100644
--- a/doc/src/snippets/code/doc_src_qtdesigner.qdoc
+++ b/doc/src/snippets/code/doc_src_qtdesigner.cpp
@@ -43,11 +43,6 @@
//! [0]
-//! [1]
-CONFIG += designer
-//! [1]
-
-
//! [2]
QDesignerMemberSheetExtension *memberSheet = 0;
QExtensionManager manager = formEditor->extensionManager();
diff --git a/doc/src/snippets/code/doc_src_qtdesigner.pro b/doc/src/snippets/code/doc_src_qtdesigner.pro
new file mode 100644
index 0000000000..dc962ef9ef
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdesigner.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+CONFIG += designer
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtestevent.qdoc b/doc/src/snippets/code/doc_src_qtestevent.cpp
index fd1c819ac0..fd1c819ac0 100644
--- a/doc/src/snippets/code/doc_src_qtestevent.qdoc
+++ b/doc/src/snippets/code/doc_src_qtestevent.cpp
diff --git a/doc/src/snippets/code/doc_src_qtestlib.cpp b/doc/src/snippets/code/doc_src_qtestlib.cpp
new file mode 100644
index 0000000000..bd9880702b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestlib.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+class MyFirstTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase()
+ { qDebug("called before everything else"); }
+ void myFirstTest()
+ { QVERIFY(1 == 1); }
+ void mySecondTest()
+ { QVERIFY(1 != 2); }
+ void cleanupTestCase()
+ { qDebug("called after myFirstTest and mySecondTest"); }
+};
+//! [0]
+
+
+//! [8]
+void TestQString::toUpper()
+{
+ QString str = "Hello";
+ QVERIFY(str.toUpper() == "HELLO");
+}
+//! [8]
+
+
+//! [11]
+QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
+//! [11]
+
+//! [12]
+class MyFirstBenchmark: public QObject
+{
+ Q_OBJECT
+private slots:
+ void myFirstBenchmark()
+ {
+ QString string1;
+ QString string2;
+ QBENCHMARK {
+ string1.localeAwareCompare(string2);
+ }
+ }
+};
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_qtestlib.pro b/doc/src/snippets/code/doc_src_qtestlib.pro
new file mode 100644
index 0000000000..a8fc56a461
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestlib.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += testlib
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtestlib.qdoc b/doc/src/snippets/code/doc_src_qtestlib.qdoc
index 80b7d927ae..92d528edd3 100644
--- a/doc/src/snippets/code/doc_src_qtestlib.qdoc
+++ b/doc/src/snippets/code/doc_src_qtestlib.qdoc
@@ -38,28 +38,6 @@
**
****************************************************************************/
-//! [0]
-class MyFirstTest: public QObject
-{
- Q_OBJECT
-private slots:
- void initTestCase()
- { qDebug("called before everything else"); }
- void myFirstTest()
- { QVERIFY(1 == 1); }
- void mySecondTest()
- { QVERIFY(1 != 2); }
- void cleanupTestCase()
- { qDebug("called after myFirstTest and mySecondTest"); }
-};
-//! [0]
-
-
-//! [1]
-QT += testlib
-//! [1]
-
-
//! [2]
testname [options] [testfunctions[:testdata]]...
//! [2]
@@ -91,15 +69,6 @@ set LIB=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SD
//! [7]
-//! [8]
-void TestQString::toUpper()
-{
- QString str = "Hello";
- QVERIFY(str.toUpper() == "HELLO");
-}
-//! [8]
-
-
//! [9]
/myTestDirectory$ qmake -project "CONFIG += qtestlib"
/myTestDirectory$ qmake
@@ -116,27 +85,3 @@ PASS : TestQString::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of TestQString *********
//! [10]
-
-
-//! [11]
-QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
-QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
-QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
-QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
-//! [11]
-
-//! [12]
-class MyFirstBenchmark: public QObject
-{
- Q_OBJECT
-private slots:
- void myFirstBenchmark()
- {
- QString string1;
- QString string2;
- QBENCHMARK {
- string1.localeAwareCompare(string2);
- }
- }
-};
-//! [12]
diff --git a/doc/src/snippets/code/doc_src_qtgui.qdoc b/doc/src/snippets/code/doc_src_qtgui.pro
index 370529a09a..dd3405c725 100644
--- a/doc/src/snippets/code/doc_src_qtgui.qdoc
+++ b/doc/src/snippets/code/doc_src_qtgui.pro
@@ -38,6 +38,6 @@
**
****************************************************************************/
-//! [0]
+#! [0]
#include <QtGui>
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qthelp.cpp b/doc/src/snippets/code/doc_src_qthelp.cpp
new file mode 100644
index 0000000000..282573835d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qthelp.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtHelp>
+//! [0]
+
+//! [6]
+QHelpEngineCore helpEngine("mycollection.qhc");
+...
+
+// get all file references for the identifier
+QMap<QString, QUrl> links =
+ helpEngine.linksForIdentifier(QLatin1String("MyDialog::ChangeButton"));
+
+// If help is available for this keyword, get the help data
+// of the first file reference.
+if (links.count()) {
+ QByteArray helpData = helpEngine->fileData(links.constBegin().value());
+ // show the documentation to the user
+ if (!helpData.isEmpty())
+ displayHelp(helpData);
+}
+//! [6]
+
+
diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc
index 4ad2100262..ff25d19b56 100644
--- a/doc/src/snippets/code/doc_src_qthelp.qdoc
+++ b/doc/src/snippets/code/doc_src_qthelp.qdoc
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtHelp>
-//! [0]
-
-
//! [1]
CONFIG += help
//! [1]
@@ -87,25 +82,6 @@ qcollectiongenerator mycollection.qhcp -o mycollection.qhc
//! [5]
-//! [6]
-QHelpEngineCore helpEngine("mycollection.qhc");
-...
-
-// get all file references for the identifier
-QMap<QString, QUrl> links =
- helpEngine.linksForIdentifier(QLatin1String("MyDialog::ChangeButton"));
-
-// If help is available for this keyword, get the help data
-// of the first file reference.
-if (links.count()) {
- QByteArray helpData = helpEngine->fileData(links.constBegin().value());
- // show the documentation to the user
- if (!helpData.isEmpty())
- displayHelp(helpData);
-}
-//! [6]
-
-
//! [7]
<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc b/doc/src/snippets/code/doc_src_qtmultimedia.cpp
index 76fb9cde71..3f25c11aa5 100644
--- a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc
+++ b/doc/src/snippets/code/doc_src_qtmultimedia.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT += multimedia
-//! [0]
-
-
//! [1]
#include <QtMultimedia>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.pro b/doc/src/snippets/code/doc_src_qtmultimedia.pro
new file mode 100644
index 0000000000..b23c994946
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtmultimedia.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+QT += multimedia
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.qdoc b/doc/src/snippets/code/doc_src_qtnetwork.cpp
index 42d1808a9d..7100f1a750 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.qdoc
+++ b/doc/src/snippets/code/doc_src_qtnetwork.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT += network
-//! [0]
-
-
//! [1]
#include <QtNetwork>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.pro b/doc/src/snippets/code/doc_src_qtnetwork.pro
new file mode 100644
index 0000000000..f6c3a5ae7d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtnetwork.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+QT += network
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtopengl.qdoc b/doc/src/snippets/code/doc_src_qtopengl.cpp
index 555d5715d6..088b31b5a3 100644
--- a/doc/src/snippets/code/doc_src_qtopengl.qdoc
+++ b/doc/src/snippets/code/doc_src_qtopengl.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtOpenGL>
//! [0]
-
-
-//! [1]
-QT += opengl
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtopengl.pro b/doc/src/snippets/code/doc_src_qtopengl.pro
new file mode 100644
index 0000000000..97fbf2879f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtopengl.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += opengl
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtscript.cpp b/doc/src/snippets/code/doc_src_qtscript.cpp
new file mode 100644
index 0000000000..822e6fa0f7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.cpp
@@ -0,0 +1,568 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtScript>
+//! [0]
+
+//! [13]
+Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+//! [13]
+
+//! [18]
+QScriptValue myQObjectConstructor(QScriptContext *context, QScriptEngine *engine)
+{
+ // let the engine manage the new object's lifetime.
+ return engine->newQObject(new MyQObject(), QScriptEngine::ScriptOwnership);
+}
+//! [18]
+
+
+//! [19]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [19]
+
+
+//! [20]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+};
+//! [20]
+
+
+//! [23]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [23]
+
+
+//! [24]
+Q_PROPERTY(int nonScriptableProperty READ foo WRITE bar SCRIPTABLE false)
+//! [24]
+
+
+//! [25]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+signals: // the signals
+ void enabledChanged( bool newState );
+
+private:
+ ....
+
+};
+//! [25]
+
+
+//! [34]
+QScriptValue Person_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->argument(0).toString();
+ context->thisObject().setProperty("name", name);
+ return engine->undefinedValue();
+}
+//! [34]
+
+
+//! [35]
+QScriptValue Person_prototype_toString(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->thisObject().property("name").toString();
+ QString result = QString::fromLatin1("Person(name: %0)").arg(name);
+ return result;
+}
+//! [35]
+
+
+//! [36]
+QScriptEngine engine;
+QScriptValue ctor = engine.newFunction(Person_ctor);
+ctor.property("prototype").setProperty("toString", engine.newFunction(Person_prototype_toString));
+QScriptValue global = engine.globalObject();
+global.setProperty("Person", ctor);
+//! [36]
+
+
+//! [37]
+QScriptValue Employee_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue super = context->callee().property("prototype").property("constructor");
+ super.call(context->thisObject(), QScriptValueList() << context->argument(0));
+ context->thisObject().setProperty("salary", context->argument(1));
+ return engine->undefinedValue();
+}
+//! [37]
+
+
+//! [38]
+QScriptValue empCtor = engine.newFunction(Employee_ctor);
+empCtor.setProperty("prototype", global.property("Person").construct());
+global.setProperty("Employee", empCtor);
+//! [38]
+
+
+//! [39]
+Q_DECLARE_METATYPE(QPointF)
+Q_DECLARE_METATYPE(QPointF*)
+
+QScriptValue QPointF_prototype_x(QScriptContext *context, QScriptEngine *engine)
+{
+ // Since the point is not to be modified, it's OK to cast to a value here
+ QPointF point = qscriptvalue_cast<QPointF>(context->thisObject());
+ return point.x();
+}
+
+QScriptValue QPointF_prototype_setX(QScriptContext *context, QScriptEngine *engine)
+{
+ // Cast to a pointer to be able to modify the underlying C++ value
+ QPointF *point = qscriptvalue_cast<QPointF*>(context->thisObject());
+ if (!point)
+ return context->throwError(QScriptContext::TypeError, "QPointF.prototype.setX: this object is not a QPointF");
+ point->setX(context->argument(0).toNumber());
+ return engine->undefinedValue();
+}
+//! [39]
+
+
+//! [43]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ ...
+};
+
+Q_DECLARE_METATYPE(MyObject*)
+
+QScriptValue myObjectToScriptValue(QScriptEngine *engine, MyObject* const &in)
+{ return engine->newQObject(in); }
+
+void myObjectFromScriptValue(const QScriptValue &object, MyObject* &out)
+{ out = qobject_cast<MyObject*>(object.toQObject()); }
+
+...
+
+qScriptRegisterMetaType(&engine, myObjectToScriptValue, myObjectFromScriptValue);
+//! [43]
+
+//! [44]
+QScriptValue QPoint_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ int x = context->argument(0).toInt32();
+ int y = context->argument(1).toInt32();
+ return engine->toScriptValue(QPoint(x, y));
+}
+
+...
+
+engine.globalObject().setProperty("QPoint", engine.newFunction(QPoint_ctor));
+//! [44]
+
+//! [45]
+QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
+{
+ QString result;
+ for (int i = 0; i < context->argumentCount(); ++i) {
+ if (i > 0)
+ result.append(" ");
+ result.append(context->argument(i).toString());
+ }
+
+ QScriptValue calleeData = context->callee().data();
+ QPlainTextEdit *edit = qobject_cast<QPlainTextEdit*>(calleeData.toQObject());
+ edit->appendPlainText(result);
+
+ return engine->undefinedValue();
+}
+//! [45]
+
+//! [46]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QScriptEngine eng;
+ QPlainTextEdit edit;
+
+ QScriptValue fun = eng.newFunction(myPrintFunction);
+ fun.setData(eng.newQObject(&edit));
+ eng.globalObject().setProperty("print", fun);
+
+ eng.evaluate("print('hello', 'world')");
+
+ edit.show();
+ return app.exec();
+}
+//! [46]
+
+
+//! [47]
+QScriptEngine eng;
+QLineEdit *edit = new QLineEdit(...);
+QScriptValue handler = eng.evaluate("(function(text) { print('text was changed to', text); })");
+qScriptConnect(edit, SIGNAL(textChanged(const QString &)), QScriptValue(), handler);
+//! [47]
+
+//! [48]
+QLineEdit *edit1 = new QLineEdit(...);
+QLineEdit *edit2 = new QLineEdit(...);
+
+QScriptValue handler = eng.evaluate("(function() { print('I am', this.name); })");
+QScriptValue obj1 = eng.newObject();
+obj1.setProperty("name", "the walrus");
+QScriptValue obj2 = eng.newObject();
+obj2.setProperty("name", "Sam");
+
+qScriptConnect(edit1, SIGNAL(returnPressed()), obj1, handler);
+qScriptConnect(edit2, SIGNAL(returnPressed()), obj2, handler);
+//! [48]
+
+//! [52]
+QScriptValue getProperty(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString name = ctx->argument(0).toString();
+ return ctx->thisObject().property(name);
+}
+//! [52]
+
+//! [53]
+QScriptValue myCompare(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double first = ctx->argument(0).toNumber();
+ double second = ctx->argument(1).toNumber();
+ int result;
+ if (first == second)
+ result = 0;
+ else if (first < second)
+ result = -1;
+ else
+ result = 1;
+ return result;
+}
+//! [53]
+
+//! [54]
+QScriptEngine eng;
+QScriptValue comparefn = eng.newFunction(myCompare);
+QScriptValue array = eng.evaluate("new Array(10, 5, 20, 15, 30)");
+array.property("sort").call(array, QScriptValueList() << comparefn);
+
+// prints "5,10,15,20,30"
+qDebug() << array.toString();
+//! [54]
+
+//! [55]
+QScriptValue rectifier(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QRectF magicRect = qscriptvalue_cast<QRectF>(ctx->callee().data());
+ QRectF sourceRect = qscriptvalue_cast<QRectF>(ctx->argument(0));
+ return eng->toScriptValue(sourceRect.intersected(magicRect));
+}
+
+...
+
+QScriptValue fun = eng.newFunction(rectifier);
+QRectF magicRect = QRectF(10, 20, 30, 40);
+fun.setData(eng.toScriptValue(magicRect));
+eng.globalObject().setProperty("rectifier", fun);
+//! [55]
+
+//! [58]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [58]
+
+//! [62]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [62]
+
+//! [63]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ if (!ctx->argument(0).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): first argument is not a number");
+ if (!ctx->argument(1).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): second argument is not a number");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [63]
+
+//! [65]
+QScriptValue concat(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString result = "";
+ for (int i = 0; i < ctx->argumentCount(); ++i)
+ result += ctx->argument(i).toString();
+ return result;
+}
+//! [65]
+
+//! [67]
+QScriptValue sort(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue comparefn = ctx->argument(0);
+ if (comparefn.isUndefined())
+ comparefn = /* the built-in comparison function */;
+ else if (!comparefn.isFunction())
+ return ctx->throwError(QScriptContext::TypeError, "sort(): argument is not a function");
+ ...
+}
+//! [67]
+
+//! [69]
+QScriptValue foo(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue bar = eng->globalObject().property("bar");
+ QScriptValue arguments = ctx->argumentsObject();
+ qDebug() << "calling bar() with" << arguments.property("length").toInt32() << "arguments";
+ QScriptValue result = bar.apply(ctx->thisObject(), arguments);
+ qDebug() << "bar() returned" << result.toString();
+ return result;
+}
+//! [69]
+
+//! [72]
+QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ QScriptValue result = eng->newFunction(counter_inner);
+ result.setScope(act);
+ return result;
+}
+//! [72]
+
+//! [73]
+QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue outerAct = ctx->callee().scope();
+ double count = outerAct.property("count").toNumber();
+ outerAct.setProperty("count", count+1);
+ return count;
+}
+//! [73]
+
+//! [74]
+QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ return eng->evaluate("(function() { return count++; })");
+}
+//! [74]
+
+//! [76]
+QScriptValue Person_ctor(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue object;
+ if (ctx->isCalledAsConstructor()) {
+ object = ctx->thisObject();
+ } else {
+ object = eng->newObject();
+ object.setPrototype(ctx->callee().property("prototype"));
+ }
+ object.setProperty("name", ctx->argument(0));
+ return object;
+}
+//! [76]
+
+//! [77]
+QScriptContext *ctx = eng.pushContext();
+QScriptValue act = ctx->activationObject();
+act.setProperty("digit", 7);
+
+qDebug() << eng.evaluate("digit + 1").toNumber(); // 8
+
+eng.popContext();
+//! [77]
+
+//! [78]
+QScriptValue getSet(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue obj = ctx->thisObject();
+ QScriptValue data = obj.data();
+ if (!data.isValid()) {
+ data = eng->newObject();
+ obj.setData(data);
+ }
+ QScriptValue result;
+ if (ctx->argumentCount() == 1) {
+ QString str = ctx->argument(0).toString();
+ str.replace("Roberta", "Ken");
+ result = str;
+ data.setProperty("x", result);
+ } else {
+ result = data.property("x");
+ }
+ return result;
+}
+//! [78]
+
+//! [79]
+QScriptEngine eng;
+QScriptValue obj = eng.newObject();
+obj.setProperty("x", eng.newFunction(getSet),
+ QScriptValue::PropertyGetter|QScriptValue::PropertySetter);
+//! [79]
+
+//! [91]
+QScriptValue object = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })");
+QScriptValue toKelvin = object.property("toKelvin");
+QScriptValue result = toKelvin.call(object, QScriptValueList() << 100);
+qDebug() << result.toNumber(); // 373
+//! [91]
+
+//! [92]
+QScriptValue add = engine.globalObject().property("add");
+qDebug() << add.call(QScriptValue(), QScriptValueList() << 1 << 2).toNumber(); // 3
+//! [92]
+
+//! [93]
+typedef QSharedPointer<QXmlStreamReader> XmlStreamReaderPointer;
+
+Q_DECLARE_METATYPE(XmlStreamReaderPointer)
+
+QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *engine)
+{
+ if (!context->isCalledAsConstructor())
+ return context->throwError(QScriptContext::SyntaxError, "please use the 'new' operator");
+
+ QIODevice *device = qobject_cast<QIODevice*>(context->argument(0).toQObject());
+ if (!device)
+ return context->throwError(QScriptContext::TypeError, "please supply a QIODevice as first argument");
+
+ // Create the C++ object
+ QXmlStreamReader *reader = new QXmlStreamReader(device);
+
+ XmlStreamReaderPointer pointer(reader);
+
+ // store the shared pointer in the script object that we are constructing
+ return engine->newVariant(context->thisObject(), qVariantFromValue(pointer));
+}
+//! [93]
+
+//! [94]
+QScriptValue xmlStreamReader_atEnd(QScriptContext *context, QScriptEngine *)
+{
+ XmlStreamReaderPointer reader = qscriptvalue_cast<XmlStreamReaderPointer>(context->thisObject());
+ if (!reader)
+ return context->throwError(QScriptContext::TypeError, "this object is not an XmlStreamReader");
+ return reader->atEnd();
+}
+//! [94]
+
+//! [95]
+ QScriptEngine engine;
+ QScriptValue xmlStreamReaderProto = engine.newObject();
+ xmlStreamReaderProto.setProperty("atEnd", engine.newFunction(xmlStreamReader_atEnd));
+
+ QScriptValue xmlStreamReaderCtor = engine.newFunction(constructXmlStreamReader, xmlStreamReaderProto);
+ engine.globalObject().setProperty("XmlStreamReader", xmlStreamReaderCtor);
+//! [95]
diff --git a/doc/src/snippets/code/doc_src_qtscript.js b/doc/src/snippets/code/doc_src_qtscript.js
new file mode 100644
index 0000000000..fe1f9b90a2
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.js
@@ -0,0 +1,444 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [2]
+function myInterestingScriptFunction() {
+ // ...
+}
+// ...
+myQObject.somethingChanged.connect(myInterestingScriptFunction);
+//! [2]
+
+
+//! [3]
+myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+//! [3]
+
+
+//! [4]
+myQObject.somethingChanged.disconnect(myInterestingFunction);
+myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+//! [4]
+
+
+//! [5]
+var obj = { x: 123 };
+var fun = function() { print(this.x); };
+myQObject.somethingChanged.connect(obj, fun);
+//! [5]
+
+
+//! [6]
+myQObject.somethingChanged.disconnect(obj, fun);
+//! [6]
+
+
+//! [7]
+var obj = { x: 123, fun: function() { print(this.x); } };
+myQObject.somethingChanged.connect(obj, "fun");
+//! [7]
+
+
+//! [8]
+myQObject.somethingChanged.disconnect(obj, "fun");
+//! [8]
+
+
+//! [9]
+try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+} catch (e) {
+ print(e);
+}
+//! [9]
+
+
+//! [10]
+myQObject.somethingChanged("hello");
+//! [10]
+
+
+//! [11]
+myQObject.myOverloadedSlot(10); // will call the int overload
+myQObject.myOverloadedSlot("10"); // will call the QString overload
+//! [11]
+
+
+//! [12]
+myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+//! [12]
+
+
+//! [14]
+myQObject.enabled = true;
+
+// ...
+
+myQObject.enabled = !myQObject.enabled;
+//! [14]
+
+
+//! [15]
+myDialog.okButton
+//! [15]
+
+
+//! [16]
+myDialog.okButton.objectName = "cancelButton";
+// from now on, myDialog.cancelButton references the button
+//! [16]
+
+
+//! [17]
+var okButton = myDialog.findChild("okButton");
+if (okButton != null) {
+ // do something with the OK button
+}
+
+var buttons = myDialog.findChildren(RegExp("button[0-9]+"));
+for (var i = 0; i < buttons.length; ++i) {
+ // do something with buttons[i]
+}
+//! [17]
+
+
+//! [21]
+var obj = new MyObject;
+obj.setEnabled( true );
+print( "obj is enabled: " + obj.isEnabled() );
+//! [21]
+
+
+//! [22]
+var obj = new MyObject;
+obj.enabled = true;
+print( "obj is enabled: " + obj.enabled );
+//! [22]
+
+
+//! [26]
+function enabledChangedHandler( b )
+{
+ print( "state changed to: " + b );
+}
+
+function init()
+{
+ var obj = new MyObject();
+ // connect a script function to the signal
+ obj["enabledChanged(bool)"].connect(enabledChangedHandler);
+ obj.enabled = true;
+ print( "obj is enabled: " + obj.enabled );
+}
+//! [26]
+
+
+//! [27]
+var o = new Object();
+o.foo = 123;
+print(o.hasOwnProperty('foo')); // true
+print(o.hasOwnProperty('bar')); // false
+print(o); // calls o.toString(), which returns "[object Object]"
+//! [27]
+
+
+//! [28]
+function Person(name)
+{
+ this.name = name;
+}
+//! [28]
+
+
+//! [29]
+Person.prototype.toString = function() { return "Person(name: " + this.name + ")"; }
+//! [29]
+
+
+//! [30]
+var p1 = new Person("John Doe");
+var p2 = new Person("G.I. Jane");
+print(p1); // "Person(name: John Doe)"
+print(p2); // "Person(name: G.I. Jane)"
+//! [30]
+
+
+//! [31]
+print(p1.hasOwnProperty('name')); // 'name' is an instance variable, so this returns true
+print(p1.hasOwnProperty('toString')); // returns false; inherited from prototype
+print(p1 instanceof Person); // true
+print(p1 instanceof Object); // true
+//! [31]
+
+
+//! [32]
+function Employee(name, salary)
+{
+ Person.call(this, name); // call base constructor
+
+ this.salary = salary;
+}
+
+// set the prototype to be an instance of the base class
+Employee.prototype = new Person();
+
+// initialize prototype
+Employee.prototype.toString = function() {
+ // ...
+}
+//! [32]
+
+
+//! [33]
+var e = new Employee("Johnny Bravo", 5000000);
+print(e instanceof Employee); // true
+print(e instanceof Person); // true
+print(e instanceof Object); // true
+print(e instanceof Array); // false
+//! [33]
+
+
+//! [40]
+var o = new Object();
+(o.__proto__ === Object.prototype); // this evaluates to true
+//! [40]
+
+
+//! [41]
+var o = new Object();
+o.__defineGetter__("x", function() { return 123; });
+var y = o.x; // 123
+//! [41]
+
+
+//! [42]
+var o = new Object();
+o.__defineSetter__("x", function(v) { print("and the value is:", v); });
+o.x = 123; // will print "and the value is: 123"
+//! [42]
+
+
+//! [49]
+var getProperty = function(name) { return this[name]; };
+
+name = "Global Object"; // creates a global variable
+print(getProperty("name")); // "Global Object"
+
+var myObject = { name: 'My Object' };
+print(getProperty.call(myObject, "name")); // "My Object"
+
+myObject.getProperty = getProperty;
+print(myObject.getProperty("name")); // "My Object"
+
+getProperty.name = "The getProperty() function";
+getProperty.getProperty = getProperty;
+getProperty.getProperty("name"); // "The getProperty() function"
+//! [49]
+
+//! [50]
+var o = { a: 1, b: 2, sum: function() { return a + b; } };
+print(o.sum()); // reference error, or sum of global variables a and b!!
+//! [50]
+
+//! [51]
+var o = { a: 1, b: 2, sum: function() { return this.a + this.b; } };
+print(o.sum()); // 3
+//! [51]
+
+//! [56]
+function add(a, b) {
+ return a + b;
+}
+//! [56]
+
+//! [57]
+function add() {
+ return arguments[0] + arguments[1];
+}
+//! [57]
+
+//! [59]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return arguments[0] + arguments[1];
+}
+//! [59]
+
+//! [60]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ if (typeof arguments[0] != "number")
+ throw TypeError("add(): first argument is not a number");
+ if (typeof arguments[1] != "number")
+ throw TypeError("add(): second argument is not a number");
+ return arguments[0] + arguments[1];
+}
+//! [60]
+
+//! [61]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return Number(arguments[0]) + Number(arguments[1]);
+}
+//! [61]
+
+//! [64]
+function concat() {
+ var result = "";
+ for (var i = 0; i < arguments.length; ++i)
+ result += String(arguments[i]);
+ return result;
+}
+//! [64]
+
+//! [66]
+function sort(comparefn) {
+ if (comparefn == undefined)
+ comparefn = fn; /* replace fn with the built-in comparison function */
+ else if (typeof comparefn != "function")
+ throw TypeError("sort(): argument must be a function");
+ // ...
+}
+//! [66]
+
+//! [68]
+function foo() {
+ // Let bar() take care of this.
+ print("calling bar() with " + arguments.length + "arguments");
+ var result = bar.apply(this, arguments);
+ print("bar() returned" + result);
+ return result;
+}
+//! [68]
+
+//! [70]
+function counter() {
+ var count = 0;
+ return function() {
+ return count++;
+ }
+}
+//! [70]
+
+//! [71]
+var c1 = counter(); // create a new counter function
+var c2 = counter(); // create a new counter function
+print(c1()); // 0
+print(c1()); // 1
+print(c2()); // 0
+print(c2()); // 1
+//! [71]
+
+//! [75]
+function Book(isbn) {
+ this.isbn = isbn;
+}
+
+var coolBook1 = new Book("978-0131872493");
+var coolBook2 = new Book("978-1593271473");
+//! [75]
+
+//! [80]
+obj.x = "Roberta sent me";
+print(obj.x); // "Ken sent me"
+obj.x = "I sent the bill to Roberta";
+print(obj.x); // "I sent the bill to Ken"
+//! [80]
+
+//! [81]
+obj = {};
+obj.__defineGetter__("x", function() { return this._x; });
+obj.__defineSetter__("x", function(v) { print("setting x to", v); this._x = v; });
+obj.x = 123;
+//! [81]
+
+//! [82]
+myButton.text = qsTr("Hello world!");
+//! [82]
+
+//! [83]
+myButton.text = qsTranslate("MyAwesomeScript", "Hello world!");
+//! [83]
+
+//! [84]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ ];
+ }
+ return qsTr(FriendlyConversation.greeting_strings[type]);
+}
+//! [84]
+
+//! [85]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+ ];
+ }
+ return qsTranslate("FriendlyConversation", FriendlyConversation.greeting_strings[type]);
+}
+//! [85]
+
+//! [86]
+FileCopier.prototype.showProgress = function(done, total, currentFileName)
+{
+ this.label.text = qsTr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFileName);
+}
+//! [86]
+
+//! [90]
+({ unitName: "Celsius",
+ toKelvin: function(x) { return x + 273; }
+ })
+//! [90]
diff --git a/doc/src/snippets/code/doc_src_qtscript.pro b/doc/src/snippets/code/doc_src_qtscript.pro
new file mode 100644
index 0000000000..ce687d7070
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += script
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtscript.qdoc b/doc/src/snippets/code/doc_src_qtscript.qdoc
index a168d5badc..b65311f779 100644
--- a/doc/src/snippets/code/doc_src_qtscript.qdoc
+++ b/doc/src/snippets/code/doc_src_qtscript.qdoc
@@ -38,882 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtScript>
-//! [0]
-
-
-//! [1]
-QT += script
-//! [1]
-
-
-//! [2]
-function myInterestingScriptFunction() { ... }
-...
-myQObject.somethingChanged.connect(myInterestingScriptFunction);
-//! [2]
-
-
-//! [3]
-myQObject.somethingChanged.connect(myOtherQObject.doSomething);
-//! [3]
-
-
-//! [4]
-myQObject.somethingChanged.disconnect(myInterestingFunction);
-myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
-//! [4]
-
-
-//! [5]
-var obj = { x: 123 };
-var fun = function() { print(this.x); };
-myQObject.somethingChanged.connect(obj, fun);
-//! [5]
-
-
-//! [6]
-myQObject.somethingChanged.disconnect(obj, fun);
-//! [6]
-
-
-//! [7]
-var obj = { x: 123, fun: function() { print(this.x); } };
-myQObject.somethingChanged.connect(obj, "fun");
-//! [7]
-
-
-//! [8]
-myQObject.somethingChanged.disconnect(obj, "fun");
-//! [8]
-
-
-//! [9]
-try {
- myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
-} catch (e) {
- print(e);
-}
-//! [9]
-
-
-//! [10]
-myQObject.somethingChanged("hello");
-//! [10]
-
-
-//! [11]
-myQObject.myOverloadedSlot(10); // will call the int overload
-myQObject.myOverloadedSlot("10"); // will call the QString overload
-//! [11]
-
-
-//! [12]
-myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
-myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
-//! [12]
-
-
-//! [13]
-Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
-//! [13]
-
-
-//! [14]
-myQObject.enabled = true;
-
-...
-
-myQObject.enabled = !myQObject.enabled;
-//! [14]
-
-
-//! [15]
-myDialog.okButton
-//! [15]
-
-
-//! [16]
-myDialog.okButton.objectName = "cancelButton";
-// from now on, myDialog.cancelButton references the button
-//! [16]
-
-
-//! [17]
-var okButton = myDialog.findChild("okButton");
-if (okButton != null) {
- // do something with the OK button
-}
-
-var buttons = myDialog.findChildren(RegExp("button[0-9]+"));
-for (var i = 0; i < buttons.length; ++i) {
- // do something with buttons[i]
-}
-//! [17]
-
-
-//! [18]
-QScriptValue myQObjectConstructor(QScriptContext *context, QScriptEngine *engine)
-{
- // let the engine manage the new object's lifetime.
- return engine->newQObject(new MyQObject(), QScriptEngine::ScriptOwnership);
-}
-//! [18]
-
-
-//! [19]
-class MyObject : public QObject
-{
- Q_OBJECT
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-private:
- ....
-
-};
-//! [19]
-
-
-//! [20]
-class MyObject : public QObject
-{
- Q_OBJECT
-
- public:
- Q_INVOKABLE void thisMethodIsInvokableInQtScript();
- void thisMethodIsNotInvokableInQtScript();
-
- ...
-};
-//! [20]
-
-
-//! [21]
-var obj = new MyObject;
-obj.setEnabled( true );
-print( "obj is enabled: " + obj.isEnabled() );
-//! [21]
-
-
-//! [22]
-var obj = new MyObject;
-obj.enabled = true;
-print( "obj is enabled: " + obj.enabled );
-//! [22]
-
-
-//! [23]
-class MyObject : public QObject
-{
- Q_OBJECT
- // define the enabled property
- Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-private:
- ....
-
-};
-//! [23]
-
-
-//! [24]
-Q_PROPERTY(int nonScriptableProperty READ foo WRITE bar SCRIPTABLE false)
-//! [24]
-
-
-//! [25]
-class MyObject : public QObject
-{
- Q_OBJECT
- // define the enabled property
- Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-signals: // the signals
- void enabledChanged( bool newState );
-
-private:
- ....
-
-};
-//! [25]
-
-
-//! [26]
-function enabledChangedHandler( b )
-{
- print( "state changed to: " + b );
-}
-
-function init()
-{
- var obj = new MyObject();
- // connect a script function to the signal
- obj["enabledChanged(bool)"].connect(enabledChangedHandler);
- obj.enabled = true;
- print( "obj is enabled: " + obj.enabled );
-}
-//! [26]
-
-
-//! [27]
-var o = new Object();
-o.foo = 123;
-print(o.hasOwnProperty('foo')); // true
-print(o.hasOwnProperty('bar')); // false
-print(o); // calls o.toString(), which returns "[object Object]"
-//! [27]
-
-
-//! [28]
-function Person(name)
-{
- this.name = name;
-}
-//! [28]
-
-
-//! [29]
-Person.prototype.toString = function() { return "Person(name: " + this.name + ")"; }
-//! [29]
-
-
-//! [30]
-var p1 = new Person("John Doe");
-var p2 = new Person("G.I. Jane");
-print(p1); // "Person(name: John Doe)"
-print(p2); // "Person(name: G.I. Jane)"
-//! [30]
-
-
-//! [31]
-print(p1.hasOwnProperty('name')); // 'name' is an instance variable, so this returns true
-print(p1.hasOwnProperty('toString')); // returns false; inherited from prototype
-print(p1 instanceof Person); // true
-print(p1 instanceof Object); // true
-//! [31]
-
-
-//! [32]
-function Employee(name, salary)
-{
- Person.call(this, name); // call base constructor
-
- this.salary = salary;
-}
-
-// set the prototype to be an instance of the base class
-Employee.prototype = new Person();
-
-// initialize prototype
-Employee.prototype.toString = function() { ... }
-//! [32]
-
-
-//! [33]
-var e = new Employee("Johnny Bravo", 5000000);
-print(e instanceof Employee); // true
-print(e instanceof Person); // true
-print(e instanceof Object); // true
-print(e instanceof Array); // false
-//! [33]
-
-
-//! [34]
-QScriptValue Person_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- QString name = context->argument(0).toString();
- context->thisObject().setProperty("name", name);
- return engine->undefinedValue();
-}
-//! [34]
-
-
-//! [35]
-QScriptValue Person_prototype_toString(QScriptContext *context, QScriptEngine *engine)
-{
- QString name = context->thisObject().property("name").toString();
- QString result = QString::fromLatin1("Person(name: %0)").arg(name);
- return result;
-}
-//! [35]
-
-
-//! [36]
-QScriptEngine engine;
-QScriptValue ctor = engine.newFunction(Person_ctor);
-ctor.property("prototype").setProperty("toString", engine.newFunction(Person_prototype_toString));
-QScriptValue global = engine.globalObject();
-global.setProperty("Person", ctor);
-//! [36]
-
-
-//! [37]
-QScriptValue Employee_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- QScriptValue super = context->callee().property("prototype").property("constructor");
- super.call(context->thisObject(), QScriptValueList() << context->argument(0));
- context->thisObject().setProperty("salary", context->argument(1));
- return engine->undefinedValue();
-}
-//! [37]
-
-
-//! [38]
-QScriptValue empCtor = engine.newFunction(Employee_ctor);
-empCtor.setProperty("prototype", global.property("Person").construct());
-global.setProperty("Employee", empCtor);
-//! [38]
-
-
-//! [39]
-Q_DECLARE_METATYPE(QPointF)
-Q_DECLARE_METATYPE(QPointF*)
-
-QScriptValue QPointF_prototype_x(QScriptContext *context, QScriptEngine *engine)
-{
- // Since the point is not to be modified, it's OK to cast to a value here
- QPointF point = qscriptvalue_cast<QPointF>(context->thisObject());
- return point.x();
-}
-
-QScriptValue QPointF_prototype_setX(QScriptContext *context, QScriptEngine *engine)
-{
- // Cast to a pointer to be able to modify the underlying C++ value
- QPointF *point = qscriptvalue_cast<QPointF*>(context->thisObject());
- if (!point)
- return context->throwError(QScriptContext::TypeError, "QPointF.prototype.setX: this object is not a QPointF");
- point->setX(context->argument(0).toNumber());
- return engine->undefinedValue();
-}
-//! [39]
-
-
-//! [40]
-var o = new Object();
-(o.__proto__ === Object.prototype); // this evaluates to true
-//! [40]
-
-
-//! [41]
-var o = new Object();
-o.__defineGetter__("x", function() { return 123; });
-var y = o.x; // 123
-//! [41]
-
-
-//! [42]
-var o = new Object();
-o.__defineSetter__("x", function(v) { print("and the value is:", v); });
-o.x = 123; // will print "and the value is: 123"
-//! [42]
-
-
-//! [43]
-class MyObject : public QObject
-{
- Q_OBJECT
- ...
-};
-
-Q_DECLARE_METATYPE(MyObject*)
-
-QScriptValue myObjectToScriptValue(QScriptEngine *engine, MyObject* const &in)
-{ return engine->newQObject(in); }
-
-void myObjectFromScriptValue(const QScriptValue &object, MyObject* &out)
-{ out = qobject_cast<MyObject*>(object.toQObject()); }
-
-...
-
-qScriptRegisterMetaType(&engine, myObjectToScriptValue, myObjectFromScriptValue);
-//! [43]
-
-//! [44]
-QScriptValue QPoint_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- int x = context->argument(0).toInt32();
- int y = context->argument(1).toInt32();
- return engine->toScriptValue(QPoint(x, y));
-}
-
-...
-
-engine.globalObject().setProperty("QPoint", engine.newFunction(QPoint_ctor));
-//! [44]
-
-//! [45]
-QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
-{
- QString result;
- for (int i = 0; i < context->argumentCount(); ++i) {
- if (i > 0)
- result.append(" ");
- result.append(context->argument(i).toString());
- }
-
- QScriptValue calleeData = context->callee().data();
- QPlainTextEdit *edit = qobject_cast<QPlainTextEdit*>(calleeData.toQObject());
- edit->appendPlainText(result);
-
- return engine->undefinedValue();
-}
-//! [45]
-
-//! [46]
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
-
- QScriptEngine eng;
- QPlainTextEdit edit;
-
- QScriptValue fun = eng.newFunction(myPrintFunction);
- fun.setData(eng.newQObject(&edit));
- eng.globalObject().setProperty("print", fun);
-
- eng.evaluate("print('hello', 'world')");
-
- edit.show();
- return app.exec();
-}
-//! [46]
-
-
-//! [47]
-QScriptEngine eng;
-QLineEdit *edit = new QLineEdit(...);
-QScriptValue handler = eng.evaluate("(function(text) { print('text was changed to', text); })");
-qScriptConnect(edit, SIGNAL(textChanged(const QString &)), QScriptValue(), handler);
-//! [47]
-
-//! [48]
-QLineEdit *edit1 = new QLineEdit(...);
-QLineEdit *edit2 = new QLineEdit(...);
-
-QScriptValue handler = eng.evaluate("(function() { print('I am', this.name); })");
-QScriptValue obj1 = eng.newObject();
-obj1.setProperty("name", "the walrus");
-QScriptValue obj2 = eng.newObject();
-obj2.setProperty("name", "Sam");
-
-qScriptConnect(edit1, SIGNAL(returnPressed()), obj1, handler);
-qScriptConnect(edit2, SIGNAL(returnPressed()), obj2, handler);
-//! [48]
-
-//! [49]
-var getProperty = function(name) { return this[name]; };
-
-name = "Global Object"; // creates a global variable
-print(getProperty("name")); // "Global Object"
-
-var myObject = { name: 'My Object' };
-print(getProperty.call(myObject, "name")); // "My Object"
-
-myObject.getProperty = getProperty;
-print(myObject.getProperty("name")); // "My Object"
-
-getProperty.name = "The getProperty() function";
-getProperty.getProperty = getProperty;
-getProperty.getProperty("name"); // "The getProperty() function"
-//! [49]
-
-//! [50]
-var o = { a: 1, b: 2, sum: function() { return a + b; } };
-print(o.sum()); // reference error, or sum of global variables a and b!!
-//! [50]
-
-//! [51]
-var o = { a: 1, b: 2, sum: function() { return this.a + this.b; } };
-print(o.sum()); // 3
-//! [51]
-
-//! [52]
-QScriptValue getProperty(QScriptContext *ctx, QScriptEngine *eng)
-{
- QString name = ctx->argument(0).toString();
- return ctx->thisObject().property(name);
-}
-//! [52]
-
-//! [53]
-QScriptValue myCompare(QScriptContext *ctx, QScriptEngine *eng)
-{
- double first = ctx->argument(0).toNumber();
- double second = ctx->argument(1).toNumber();
- int result;
- if (first == second)
- result = 0;
- else if (first < second)
- result = -1;
- else
- result = 1;
- return result;
-}
-//! [53]
-
-//! [54]
-QScriptEngine eng;
-QScriptValue comparefn = eng.newFunction(myCompare);
-QScriptValue array = eng.evaluate("new Array(10, 5, 20, 15, 30)");
-array.property("sort").call(array, QScriptValueList() << comparefn);
-
-// prints "5,10,15,20,30"
-qDebug() << array.toString();
-//! [54]
-
-//! [55]
-QScriptValue rectifier(QScriptContext *ctx, QScriptEngine *eng)
-{
- QRectF magicRect = qscriptvalue_cast<QRectF>(ctx->callee().data());
- QRectF sourceRect = qscriptvalue_cast<QRectF>(ctx->argument(0));
- return eng->toScriptValue(sourceRect.intersected(magicRect));
-}
-
-...
-
-QScriptValue fun = eng.newFunction(rectifier);
-QRectF magicRect = QRectF(10, 20, 30, 40);
-fun.setData(eng.toScriptValue(magicRect));
-eng.globalObject().setProperty("rectifier", fun);
-//! [55]
-
-//! [56]
-function add(a, b) {
- return a + b;
-}
-//! [56]
-
-//! [57]
-function add() {
- return arguments[0] + arguments[1];
-}
-//! [57]
-
-//! [58]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [58]
-
-//! [59]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- return arguments[0] + arguments[1];
-}
-//! [59]
-
-//! [60]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- if (typeof arguments[0] != "number")
- throw TypeError("add(): first argument is not a number");
- if (typeof arguments[1] != "number")
- throw TypeError("add(): second argument is not a number");
- return arguments[0] + arguments[1];
-}
-//! [60]
-
-//! [61]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- return Number(arguments[0]) + Number(arguments[1]);
-}
-//! [61]
-
-//! [62]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- if (ctx->argumentCount() != 2)
- return ctx->throwError("add() takes exactly two arguments");
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [62]
-
-//! [63]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- if (ctx->argumentCount() != 2)
- return ctx->throwError("add() takes exactly two arguments");
- if (!ctx->argument(0).isNumber())
- return ctx->throwError(QScriptContext::TypeError, "add(): first argument is not a number");
- if (!ctx->argument(1).isNumber())
- return ctx->throwError(QScriptContext::TypeError, "add(): second argument is not a number");
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [63]
-
-//! [64]
-function concat() {
- var result = "";
- for (var i = 0; i < arguments.length; ++i)
- result += String(arguments[i]);
- return result;
-}
-//! [64]
-
-//! [65]
-QScriptValue concat(QScriptContext *ctx, QScriptEngine *eng)
-{
- QString result = "";
- for (int i = 0; i < ctx->argumentCount(); ++i)
- result += ctx->argument(i).toString();
- return result;
-}
-//! [65]
-
-//! [66]
-function sort(comparefn) {
- if (comparefn == undefined)
- comparefn = /* the built-in comparison function */;
- else if (typeof comparefn != "function")
- throw TypeError("sort(): argument must be a function");
- ...
-}
-//! [66]
-
-//! [67]
-QScriptValue sort(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue comparefn = ctx->argument(0);
- if (comparefn.isUndefined())
- comparefn = /* the built-in comparison function */;
- else if (!comparefn.isFunction())
- return ctx->throwError(QScriptContext::TypeError, "sort(): argument is not a function");
- ...
-}
-//! [67]
-
-//! [68]
-function foo() {
- // Let bar() take care of this.
- print("calling bar() with " + arguments.length + "arguments");
- var result = return bar.apply(this, arguments);
- print("bar() returned" + result);
- return result;
-}
-//! [68]
-
-//! [69]
-QScriptValue foo(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue bar = eng->globalObject().property("bar");
- QScriptValue arguments = ctx->argumentsObject();
- qDebug() << "calling bar() with" << arguments.property("length").toInt32() << "arguments";
- QScriptValue result = bar.apply(ctx->thisObject(), arguments);
- qDebug() << "bar() returned" << result.toString();
- return result;
-}
-//! [69]
-
-//! [70]
-function counter() {
- var count = 0;
- return function() {
- return count++;
- }
-}
-//! [70]
-
-//! [71]
-var c1 = counter(); // create a new counter function
-var c2 = counter(); // create a new counter function
-print(c1()); // 0
-print(c1()); // 1
-print(c2()); // 0
-print(c2()); // 1
-//! [71]
-
-//! [72]
-QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue act = ctx->activationObject();
- act.setProperty("count", 0);
- QScriptValue result = eng->newFunction(counter_inner);
- result.setScope(act);
- return result;
-}
-//! [72]
-
-//! [73]
-QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue outerAct = ctx->callee().scope();
- double count = outerAct.property("count").toNumber();
- outerAct.setProperty("count", count+1);
- return count;
-}
-//! [73]
-
-//! [74]
-QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue act = ctx->activationObject();
- act.setProperty("count", 0);
- return eng->evaluate("(function() { return count++; })");
-}
-//! [74]
-
-//! [75]
-function Book(isbn) {
- this.isbn = isbn;
-}
-
-var coolBook1 = new Book("978-0131872493");
-var coolBook2 = new Book("978-1593271473");
-//! [75]
-
-//! [76]
-QScriptValue Person_ctor(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue object;
- if (ctx->isCalledAsConstructor()) {
- object = ctx->thisObject();
- } else {
- object = eng->newObject();
- object.setPrototype(ctx->callee().property("prototype"));
- }
- object.setProperty("name", ctx->argument(0));
- return object;
-}
-//! [76]
-
-//! [77]
-QScriptContext *ctx = eng.pushContext();
-QScriptValue act = ctx->activationObject();
-act.setProperty("digit", 7);
-
-qDebug() << eng.evaluate("digit + 1").toNumber(); // 8
-
-eng.popContext();
-//! [77]
-
-//! [78]
-QScriptValue getSet(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue obj = ctx->thisObject();
- QScriptValue data = obj.data();
- if (!data.isValid()) {
- data = eng->newObject();
- obj.setData(data);
- }
- QScriptValue result;
- if (ctx->argumentCount() == 1) {
- QString str = ctx->argument(0).toString();
- str.replace("Roberta", "Ken");
- result = str;
- data.setProperty("x", result);
- } else {
- result = data.property("x");
- }
- return result;
-}
-//! [78]
-
-//! [79]
-QScriptEngine eng;
-QScriptValue obj = eng.newObject();
-obj.setProperty("x", eng.newFunction(getSet),
- QScriptValue::PropertyGetter|QScriptValue::PropertySetter);
-//! [79]
-
-//! [80]
-obj.x = "Roberta sent me";
-print(obj.x); // "Ken sent me"
-obj.x = "I sent the bill to Roberta";
-print(obj.x); // "I sent the bill to Ken"
-//! [80]
-
-//! [81]
-obj = {};
-obj.__defineGetter__("x", function() { return this._x; });
-obj.__defineSetter__("x", function(v) { print("setting x to", v); this._x = v; });
-obj.x = 123;
-//! [81]
-
-//! [82]
-myButton.text = qsTr("Hello world!");
-//! [82]
-
-//! [83]
-myButton.text = qsTranslate("MyAwesomeScript", "Hello world!");
-//! [83]
-
-//! [84]
-FriendlyConversation.prototype.greeting = function(type)
-{
- if (FriendlyConversation['greeting_strings'] == undefined) {
- FriendlyConversation['greeting_strings'] = [
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- ];
- }
- return qsTr(FriendlyConversation.greeting_strings[type]);
-}
-//! [84]
-
-//! [85]
-FriendlyConversation.prototype.greeting = function(type)
-{
- if (FriendlyConversation['greeting_strings'] == undefined) {
- FriendlyConversation['greeting_strings'] = [
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
- ];
- }
- return qsTranslate("FriendlyConversation", FriendlyConversation.greeting_strings[type]);
-}
-//! [85]
-
-//! [86]
-FileCopier.prototype.showProgress = function(done, total, currentFileName)
-{
- this.label.text = qsTr("%1 of %2 files copied.\nCopying: %3")
- .arg(done)
- .arg(total)
- .arg(currentFileName));
-}
-//! [86]
-
//! [87]
lupdate myscript.qs -ts myscript_la.ts
//! [87]
@@ -925,64 +49,3 @@ lupdate -extensions qs scripts/ -ts scripts_la.ts
//! [89]
lrelease myscript_la.ts
//! [89]
-
-//! [90]
-({ unitName: "Celsius",
- toKelvin: function(x) { return x + 273; }
- })
-//! [90]
-
-//! [91]
-QScriptValue object = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })");
-QScriptValue toKelvin = object.property("toKelvin");
-QScriptValue result = toKelvin.call(object, QScriptValueList() << 100);
-qDebug() << result.toNumber(); // 373
-//! [91]
-
-//! [92]
-QScriptValue add = engine.globalObject().property("add");
-qDebug() << add.call(QScriptValue(), QScriptValueList() << 1 << 2).toNumber(); // 3
-//! [92]
-
-//! [93]
-typedef QSharedPointer<QXmlStreamReader> XmlStreamReaderPointer;
-
-Q_DECLARE_METATYPE(XmlStreamReaderPointer)
-
-QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *engine)
-{
- if (!context->isCalledAsConstructor())
- return context->throwError(QScriptContext::SyntaxError, "please use the 'new' operator");
-
- QIODevice *device = qobject_cast<QIODevice*>(context->argument(0).toQObject());
- if (!device)
- return context->throwError(QScriptContext::TypeError, "please supply a QIODevice as first argument");
-
- // Create the C++ object
- QXmlStreamReader *reader = new QXmlStreamReader(device);
-
- XmlStreamReaderPointer pointer(reader);
-
- // store the shared pointer in the script object that we are constructing
- return engine->newVariant(context->thisObject(), qVariantFromValue(pointer));
-}
-//! [93]
-
-//! [94]
-QScriptValue xmlStreamReader_atEnd(QScriptContext *context, QScriptEngine *)
-{
- XmlStreamReaderPointer reader = qscriptvalue_cast<XmlStreamReaderPointer>(context->thisObject());
- if (!reader)
- return context->throwError(QScriptContext::TypeError, "this object is not an XmlStreamReader");
- return reader->atEnd();
-}
-//! [94]
-
-//! [95]
- QScriptEngine engine;
- QScriptValue xmlStreamReaderProto = engine.newObject();
- xmlStreamReaderProto.setProperty("atEnd", engine.newFunction(xmlStreamReader_atEnd));
-
- QScriptValue xmlStreamReaderCtor = engine.newFunction(constructXmlStreamReader, xmlStreamReaderProto);
- engine.globalObject().setProperty("XmlStreamReader", xmlStreamReaderCtor);
-//! [95]
diff --git a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc b/doc/src/snippets/code/doc_src_qtscriptextensions.js
index 456077db48..456077db48 100644
--- a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc
+++ b/doc/src/snippets/code/doc_src_qtscriptextensions.js
diff --git a/doc/src/snippets/code/doc_src_qtscripttools.cpp b/doc/src/snippets/code/doc_src_qtscripttools.cpp
new file mode 100644
index 0000000000..258c7dfcf1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscripttools.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtScriptTools>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtscripttools.pro b/doc/src/snippets/code/doc_src_qtscripttools.pro
new file mode 100644
index 0000000000..e87644d100
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscripttools.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += scripttools
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsql.qdoc b/doc/src/snippets/code/doc_src_qtsql.cpp
index 1bc7518e64..9c0c16e14b 100644
--- a/doc/src/snippets/code/doc_src_qtsql.qdoc
+++ b/doc/src/snippets/code/doc_src_qtsql.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtSql>
//! [0]
-
-
-//! [1]
-QT += sql
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsql.pro b/doc/src/snippets/code/doc_src_qtsql.pro
new file mode 100644
index 0000000000..4e31846735
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsql.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += sql
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsvg.qdoc b/doc/src/snippets/code/doc_src_qtsvg.cpp
index 57db6dee8d..c66b4da122 100644
--- a/doc/src/snippets/code/doc_src_qtsvg.qdoc
+++ b/doc/src/snippets/code/doc_src_qtsvg.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtSvg>
//! [0]
-
-
-//! [1]
-QT += svg
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsvg.pro b/doc/src/snippets/code/doc_src_qtsvg.pro
new file mode 100644
index 0000000000..1a75d03c9e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsvg.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += svg
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qttest.qdoc b/doc/src/snippets/code/doc_src_qttest.cpp
index 354d188704..5b21c9e098 100644
--- a/doc/src/snippets/code/doc_src_qttest.qdoc
+++ b/doc/src/snippets/code/doc_src_qttest.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtTest>
//! [0]
-
-
-//! [1]
-CONFIG += qtestlib
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qttest.pro b/doc/src/snippets/code/doc_src_qttest.pro
new file mode 100644
index 0000000000..73d210ee81
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qttest.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+CONFIG += qtestlib
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtuiloader.qdoc b/doc/src/snippets/code/doc_src_qtuiloader.cpp
index b8d8019d2a..de35e7837c 100644
--- a/doc/src/snippets/code/doc_src_qtuiloader.qdoc
+++ b/doc/src/snippets/code/doc_src_qtuiloader.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-CONFIG += uitools
-//! [0]
-
-
//! [1]
#include <QtUiTools>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtuiloader.pro b/doc/src/snippets/code/doc_src_qtuiloader.pro
new file mode 100644
index 0000000000..a050213049
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtuiloader.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [0]
+CONFIG += uitools
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxml.cpp b/doc/src/snippets/code/doc_src_qtxml.cpp
new file mode 100644
index 0000000000..5413fd2ccf
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxml.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtXml>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxml.pro b/doc/src/snippets/code/doc_src_qtxml.pro
new file mode 100644
index 0000000000..d69b2ceadd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxml.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#! [1]
+QT += xml
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtxml.qdoc b/doc/src/snippets/code/doc_src_qtxml.qdoc
index 6576815197..1e864eacd7 100644
--- a/doc/src/snippets/code/doc_src_qtxml.qdoc
+++ b/doc/src/snippets/code/doc_src_qtxml.qdoc
@@ -38,21 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtXml>
-//! [0]
-
-
-//! [1]
-QT += xml
-//! [1]
-
-
-//! [2]
-QT += xml
-//! [2]
-
-
//! [3]
<quote>A quotation.</quote>
//! [3]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp b/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp
new file mode 100644
index 0000000000..2c3235ca5a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+
+//! [0]
+#include <QtXmlPatterns>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.pro b/doc/src/snippets/code/doc_src_qtxmlpatterns.pro
new file mode 100644
index 0000000000..61ee910174
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.pro
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+
+#! [1]
+QT += xmlpatterns
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
index 560cc53876..22e2dde23e 100644
--- a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
@@ -42,15 +42,6 @@
void wrapInFunction()
{
-//! [0]
-#include <QtXmlPatterns>
-//! [0]
-
-
-//! [1]
-QT += xmlpatterns
-//! [1]
-
//! [2]
xmlpatterns myQuery.xq
//! [2]
diff --git a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
index a9383301f5..a9383301f5 100644
--- a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc
+++ b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/code/doc_src_resources.cpp
index 81ad3334a1..b965cbeb29 100644
--- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml
+++ b/doc/src/snippets/code/doc_src_resources.cpp
@@ -38,16 +38,17 @@
**
****************************************************************************/
-//! [document]
-import QtQuick 1.0
+//! [4]
+QResource::registerResource("/path/to/myresource.rcc");
+//! [4]
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
- Text { text: "Hello World!" }
-
- color: "lightgray"
+//! [5]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(graphlib);
+ ...
+ return app.exec();
}
-//! [document]
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/doc/src/snippets/code/doc_src_resources.qdoc
index c524ae7213..0b727da461 100644
--- a/doc/src/snippets/code/doc_src_resources.qdoc
+++ b/doc/src/snippets/code/doc_src_resources.qdoc
@@ -63,19 +63,3 @@
//! [3]
rcc -binary myresource.qrc -o myresource.rcc
//! [3]
-
-
-//! [4]
-QResource::registerResource("/path/to/myresource.rcc");
-//! [4]
-
-
-//! [5]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- Q_INIT_RESOURCE(graphlib);
- ...
- return app.exec();
-}
-//! [5]
diff --git a/doc/src/snippets/code/doc_src_richtext.cpp b/doc/src/snippets/code/doc_src_richtext.cpp
new file mode 100644
index 0000000000..8de5f4ca68
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_richtext.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [0]
+QTextDocument *newDocument = new QTextDocument;
+//! [0]
+
+
+//! [1]
+QTextEdit *editor = new QTextEdit;
+QTextDocument *editorDocument = editor->document();
+//! [1]
+
+
+//! [2]
+QTextEdit *editor = new QTextEdit(parent);
+editor->setHtml(aStringContainingHTMLtext);
+editor->show();
+//! [2]
+
+
+//! [3]
+QTextDocument *document = editor->document();
+//! [3]
+
+
+//! [4]
+QTextCursor cursor = editor->textCursor();
+//! [4]
+
+
+//! [5]
+editor->setTextCursor(cursor);
+//! [5]
+
+
+//! [6]
+textEdit.show();
+
+textCursor.beginEditBlock();
+
+for (int i = 0; i < 1000; ++i) {
+ textCursor.insertBlock();
+ textCursor.insertText(paragraphText.at(i));
+}
+
+textCursor.endEditBlock();
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_richtext.qdoc b/doc/src/snippets/code/doc_src_richtext.qdoc
index e031d77ca7..2b79fdbc09 100644
--- a/doc/src/snippets/code/doc_src_richtext.qdoc
+++ b/doc/src/snippets/code/doc_src_richtext.qdoc
@@ -38,53 +38,6 @@
**
****************************************************************************/
-//! [0]
-QTextDocument *newDocument = new QTextDocument;
-//! [0]
-
-
-//! [1]
-QTextEdit *editor = new QTextEdit;
-QTextDocument *editorDocument = editor->document();
-//! [1]
-
-
-//! [2]
-QTextEdit *editor = new QTextEdit(parent);
-editor->setHtml(aStringContainingHTMLtext);
-editor->show();
-//! [2]
-
-
-//! [3]
-QTextDocument *document = editor->document();
-//! [3]
-
-
-//! [4]
-QTextCursor cursor = editor->textCursor();
-//! [4]
-
-
-//! [5]
-editor->setTextCursor(cursor);
-//! [5]
-
-
-//! [6]
-textEdit.show();
-
-textCursor.beginEditBlock();
-
-for (int i = 0; i < 1000; ++i) {
- textCursor.insertBlock();
- textCursor.insertText(paragraphText.at(i));
-}
-
-textCursor.endEditBlock();
-//! [6]
-
-
//! [7]
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
//! [7]
diff --git a/doc/src/snippets/code/doc_src_sql-driver.cpp b/doc/src/snippets/code/doc_src_sql-driver.cpp
new file mode 100644
index 0000000000..56e4f9bcdb
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_sql-driver.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [2]
+QSqlQuery q;
+q.exec("call qtestproc (@outval1, @outval2)");
+q.exec("select @outval1, @outval2");
+q.next();
+qDebug() << q.value(0) << q.value(1); // outputs "42" and "43"
+//! [2]
+
+
+//! [10]
+// STORED_PROC uses the return statement or returns multiple result sets
+QSqlQuery query;
+query.setForwardOnly(true);
+query.exec("{call STORED_PROC}");
+//! [10]
+
+
+//! [24]
+db.setHostName("MyServer");
+db.setDatabaseName("C:\\test.gdb");
+//! [24]
+
+
+//! [25]
+// connect to database using the Latin-1 character set
+db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1");
+db.open();
+//! [25]
+
+
+//! [26]
+QSqlQuery q;
+q.exec("execute procedure my_procedure");
+q.next();
+qDebug() << q.value(0); // outputs the first RETURN/OUT value
+//! [26]
+
+
+//! [31]
+QSqlDatabase: QMYSQL driver not loaded
+QSqlDatabase: available drivers: QMYSQL
+//! [31]
diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc
index 482e38ce0a..46cd1b3f3e 100644
--- a/doc/src/snippets/code/doc_src_sql-driver.qdoc
+++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc
@@ -59,15 +59,6 @@ END
//! [1]
-//! [2]
-QSqlQuery q;
-q.exec("call qtestproc (@outval1, @outval2)");
-q.exec("select @outval1, @outval2");
-q.next();
-qDebug() << q.value(0) << q.value(1); // outputs "42" and "43"
-//! [2]
-
-
//! [3]
cd $QTDIR/src/plugins/sqldrivers/mysql
qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
@@ -116,14 +107,6 @@ set PATH=%PATH%;c:\oracle\bin
//! [9]
-//! [10]
-\\ STORED_PROC uses the return statement or returns multiple result sets
-QSqlQuery query;
-query.setForwardOnly(true);
-query.exec("{call STORED_PROC}");
-//! [10]
-
-
//! [11]
cd $QTDIR/src/plugins/sqldrivers/odbc
qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
@@ -212,27 +195,6 @@ nmake
//! [23]
-//! [24]
-db.setHostName("MyServer");
-db.setDatabaseName("C:\\test.gdb");
-//! [24]
-
-
-//! [25]
-// connect to database using the Latin-1 character set
-db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1");
-db.open();
-//! [25]
-
-
-//! [26]
-QSqlQuery q;
-q.exec("execute procedure my_procedure");
-q.next();
-qDebug() << q.value(0); // outputs the first RETURN/OUT value
-//! [26]
-
-
//! [27]
cd $QTDIR/src/plugins/sqldrivers/ibase
qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro
@@ -261,11 +223,6 @@ nmake
//! [30]
-//! [31]
-QSqlDatabase: QMYSQL driver not loaded
-QSqlDatabase: available drivers: QMYSQL
-//! [31]
-
//! [32]
configure -I /usr/include/oracle/10.1.0.3/client -L /usr/lib/oracle/10.1.0.3/client/lib -R /usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10
make
@@ -276,4 +233,3 @@ cd $QTDIR/src/plugins/sqldrivers/oci
qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib -Wl,-rpath,/usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10" oci.pro
make
//! [33]
-
diff --git a/doc/src/snippets/code/doc_src_styles.qdoc b/doc/src/snippets/code/doc_src_styles.cpp
index a2a6fa9694..a2a6fa9694 100644
--- a/doc/src/snippets/code/doc_src_styles.qdoc
+++ b/doc/src/snippets/code/doc_src_styles.cpp
diff --git a/doc/src/snippets/code/doc_src_stylesheet.cpp b/doc/src/snippets/code/doc_src_stylesheet.cpp
new file mode 100644
index 0000000000..3faaf2d037
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_stylesheet.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [21]
+qApp->setStyleSheet("QPushButton { color: white }");
+//! [21]
+
+
+//! [22]
+myPushButton->setStyleSheet("* { color: blue }");
+//! [22]
+
+
+//! [23]
+myPushButton->setStyleSheet("color: blue");
+//! [23]
+
+
+//! [24]
+qApp->setStyleSheet("QGroupBox { color: red; } ");
+//! [24]
+
+//! [25]
+qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
+//! [25]
+
+
+//! [26]
+class MyPushButton : public QPushButton {
+ // ...
+}
+
+// ...
+qApp->setStyleSheet("MyPushButton { background: yellow; }");
+//! [26]
+
+
+//! [27]
+namespace ns {
+ class MyPushButton : public QPushButton {
+ // ...
+ }
+}
+
+// ...
+qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
+//! [27]
+
+
+//! [32]
+void CustomWidget::paintEvent(QPaintEvent *)
+{
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}
+//! [32]
+
+
+//! [88]
+qApp->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [88]
+
+
+//! [89]
+myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [89]
+
+
+//! [90]
+myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
+//! [90]
+
+
+//! [91]
+nameEdit->setStyleSheet("background-color: yellow");
+//! [91]
+
+
+//! [92]
+nameEdit->setStyleSheet("color: blue; background-color: yellow");
+//! [92]
+
+
+//! [93]
+nameEdit->setStyleSheet("color: blue;"
+ "background-color: yellow;"
+ "selection-color: yellow;"
+ "selection-background-color: blue;");
+//! [93]
+
+
+//! [95]
+QLineEdit *nameEdit = new QLineEdit(this);
+nameEdit->setProperty("mandatoryField", true);
+
+QLineEdit *emailEdit = new QLineEdit(this);
+emailEdit->setProperty("mandatoryField", true);
+
+QSpinBox *ageSpinBox = new QSpinBox(this);
+ageSpinBox->setProperty("mandatoryField", true);
+//! [95]
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
index 9b8a3b5e6f..99b31c9387 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
+++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
@@ -170,53 +170,6 @@ LI.red.level {} /* a=0 b=2 c=1 -> specificity = 21 */
//! [20]
-//! [21]
-qApp->setStyleSheet("QPushButton { color: white }");
-//! [21]
-
-
-//! [22]
-myPushButton->setStyleSheet("* { color: blue }");
-//! [22]
-
-
-//! [23]
-myPushButton->setStyleSheet("color: blue");
-//! [23]
-
-
-//! [24]
-qApp->setStyleSheet("QGroupBox { color: red; } ");
-//! [24]
-
-
-//! [25]
-qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
-//! [25]
-
-
-//! [26]
-class MyPushButton : public QPushButton {
- // ...
-}
-
-// ...
-qApp->setStyleSheet("MyPushButton { background: yellow; }");
-//! [26]
-
-
-//! [27]
-namespace ns {
- class MyPushButton : public QPushButton {
- // ...
- }
-}
-
-// ...
-qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
-//! [27]
-
-
//! [28]
MyLabel { qproperty-pixmap: url(pixmap.png); }
MyGroupBox { qproperty-titleColor: rgb(100, 200, 100); }
@@ -234,17 +187,6 @@ QToolButton { background-color: red; border: none; }
//! [31]
-//! [32]
-void CustomWidget::paintEvent(QPaintEvent *)
-{
- QStyleOption opt;
- opt.init(this);
- QPainter p(this);
- style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
-}
-//! [32]
-
-
//! [33]
QTreeView {
alternate-background-color: blue;
@@ -617,56 +559,11 @@ QPushButton { color: palette(dark); }
//! [87]
-//! [88]
-qApp->setStyleSheet("QLineEdit { background-color: yellow }");
-//! [88]
-
-
-//! [89]
-myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
-//! [89]
-
-
-//! [90]
-myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
-//! [90]
-
-
-//! [91]
-nameEdit->setStyleSheet("background-color: yellow");
-//! [91]
-
-
-//! [92]
-nameEdit->setStyleSheet("color: blue; background-color: yellow");
-//! [92]
-
-
-//! [93]
-nameEdit->setStyleSheet("color: blue;"
- "background-color: yellow;"
- "selection-color: yellow;"
- "selection-background-color: blue;");
-//! [93]
-
-
//! [94]
*[mandatoryField="true"] { background-color: yellow }
//! [94]
-//! [95]
-QLineEdit *nameEdit = new QLineEdit(this);
-nameEdit->setProperty("mandatoryField", true);
-
-QLineEdit *emailEdit = new QLineEdit(this);
-emailEdit->setProperty("mandatoryField", true);
-
-QSpinBox *ageSpinBox = new QSpinBox(this);
-ageSpinBox->setProperty("mandatoryField", true);
-//! [95]
-
-
//! [96]
QPushButton#evilButton { background-color: red }
//! [96]
diff --git a/doc/src/snippets/code/doc_src_unicode.qdoc b/doc/src/snippets/code/doc_src_unicode.cpp
index 4415cf243e..4415cf243e 100644
--- a/doc/src/snippets/code/doc_src_unicode.qdoc
+++ b/doc/src/snippets/code/doc_src_unicode.cpp
diff --git a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
index fd5f38631a..fd5f38631a 100644
--- a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc
+++ b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
diff --git a/doc/src/snippets/declarative/animation-behavioral.qml b/doc/src/snippets/code/doc_src_wince-customization.cpp
index 93cf2fa102..90c2207165 100644
--- a/doc/src/snippets/declarative/animation-behavioral.qml
+++ b/doc/src/snippets/code/doc_src_wince-customization.cpp
@@ -37,25 +37,22 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-Item {
- width: 100; height: 100
+//! [9]
+wchar_t* libraries[] = {
+ L"QtCore4.dll",
+ L"QtGui4.dll",
+ 0
+};
- Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- Behavior on x { PropertyAnimation { duration: 500 } }
- Behavior on y { PropertyAnimation { duration: 500 } }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { rect.x = mouse.x; rect.y = mouse.y }
+for (int i = 0; libraries[i] != 0; ++i) {
+ HINSTANCE instance = LoadLibraryW(libraries[i]);
+ OutputDebugStringW(libraries[i]);
+ if (instance != NULL) {
+ OutputDebugStringW(L" : Successfully instantiated\n");
+ FreeLibrary(instance);
+ } else {
+ OutputDebugStringW(L" : Could not be loaded\n");
}
}
-//![0]
-
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_wince-customization.qdoc b/doc/src/snippets/code/doc_src_wince-customization.qdoc
index 657786ff20..ab0922239c 100644
--- a/doc/src/snippets/code/doc_src_wince-customization.qdoc
+++ b/doc/src/snippets/code/doc_src_wince-customization.qdoc
@@ -89,22 +89,3 @@ if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
DEFINES -= _M_ARM
}
//! [8]
-
-//! [9]
-wchar_t* libraries[] = {
- L"QtCore4.dll",
- L"QtGui4.dll",
- 0
-};
-
-for (int i = 0; libraries[i] != 0; ++i) {
- HINSTANCE instance = LoadLibraryW(libraries[i]);
- OutputDebugStringW(libraries[i]);
- if (instance != NULL) {
- OutputDebugStringW(L" : Successfully instantiated\n");
- FreeLibrary(instance);
- } else {
- OutputDebugStringW(L" : Could not be loaded\n");
- }
-}
-//! [9]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
index 7a752b1df0..86bad5e825 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
@@ -43,7 +43,7 @@ void wrapInFunction()
{
//! [0]
-class MyClass
+class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/doc/src/snippets/code/src_gui_painting_qpen.cpp
index 6973e0c60a..8674516fbc 100644
--- a/doc/src/snippets/code/src_gui_painting_qpen.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpen.cpp
@@ -47,7 +47,7 @@ painter.setPen(pen);
//! [1]
QPainter painter(this);
-QPen pen(); // creates a default pen
+QPen pen; // creates a default pen
pen.setStyle(Qt::DashDotLine);
pen.setWidth(3);
diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/Button.qml
index 2c4ce11ed6..214dfea1af 100644
--- a/doc/src/snippets/declarative/qml-intro/anchors2.qml
+++ b/doc/src/snippets/declarative/Button.qml
@@ -41,18 +41,27 @@
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: myWin
- width: 500
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
- }
+//! [parent begin]
+
+//! [property alias]
+property alias buttonLabel: label.text
+Text {
+ id: label
+ text: "empty label"
+}
+ //! [property alias]
+
+//! [id alias]
+ property alias buttonImage: image
+
+ Image {id: image}
+//! [id alias]
+//! [parent end]
}
+//! [parent end]
+
//! [document]
+
+
diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/declarative/animation.qml
new file mode 100644
index 0000000000..ae6142d69d
--- /dev/null
+++ b/doc/src/snippets/declarative/animation.qml
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//! [document]
+import QtQuick 1.0
+
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 200; height: 600
+ id: screen
+
+Column {
+ spacing: 12
+//! [direct property change]
+Rectangle {
+ id: blob
+ width: 75; height: 75
+ color: "blue"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: blob.color = "green"
+ }
+}
+//! [direct property change]
+
+//! [property animation]
+Rectangle {
+ id: flashingblob
+ width: 75; height: 75
+ color: "blue"
+ opacity: 1.0
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ animateColor.start()
+ animateOpacity.start()
+ }
+ }
+
+ PropertyAnimation {id: animateColor; target: flashingblob; properties: "color"; to: "green"; duration: 100}
+
+ NumberAnimation {
+ id: animateOpacity
+ target: flashingblob
+ properties: "opacity"
+ from: 0.99
+ to: 1.0
+ loops: Animation.Infinite
+ easing {type: Easing.OutBack; overshoot: 500}
+ }
+}
+//! [property animation]
+
+//! [transition animation]
+Rectangle {
+ width: 75; height: 75
+ id: button
+ state: "RELEASED"
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: button.state = "PRESSED"
+ onReleased: button.state = "RELEASED"
+ }
+
+ states: [
+ State {
+ name: "PRESSED"
+ PropertyChanges { target: button; color: "lightblue"}
+ },
+ State {
+ name: "RELEASED"
+ PropertyChanges { target: button; color: "lightsteelblue"}
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "PRESSED"
+ to: "RELEASED"
+ ColorAnimation { target: button; duration: 100}
+ },
+ Transition {
+ from: "RELEASED"
+ to: "PRESSED"
+ ColorAnimation { target: button; duration: 100}
+ }
+ ]
+}
+//! [transition animation]
+
+Rectangle {
+ width: 75; height: 75
+ id: wildcard
+ color: "green"
+//! [wildcard animation]
+ transitions:
+ Transition {
+ to: "*"
+ ColorAnimation { target: button; duration: 100}
+ }
+//! [wildcard animation]
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ ball.x = 10
+ ball.color = "red"
+ }
+ onReleased: {
+ ball.x = screen.width / 2
+ ball.color = "salmon"
+ }
+ }
+}
+
+//! [behavior animation]
+Rectangle {
+ width: 75; height: 75; radius: width
+ id: ball
+ color: "salmon"
+
+ Behavior on x {
+ NumberAnimation {
+ id: bouncebehavior
+ easing {
+ type: Easing.OutElastic
+ amplitude: 1.0
+ period: 0.5
+ }
+ }
+ }
+ Behavior on y {
+ animation: bouncebehavior
+ }
+ Behavior {
+ ColorAnimation { target: ball; duration: 100 }
+ }
+}
+//! [behavior animation]
+
+//! [sequential animation]
+Rectangle {
+ id: banner
+ width: 150; height: 100; border.color: "black"
+
+ Column {
+ anchors.centerIn: parent
+ Text {
+ id: code
+ text: "Code less."
+ opacity: 0.01
+ }
+ Text {
+ id: create
+ text: "Create more."
+ opacity: 0.01
+ }
+ Text {
+ id: deploy
+ text: "Deploy everywhere."
+ opacity: 0.01
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: playbanner.start()
+ }
+
+ SequentialAnimation {
+ id: playbanner
+ running: false
+ NumberAnimation { target: code; property: "opacity"; to: 1.0; duration: 200}
+ NumberAnimation { target: create; property: "opacity"; to: 1.0; duration: 200}
+ NumberAnimation { target: deploy; property: "opacity"; to: 1.0; duration: 200}
+ }
+}
+//! [sequential animation]
+
+}//end of col
+//! [parent end]
+}
+//! [parent end]
+
+//! [document]
diff --git a/doc/src/snippets/declarative/animation-propertyvaluesource.qml b/doc/src/snippets/declarative/bestpractices/group.qml
index 6f93967984..8a2b398edf 100644
--- a/doc/src/snippets/declarative/animation-propertyvaluesource.qml
+++ b/doc/src/snippets/declarative/bestpractices/group.qml
@@ -37,15 +37,40 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+
+
+//! [document]
import QtQuick 1.0
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 175; height: 175; color: "white"
+
+Rectangle{
+width: 170; height: 170
+//! [not grouped]
+border.width: 1
+border.color: "red"
+anchors.bottom: parent.bottom
+anchors.left: parent.left
+//! [not grouped]
+}
Rectangle {
width: 100; height: 100
+
+//! [grouped]
+border {
+ width: 1;
color: "red"
-
- PropertyAnimation on x { to: 50; duration: 1000; loops: Animation.Infinite }
- PropertyAnimation on y { to: 50; duration: 1000; loops: Animation.Infinite }
}
-//![0]
-
+anchors {
+ bottom: parent.bottom;
+ left: parent.left
+}
+//! [grouped]
+}
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/events.qml b/doc/src/snippets/declarative/events.qml
new file mode 100644
index 0000000000..3dc44f20eb
--- /dev/null
+++ b/doc/src/snippets/declarative/events.qml
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//![document]
+import QtQuick 1.0
+
+//![parent begin]
+Rectangle {
+//![parent begin]
+
+ id: screen
+ width: 400; height: 500
+
+//! [signal declaration]
+ signal trigger
+ signal send (string notice)
+ signal perform (string task, variant object)
+//! [signal declaration]
+
+//! [signal handler declaration]
+onTrigger: console.log("trigger signal emitted")
+
+onSend: {
+ console.log("send signal emitted with notice: " + notice)
+}
+
+onPerform: console.log("perform signal emitted")
+//! [signal handler declaration]
+
+//! [automatic signals]
+Rectangle {
+ id: sprite
+ width: 25; height: 25
+ x: 50; y: 15
+
+ onXChanged: console.log("x property changed, emitted xChanged signal")
+ onYChanged: console.log("y property changed, emitted yChanged signal")
+}
+//! [automatic signals]
+
+//! [signal emit]
+Rectangle {
+ id: messenger
+
+ signal send( string person, string notice)
+
+ onSend: {
+ console.log("For " + person + ", the notice is: " + notice)
+ }
+
+ Component.onCompleted: messenger.send("Tom", "the door is ajar.")
+}
+//! [signal emit]
+
+//! [connect method]
+Rectangle {
+ id: relay
+
+ signal send( string person, string notice)
+ onSend: console.log("Send signal to: " + person + ", " + notice)
+
+ Component.onCompleted: {
+ relay.send.connect(sendToPost)
+ relay.send.connect(sendToTelegraph)
+ relay.send.connect(sendToEmail)
+ relay.send("Tom", "Happy Birthday")
+ }
+
+ function sendToPost(person, notice) {
+ console.log("Sending to post: " + person + ", " + notice)
+ }
+ function sendToTelegraph(person, notice) {
+ console.log("Sending to telegraph: " + person + ", " + notice)
+ }
+ function sendToEmail(person, notice) {
+ console.log("Sending to email: " + person + ", " + notice)
+ }
+}
+//! [connect method]
+
+//! [forward signal]
+Rectangle {
+ id: forwarder
+ width: 100; height: 100
+
+ signal send()
+ onSend: console.log("Send clicked")
+
+ MouseArea {
+ id: mousearea
+ anchors.fill: parent
+ onClicked: console.log("MouseArea clicked")
+ }
+ Component.onCompleted: {
+ mousearea.clicked.connect(send)
+ }
+}
+//! [forward signal]
+
+//! [connect method]
+//![parent end]
+}
+//![parent end]
+
+//![document]
diff --git a/doc/src/snippets/declarative/focus/advancedFocus.qml b/doc/src/snippets/declarative/focus/advancedFocus.qml
index fda37c1f4c..409663b22c 100644
--- a/doc/src/snippets/declarative/focus/advancedFocus.qml
+++ b/doc/src/snippets/declarative/focus/advancedFocus.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
diff --git a/doc/src/snippets/declarative/focus/basicwidget.qml b/doc/src/snippets/declarative/focus/basicwidget.qml
index b74c1cd522..bf834b493e 100644
--- a/doc/src/snippets/declarative/focus/basicwidget.qml
+++ b/doc/src/snippets/declarative/focus/basicwidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
diff --git a/doc/src/snippets/declarative/focus/focusscopewidget.qml b/doc/src/snippets/declarative/focus/focusscopewidget.qml
index 7421a63067..6a97512150 100644
--- a/doc/src/snippets/declarative/focus/focusscopewidget.qml
+++ b/doc/src/snippets/declarative/focus/focusscopewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
@@ -37,6 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [focusscope window]
@@ -59,3 +60,4 @@ Rectangle {
}
//! [focusscope window]
+//! [document]
diff --git a/doc/src/snippets/declarative/focus/myclickablewidget.qml b/doc/src/snippets/declarative/focus/myclickablewidget.qml
index 4777dd1298..30b1c699c9 100644
--- a/doc/src/snippets/declarative/focus/myclickablewidget.qml
+++ b/doc/src/snippets/declarative/focus/myclickablewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
index c87a47e357..6462301a3f 100644
--- a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
+++ b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
@@ -37,12 +37,13 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [widget in focusscope]
FocusScope {
- //FocusScope needs to bind to visual properties of the children
+ //FocusScope needs to bind to visual properties of the Rectangle
property alias color: rectangle.color
x: rectangle.x; y: rectangle.y
width: rectangle.width; height: rectangle.height
@@ -64,3 +65,4 @@ FocusScope {
}
}
//! [widget in focusscope]
+//! [document]
diff --git a/doc/src/snippets/declarative/focus/mywidget.qml b/doc/src/snippets/declarative/focus/mywidget.qml
index 86d2d0f509..0cca7479e8 100644
--- a/doc/src/snippets/declarative/focus/mywidget.qml
+++ b/doc/src/snippets/declarative/focus/mywidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
@@ -37,10 +37,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [mywidget]
-//MyWidget code
Rectangle {
id: widget
color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
diff --git a/doc/src/snippets/declarative/focus/widget.qml b/doc/src/snippets/declarative/focus/widget.qml
index a5053d91a7..a3a726eac5 100644
--- a/doc/src/snippets/declarative/focus/widget.qml
+++ b/doc/src/snippets/declarative/focus/widget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** 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:
diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid-spacing.qml
index 8914ce31ab..8914ce31ab 100644
--- a/doc/src/snippets/declarative/grid/grid-spacing.qml
+++ b/doc/src/snippets/declarative/grid-spacing.qml
diff --git a/doc/src/snippets/code/doc_src_phonon.qdoc b/doc/src/snippets/declarative/imports/best-practices.qml
index 61ee189134..17e5b7abab 100644
--- a/doc/src/snippets/code/doc_src_phonon.qdoc
+++ b/doc/src/snippets/declarative/imports/best-practices.qml
@@ -38,16 +38,12 @@
**
****************************************************************************/
-//! [0]
-QT += phonon
-//! [0]
+//! [imports]
+import QtQuick 1.0
+import QtWebKit 1.0
+import "subdirectory"
+import "script.js"
+//! [imports]
-
-//! [1]
-QT += phonon
-//! [1]
-
-
-//! [2]
-#include <Phonon/MediaObject>
-//! [2]
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/chart.qml b/doc/src/snippets/declarative/imports/chart.qml
new file mode 100644
index 0000000000..6de02c1f3d
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/chart.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [import]
+import Charts 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/installed-module.qml b/doc/src/snippets/declarative/imports/installed-module.qml
new file mode 100644
index 0000000000..288bdd3773
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/installed-module.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [imports]
+import QtQuick 1.0
+import com.nokia.qml.mymodule 1.0
+//! [imports]
+
+Item {
+}
diff --git a/doc/src/snippets/code/doc.src.qtscripttools.qdoc b/doc/src/snippets/declarative/imports/merged-named-imports.qml
index 76840b3c77..366e76ec96 100644
--- a/doc/src/snippets/code/doc.src.qtscripttools.qdoc
+++ b/doc/src/snippets/declarative/imports/merged-named-imports.qml
@@ -38,11 +38,10 @@
**
****************************************************************************/
-//! [0]
- #include <QtScriptTools>
-//! [0]
+//! [imports]
+import QtQuick 1.0 as Nokia
+import Ovi 1.0 as Nokia
+//! [imports]
-
-//! [1]
- QT += scripttools
-//! [1]
+Item {
+}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/imports/named-imports.qml
index 832e37d924..a8fa743ddf 100644
--- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml
+++ b/doc/src/snippets/declarative/imports/named-imports.qml
@@ -38,24 +38,24 @@
**
****************************************************************************/
-import QtQuick 1.0
+//! [imports]
+import QtQuick 1.0 as QtLibrary
+import "../MyComponents" as MyComponents
+import com.nokia.qml.mymodule 1.0 as MyModule
+//! [imports]
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
- Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
+Item {
+ //! [imported items]
+ QtLibrary.Rectangle {
+ // ...
}
-//! [added an image]
- Image {
- source: "images/qt-logo.svg"
+ MyComponents.Slider {
+ // ...
}
-//! [added an image]
- color: "lightgray"
+ MyModule.SomeComponent {
+ // ...
+ }
+ //! [imported items]
}
diff --git a/doc/src/snippets/declarative/imports/network-imports.qml b/doc/src/snippets/declarative/imports/network-imports.qml
new file mode 100644
index 0000000000..54e177abef
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/network-imports.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [imports]
+import "http://www.my-server.com/MyQMLProject/MyComponents"
+import "http://www.my-server.com/MyQMLProject/MyComponents" 1.0
+//! [imports]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/qtquick-1.0.qml b/doc/src/snippets/declarative/imports/qtquick-1.0.qml
new file mode 100644
index 0000000000..e2a642d013
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/qtquick-1.0.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [import]
+import QtQuick 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/timeexample.qml b/doc/src/snippets/declarative/imports/timeexample.qml
new file mode 100644
index 0000000000..24eafd738e
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/timeexample.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [import]
+import com.nokia.TimeExample 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/listview-decorations.qml b/doc/src/snippets/declarative/listview-decorations.qml
new file mode 100644
index 0000000000..9ba9b70d2e
--- /dev/null
+++ b/doc/src/snippets/declarative/listview-decorations.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [document]
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 550; height: 220; color: "white"
+
+//! [model]
+ListModel {
+ id: nameModel
+ ListElement { name: "Alice" }
+ ListElement { name: "Bob" }
+ ListElement { name: "Jane" }
+ ListElement { name: "Harry" }
+ ListElement { name: "Wendy" }
+}
+//! [model]
+
+//! [delegate]
+Component {
+ id: nameDelegate
+ Text {
+ text: name;
+ font.pixelSize: 24
+ }
+}
+//! [delegate]
+
+//! [decorations]
+ListView {
+ anchors.fill: parent
+ clip: true
+ model: nameModel
+ delegate: nameDelegate
+ header: bannercomponent
+ footer: Rectangle {
+ width: parent.width; height: 30;
+ gradient: clubcolors
+ }
+ highlight: Rectangle {
+ width: parent.width
+ color: "lightgray"
+ }
+}
+
+Component { //instantiated when header is processed
+ id: bannercomponent
+ Rectangle {
+ id: banner
+ width: parent.width; height: 50
+ gradient: clubcolors
+ border {color: "#9EDDF2"; width: 2}
+ Text {
+ anchors.centerIn: parent
+ text: "Club Members"
+ font.pixelSize: 32
+ }
+ }
+}
+Gradient {
+ id: clubcolors
+ GradientStop { position: 0.0; color: "#8EE2FE"}
+ GradientStop { position: 0.66; color: "#7ED2EE"}
+}
+//! [decorations]
+
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/listview-sections.qml
index 270d6c3e0d..74c96dd365 100644
--- a/doc/src/snippets/declarative/qml-intro/states1.qml
+++ b/doc/src/snippets/declarative/listview-sections.qml
@@ -37,58 +37,65 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: mainRectangle
- width: 600
- height: 400
- color: "black"
+//! [parent begin]
+ width: 150; height: 300; color: "white"
- Rectangle {
- id: sky
- width: 600
- height: 200
- y: 0
- color: "lightblue"
- }
+//! [model]
+ListModel {
+ id: nameModel
+ ListElement { name: "Alice"; team: "Crypto" }
+ ListElement { name: "Bob"; team: "Crypto" }
+ ListElement { name: "Jane"; team: "QA" }
+ ListElement { name: "Victor"; team: "QA" }
+ ListElement { name: "Wendy"; team: "Graphics" }
+}
+//! [model]
- Rectangle {
- id: ground
- width: 600; height: 200
- y: 200
- color: "green"
+//! [delegate]
+Component {
+ id: nameDelegate
+ Text {
+ text: name;
+ font.pixelSize: 24
+ anchors.left: parent.left
+ anchors.leftMargin: 2
}
+}
+//! [delegate]
- MouseArea {
- id: mousearea
- anchors.fill: mainRectangle
+//! [section]
+ListView {
+ anchors.fill: parent
+ model: nameModel
+ delegate: nameDelegate
+ focus: true
+ highlight: Rectangle {
+ color: "lightblue"
+ width: parent.width
}
-
- states: [ State {
- name: "night"
- when: mousearea.pressed == true
- PropertyChanges { target: sky; color: "darkblue" }
- PropertyChanges { target: ground; color: "black" }
- },
- State {
- name: "daylight"
- when: mousearea.pressed == false
- PropertyChanges { target: sky; color: "lightblue" }
- PropertyChanges { target: ground; color: "green" }
+ section {
+ property: "team"
+ criteria: ViewSection.FullString
+ delegate: Rectangle {
+ color: "#b0dfb0"
+ width: parent.width
+ height: childrenRect.height + 4
+ Text { anchors.horizontalCenter: parent.horizontalCenter
+ font.pixelSize: 16
+ font.bold: true
+ text: section
+ }
}
- ]
+ }
+}
+//! [section]
- transitions: [ Transition {
- from: "daylight"; to: "night"
- ColorAnimation { duration: 1000 }
- },
- Transition {
- from: "night"; to: "daylight"
- ColorAnimation { duration: 500 }
- }
- ]
+//! [parent end]
}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/listview.qml
index ccf2d3607f..081d2b095a 100644
--- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml
+++ b/doc/src/snippets/declarative/listview.qml
@@ -41,24 +41,47 @@
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: mainRec
- width: 600
- height: 400
+//! [parent begin]
+ width: 175; height: 175; color: "white"
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 200; y: 100
- width: 100; height: 100
+//! [model]
+ListModel {
+ id: petlist
+ ListElement { type: "Cat" }
+ ListElement { type: "Dog" }
+ ListElement { type: "Mouse" }
+ ListElement { type: "Rabbit" }
+ ListElement { type: "Horse" }
+}
+//! [model]
- // Animate a rotation
- transformOrigin: Item.Center
- NumberAnimation on rotation {
- from: 0; to: 360
- duration: 2000
- loops: Animation.Infinite
- }
+//! [delegate]
+Component {
+ id: petdelegate
+ Text {
+ id: label
+ font.pixelSize: 24
+ text: if (index == 0)
+ label.text = type + " (default)"
+ else
+ text: type
}
}
+//! [delegate]
+
+//! [view]
+ListView {
+ id: view
+ anchors.fill: parent
+
+ model: petlist
+ delegate: petdelegate
+}
+//! [view]
+
+//! [parent end]
+}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/models/views-models-delegates.qml b/doc/src/snippets/declarative/models/views-models-delegates.qml
new file mode 100644
index 0000000000..2f76856ca6
--- /dev/null
+++ b/doc/src/snippets/declarative/models/views-models-delegates.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [rectangle]
+Rectangle {
+ width: 200; height: 200
+
+ ListModel {
+ id: fruitModel
+ property string language: "en"
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
+ }
+
+ Component {
+ id: fruitDelegate
+ Row {
+ Text { text: " Fruit: " + name; color: ListView.view.fruit_color }
+ Text { text: " Cost: $" + cost }
+ Text { text: " Language: " + ListView.view.model.language }
+ }
+ }
+
+ ListView {
+ property color fruit_color: "green"
+ model: fruitModel
+ delegate: fruitDelegate
+ anchors.fill: parent
+ }
+}
+//! [rectangle]
diff --git a/doc/src/snippets/declarative/animation-transitions.qml b/doc/src/snippets/declarative/models/visual-model-and-view.qml
index 62bef23395..4d42b6585c 100644
--- a/doc/src/snippets/declarative/animation-transitions.qml
+++ b/doc/src/snippets/declarative/models/visual-model-and-view.qml
@@ -37,26 +37,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- MouseArea {
- anchors.fill: parent
- onClicked: rect.state = "moved"
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: rect; x: 50; y: 50 }
+ width: 200; height: 200
+
+ //! [visual model and view]
+ VisualItemModel {
+ id: itemModel
+ Rectangle { height: 30; width: 80; color: "red" }
+ Rectangle { height: 30; width: 80; color: "green" }
+ Rectangle { height: 30; width: 80; color: "blue" }
}
-
- transitions: Transition {
- PropertyAnimation { properties: "x,y"; duration: 1000 }
+
+ ListView {
+ anchors.fill: parent
+ model: itemModel
}
+ //! [visual model and view]
}
-//![0]
diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
index 3c2e143c27..03473bafda 100644
--- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
+++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
@@ -41,13 +41,60 @@
//! [document]
import QtQuick 1.0
-Rectangle {
- width: 100; height: 100
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 500; height: 500
color: "green"
- MouseArea {
+Column {
+//! [anchor fill]
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+ MouseArea {
anchors.fill: parent
- onClicked: { parent.color = 'red' }
+ onClicked: console.log("button clicked")
+ }
+ MouseArea {
+ width:150; height: 75
+ onClicked: console.log("irregular area clicked")
+ }
+}
+//! [anchor fill]
+
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+//! [enable handlers]
+ MouseArea {
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
}
+//! [enable handlers]
+}
+
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+//! [mouse handlers]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("area clicked")
+ onDoubleClicked: console.log("area double clicked")
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
+ }
+//! [mouse handlers]
+}
+
+} //end of column
+//! [parent end]
}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png
index cbed1a9019..4f68e162de 100644
--- a/doc/src/snippets/declarative/pics/qt.png
+++ b/doc/src/snippets/declarative/pics/qt.png
Binary files differ
diff --git a/doc/src/snippets/declarative/properties.qml b/doc/src/snippets/declarative/properties.qml
new file mode 100644
index 0000000000..330d1cfbdf
--- /dev/null
+++ b/doc/src/snippets/declarative/properties.qml
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//! [document]
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+
+ //! [inherited properties]
+ width: 320; height: 240
+ color: "lightblue"
+ focus: true
+ //! [inherited properties]
+
+ //! [custom properties]
+ property int counter
+ property real area: 100.45
+ //! [custom properties]
+
+ //! [property types]
+ property int number
+ property real volume: 100.45
+ property date today: "2011-01-01"
+ property color background: "yellow"
+ //! [property types]
+
+
+//! [grouped properties]
+Text {
+ //dot notation
+ font.pixelSize: 12
+ font.bold: true
+}
+
+Text {
+ //group notation
+ font {pixelSize: 12; bold: true}
+}
+//! [grouped properties]
+
+
+//! [property binding]
+Rectangle {
+ width: parent.width
+}
+//! [property binding]
+
+//! [property assignment]
+Rectangle {
+ Component.onCompleted: {
+ width = 150
+ }
+}
+//! [property assignment]
+
+Rectangle {
+ //placeholder slider
+ id: slider
+ property real value
+}
+Rectangle {
+ //placeholder system
+ id: system
+ property real brightness
+}
+//! [binding element]
+Binding {
+ target: system
+ property: "brightness"
+ value: slider.value
+}
+//! [binding element]
+
+Rectangle {
+ //placeholder warning
+ id: warning
+ color: "red"
+}
+//! [PropertyChanges element]
+Rectangle {
+ id: rectangle
+
+ states: State {
+ name: "WARNING"
+ PropertyChanges {
+ target: rectangle
+ color: warning.color
+ }
+ }
+}
+//! [PropertyChanges element]
+
+//! [list property]
+Item {
+ id: multistate
+ states: [
+ State {name: "FETCH"},
+ State {name: "DECODE"},
+ State {name: "EXECUTE"}
+ ]
+}
+//! [list property]
+//! [single property]
+Item {
+ id: monostate
+ states: State {name: "RUNNING"}
+}
+//! [single property]
+
+Item {
+ id: printstate
+//! [print list property]
+ Component.onCompleted: console.log (multistate.states[0].name)
+//! [print list property]
+}
+
+//! [JavaScript sample]
+function calculateArea(width, height) {
+ return (width * height) * 0.5
+}
+
+Rectangle {
+ width: 150; height: 75
+ property real area: calculateArea(width, height)
+ property real parentArea: calculateArea(parent.width,parent.height)
+ color: { if (area > parentArea) "blue"; else "red" }
+}
+//! [JavaScript sample]
+
+//! [id property]
+Rectangle {
+ id: container
+ width: 100; height: 100
+ Rectangle {
+ width: parent.width; height: parent.height
+ }
+}
+Rectangle {
+ width: container.width; height: container.height
+}
+//! [id property]
+
+//! [default property]
+Item {
+ Text {}
+ Rectangle {}
+ Timer {}
+}
+
+Item {
+ //without default property
+ children: [
+ Text {},
+ Rectangle {}
+ ]
+ resources: [
+ Timer {}
+ ]
+}
+//! [default property]
+
+//! [state default]
+State {
+ changes: [
+ PropertyChanges {},
+ PropertyChanges {}
+ ]
+}
+
+State {
+ PropertyChanges {}
+ PropertyChanges {}
+}
+//! [state default]
+
+//! [object binding]
+Rectangle {
+
+ id: parentrectangle
+ gradient:
+ Gradient { //not a child of parentrectangle
+
+ //generates a TypeError
+ //Component.onCompleted: console.log(parent.width)
+ }
+
+ //child of parentrectangle
+ Rectangle {property string name: "childrectangle"}
+
+ //prints "childrectangle"
+ Component.onCompleted: console.log(children[0].name)
+}
+//! [object binding]
+
+//! [list attached property]
+Component {
+ id: listdelegate
+ Text {
+ text: "Hello"
+ color: ListView.isCurrentItem ? "red" : "blue"
+ }
+}
+ListView {
+ delegate: listdelegate
+}
+//! [list attached property]
+
+//! [attached signal handler]
+Item {
+ Keys.onPressed: console.log("Key Press Detected")
+ Component.onCompleted: console.log("Completed initialization")
+}
+//! [attached signal handler]
+
+//! [alias usage]
+Button {
+ id: textbutton
+ buttonLabel: "Click Me!"
+}
+//! [alias usage]
+
+//! [image alias]
+Button {
+ id: imagebutton
+ buttonImage.source: "http://qt.nokia.com/logo.png"
+ buttonLabel: buttonImage.source
+}
+//! [image alias]
+
+Item {
+id: widget
+
+//! [alias complete]
+property alias widgetLabel: label
+
+//will generate an error
+//widgetLabel.text: "Initial text"
+
+//will generate an error
+//property alias widgetLabelText: widgetLabel.text
+
+Component.onCompleted: widgetLabel.text = "Alias completed Initialization"
+//! [alias complete]
+
+ Text {id: label}
+}
+
+//![alias overwrite]
+Rectangle {
+ id: coloredrectangle
+ property alias color: bluerectangle.color
+ color: "red"
+
+ Rectangle {
+ id: bluerectangle
+ color: "#1234ff"
+ }
+
+ Component.onCompleted: {
+ console.log (coloredrectangle.color) //prints "#1234ff"
+ setInternalColor()
+ console.log (coloredrectangle.color) //prints "#111111"
+ coloredrectangle.color = "#884646"
+ console.log (coloredrectangle.color) //prints #884646
+ }
+
+ //internal function that has access to internal properties
+ function setInternalColor() {
+ color = "#111111"
+ }
+}
+//![alias overwrite]
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml
deleted file mode 100644
index 24851af1b1..0000000000
--- a/doc/src/snippets/declarative/qml-intro/anchors3.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myWin
- width: 500
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
- }
-
-//! [adding some text]
- Text {
- text: "<h2>The Qt Logo</h2>"
- anchors.bottom: image1.top
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 15
- }
-//! [adding some text]
-}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml
deleted file mode 100644
index 2564e2523c..0000000000
--- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
-//! [updated text]
- Text {
- text: "<h2>Hello World</h2>"; color: "darkgreen"
- x: 100; y:100
- }
-//! [updated text]
-
- color: "lightgray"
-}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml
deleted file mode 100644
index 03358d0eb0..0000000000
--- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
-//! [updated text]
- Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
- }
-//! [updated text]
-
- color: "lightgray"
-}
diff --git a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg b/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg
deleted file mode 100644
index 8c018be6a2..0000000000
--- a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- clip-rule="evenodd"
- stroke-miterlimit="10"
- viewBox="0 0 174.35 209.78"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- width="744.09186"
- height="895.29858"
- sodipodi:docname="qt-logo.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- version="1.0"
- style="stroke-miterlimit:10">
- <metadata
- id="metadata29">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview
- inkscape:window-height="668"
- inkscape:window-width="722"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- showgrid="false"
- inkscape:zoom="0.12195802"
- inkscape:cx="525.6108"
- inkscape:cy="-287.87189"
- inkscape:window-x="476"
- inkscape:window-y="228"
- inkscape:current-layer="svg2" />
- <desc
- id="desc4">SVG generated by Lineform</desc>
- <defs
- id="defs6">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective31" />
- </defs>
- <g
- id="g8"
- transform="translate(-1.5304326e-4,-3.775985e-4)">
- <path
- d="M 43.08,0.36 C 40.94,0 38.84,-0.08 36.81,0.08 L 36.8,0.08 C 36.8,0.08 22.92,1.02 22.29,1.07 C 9.62,2.08 0,12.5 0,26.89 L 0,196.55 L 14.19,209.78 L 156.79,185.81 C 166.6,184.11 174.35,172.54 174.35,160.04 L 174.35,21.88 L 43.08,0.36"
- id="path10"
- style="fill:#0c481e" />
- <path
- d="M 174.35,160.04 C 174.35,172.54 166.6,184.11 156.79,185.82 L 14.19,209.78 L 14.19,25.99 C 14.19,9.27 27.53,-2.21 43.08,0.36 L 174.35,21.88 L 174.35,160.04"
- id="path12"
- style="fill:#66b036" />
- <path
- d="M 130.42,45.91 L 141.94,47.15 L 141.94,67.36 L 154.9,68.28 L 154.9,80.96 L 141.94,80.36 L 141.94,126.69 C 141.94,130.72 142.38,133.31 143.28,134.48 C 144.08,135.55 145.32,136.07 146.99,136.07 C 147.15,136.07 147.32,136.07 147.48,136.06 C 150.03,135.91 152.81,135.13 155.83,133.75 L 155.83,145.4 C 150.69,147.65 145.65,149 140.7,149.42 C 139.99,149.47 139.29,149.5 138.62,149.5 C 134.14,149.5 130.72,148.2 128.38,145.57 C 125.65,142.52 124.29,137.62 124.29,130.9 L 124.29,79.54 L 118.06,79.26 L 118.06,65.67 L 125.65,66.22 L 130.42,45.91"
- id="path14"
- style="fill:#ffffff" />
- <path
- d="M 154.9,80.96 L 141.94,80.36 L 141.94,80.64 L 148.88,80.96 L 154.9,80.96"
- id="path16"
- style="fill:#0c481e" />
- <path
- d="M 144.64,135.6 C 145.3,135.92 146.07,136.07 146.99,136.07 C 147.15,136.07 147.32,136.07 147.48,136.06 C 150.03,135.91 152.81,135.13 155.83,133.75 L 149.81,133.75 C 147.99,134.58 146.28,135.21 144.64,135.6"
- id="path18"
- style="fill:#0c481e" />
- <path
- d="M 128.38,145.57 C 125.65,142.52 124.29,137.62 124.29,130.9 L 124.29,79.54 L 118.06,79.26 L 118.06,65.67 L 112.05,65.67 L 112.05,68.71 C 112.92,71.98 113.6,75.53 114.11,79.35 L 118.28,79.54 L 118.28,130.9 C 118.28,137.62 119.64,142.52 122.37,145.57 C 124.71,148.2 128.13,149.5 132.61,149.5 L 138.62,149.5 C 134.14,149.5 130.72,148.2 128.38,145.57 z M 130.42,45.91 L 124.41,45.91 L 119.74,65.79 L 125.65,66.22 L 130.42,45.91"
- id="path20"
- style="fill:#0c481e" />
- <path
- d="M 91.15,132.4 C 93.5,126.36 94.66,114.49 94.66,96.79 C 94.66,80.9 93.51,69.97 91.18,63.98 C 88.84,57.95 85.35,54.69 80.66,54.28 C 80.3,54.25 79.95,54.23 79.6,54.23 C 75.26,54.23 71.92,56.77 69.59,61.86 C 67.07,67.4 65.8,78.9 65.8,96.3 C 65.8,113.11 67.04,125.05 69.54,132.05 C 71.89,138.72 75.41,142.03 80.04,142.03 C 80.25,142.03 80.45,142.02 80.66,142.01 C 85.29,141.71 88.78,138.51 91.15,132.4 M 109.13,136.15 C 105.01,145.86 98.73,152.21 90.14,155.15 C 91.01,159.6 92.32,162.6 94.06,164.17 C 95.41,165.39 97.49,165.99 100.28,165.99 C 101.09,165.99 101.96,165.94 102.87,165.84 L 102.87,178.96 L 96.91,179.75 C 95.16,179.97 93.49,180.09 91.91,180.09 C 86.69,180.09 82.47,178.82 79.29,176.26 C 75.08,172.89 71.98,166.37 69.99,156.73 C 60.86,154.78 53.73,148.97 48.8,139.23 C 43.8,129.32 41.25,114.83 41.25,95.89 C 41.25,75.46 44.74,60.38 51.6,50.81 C 57.38,42.75 65.46,38.78 75.62,38.78 C 77.24,38.78 78.93,38.88 80.66,39.08 C 92.61,40.46 101.28,46.1 106.92,55.87 C 112.46,65.43 115.17,79.14 115.17,97.13 C 115.17,113.62 113.17,126.58 109.13,136.15"
- id="path22"
- style="fill:#ffffff" />
- <path
- d="M 100.28,165.99 C 101.09,165.99 101.95,165.94 102.87,165.84 L 98.04,165.84 C 98.71,165.94 99.49,165.99 100.28,165.99"
- id="path24"
- style="fill:#0c481e" />
- <path
- d="M 84.85,63.98 C 87.19,69.97 88.34,80.9 88.34,96.79 C 88.34,114.49 87.18,126.36 84.82,132.4 C 82.93,137.28 80.3,140.31 76.96,141.48 C 77.93,141.84 78.96,142.03 80.04,142.03 C 80.25,142.03 80.45,142.02 80.66,142.01 C 85.29,141.71 88.78,138.51 91.15,132.4 C 93.5,126.36 94.66,114.49 94.66,96.79 C 94.66,80.9 93.51,69.97 91.18,63.98 C 88.84,57.95 85.35,54.69 80.66,54.28 C 80.3,54.25 79.95,54.23 79.6,54.23 C 78.51,54.23 77.48,54.39 76.52,54.72 L 76.52,54.72 C 80.12,55.83 82.89,58.93 84.85,63.98 z M 82.51,178.25 C 82.4,178.2 82.28,178.15 82.17,178.09 C 82.16,178.09 82.15,178.08 82.14,178.08 C 82.03,178.03 81.93,177.97 81.83,177.92 C 81.81,177.91 81.79,177.9 81.77,177.89 C 81.68,177.84 81.59,177.79 81.49,177.74 C 81.46,177.72 81.44,177.71 81.41,177.69 C 81.33,177.65 81.24,177.6 81.16,177.55 C 81.12,177.53 81.09,177.51 81.05,177.48 C 80.98,177.44 80.91,177.4 80.84,177.36 C 80.79,177.33 80.74,177.3 80.7,177.27 C 80.64,177.23 80.58,177.19 80.52,177.15 C 80.46,177.12 80.41,177.08 80.35,177.04 C 80.3,177.01 80.25,176.98 80.2,176.94 C 80.14,176.9 80.07,176.85 80.01,176.81 C 79.97,176.78 79.93,176.75 79.89,176.72 C 79.82,176.67 79.74,176.61 79.67,176.55 C 79.64,176.54 79.61,176.52 79.59,176.5 C 79.49,176.42 79.39,176.34 79.29,176.26 C 75.08,172.89 71.98,166.37 69.99,156.73 C 60.86,154.78 53.73,148.97 48.8,139.23 C 43.8,129.32 41.25,114.83 41.25,95.89 C 41.25,75.46 44.74,60.38 51.6,50.81 C 57.38,42.75 65.46,38.78 75.62,38.78 C 75.65,38.78 69.27,38.77 69.27,38.77 L 69.27,38.78 C 59.12,38.78 51.05,42.75 45.27,50.81 C 38.41,60.38 34.92,75.46 34.92,95.89 C 34.92,114.83 37.47,129.32 42.47,139.23 C 47.41,148.97 54.53,154.78 63.67,156.73 C 65.65,166.37 68.76,172.89 72.96,176.26 C 76.14,178.82 80.36,180.09 85.58,180.09 C 85.68,180.09 85.78,180.09 85.88,180.09 L 91.42,180.09 C 88.01,180.03 85.04,179.43 82.52,178.26 C 82.51,178.26 82.51,178.26 82.51,178.25"
- id="path26"
- style="fill:#0c481e" />
- </g>
-</svg>
diff --git a/doc/src/snippets/declarative/reusablecomponents/Button.qml b/doc/src/snippets/declarative/reusablecomponents/Button.qml
new file mode 100644
index 0000000000..3b97e00952
--- /dev/null
+++ b/doc/src/snippets/declarative/reusablecomponents/Button.qml
@@ -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$
+**
+****************************************************************************/
+//! [document]
+//contents of Button.qml
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ id: button
+//! [properties]
+ width: 145; height: 60
+ color: "blue"
+ smooth: true; radius: 9
+ property alias text: label.text
+//! [properties]
+ border {color: "#B9C5D0"; width: 1}
+
+ gradient: Gradient {
+ GradientStop {color: "#CFF7FF"; position: 0.0}
+ GradientStop {color: "#99C0E5"; position: 0.57}
+ GradientStop {color: "#719FCB"; position: 0.9}
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "Click Me!"
+ font.pointSize: 12
+ color: "blue"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log(text + " clicked")
+ }
+//! [parent end]
+}
+//! [parent end]
+
+//! [document]
+
+//! [ellipses]
+ //...
+//! [ellipses]
+
+
diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/reusablecomponents/application.qml
index b9581381a0..a09b276b73 100644
--- a/doc/src/snippets/declarative/qml-intro/anchors1.qml
+++ b/doc/src/snippets/declarative/reusablecomponents/application.qml
@@ -37,20 +37,19 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
Rectangle {
- id: myWin
- width: 500
- height: 400
+ width: 175; height: 350
+ color: "lightgrey"
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
+ Button {}
+ Button {text: "Me Too!"}
+ Button {text: "Me Three!"}
}
}
//! [document]
diff --git a/doc/src/snippets/declarative/reusablecomponents/component.qml b/doc/src/snippets/declarative/reusablecomponents/component.qml
new file mode 100644
index 0000000000..8660c50fd7
--- /dev/null
+++ b/doc/src/snippets/declarative/reusablecomponents/component.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+//! [document]
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ id: screen
+ width: 175; height: 175
+ color: "lightgrey"
+
+//! [define inline component]
+ Component {
+ id: inlinecomponent
+ Rectangle {
+ id: display
+ width: 50; height: 50
+ color: "blue"
+ }
+ }
+//! [define inline component]
+//! [create inline component]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ inlinecomponent.createObject(parent)
+
+ var second = inlinecomponent.createObject(parent)
+
+ var third = inlinecomponent.createObject(parent)
+ third.x = second.width + 10
+ third.color = "red"
+ }
+ }
+//! [create inline component]
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml
index d8405759c9..2522a9891e 100644
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml
+++ b/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml
@@ -37,56 +37,62 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-import QtQuick 1.0
-
//! [document]
+//contents of focusbutton.qml
import QtQuick 1.0
-Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
+//! [parent begin]
+FocusScope {
+//! [parent begin]
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
- }
+ //! [expose visuals]
+ //FocusScope needs to bind to visual properties of the children
+ property alias color: button.color
+ x: button.x; y: button.y
+ width: button.width; height: button.height
+ //! [expose visuals]
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 20; y: 20 ; z: 1
- width: 100; height: 100
+ //! [rectangle begin]
+ Rectangle {
+ //! [rectangle begin]
+ id: button
+ //! [properties]
+ width: 145; height: 60
+ color: "blue"
+ smooth: true; radius: 9
+ property alias text: label.text
+ //! [properties]
+ border {color: "#B9C5D0"; width: 1}
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 450
- easing.type: "InOutQuad"; duration: 2000
- }
- PauseAnimation { duration: 500 }
+ gradient: Gradient {
+ GradientStop {color: "#CFF7FF"; position: 0.0}
+ GradientStop {color: "#99C0E5"; position: 0.57}
+ GradientStop {color: "#719FCB"; position: 0.9}
}
- SequentialAnimation on y {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 250
- easing.type: "InOutQuad"; duration: 2000
- }
- PauseAnimation { duration: 500 }
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "Click Me!"
+ font.pointSize: 12
+ color: "blue"
}
- SequentialAnimation on scale {
- loops: Animation.Infinite
- NumberAnimation { from: 1; to: 0.5; duration: 1000 }
- NumberAnimation { from: 0.5; to: 1; duration: 1000 }
- PauseAnimation { duration: 500 }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log(text + " clicked")
}
+ //! [rectangle end]
}
+ //! [rectangle end]
+//! [parent end]
}
+//! [parent end]
+
//! [document]
+
+//! [ellipses]
+ //...
+//! [ellipses]
+
+
diff --git a/doc/src/snippets/declarative/reusablecomponents/qmldir b/doc/src/snippets/declarative/reusablecomponents/qmldir
new file mode 100644
index 0000000000..253732de01
--- /dev/null
+++ b/doc/src/snippets/declarative/reusablecomponents/qmldir
@@ -0,0 +1,4 @@
+//! [document]
+Button ./Button.qml
+FocusButton ./focusbutton.qml
+//! [document]
diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml
index c3b7197d6e..ab6b8d0c32 100644
--- a/doc/src/snippets/declarative/states.qml
+++ b/doc/src/snippets/declarative/states.qml
@@ -37,24 +37,85 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+//![document]
import QtQuick 1.0
-
+
+//![parent begin]
Rectangle {
- id: myRect
- width: 200; height: 200
- color: "red"
+//![parent begin]
+
+ id: screen
+ width: 400; height: 500
- MouseArea {
- anchors.fill: parent
- onClicked: myRect.state = 'moved'
- }
+
+Rectangle {
+ id: flag
+}
+Column {
+ spacing: 15
+//![signal states]
+Rectangle {
+ id: signal
+ width: 200; height: 200
+ state: "NORMAL"
states: [
State {
- name: "moved"
- PropertyChanges { target: myRect; x: 50; y: 50 }
+ name: "NORMAL"
+ PropertyChanges { target: signal; color: "green"}
+ PropertyChanges { target: flag; state: "FLAG_DOWN"}
+ },
+ State {
+ name: "CRITICAL"
+ PropertyChanges { target: signal; color: "red"}
+ PropertyChanges { target: flag; state: "FLAG_UP"}
}
]
}
-//![0]
+//![signal states]
+
+//![switch states]
+Rectangle {
+ id: signalswitch
+ width: 75; height: 75
+ color: "blue"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (signal.state == "NORMAL")
+ signal.state = "CRITICAL"
+ else
+ signal.state = "NORMAL"
+ }
+ }
+}
+//![switch states]
+
+//![when property]
+Rectangle {
+ id: bell
+ width: 75; height: 75
+ color: "yellow"
+
+ states: State {
+ name: "RINGING"
+ when: (signal.state == "CRITICAL")
+ PropertyChanges {target: speaker; play: "RING!"}
+ }
+}
+//![when property]
+
+Text {
+ id: speaker
+ property alias play: speaker.text
+ text: "NORMAL"
+}
+
+} // end of row
+
+//![parent end]
+}
+//![parent end]
+
+//![document]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/texthandling.qml
index c789bbe99b..377bb8bf6d 100644
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml
+++ b/doc/src/snippets/declarative/texthandling.qml
@@ -37,29 +37,53 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
+
+//! [parent begin]
Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
+//! [parent begin]
+ width: 300; height: 300
+ id: screen
+
+Column {
+ anchors.centerIn:parent
+
+//! [int validator]
+Column {
+ spacing: 10
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 20; y: 20 ; z: 1
- width: 100; height: 100
+ Text {
+ text: "Enter a value from 0 to 2000"
}
+ TextInput {
+ focus: true
+ validator: IntValidator { bottom:0; top: 2000}
+ }
+}
+//! [int validator]
+
+//! [regexp validator]
+Column {
+ spacing: 10
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
+ Text {
+ text: "Which basket?"
}
+ TextInput {
+ focus: true
+ validator: RegExpValidator { regExp: /fruit basket/ }
+ }
+}
+//! [regexp validator]
+
+//end of column
}
+
+//! [parent end]
+}
+//! [parent end]
+
//! [document]
+
diff --git a/doc/src/snippets/declarative/webview/webview.qml b/doc/src/snippets/declarative/webview/webview.qml
index c1cef33a6f..a986fab8c4 100644
--- a/doc/src/snippets/declarative/webview/webview.qml
+++ b/doc/src/snippets/declarative/webview/webview.qml
@@ -39,7 +39,9 @@
****************************************************************************/
//! [document]
+//! [import]
import QtWebKit 1.0
+//! [import]
WebView {
url: "http://www.nokia.com"
diff --git a/doc/src/snippets/qtreeview-dnd/dragdropmodel.h b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
index ed01540403..a20b1bbd41 100644
--- a/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
+++ b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
@@ -38,17 +38,6 @@
**
****************************************************************************/
-/****************************************************************************
-**
-** 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 an example program for Qt.
-** EDITIONS: NOLIMITS
-**
-****************************************************************************/
-
#ifndef DRAGDROPMODEL_H
#define DRAGDROPMODEL_H
diff --git a/doc/src/snippets/qtscript/evaluation/main.cpp b/doc/src/snippets/qtscript/evaluation/main.cpp
index e7efd8e66f..01e06b633c 100644
--- a/doc/src/snippets/qtscript/evaluation/main.cpp
+++ b/doc/src/snippets/qtscript/evaluation/main.cpp
@@ -42,9 +42,9 @@
int main(int argc, char *argv[])
{
-//! [0]
+ //! [0]
QScriptEngine engine;
qDebug() << "the magic number is:" << engine.evaluate("1 + 2").toNumber();
-//! [0]
+ //! [0]
return 0;
}
diff --git a/doc/src/snippets/qtscript/registeringobjects/main.cpp b/doc/src/snippets/qtscript/registeringobjects/main.cpp
index 1911442395..9dab25a412 100644
--- a/doc/src/snippets/qtscript/registeringobjects/main.cpp
+++ b/doc/src/snippets/qtscript/registeringobjects/main.cpp
@@ -44,12 +44,12 @@
int main(int argc, char *argv[])
{
-//! [0]
+ //! [0]
QScriptEngine engine;
QObject *someObject = new MyObject;
QScriptValue objectValue = engine.newQObject(someObject);
engine.globalObject().setProperty("myObject", objectValue);
-//! [0]
+ //! [0]
qDebug() << "myObject's calculate() function returns"
<< engine.evaluate("myObject.calculate(10)").toNumber();
return 0;
diff --git a/doc/src/snippets/qtscript/registeringvalues/main.cpp b/doc/src/snippets/qtscript/registeringvalues/main.cpp
index 3defc1f332..6dc5b7c582 100644
--- a/doc/src/snippets/qtscript/registeringvalues/main.cpp
+++ b/doc/src/snippets/qtscript/registeringvalues/main.cpp
@@ -43,10 +43,10 @@
int main(int argc, char *argv[])
{
QScriptEngine engine;
-//! [0]
+ //! [0]
engine.globalObject().setProperty("foo", 123);
qDebug() << "foo times two is:" << engine.evaluate("foo * 2").toNumber();
-//! [0]
+ //! [0]
return 0;
}
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.cpp b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
index 9f66d9ac7a..252720bc14 100644
--- a/doc/src/snippets/textblock-fragments/xmlwriter.cpp
+++ b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
@@ -102,11 +102,10 @@ void XmlWriter::readFragment(const QTextBlock &currentBlock,
QDomText fragmentText = document->createTextNode(currentFragment.text());
fragmentElement.appendChild(fragmentText);
-//! [6]
}
-//! [7]
- }
//! [6] //! [7]
+ }
+//! [7] //! [6]
}
void XmlWriter::processBlock(const QTextBlock &currentBlock)
diff --git a/doc/src/snippets/textdocument-frames/xmlwriter.cpp b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
index 31f08f3bec..8988100ac2 100644
--- a/doc/src/snippets/textdocument-frames/xmlwriter.cpp
+++ b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
@@ -100,6 +100,8 @@ void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
parent.appendChild(frameElement);
//! [1]
+ QDomElement frameElement = ...
+
QTextFrame::iterator it;
for (it = frame->begin(); !(it.atEnd()); ++it) {
diff --git a/doc/src/snippets/textdocument-tables/xmlwriter.cpp b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
index d1d6798e51..8f98295884 100644
--- a/doc/src/snippets/textdocument-tables/xmlwriter.cpp
+++ b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
@@ -98,6 +98,8 @@ void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
parent.appendChild(frameElement);
//! [0]
+ QDomElement frameElement = ...
+
QTextFrame::iterator it;
for (it = frame->begin(); !(it.atEnd()); ++it) {
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index a4bcb9794f..2cb7aaba18 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -121,7 +121,7 @@
Source code to access the OUT values:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 2
\bold{Note:} \c{@outval1} and \c{@outval2} are variables local to the current
connection and will not be affected by queries sent from another host
@@ -394,7 +394,7 @@
sets, will be accessible only if you set the query's forward only
mode to \e forward using \l QSqlQuery::setForwardOnly().
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 10
\bold{Note:} The value returned by the stored procedure's return statement
is discarded.
@@ -681,7 +681,7 @@
database file, no matter whether it is stored locally or on another
server.
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 24
You need the InterBase/Firebird development headers and libraries
to build this plugin.
@@ -696,7 +696,7 @@
be overridden by setting the ISC_DPB_LC_CTYPE parameter with
QSqlDatabase::setConnectOptions() before opening the connection.
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 25
If Qt doesn't support the given text encoding the driver will issue a
warning message and connect to the database using UNICODE_FSS.
@@ -710,7 +710,7 @@
procedure, only IN values need to be bound via QSqlQuery::bindValue(). The
RETURN/OUT values can be retrieved via QSqlQuery::value(). Example:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 26
\section3 How to Build the QIBASE Plugin on Unix and Mac OS X
@@ -777,7 +777,7 @@
Make sure you have followed the guide to \l{Deploying Plugins}.
If you experience plugin load problems and see output like this:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 31
the problem is usually that the plugin had the wrong \l{Deploying
Plugins#The Build Key}{build key}. This might require removing an
diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
index 4083a75d97..44abb3cf91 100644
--- a/doc/src/template/style/offline.css
+++ b/doc/src/template/style/offline.css
@@ -26,14 +26,14 @@
{
text-decoration: none;
}
- li
- {
- list-style: none;
- }
ol li
{
list-style: decimal;
}
+ ul li
+ {
+ list-style: none;
+ }
caption, th
{
text-align: left;
@@ -76,6 +76,8 @@
{
margin-left: 0.5em;
margin-right: 0.5em;
+ font-family: sans-serif;
+ line-height: normal
}
a
{
@@ -124,13 +126,13 @@
}
th
{
- padding: 0.5em 1.5em 0.5em 1.5em;
+ padding: 0.5em 1.5em 0.5em 1em;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 0.25em 1.5em 0.25em 2em;
+ padding: 0.25em 1.5em 0.25em 1em;
}
td.rightAlign
@@ -141,13 +143,13 @@
{
border-left: 1px solid #E6E6E6;
background-color: #F6F6F6;
- color: #66666E;
+ color: black;
}
table tr.even
{
border-left: 1px solid #E6E6E6;
background-color: #ffffff;
- color: #66666E;
+ color: #202020;
}
div.float-left
@@ -239,10 +241,6 @@
margin-bottom: 0.5em
}
- .naviNextPrevious
- {
- display: none
- }
.header .breadcrumb
{
font-size: 90%;
@@ -309,19 +307,19 @@
.content h1
{
font-weight: bold;
- font-size: 150%
+ font-size: 130%
}
.content h2
{
font-weight: bold;
- font-size: 135%;
+ font-size: 120%;
width: 100%;
}
.content h3
{
font-weight: bold;
- font-size: 120%;
+ font-size: 110%;
width: 100%;
}
.content table p
@@ -471,6 +469,11 @@
padding: 0.25em 0.5em 0.25em 0.5em;
}
+ .toc
+ {
+ font-size: 80%
+ }
+
.header .content .toc ul
{
padding-left: 0px;
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index df2729c3e1..4071145ec0 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -7,7 +7,7 @@
color: #000000;
background: #FFFFFF;
}
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, th, td
{
margin: 0;
padding: 0;
@@ -146,13 +146,13 @@
}
th
{
- padding: 5px 15px 5px 15px;
+ padding: 5px 15px 5px 10px;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 3px 15px 3px 20px;
+ padding: 3px 15px 3px 10px;
}
tr.odd td:hover, tr.even td:hover {}
@@ -185,10 +185,165 @@
{
float: right; margin-left: 2em
}
+ div.clear-both
+ {
+ clear: both
+ }
+ div.clear-left
+ {
+ clear: left
+ }
+ div.clear-right
+ {
+ clear: right
+ }
+ #color-white
+ {
+ background: #ffffff;
+ color: #000000;
+ }
+ #color-black
+ {
+ background: #000000;
+ color: #ffffff;
+ }
+ #color-red
+ {
+ background: #ff0000;
+ color: #000000;
+ }
+ #color-darkRed
+ {
+ background: #800000;
+ color: #ffffff;
+ }
+ #color-green
+ {
+ background: #00ff00;
+ color: #000000;
+ }
+ #color-darkGreen
+ {
+ background: #008000;
+ color: #ffffff;
+ }
+ #color-blue
+ {
+ background: #0000ff;
+ color: #ffffff;
+ }
+ #color-darkBlue
+ {
+ background: #000080;
+ color: #ffffff;
+ }
+ #color-cyan
+ {
+ background: #00ffff;
+ color: #000000;
+ }
+ #color-darkCyan
+ {
+ background: #008080;
+ color: #ffffff;
+ }
+ #color-magenta
+ {
+ background: #ff00ff;
+ color: #000000;
+ }
+ #color-darkMagenta
+ {
+ background: #800080;
+ color: #ffffff;
+ }
+ #color-yellow
+ {
+ background: #ffff00;
+ color: #000000;
+ }
+ #color-darkYellow
+ {
+ background: #808000;
+ color: #ffffff;
+ }
+ #color-gray
+ {
+ background: #a0a0a4;
+ color: #000000;
+ }
+ #color-darkGray
+ {
+ background: #808080;
+ color: #ffffff;
+ }
+ #color-lightGray
+ {
+ background: #c0c0c0;
+ color: #000000;
+ }
+ #QtGuiColor
+ {
+ background-color: #98fd00;
+ color: black;
+ }
+ #QtCoreColor
+ {
+ background-color: #9c9cff;
+ color: black;
+ }
+ #DefaultColor
+ {
+ background-color: #f6f6dc;
+ color: black;
+ }
+ #FreetypeColor
+ {
+ background-color: #e6e6fa;
+ color: black;
+ }
+ #GLColor
+ {
+ background-color: #ffc0cb;
+ color: black;
+ }
+ #PthreadColor
+ {
+ background-color: #bdb76b;
+ color: black;
+ }
+ #OptionalColor
+ {
+ background-color: #cae1ff;
+ color: black;
+ }
+ #SMColor
+ {
+ background-color: #c2fafa;
+ color: black;
+ }
+ #MiscColor
+ {
+ background-color: #f0f9ff;
+ color: black;
+ }
+ #GlibColor
+ {
+ background-color: #b3b3b3;
+ color: black;
+ }
+ .figCaption
+ {
+ color:#363534;
+ font:italic 11px/1.2 Verdana;
+ text-align: center;
+ padding-top:0;
+ }
span.comment
{
color: #008B00;
+ font-style: italic
}
span.string, span.char
{
@@ -1030,11 +1185,28 @@
padding:0px;
}
- .content .alignedsummary
- {
- margin: 15px;
- }
-
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+ .details
+ {
+ text-align: left;
+ font-size: 80%;
+ color: blue
+ }
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ .newStuff
+ {
+ text-align: left;
+ font-size: 80%;
+ color: red
+ }
.qmltype
{
@@ -1381,6 +1553,10 @@
font: normal bold 13px/1 Verdana;
}
+ .content .normallist li
+ {
+ font: normal 13px/1 Verdana;
+ }
.indexbox a:hover, .indexbox a:visited:hover
{
color: #4c0033;
@@ -1417,6 +1593,13 @@
background: url(../images/sprites-combined.png) no-repeat -111px -376px;
padding: 0;
}
+ .indexbox.tools .indexIcon2
+ {
+ width: 115px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -111px -376px;
+ padding: 0;
+ }
.indexboxcont:after
{
content: ".";
diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc
index cae7764eb9..efd0ff2efb 100644
--- a/doc/src/tutorials/modelview.qdoc
+++ b/doc/src/tutorials/modelview.qdoc
@@ -27,7 +27,7 @@
/*!
\page modelview.html
-
+ \ingroup tutorials
\startpage {index.html}{Qt Reference Documentation}
\title Model/View Tutorial
diff --git a/doc/src/tutorials/threads.qdoc b/doc/src/tutorials/threads.qdoc
new file mode 100644
index 0000000000..2d6a540bf3
--- /dev/null
+++ b/doc/src/tutorials/threads.qdoc
@@ -0,0 +1,572 @@
+/****************************************************************************
+**
+** 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:FDL$
+** 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 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$
+**
+****************************************************************************/
+
+/*!
+ \page thread-basics.html
+ \ingroup tutorials
+ \startpage {index.html}{Qt Reference Documentation}
+
+ \title Threading Basics
+ \brief An introduction to threads
+
+ \section1 What Are Threads?
+
+ Threads are about doing things in parallel, just like processes. So how do
+ threads differ from processes? While you are making calculations on a
+ spreadsheet, there may also be a media player running on the same desktop
+ playing your favorite song. Here is an example of two processes working in
+ parallel: one running the spreadsheet program; one running a media player.
+ Multitasking is a well known term for this. A closer look at the media
+ player reveals that there are again things going on in parallel within one
+ single process. While the media player is sending music to the audio driver,
+ the user interface with all its bells and whistles is being constantly
+ updated. This is what threads are for \mdash concurrency within one single
+ process.
+
+ So how is concurrency implemented? Parallel work on single core CPUs is an
+ illusion which is somewhat similar to the illusion of moving images in
+ cinema.
+ For processes, the illusion is produced by interrupting the processor's
+ work on one process after a very short time. Then the processor moves on to
+ the next process. In order to switch between processes, the current program
+ counter is saved and the next processor's program counter is loaded. This
+ is not sufficient because the same needs to be done with registers and
+ certain architecture and OS specific data.
+
+ Just as one CPU can power two or more processes, it is also possible to let
+ the CPU run on two different code segments of one single process. When a
+ process starts, it always executes one code segment and therefore the
+ process is said to have one thread. However, the program may decide to
+ start a second thread. Then, two different code sequences are processed
+ simultaneously inside one process. Concurrency is achieved on single core
+ CPUs by repeatedly saving program counters and registers then loading the
+ next thread's program counters and registers. No cooperation from the
+ program is required to cycle between the active threads. A thread may be in
+ any state when the switch to the next thread occurs.
+
+ The current trend in CPU design is to have several cores. A typical
+ single-threaded application can make use of only one core. However, a
+ program with multiple threads can be assigned to multiple cores, making
+ things happen in a truly concurrent way. As a result, distributing work
+ to more than one thread can make a program run much faster on multicore
+ CPUs because additional cores can be used.
+
+ \section2 GUI Thread and Worker Thread
+
+ As mentioned, each program has one thread when it is started. This thread
+ is called the "main thread" (also known as the "GUI thread" in Qt
+ applications). The Qt GUI must run in this thread. All widgets and several
+ related classes, for example QPixmap, don't work in secondary threads.
+ A secondary thread is commonly referred to as a "worker thread" because it
+ is used to offload processing work from the main thread.
+
+ \section2 Simultaneous Access to Data
+
+ Each thread has its own stack, which means each thread has its own call
+ history and local variables. Unlike processes, threads share the same
+ address space. The following diagram shows how the building blocks of
+ threads are located in memory. Program counter and registers of inactive
+ threads are typically kept in kernel space. There is a shared copy of the
+ code and a separate stack for each thread.
+
+ \image threadvisual-example.png "Thread visualization"
+
+ If two threads have a pointer to the same object, it is possible that both
+ threads will access that object at the same time and this can potentially
+ destroy the object's integrity. It's easy to imagine the many things that
+ can go wrong when two methods of the same object are executed
+ simultaneously.
+
+ Sometimes it is necessary to access one object from different threads;
+ for example, when objects living in different threads need to communicate.
+ Since threads use the same address space, it is easier and faster for
+ threads to exchange data than it is for processes. Data does not have to be
+ serialized and copied. Passing pointers is possible, but there must be a
+ strict coordination of what thread touches which object. Simultaneous
+ execution of operations on one object must be prevented. There are several
+ ways of achieving this and some of them are described below.
+
+ So what can be done safely? All objects created in a thread can be used
+ safely within that thread provided that other threads don't have references
+ to them and objects don't have implicit coupling with other threads. Such
+ implicit coupling may happen when data is shared between instances as with
+ static members, singletons or global data. Familiarize yourself with the
+ concept of \l{Reentrancy and Thread-Safety}{thread safe and reentrant}
+ classes and functions.
+
+ \section1 Using Threads
+
+ There are basically two use cases for threads:
+
+ \list
+ \o Make processing faster by making use of multicore processors.
+ \o Keep the GUI thread or other time critical threads responsive by
+ offloading long lasting processing or blocking calls to other threads.
+ \endlist
+
+ \section2 When to Use Alternatives to Threads
+
+ Developers need to be very careful with threads. It is easy to start other
+ threads, but very hard to ensure that all shared data remains consistent.
+ Problems are often hard to find because they may only show up once in a
+ while or only on specific hardware configurations. Before creating threads
+ to solve certain problems, possible alternatives should be considered.
+
+ \table
+ \header
+ \o Alternative
+ \o Comment
+ \row
+ \o QEventLoop::processEvents()
+ \o Calling QEventLoop::processEvents() repeatedly during a
+ time-consuming calculation prevents GUI blocking. However, this
+ solution doesn't scale well because the call to processEvents() may
+ occur too often, or not often enough, depending on hardware.
+ \row
+ \o QTimer
+ \o Background processing can sometimes be done conveniently using a
+ timer to schedule execution of a slot at some point in the future.
+ A timer with an interval of 0 will time out as soon as there are no
+ more events to process.
+ \row
+ \o QSocketNotifier QNetworkAccessManager QIODevice::readyRead()
+ \o This is an alternative to having one or multiple threads, each with
+ a blocking read on a slow network connection. As long as the
+ calculation in response to a chunk of network data can be executed
+ quickly, this reactive design is better than synchronous waiting in
+ threads. Reactive design is less error prone and energy efficient
+ than threading. In many cases there are also performance benefits.
+ \endtable
+
+ In general, it is recommended to only use safe and tested paths and to
+ avoid introducing ad-hoc threading concepts. QtConcurrent provides an easy
+ interface for distributing work to all of the processor's cores. The
+ threading code is completely hidden in the QtConcurrent framework, so you
+ don't have to take care of the details. However, QtConcurrent can't be used
+ when communication with the running thread is needed, and it shouldn't be
+ used to handle blocking operations.
+
+ \section2 Which Qt Thread Technology Should You Use?
+
+ Sometimes you want to do more than just running a method in the context of
+ another thread. You may want to have an object which lives in another
+ thread that provides a service to the GUI thread. Maybe you want another
+ thread to stay alive forever to poll hardware ports and send a signal to
+ the GUI thread when something noteworthy has happened. Qt provides
+ different solutions for developing threaded applications. The right
+ solution depends on the purpose of the new thread as well as on the
+ thread's lifetime.
+
+ \table
+ \header
+ \o Lifetime of thread
+ \o Development task
+ \o Solution
+ \row
+ \o One call
+ \o Run one method within another thread and quit the thread when the
+ method is finished.
+ \o Qt provides different solutions:
+ \list
+ \o Write a function and run it with QtConcurrent::run()
+ \o Derive a class from QRunnable and run it in the global thread
+ pool with QThreadPool::globalInstance()->start()
+ \o Derive a class from QThread, reimplement the QThread::run()
+ method and use QThread::start() to run it.
+ \endlist
+
+ \row
+ \o One call
+ \o Operations are to be performed on all items of a container.
+ Processing should be performed using all available cores. A common
+ example is to produce thumbnails from a list of images.
+ \o QtConcurrent provides the \l{QtConcurrent::}{map()} function for
+ applying operations on every container element,
+ \l{QtConcurrent::}{filter()} for selecting container elements, and
+ the option of specifying a reduce function for combining the
+ remaining elements.
+ \row
+ \o One call
+ \o A long running operation has to be put in another thread. During the
+ course of processing, status information should be sent to the GUI
+ thread.
+ \o Use QThread, reimplement run and emit signals as needed. Connect the
+ signals to the GUI thread's slots using queued signal/slot
+ connections.
+
+ \row
+ \o Permanent
+ \o Have an object living in another thread and let it perform different
+ tasks upon request.
+ This means communication to and from the worker thread is required.
+ \o Derive a class from QObject and implement the necessary slots and
+ signals, move the object to a thread with a running event loop and
+ communicate with the object over queued signal/slot connections.
+ \row
+ \o Permanent
+ \o Have an object living in another thread, let the object perform
+ repeated tasks such as polling a port and enable communication with
+ the GUI thread.
+ \o Same as above but also use a timer in the worker thread to implement
+ polling. However, the best solution for polling is to avoid it
+ completely. Sometimes using QSocketNotifier is an alternative.
+ \endtable
+
+
+ \section1 Qt Thread Basics
+
+ QThread is a very convenient cross platform abstraction of native platform
+ threads. Starting a thread is very simple. Let us look at a short piece of
+ code that generates another thread which says hello in that thread and then
+ exits.
+
+ \snippet examples/tutorials/threads/hellothread/hellothread.h 1
+
+ We derive a class from QThread and reimplement the \l{QThread::}{run()}
+ method.
+
+ \snippet examples/tutorials/threads/hellothread/hellothread.cpp 1
+
+ The run method contains the code that will be run in a separate thread. In
+ this example, a message containing the thread ID will be printed.
+ QThread::start() will call the method in another thread.
+
+ \snippet examples/tutorials/threads/hellothread/main.cpp 1
+
+ To start the thread, our thread object needs to be instantiated. The
+ \l{QThread::}{start()} method creates a new thread and calls the
+ reimplemented \l{QThread::}{run()} method in this new thread. Right after
+ \l{QThread::}{start()} is called, two program counters walk through the
+ program code. The main function starts with only the GUI thread running and
+ it should terminate with only the GUI thread running. Exiting the program
+ when another thread is still busy is a programming error, and therefore,
+ wait is called which blocks the calling thread until the
+ \l{QThread::}{run()} method has completed.
+
+ This is the result of running the code:
+
+ \badcode
+ hello from GUI thread 3079423696
+ hello from worker thread 3076111216
+ \endcode
+
+
+ \section2 QObject and Threads
+
+ A QObject is said to have a \e{thread affinity} or, in other words, that it
+ lives in a certain thread. This means that, at creation time, QObject saves
+ a pointer to the current thread. This information becomes relevant when an
+ event is posted with \l{QCoreApplication::}{postEvent()}. The event will be
+ put in the corresponding thread's event loop. If the thread where the
+ QObject lives doesn't have an event loop, the event will never be delivered.
+
+ To start an event loop, \l{QThread::}{exec()} must be called inside
+ \l{QThread::}{run()}. Thread affinity can be changed using
+ \l{QObject::}{moveToThread()}.
+
+ As mentioned above, developers must always be careful when calling objects'
+ methods from other threads. Thread affinity does not change this situation.
+ Qt documentation marks several methods as thread-safe.
+ \l{QCoreApplication::}{postEvent()} is a noteworthy example. A thread-safe
+ method may be called from different threads simultaneously.
+
+ In cases where there is usually no concurrent access to methods, calling
+ non-thread-safe methods of objects in other threads may work thousands
+ of times before a concurrent access occurs, causing unexpected behavior.
+ Writing test code does not entirely ensure thread correctness, but it is
+ still important.
+ On Linux, Valgrind and Helgrind can help detect threading errors.
+
+ The anatomy of QThread is quite interesting:
+
+ \list
+ \o QThread does not live in the new thread where \l{QThread::}{run()} is
+ executed. It lives in the old thread.
+ \o Most QThread methods are the thread's control interface and are meant to
+ be called from the old thread. Do not move this interface to the newly
+ created thread using \l{QObject::}{moveToThread()}; i.e., calling
+ \l{QObject::moveToThread()}{moveToThread(this)} is regarded as bad
+ practice.
+ \o \l{QThread::}{exec()} and the static methods
+ \l{QThread::}{usleep()}, \l{QThread::}{msleep()},
+ \l{QThread::}{sleep()} are meant to be called from the newly created
+ thread.
+ \o Additional members defined in the QThread subclass are
+ accessible by both threads. The developer is responsible for
+ coordinating access. A typical strategy is to set the members before
+ \l{QThread::}{start()} is called. Once the worker thread is running,
+ the main thread should not touch the additional members anymore. After
+ the worker has terminated, the main thread can access the additional
+ members again. This is a convenient strategy for passing parameters to a
+ thread before it is started as well as for collecting the result once it
+ has terminated.
+ \endlist
+
+ A QObject's parent must always be in the same thread. This has a surprising
+ consequence for objects generated within the \l{QThread::}{run()} method:
+
+ \code
+ void HelloThread::run()
+ {
+ QObject *object1 = new QObject(this); //error, parent must be in the same thread
+ QObject object2; // OK
+ QSharedPointer <QObject> object3(new QObject); // OK
+ }
+ \endcode
+
+ \section2 Using a Mutex to Protect the Integrity of Data
+
+ A mutex is an object that has \l{QMutex::}{lock()} and \l{QMutex::}{unlock()}
+ methods and remembers if it is already locked. A mutex is designed to be
+ called from multiple threads. \l{QMutex::}{lock()} returns immediately if
+ the mutex is not locked. The next call from another thread will find the
+ mutex in a locked state and then \l{QMutex::}{lock()} will block the thread
+ until the other thread calls \l{QMutex::}{unlock()}. This functionality can
+ make sure that a code section will be executed by only one thread at a time.
+
+ The following line sketches how a mutex can be used to make a method
+ thread-safe:
+
+ \code
+ void Worker::work()
+ {
+ this->mutex.lock(); // first thread can pass, other threads will be blocked here
+ doWork();
+ this->mutex.unlock();
+ }
+ \endcode
+
+ What happens if one thread does not unlock a mutex? The result can be a
+ frozen application. In the example above, an exception might be thrown and
+ \c{mutex.unlock()} will never be reached. To prevent problems like this,
+ QMutexLocker should be used.
+
+ \code
+ void Worker::work()
+ {
+ QMutexLocker locker(&mutex); // Locks the mutex and unlocks when locker exits the scope
+ doWork();
+ }
+ \endcode
+
+ This looks easy, but mutexes introduce a new class of problems: deadlocks.
+ A deadlock happens when a thread waits for a mutex to become unlocked, but
+ the mutex remains locked because the owning thread is waiting for the first
+ thread to unlock it. The result is a frozen application. Mutexes can be
+ used to make a method thread safe. Most Qt methods aren't thread safe
+ because there is always a performance penalty when using mutexes.
+
+ It isn't always possible to lock and unlock a mutex in a method. Sometimes
+ the need to lock spans several calls. For example, modifying a container
+ with an iterator requires a sequence of several calls which should not be
+ interrupted by other threads. In such a scenario, locking can be achieved
+ with a mutex that is kept outside of the object to be manipulated. With an
+ external mutex, the duration of locking can be adjusted to the needs of the
+ operation. One disadvantage is that external mutexes aid locking, but do
+ not enforce it because users of the object may forget to use it.
+
+ \section2 Using the Event Loop to Prevent Data Corruption
+
+ The event loops of Qt are a very valuable tool for inter-thread
+ communication. Every thread may have its own event loop. A safe way of
+ calling a slot in another thread is by placing that call in another
+ thread's event loop. This ensures that the target object finishes the
+ method that is currently running before another method is started.
+
+ So how is it possible to put a method invocation in an event loop? Qt has
+ two ways of doing this. One way is via queued signal-slot connections; the
+ other way is to post an event with QCoreApplication::postEvent(). A queued
+ signal-slot connection is a signal slot connection that is executed
+ asynchronously. The internal implementation is based on posted events. The
+ arguments of the signal are put into the event loop and the signal method
+ returns immediately.
+
+ The connected slot will be executed at a time which depends on what else is
+ in the event loop.
+
+ Communication via the event loop eliminates the deadlock problem we face
+ when using mutexes. This is why we recommend using the event loop rather
+ than locking an object using a mutex.
+
+ \section2 Dealing with Asynchronous Execution
+
+ One way to obtain a worker thread's result is by waiting for the thread
+ to terminate. In many cases, however, a blocking wait isn't acceptable. The
+ alternative to a blocking wait are asynchronous result deliveries with
+ either posted events or queued signals and slots. This generates a certain
+ overhead because an operation's result does not appear on the next source
+ line, but in a slot located somewhere else in the source file. Qt
+ developers are used to working with this kind of asynchronous behavior
+ because it is much similar to the kind of event-driven programming used in
+ GUI applications.
+
+ \section1 Examples
+
+ This tutorial comes with examples for Qt's three basic ways of working with
+ threads. Two more examples show how to communicate with a running thread
+ and how a QObject can be placed in another thread, providing service to the
+ main thread.
+
+ \list
+ \o Using QThread as shown \l{Qt thread basics}{above}
+ \o \l{Example 1: Using the Thread Pool}{Using the global QThreadPool}
+ \o \l{Example 2: Using QtConcurrent}{Using QtConcurrent}
+ \o \l{Example 3: Clock}{Communication with the GUI thread}
+ \o \l{Example 4: A Permanent Thread}{A permanent QObject in another thread
+ provides service to the main thread}
+ \endlist
+
+ The following examples can all be compiled and run independently. The source can
+ be found in the examples directory: examples/tutorials/threads/
+
+ \section2 Example 1: Using the Thread Pool
+
+ Creating and destroying threads frequently can be expensive. To avoid the
+ cost of thread creation, a thread pool can be used. A thread pool is a
+ place where threads can be parked and fetched. We can write the same
+ "hello thread" program as \l{Qt Thread Basics}{above} using the global
+ thread pool. We derive a class from QRunnable. The code we want to run in
+ another thread needs to be placed in the reimplemented QRunnable::run()
+ method.
+
+ \snippet examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp 1
+
+ We instantiate Work in main(), locate the global thread pool and use the
+ QThreadPool::start() method. Now the thread pool runs our worker in another
+ thread. Using the thread pool has a performance advantage because threads
+ are not destroyed after they have finished running. They are kept in a pool
+ and wait to be used again later.
+
+ \section2 Example 2: Using QtConcurrent
+
+ \snippet examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp 1
+
+ We write a global function hello() to implement the work. QtConcurrent::run()
+ is used to run the function in another thread. The result is a QFuture.
+ QFuture provides a method called \l{QFuture::}{waitForFinished()}, which
+ blocks until the calculation is completed. The real power of QtConcurrent
+ becomes visible when data can be made available in a container. QtConcurrent
+ provides several functions that are able to process itemized data on all
+ available cores simultaneously. The use of QtConcurrent is very similar to
+ applying an STL algorithm to an STL container.
+ \l{examples-threadandconcurrent.html}{QtConcurrent Map} is a very short and
+ clear example about how a container of images can be scaled on all available
+ cores. The image scaling example uses the blocking variants of the functions
+ used. For every blocking function there is also a non-blocking, asynchronous
+ counterpart. Getting results asynchronously is implemented with QFuture and
+ QFutureWatcher.
+
+ \section2 Example 3: Clock
+
+ \image thread_clock.png "clock"
+
+ We want to produce a clock application. The application has a GUI and a
+ worker thread. The worker thread checks every 10 milliseconds what time it
+ is. If the formatted time has changed, the result will be sent to the GUI
+ thread where it is displayed.
+
+ Of course, this is an overly complicated way of designing a clock and,
+ actually, a separate thread is unnecessary. We would be better off placing
+ the timer in the main thread because the calculation made in the timer slot
+ is very short-lived. This example is purely for instructional use and shows
+ how to communicate from a worker thread to a GUI thread. Note that
+ communication in this direction is easy. We only need to add a signal
+ to QThread and make a queued signal/slot connection to the main thread.
+ Communication from the GUI to the worker thread is shown in the next
+ example.
+
+ \snippet examples/tutorials/threads/clock/main.cpp 1
+
+ We've connected the \c clockThread with the label. The connection must be a
+ queued signal-slot connection because we want to put the call in the event
+ loop.
+
+ \snippet examples/tutorials/threads/clock/clockthread.h 1
+
+ We have derived a class from QThread and declared the \c sendTime() signal.
+
+ \snippet examples/tutorials/threads/clock/clockthread.cpp 1
+
+ The trickiest part of this example is that the timer is connected to its
+ slot via a direct connection. A default connection would produce a queued
+ signal-slot connection because the connected objects live in different
+ threads; remember that QThread does not live in the thread it creates.
+
+ Still it is safe to access ClockThread::timerHit() from the worker thread
+ because ClockThread::timerHit() is private and only touches local variables
+ and a private member that isn't touched by public methods.
+ QDateTime::currentDateTime() isn't marked as thread-safe in Qt
+ documentation, however we can get away with using it in this small
+ example because we know that the QDateTime::currentDateTime() static
+ method isn't used in any other threads.
+
+ \section2 Example 4: A Permanent Thread
+
+ This example shows how it is possible to have a QObject in a worker thread
+ that accepts requests from the GUI thread, does polling using a timer and
+ continuously reports results back to the GUI thread. The actual work
+ including the polling must be implemented in a class derived from QObject.
+ We have called this class \c WorkerObject in the code shown below. The
+ thread-specific code is hidden in a class called \c Thread, derived from
+ QThread.
+ \c Thread has two additional public members. The \c launchWorker() member
+ takes the worker object and moves it to another thread with a started event
+ loop.
+ The call blocks for a very short moment until the thread creation operation
+ is completed, allowing the worker object to be used again on the next line.
+ The \c Thread class's code is short but somewhat involved, so we only show
+ how to use the class.
+
+ \snippet examples/tutorials/threads/movedobject/main.cpp 1
+
+ QMetaObject::invokeMethod() calls a slot via the event loop. The worker
+ object's methods should not be called directly after the object has been
+ moved to another thread. We let the worker thread do some work and polling,
+ and use a timer to shut the application down after 3 seconds. Shutting the
+ worker down needs some care. We call \c{Thread::stop()} to exit the event
+ loop. We wait for the thread to terminate and, after this has occurred, we
+ delete the worker.
+
+ \section1 Digging Deeper
+
+ Threading is a very complicated subject. Qt offers more classes for
+ threading than we have presented in this tutorial. The following materials
+ can help you go into the subject in more depth:
+
+ \list
+ \o Good video tutorials about threads with Qt can be found in the material
+ from the \l{Training Day at Qt Developer Days 2009}.
+ \o The \l{Thread Support in Qt} document is a good starting point into
+ the reference documentation.
+ \o Qt comes with several additional examples for
+ \l{Threading and Concurrent Programming Examples}{QThread and QtConcurrent}.
+ \o Several good books describe how to work with Qt threads. The most
+ extensive coverage can be found in \e{Advanced Qt Programming} by Mark
+ Summerfield, Prentice Hall - roughly 70 of 500 pages cover QThread and
+ QtConcurrent.
+ \endlist
+*/
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index 2125edcd03..4877339348 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -27,6 +27,7 @@
/*!
\page widgets-tutorial.html
+ \ingroup tutorials
\title Widgets Tutorial
\brief This tutorial covers basic usage of widgets and layouts, showing how
they are used to build GUI applications.
@@ -133,19 +134,13 @@
In the following example, we use QWidget to create and show a window with
a default size:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/toplevel/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-toplevel.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/toplevel/main.cpp main program
+ \o \inlineimage widgets-tutorial-toplevel.png
+ \endtable
+ \enddiv
To create a real GUI, we need to place widgets inside the window. To do
this, we pass a QWidget instance to a widget's constructor, as we will
@@ -161,19 +156,13 @@
passing \c window as the parent to its constructor. In this case, we add a
button to the window and place it in a specific location:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/childwidget/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-childwidget.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/childwidget/main.cpp main program
+ \o \inlineimage widgets-tutorial-childwidget.png
+ \endtable
+ \enddiv
The button is now a child of the window and will be deleted when the
window is destroyed. Note that hiding or closing the window does not
@@ -189,19 +178,13 @@
construct a label and line edit widget that we would like to arrange
side-by-side.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/windowlayout/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-windowlayout.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/windowlayout/main.cpp main program
+ \o \inlineimage widgets-tutorial-windowlayout.png
+ \endtable
+ \enddiv
The \c layout object we construct manages the positions and sizes of
widgets supplied to it with the \l{QHBoxLayout::}{addWidget()} function.
@@ -233,20 +216,14 @@
\c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a
QTableView arranged vertically.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/nestedlayouts/main.cpp first part
- \snippet tutorials/widgets/nestedlayouts/main.cpp last part
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-nestedlayouts.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
+ \o \inlineimage widgets-tutorial-nestedlayouts.png
+ \endtable
+ \enddiv
Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()}
function to insert the \c{queryLayout} above the \c{resultView} table.
diff --git a/doc/src/webkit/guide/chapter_cache.qdoc b/doc/src/webkit/guide/chapter_cache.qdoc
new file mode 100644
index 0000000000..fcfd20860d
--- /dev/null
+++ b/doc/src/webkit/guide/chapter_cache.qdoc
@@ -0,0 +1,511 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/*!
+
+\page qtwebkit-guide-cache.html
+\title QtWebKit Guide - Client Storage
+\chapter Client Storage
+
+This section of the \l{QtWebKit Guide} serves as an introduction to the
+\l{HTML5 Web Storage} features of QtWebKit.
+
+Traditional mobile web development centered around the limitations of client
+handsets, which had very little storage for applications. As handsets become
+more powerful, however, this assumption is no longer valid. HTML5's newly
+introduced \l{HTML5 Web Storage}{Web Storage} features expand application
+storage on the client.
+
+HTML 5 standardizes access to an application's local data via \c{LocalStorage}
+and \c{SessionStorage} APIs. These APIs boost the amount of client storage
+available to web applications. They also can effectively replace cookies as a
+means to maintain application state and track user preferences.
+
+Local storage persists indefinitely, while session storage lasts only for the
+duration of a window session. Local storage is available from any page or window
+from the same site, while session storage is local to each window. Both local
+and session storage rely on simple key/value pairs, with keys and values both
+stored as strings.
+
+Local and session storage are not the only client storage available. HTML 5
+WebSQL serves as a more full-featured, client-side database. WebSQL brings
+SQLite-based structured database functionality, typically deployed on servers,
+to client browser applications. WebSQL is appropriate for data-intensive
+applications requiring complex queries rather than simple key/value access.
+WebSQL database transaction calls help avoid interfaces from locking up,
+facilitate rollback and error handling, and protect against SQL injection.
+Database versioning allows you to manage schema changes incrementally.
+
+
+\section1 Simple Data Storage
+
+The \c{localStorage} and \c{sessionStorage} APIs offer applications up to 5MB of
+data storage. They both share the same simple key/value interface, but have
+different namespaces and also differ in the extent to which data is available.
+Local storage persists indefinitely, while session storage only lasts for the
+duration of a window session. Local storage is available from any page or window
+from the same site, while session storage is local to each window.
+
+The following examples demonstrate the API interface. While these use
+\c{localStorage} as an example, the same set of API calls work for
+\c{sessionStorage}, which is also available within the \c{window} object.
+
+The following performs an initial check for support of browser-based
+storage and assigns the database to a variable:
+
+\code
+if (window.localStorage) {
+ var db = window.localStorage;
+ // storage functionality here
+}
+else {
+ // store data remotely?
+}
+\endcode
+
+The \c{getItem()} method retrieves the value of a database field named
+\c{key}:
+
+\code
+var value = db.getItem("key");
+\endcode
+
+Note that both keys and values are represented as strings. If you specify any
+other type of data, it is converted silently to a string representation. (See
+\l{Storing Non-String Data} for ways around this limitation.) If \c{getItem()}
+returns \c{null} rather than a string value, it means the specified key does not
+exist.
+
+The \c{setItem()} method establishes a new value. When adding data, it is a good
+idea to check to make sure you haven't exceeded the allotted storage space:
+
+\code
+try {
+ db.setItem("key", "string");
+}
+catch(err) {
+ if (err.QUOTA_EXCEEDED_ERR) {
+ // storage space is exceeded
+ }
+}
+\endcode
+
+The \c{removeItem()} method deletes database fields:
+
+\code
+db.removeItem("key");
+\endcode
+
+The \c{clear()} method deletes all key/value pairs within the database, either
+for an entire site in the case of \c{localStorage}, or for an individual window
+session in the case of \c{sessionStorage}:
+
+\code
+db.clear();
+\endcode
+
+Databases can be accessed as arrays using index notation, useful in cases where
+you may not know all the field names. The \c{length} property returns the number
+of fields in the database, and the \c{key()} method returns the name of the key
+corresponding to a given index. The following reflects the contents of a
+database in a JavaScript object:
+
+\code
+var obj = {};
+for ( var i = 0, l = db.length ; i < l ; i++ ) {
+ obj[ db.key(i) ] = db.getItem( db.key(i) );
+}
+\endcode
+
+Since keys correspond to array indexes, you should not add or remove keys during
+any operation that iterates over the full set of key/value pairs. Newly
+introduced keys are introduced randomly into the array's sequence.
+
+The following displays simple storage functionality. The application prompts for
+a login and password if they are unavailable. This locally stored data is
+available the next time users open the browser. However, the contents of the
+credit card field is stored only for the duration of the browing session.
+
+\l{ex_storage}{\inlineimage webkit-guide/scr_storage.png
+}
+
+\l{storage_css}{(CSS)}
+\l{storage_js}{(JavaScript)}
+
+
+ \section2 Storing Non-String Data
+
+ Since local and session storage APIs only support string values, you need to
+ be careful not to allow errors that result from passive conversions from
+ other data types. The following sample shows how such an error might come
+ about:
+
+ \code
+ var db = window.localStorage;
+ var saveCardInfo;
+ // user expresses preference NOT to save credit card info:
+ saveCardInfo = false;
+ // BUG happens here...
+ db.setItem("save_card_info", saveCardInfo);
+ // variable is now a string, not a boolean:
+ saveCardInfo = db.getItem("save_card_info");
+ // both "true" and "false" strings evaluate as true...
+ if ( saveCardInfo ) {
+ // ...so this code always executes...
+ }
+ else {
+ // ...and this code never executes.
+ }
+ \endcode
+
+ The user's preference to retain credit card information is expressed within
+ the application as a \c{true} or \c{false} boolean value. When each value is
+ passed to storage, however, it is passively converted to a string. When
+ reassigned to a JavaScript variable, it no longer serves as a valid boolean
+ test. The application falsely assumes users want to save credit card
+ information, regardless of their expressed preference.
+
+ The following sample fixes the problem. Instead of using \c{true} and
+ \c{false} boolean values, it converts \c{1} and \c{0} strings to numbers:
+
+ \code
+ var db = window.localStorage;
+ var saveCardInfo = 0;
+ db.setItem("save_card_info", saveCardInfo);
+ // multiplying forces numeric output:
+ saveCardInfo = db.getItem("save_card_info") * 1;
+ \endcode
+
+ For a more reliable alternative, store values as JSON strings and rely on
+ automatic type conversion when subsequently parsing them. The following
+ sample shows how parsing JSON preserves both boolean and numeric data:
+
+ \code
+ var saveCardInfo = true; // boolean
+ var shipMethod = 2; // number
+ var db = window.localStorage;
+
+ db.setItem("save_card_info", JSON.stringify(saveCardInfo));
+ db.setItem("ship_method", JSON.stringify(shipMethod));
+
+ saveCardInfo = JSON.parse(db.getItem("save_card_info")); // boolean
+ shipMethod = JSON.parse(db.getItem("ship_method")); // number
+ \endcode
+
+ Note that this simple approach may cause problems of its own. For example,
+ perhaps the words \c{true} and \c{false} really should be represented
+ as strings. Encapsulating data within objects accounts for such variability:
+
+ \code
+ var db = window.localStorage;
+ var obj = {
+ bool : true,
+ str : "true",
+ num : 1
+ };
+ db.setItem("appState", JSON.stringify(obj)); // to database...
+ // "appState" is "{'bool':true,'num':1,'str':'true'}"
+ obj = JSON.parse(db.getItem("appState")); // ...and back
+ // obj is same as initially defined.
+ \endcode
+
+ The ability to save objects as JSON strings means that you can save an
+ application's state within a single database field. For example, you might
+ use the following approach to save the entire contents of a shopping cart in
+ a single field for later use:
+
+ \code
+ var db = window.localStorage;
+ var cart = { items: [] };
+
+ cart.message = "From your loving uncle";
+
+ cart.items.push({
+ description : "Floor to Ceiling Shoe Rack",
+ id : 203174676,
+ price : 99.95,
+ quantity : 1,
+ weight : 20,
+ });
+
+ cart.items.push({
+ description : "Automatic Laser Toy for Cats",
+ id : 203345371,
+ price : 19.95,
+ quantity : 2,
+ weight : 0.5,
+ });
+
+ // save all cumulative items:
+ db.setItem("cart", JSON.stringify(cart));
+
+ // extract items from storage:
+ cart = JSON.parse(db.getItem("cart"));
+ \endcode
+
+ JSON allows you to store data types, but functions are ignored. That makes
+ it more difficult to preserve objects representing fully functional
+ applications.
+
+ \section2 Storage Events
+
+ The \c{storage} event allows applications to respond indirectly to modified
+ data resulting from calls to \c{setItem()}, \c{removeItem()}, or
+ \c{clear()}. This may be useful in providing users with visual feedback
+ notifying them of data that is modified locally, perhaps rather than being
+ sent to a remote server:
+
+ \code
+ window.addEventListener("storage", function(event){
+ var icon = document.querySelector("#indicator");
+ if (event.storageArea.length) {
+ icon.className = "writing";
+ }
+ else {
+ icon.className = "empty";
+ }
+ }, false);
+ \endcode
+
+ The \c{storage} event's \c{storageArea} attribute returns the
+ \c{localStorage} or \c{sessionStorage} object being modified. The \c{key} is
+ the name of the field being modified, and \c{oldValue} and \c{newValue} are
+ its values before and after the event. The \c{url} is the page that called
+ the method triggering the change.
+
+
+\section1 WebSQL Databases
+
+While common local- or session-based databases are capable of storing complex
+data structures, QtWebKit-based browsers can also rely upon the WebSQL standard,
+which brings SQLite-based structured database functionality, typically deployed
+on servers, to client browser applications. Based on SQLite version 3.6.19,
+WebSQL is appropriate for data-intensive applications requring complex queries
+rather than simple key/value access.
+
+The following test confirms support for WebSQL:
+
+\code
+if (!!window.openDatabase) {
+ // supports WebSQL
+}
+\endcode
+
+Calls to databases made via the WebSQL API are made asynchronously via
+transactions to avoid the user interface from locking up, as database
+interaction may occur from several windows at a time.
+
+The three core API methods are:
+
+\list
+\o \c{openDatabase()}
+\o \c{transaction()}
+\o \c{executeSql()}
+\endlist
+
+ \section2 Creating and Opening a New Database
+
+ To create and open a database, use \c{openDatabase()}on the Window object,
+ for example:
+
+ \code
+ var db = openDatabase('mydb', '1.0', 'my first database', 2*1024*1024);
+ var db = openDatabase('notes', '', 'The Example Notes App!', 1048576);
+ \endcode
+
+ The four required arguments are the database name, version, display name,
+ and estimated size in bytes. You can supply a function as an optional fifth
+ argument to serve as a callback when a database is created. It may be used
+ to call the \c{changeversion()} method, in which case the callback is
+ invoked with an empty string for the database version.
+
+ The second example above specifies an empty string for the version. In this
+ case, the database opens no matter what the database version is. (An
+ \c{openDatabase()} call specifying the wrong version for an existing
+ database throws an \c{INVALID_STATE_ERR} exception.) You can then query the
+ version by examining the database object's version property, for example:
+
+ \code
+ var version = db.version;
+ \endcode
+
+ Note that you don't need to close a client-side Web SQL database when
+ you're done working with it.
+
+ \section2 Transaction Calls and ExecuteSQL Method
+
+ Performing database transactions is superior to running SQL statements
+ directly because transactions are not committed if they fail and you can
+ undo them if needed. Transactions also allow you to handle errors using a
+ callback. To implement a transaction, specify a callback function such as
+ the following:
+
+ \code
+ db.transaction(function (tx) {
+ // SQL details on the tx object go here
+ }
+ \endcode
+
+ The \c{transaction()} method takes one to three arguments:
+
+ \list
+ \o a required transaction callback, in which \c{executeSQL()} calls
+ belong
+ \o an optional transaction error object
+ \o an optional success callback.
+ \endlist
+
+ Use the \c{executeSQL()} method to specify SQL statements for read and write
+ operations. The method protects against SQL injection and provides a
+ callback method to process the results of any SQL queries you specify. The
+ \c{executeSQL()} method takes from one to four arguments:
+
+ \list
+ \o a required SQL statement
+ \o an optional object array of arguments
+ \o an optional SQL statement callback
+ \o an optional SQL statement error callback
+ \endlist
+
+ The example below creates the database if it doesn't exist, adds a
+ two-column table to the database, and adds a row of data to the table:
+
+ \code
+ var db = openDatabase('mydb', '1.0', 'my first database', 2 * 1024 * 1024);
+ db.transaction(function (tx) {
+ tx.executeSql('CREATE TABLE IF NOT EXISTS foo (id unique, text)');
+ tx.executeSql('INSERT INTO foo (id, text) VALUES (1, "synergies")');
+ });
+ \endcode
+
+ To capture data from the user or an external source, use \c{?} placeholders
+ to map that data into the SQL query. This ensures the data doesn't
+ compromise database security, for example from SQL injection:
+
+ \code
+ tx.executeSql('INSERT INTO foo (id, text) VALUES (?, ?)', [id, value]);
+ \endcode
+
+ \c{id} and \c{value} are external variables, and \c{executeSql} maps
+ the items in the array to the \c{?}s.
+
+ To select values from the table, use a callback to capture the results:
+
+ \code
+ tx.executeSql('SELECT * FROM foo', [], function(tx, results) {
+ for (var i = 0 , len = results.rows.length; i < len; i++) {
+ // do something with results.rows.item(i).text
+ }
+ });
+ \endcode
+
+ No fields are mapped in the above query, but to use the third argument you
+ need to pass in an empty array as the second argument.
+
+ The SQL statement callback for \c{executeSQL()} is called with the
+ \c{transaction} object and a SQL statement \c{result} object. The \c{result}
+ gives access to the ID of the last inserted row, the number of rows
+ affected, and an indexed list representing the rows returned, in the order
+ returned.
+
+ The \c{result} object contains an array-like \c{rows} object. It has a
+ length, but to access individual rows you need to use
+ \c{results.rows.item(i)}, where \c{i} is the index of the row. This returns
+ an object representation of each row. For example, if your database has a
+ \c{name} and an \c{age} field, the \c{row} contains a \c{name} and an
+ \c{age} property. The value of the \c{age} field can be accessed using
+ \c{results.rows.item(i).age}.
+
+ \section2 Changing Database Versions
+
+ Each database has one version at a time and multiple versions cannot exist
+ at one time. Versions allow you to manage schema changes incrementally.
+
+ You can change the version of a client-side Web SQL database using the
+ \c{changeversion()} method:
+
+ \code
+ if (db.version == "1.0") {
+ try {
+ // comment out for crash recovery.
+ db.changeVersion("1.0", "2.0", cv_1_0_2_0, oops_1_0_2_0, success_1_0_2_0);
+ } catch(e) {
+ alert('changeversion 1.0 -> 2.0 failed');
+ alert('DB Version: '+db.version);
+ }
+ }
+ \endcode
+
+ \c{changeversion()} takes the following arguments: required old and new
+ version numbers, optional SQL transaction callback, optional SQL transaction
+ error callback, and optional success callback.
+
+ \section2 Errors
+
+ Asynchronous API errors are reported using callbacks that have a
+ \c{SQLError} object as one of their arguments. \c{SQLError} contains a code
+ from the table below and a localized message string.
+
+ Error codes are:
+
+ \list
+ \o 0 \c{UNKNOWN_ERROR} Transaction failed for reasons unrelated to the DB
+ \o 1 \c{DATABASE_ERROR} Statement failed for DB reasons not covered by other
+ code
+ \o 2 \c{VERSION_ERROR} DB version doesn't match expected version
+ \o 3 \c{TOO_LARGE_ERROR} Data returned from DB was too large. Try the
+ \c{SQL LIMIT} modifier.
+ \o 4 \c{QUOTA_ERROR} Insufficient remaining storage
+ \o 5 \c{SYNTAX_ERROR} Syntax error, argument mismatch, or unallowed
+ statement
+ \o 6 \c{CONSTRAINT_ERROR} An \c{INSERT}, \c{UPDATE}, or \c{REPLACE}
+ statement failed due to a constraint error
+ \o 7 \c{TIMEOUT_ERROR} Timeout waiting for transaction lock
+ \endlist
+
+ \bold{See Also:}
+ \l{HTML5 Doctor: Introducing Web SQL Databases}
+
+\list
+\o \l{QtWebKit Guide} -back to the main page
+\endlist
+*/
+
+*/
diff --git a/doc/src/webkit/guide/chapter_canvas.qdoc b/doc/src/webkit/guide/chapter_canvas.qdoc
new file mode 100644
index 0000000000..eea2236171
--- /dev/null
+++ b/doc/src/webkit/guide/chapter_canvas.qdoc
@@ -0,0 +1,1016 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+/*!
+
+\page qtwebkit-guide-canvas.html
+\title QtWebKit Guide - Canvas Graphics
+
+\chapter Canvas Graphics
+This section of the \l{QtWebKit Guide} serves as an introduction to the
+\l{HTML5 Canvas API} features of QtWebKit.
+
+The \l{HTML5 Canvas API} enables you to draw within a Web page or Web App using
+JavaScript. After you define a rectangle that serves as your drawing canvas, you
+can draw straight and curved lines, simple and complex shapes, graphs, and
+referenced graphic images. You can add text, color, shadows, gradients, and
+patterns. The canvas API also enables you to save or export the canvas as a .png
+or .jpeg image file.
+
+To define the drawing area, set the \c{width} and \c{height} of a \c{<canvas>}
+element. For example, the following sets a drawing area with a height of 100
+pixels and width of 200 pixels:
+
+\code
+<canvas id="mycanvas" width="100" height="200"></canvas>
+\endcode
+
+By default, \c{canvas} elements are sized 150 pixels high and 300 pixels wide.
+You can also set the size of the canvas using CSS:
+
+\code
+canvas { height : 200px; width : 100px; }
+\endcode
+
+The \c{canvas} element is transparent and has no visible borders until you
+\l{Accessing the Rendering Context}{access the 2D rendering context}.
+
+Resetting the width or height of an existing canvas erases its contents and
+resets all the context properties of the canvas to their default values.
+
+\section1 Accessing the Rendering Context
+
+The rendering \bold{context} defines the methods and attributes needed to draw
+on the canvas. QtWebKit currently supports the two-dimensional rendering
+context. The following assigns the canvas rendering context to a \c{context}
+variable:
+
+\code
+var context = canvas.getContext("2d")
+\endcode
+
+The 2d context renders the canvas as a coordinate system whose origin (0,0) is
+at the top left corner, as shown in the figure below. Coordinates increase along
+the \c{x} axis from left to right and along the \c{y} axis from top to bottom of
+the canvas.
+
+\image webkit-guide/canvas_context.gif
+
+\section1 Drawing Shapes
+
+The 2D rendering context supports rectangles, lines, and arcs, which
+you can combine to build complex shapes and graphic images.
+
+ \section2 Drawing Rectangles
+
+ The rectangle is the only geometric shape that is built in to the
+ canvas API. You can draw an outline of a rectangle, a filled
+ rectangle, and a filled rectangle with clear parts. You do not have to
+ create a path to draw a rectangle.
+
+ To draw an outline of a rectangle, use the \c{strokeRect()} method.
+
+ To draw a filled rectangle, use the \c{fillRect()} method. The default
+ fill color is black.
+
+ To clear part of a filled rectangle, use the \c{clearRect()} method.
+
+ Each method accepts the following series of arguments:
+
+ \list
+ \o \c{x} is the position on the canvas to the right of the origin
+ (0,0) of the top left corner of the rectangle
+ \o \c{y} is the position on the canvas below the origin of the top
+ left corner of the rectangle
+ \o \c{width} is the width of the rectangle to be drawn
+ \o \c{height} is the height of the rectangle to be drawn
+ \endlist
+
+ For example, the following code draws concentric rectangles:
+
+ \code
+ var context = canvas.getContext("2d");
+ canvas.strokeRect(50,50,50,50);
+ canvas.fillRect(60,60,30,30);
+ canvas.clearRect(70,70,10,10);
+ \endcode
+
+ \image webkit-guide/canvas_rectangles.gif
+
+ \section2 Drawing Lines
+
+ To draw a line, you first have to \e{"put your pencil down"} on the canvas
+ by creating a path. The \c{context.beginPath()} method sets a new path
+ in the canvas. Each line that you draw is stored as a sub-path.
+ Sub-paths can be closed to form a shape, or they can be left open.
+ Each time you want to draw a new shape, you have to call the
+ \c{beginPath()} method to reset the current path.
+
+ After calling \c{beginPath()}, you set your starting position on the
+ canvas by calling the \c{context.moveTo(x,y)} method. The
+ \c{moveTo(x,y)} method creates a new subpath on the canvas that begins
+ at the Cartesian point \c{(x,y)}.
+
+ To draw a straight line, call the \c{context.lineTo(x,y)} method. This
+ adds the point (x,y) to the current subpath and connects it to the
+ previous subpath by a straight line. In other words, (x,y) are the
+ coordinates of the line's endpoint. For example:
+
+ \code
+ context.beginPath();
+ context.moveTo(10,10);
+ context.lineTo(30,30);
+ \endcode
+
+ To get the \e{pencil} to actually draw on the canvas, first use the
+ \c{strokeStyle} property to set the color to a value such as black
+ (\c{#000}):
+
+ \code
+ context.strokeStyle(#000);
+ \endcode
+
+ (The \c{strokeStyle} property can be a CSS color, a pattern, or a gradient.)
+ Then use the \c{context.stroke()} method to actually draw the line on the
+ canvas:
+
+ \code
+ context.stroke();
+ \endcode
+
+ This produces the image below. The numeric coordinates are added for clarity
+ but are not part of the image drawn by the code:
+
+ \image webkit-guide/canvas_lineStrokeTo.gif
+
+ To create a shape, call the \c{context.closePath()} method:
+
+ \code
+ context.closePath();
+ context.moveTo(10,10); // starting point
+ context.lineTo(30,30); // specify first line
+ context.moveTo(30,30); // move to end of first line
+ context.lineTo(60,10); // specify second line
+ context.moveTo(60,10); // move to end of second line
+ context.lineTo(10,10); // specify third line to close triangle
+ context.strokeStyle("#000"); // use black color for lines
+ context.stroke(); // draws the triangle lines on the canvas
+ \endcode
+
+ To fill the shape, use the \c{fillstyle} property and the \c{fill()}
+ method:
+
+ \code
+ context.fillStyle("#FF0000"); // use red color for fill
+ context.fill(); // fill the triangle
+ \endcode
+
+ The commands, if coded fully, would create the shape below:
+
+ \image webkit-guide/canvas_closepath.gif
+
+ \note It is not necessary to close the path when calling the \c{fill()}
+ method. Calling \c{fill()} closes the path and creates the completed shape.
+
+ You can draw lines of various widths, endcap types, and joining options by
+ configuring the following attributes:
+
+ \list
+ \o \c{lineWidth} sets the thickness of the current line. The value can be
+ any number greater than \c 0. For example, \c{context.lineWidth = 10} sets
+ the line thickness to \c 10 units. The default value is \c 1 unit, which is
+ not the same as \c 1 \e pixel. Instead, the line is centered on the current
+ path, with half its thickness on each side of the path.
+ \o \c{lineCap} sets the type of endpoint of the current line. The value can
+ be either \c{butt}, \c{square}, or \c{round}. (The default value is
+ \c{butt}.)
+ \list
+ \o \c{butt}- the ends of the line abutt the line guide.
+ \o \c{square} adds a box at both ends of the line.
+ \o \c{round} adds a semicircle at both ends of the line.
+ \endlist
+
+ \o \c{lineJoin} sets the style with which lines are joined. The value
+ can be either \c{bevel}, \c{round}, or \c{miter}. (The default value
+ is \c{miter}.)
+ \list
+ \o \c{bevel} flattens the corners at which the lines join
+ \o \c{round} rounds the corners at which the lines join
+ \o \c{miter} joins the lines at a single point
+ \endlist
+ \o \c{miterLimit} sets the \e{miter limit ratio}. The value can be any
+ number greater than \c 0. The miter limit ratio determines how far the
+ connection point of the outside of the lines can be from the connection
+ point of the inside of the lines. (The default value is \c 10.)
+ \endlist
+
+ \image webkit-guide/canvas_linecap.png
+
+ \section2 Drawing Arcs
+
+ To draw an arc, you begin with the same steps your followed to create
+ a line:
+
+ \list 1
+ \o Call the \c{context.beginPath()} method to \e{"put your pencil down"} on
+ the canvas and set a new path.
+ \o Call the \c{context.moveTo(x,y)} method to set your starting position on
+ the canvas at the point (x,y).
+ \o To draw an arc or circle, call the \c{context.arcTo(x1,y1,x2,y2,radius)}
+ method. This adds an arc with starting point \c{(x1,y1)}, ending point
+ \c{(x2,y2)}, and radius \c{radius} to the current subpath and connects it to
+ the previous subpath by a straight line.
+
+ \image webkit-guide/canvas_arcTo.png
+
+ \o An alternative way to draw an arc or circle is to call the
+ \c{context.arc(x,y,radius,startAngle,endAngle,anticlockwise)} method. This
+ adds an arc to the current subpath that lies on the circumference of the
+ circle whose center is at the point (x,y) and whose radius is \c{radius}.
+
+ \image webkit-guide/canvas_arcTo2.png
+
+ Both \c{startAngle} and \c{endAngle} are measured from the x axis in units
+ of radians.
+
+ A complete circle is \c 360 degrees, or 2\pi radians. A semicircle is \c 180
+ degrees, or \pi radians. The number of radians is the number of degrees
+ multiplied by \pi/180, expressed in JavaScript as:
+
+ \code
+ var radians = (Math.PI/180)*degrees;
+ \endcode
+
+ \image webkit-guide/canvas_startAngle.png
+
+ \c{anticlockwise} has the value \c{TRUE} for each arc in the figure
+ above because they are all drawn in the counterclockwise direction.
+
+ \o To create a shape, call the \c{context.closePath()} method. This
+ marks the current subpath as closed and draws a straight line from the
+ current point to the first point in the path.
+
+ \o To draw only the outline of the shape, call the \c{context.stroke()}
+ method.
+
+ \o To fill in the shape, call the \c{context.fill()} method.
+
+ \o To set the color of the fill, set the \c{strokeStyle}. For example,
+ the code
+
+ \code
+ context.strokeStyle = "#FF0000";
+ \endcode
+
+ sets the fill color to red.
+
+ \endlist
+
+ \note It is not necessary to close the path if you are going to call
+ the \c{fill()} method. The fill closes the path and creates the completed
+ shape.
+
+ To create complex shapes, combine lines and arcs:
+
+ \list 1
+ \o Call the \c{context.beginPath()} method to \e{"put your pencil down"} on
+ the canvas and set a new path.
+ \o Call the \c{context.moveTo(x,y)} method to set your starting position on
+ the canvas at the point (x,y).
+ \o Draw any combination of lines and arcs by calling the \c{lineTo},
+ \c{arcTo}, \c{arc}, \c{moveTo}, \c{closePath}, \c{stroke}, and \c{fill}
+ methods and setting the line attributes and fill colors as described above.
+ \endlist
+
+ You can also create complex shapes by removing portions of the shapes you
+ draw. The \c{clip()} method creates a clipping path that defines the area
+ along which your "scissor" will cut. Any parts of the shape outside the
+ clipping path are not displayed. To create a complex shape using the
+ \c{clip()} method:
+
+ \list 1
+ \o Call the \c{context.beginPath()} method to set the clipping path.
+ \o Define the clipping path by calling any combination of the \c{lineTo},
+ \c{arcTo}, \c{arc}, \c{moveTo}, and \c{closePath} methods.
+ \o Call the \c{context.clip()} method.
+ \endlist
+
+ The new shape displays. The following shows how a clipping path can
+ modify how an image displays:
+
+ \image webkit-guide/canvas_clip-complex.png
+
+\section1 Compositing
+
+You can build complex shapes by drawing shapes on top of each other. It is also
+possible to draw shapes behind existing shapes and to mask parts of shapes by
+using \e{compositing operations}. The \c{globalCompositeOperation} attribute
+sets the way shapes can be combined.
+
+The first shape drawn on the canvas to which additional shapes are added is
+called the \e{destination} shape. The shape drawn on the canvas afterwards to
+create the composite image is called the \e{source} shape. The value of the
+\c{globalCompositeOperation} attribute must be set to one of the following:
+
+\list
+\o \c{source-over} displays the source (newer) shape over the destination
+(older) shape unless the source shape is transparent. (This is the default
+value)
+
+\o \c{source-in} displays only the portion of the source shape that is opaque
+and overlaps the destination shape. Everything else is transparent.
+
+\o \c{source-out} displays only the portion of the source shape that does not
+overlap the destination shape.
+
+\o \c{source-atop} displays only the portion of the opaque source shape that
+overlaps the destination shape and the portion of the destination shape that is
+not covered by the opaque source shape.
+
+\o \c{destination-over} displays the destination shape over the source shape. In
+areas where both shapes are opaque and overlap, the older shape displays.
+
+\o \c{destination-in} displays only the portion of the destination shape that is
+opaque and overlaps the source shape. Everything else is transparent. The source
+(newer) shape is not visible.
+
+\o \c{destination-out} displays only the portion of the destination shape that
+does not overlap the source shape. The source shape is not visible.
+
+\o \c{destination-atop} displays only the portion of the opaque destination
+shape that overlaps the source shape and the portion of the source shape that is
+not covered by the opaque destination shape.
+
+\o \c{lighter} displays both the source and destination shapes. Where the shapes
+overlap, the their color values are added, producing a lighter color.
+
+\o \c{copy} displays only the source shape. The destination shape is ignored.
+
+\o \c{xor} displays both the source and the destination shapes except the areas
+of overlap, in which both shapes are completely transparent.
+\endlist
+
+The following figure shows the various compositing effects:
+\image webkit-guide/canvas_composite.png
+
+\section1 Saving and Exporting Canvas Drawings as Image Files
+
+You can save or export your canvas drawings as .png or .jpeg image files by
+calling the \c{toDataURL()} method:
+
+\code
+canvas.toDataURL([type, ...])
+\endcode
+where:
+\list
+\o \c{type} is the MIME type to which you want to save or export your canvas.
+Possible values are:
+ \list
+ \o \c{"image\png"} (Default value)
+ \o \c{"image\jpeg"}
+ \endlist
+\o\c{...} represents additional arguments that depend on the MIME type.
+ \list
+ \o If \c{type} is \c{png}, this argument is \c{" "}
+ \o If \c{type} is \c{jpeg}, this argument is the desired quality level of the
+ image. The value is a number in the range 0.0 to 1.0, inclusive.
+ \endlist
+\endlist
+
+\section1 Drawing Text
+
+You can draw text on your canvas by setting the following font attributes on the
+2d drawing context:
+
+\list
+\o \c{font} refers to any font, expressed the same way as in CSS properties.
+This attribute's value can include any font style, variant, weight, size,
+height, and family. For example:
+
+ \code
+ context.font = "12pt Arial";
+ \endcode
+
+ The default value is \c{10px sans-serif}.
+
+ If you set the \c{font} attribute to a
+ relative font size, the browser multiplies it by the computed font size of the
+ \c{<canvas>} element itself. For example:
+
+ \code
+ context.font = "200%";
+ \endcode
+
+\o \c{textAlign} specifies the alignment of the text. The values can be one of
+the following:
+ \list
+ \o \c{left} for left-aligned text
+ \o \c{right} for right-aligned text
+ \o \c{center} for text that is centered within each line
+ \o \c{start} (default) - the text is aligned at the beginning of the line. Text
+ is left- or right-justified based on locale-specific writing method: left when
+ text is left-to-right, right when text is right-to-left.
+ \o \c{end} - the text is aligned at the end of the line, either left or right
+ depending on locale-specific writing method.
+ \endlist
+
+\o \c{textBaseline} specifies the position at which text is drawn relative to a
+baseline. The figure below, from \l{HTML5 Canvas API}, illustrates the possible
+values for the \c{textBaseline} attribute:
+ \list
+ \o \c{top} is the top of the em square, which approximates the top of the glyphs
+ in a font
+ \o \c{hanging} specifies a hanging baseline, where the tops of some glyphs are
+ anchored.
+ \o \c{middle} is the mid-point of the em square
+ \o \c{alphabetic} (default) is the anchor point of many alphabetic characters
+ \o \c{ideographic} is the anchor point of many ideograms, such as the characters
+ used in the writing systems of many Asian languages
+ \o \c{bottom} is the bottom of the em square
+ \endlist
+\endlist
+
+\image webkit-guide/canvas_text.png
+
+To draw text on a canvas:
+\list 1
+\o Set the \c{font} attribute on the drawing context. For example:
+ \code
+ context.font = "bold 11px arial"
+ \endcode
+\o Measure the text that you want to draw by calling the \c{measureText} method:
+ \code
+ TextMetrics measureText("Text to draw");
+ \endcode
+where \c{TextMetrics} is the object returned. Its \c{width} attribute is the
+width, in pixels, that the \c{"Text to draw"} would be when drawn with the font
+specified by the \c{font} attribute.
+\o Call either of the following methods:
+ \list
+ \o \c{fillText} draws the text with the font style specified by the \c{font}
+ attribute, the alignment specified by the \c{textAlign} attribute, and the
+ baseline specified by the \c{textBaseline} attribute. For example:
+ \code
+ context.fillText("Text to draw",x,y,maximumWidth);
+ \endcode
+where \c{x} and \c{y} are the coordinates at which the drawing begins (the
+anchor point), and \c{maximumWidth} is the maximum width of the text string
+(optional). If the \c{width} returned in step 2 is larger than the
+\c{maximumWidth}, the font is scaled down until the width of the text string is
+less than the \c{maximumWidth} specified.
+
+If you don't specify the \c{font} attribute, the text inherits the font size and
+style of the \c{<canvas>} element itself.
+
+\o \c{strokeText} is the same as the \c{fillText} method, except that
+a stroke style is applied to the text instead of a fill style,
+creating outlines of glyphs. For example:
+
+\code
+context.fillText("Text to stroke",x,y,maximumWidth);
+\endcode
+
+\endlist
+
+\endlist
+
+\section1 Working with Images
+
+You can insert existing images onto your canvas, you can scale or crop
+them, and you can combine them to create composite images. You can
+also draw new images by creating an \c{Image()} object with JavaScript.
+
+To insert an existing image onto a canvas, call the \c{drawImage} method:
+
+\code
+context.drawImage(image, dx, dy, dw, dh)
+\endcode
+
+where:
+
+\list
+
+\o \c{image} is a reference to an HTML \c{<image>} or \c{<canvas>}
+element. The image must be fully loaded before you can draw it on the
+canvas. The reference cannot be a URL. Instead, it should be
+referenced using standard DOM methods such as \c{document.images()} or
+\c{document.getElementById()}. For example:
+
+\code
+<canvas id="demo1" width="100" height="150"></canvas>
+
+var canvas = document.getElementById("demo1");
+var context = canvas.getContext("2d");
+\endcode
+
+
+\o \c{dx} is the x coordinate of the upper left corner of the image to be
+drawn on the canvas (the destination image)
+
+\o \c{dy} is the y coordinate of the upper left corner of the destination
+image
+
+\o \c{dw} is the width of the destination image (optional)
+
+\o \c{dh} is the height of the destination image (optional)
+
+\endlist
+
+If \c{dw} and \c{dh} are not specified, the image retains its source
+dimensions when drawn on the canvas. When \c{dw} and \c{dh} are
+specified, the image is scaled to width \c{dw} and height \c{dh} when
+drawn on the canvas.
+
+If you want to crop the source image, the \c{drawImage} method can be
+overloaded with the following arguments:
+
+\code
+context.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh)
+\endcode
+
+where:
+\list
+\o \c{sx} is the x coordinate of the upper left corner of the cropped source
+image
+\o \c{sy} is the y coordinate of the upper left corner of the cropped source
+image
+\o \c{sw} is the width of the cropped source image
+\o \c{sh} is the height of the cropped source image
+\endlist
+
+Use this method if you want to crop the source image to the rectangle (sx, sy,
+sw, sh) before drawing it on the canvas. The destination image will have width
+\c dw, height \c dh, and upper left corner at coordinates \c{(dx,dy)} on the
+canvas.
+
+To create a new image using JavaScript, create an \c{Image} object and define
+its source. Use an \c{onload} event handler to ensure that the \c{drawImage}
+method is not called until the image has finished loading. For example:
+
+\code
+var graphic = new Image();
+graphic.src = "clipart/graphic.png";
+\endcode
+
+The image begins to load.
+
+\code
+graphic.onload = function(){
+ context.drawImage(graphic,x,y);
+};
+\endcode
+
+ \section2 Creating Patterns with Images
+
+ You can create patterns with an image by repeating it horizontally,
+ vertically, or both. The top left corner of the first image must be
+ anchored at the origin of the coordinate space. To repeat an image,
+ call the \c{createPattern} method:
+
+ \code
+ context.createPattern(image, repetition);
+ \endcode
+
+ where:
+
+ \list
+
+ \o \c{image} is a reference to an HTML \c{<image>} or \c{<canvas>}element
+ that is repeated to form a pattern. The image must
+ be fully loaded before you can draw it on the canvas. The reference
+ cannot be a URL. Instead, it should be referenced via standard DOM
+ methods such as
+ \list
+ \o \c{document.images} and
+ \o \c{document.getElementById}. For example:
+
+ \code
+ <canvas id="demo1" width="100" height="150"></canvas>
+
+ var canvas = document.getElementById("demo1");
+ var context = canvas.getContext("2d");
+ \endcode
+ \endlist
+ \o \c{repetition} is the direction in which the image repeats to form the
+ pattern. Possible values are:
+ \list
+ \o \c{repeat} (default) the image repeats both horizontally and vertically
+ \o \c{repeat-x} the image repeats horizontally
+ \o \c{repeat-y} the image repeats vertically
+ \endlist
+ \endlist
+
+ The repeated images are the same size as the source image. The
+ \c{createPattern} method does not scale the images.
+
+ For example, to create a horizontal pattern of roses, create an
+ \c{Image} object to use as a pattern and define its source. Use an
+ \c{onload} event handler to ensure that the \c{createPattern} method
+ is not called until the image has finished loading. For example:
+
+ \code
+ var roses = new Image();
+ roses.src = "clipart/roses.jpg";
+ \endcode
+
+ The image begins to load.
+
+ \code
+ roses.onload = function(){
+ var pattern = context.createPattern(roses,repeat-x);
+ };
+ \endcode
+
+ \image webkit-guide/canvas_pattern.png
+
+\section1 Applying Colors
+
+To draw the outline of a shape in color, set the \c{strokeStyle} attribute to
+any valid \l{CSS Color Value}{CSS color value}. The color value can be in
+hexadecimal notation or in RGB/HSL notation, as described in \l{Specifying Color
+and Opacity}. For example, either of the following sets a shape's outline to
+red:
+
+\code
+context.strokeStyle = "#FF0000"
+context.strokeStyle = "rgb(255,0,0)"
+\endcode
+
+To fill a shape with color, set the \c{fillStyle} attribute to a l{CSS Color
+Value}{CSS color value}. The color value can be in hexadecimal notation or in
+RGB/HSL notation. For example, either of the following colors a shape's interior
+as blue:
+
+\code
+context.fillStyle = "#0000FF"
+context.fillStyle = "rgb(0,0,255)"
+\endcode
+
+The \l{CSS3 Color Module specification} extends both RGB and HSL color models to
+include a color's opacity, referred to as its \e{alpha}. These extended
+models are known as RGBA and HSLA. There are no hexadecimal notations for RGBA
+and HSLA values. The following specifies varying levels of opacity for a blue
+shape:
+
+\code
+context.fillStyle = rgba(0, 0, 255, 0) // transparent
+context.fillStyle = rgba(0, 0, 255, 0.5) // semi-transparent
+context.fillStyle = rgba(0, 0, 255, 1) // opaque
+\endcode
+
+When you set the \c{context.strokeStyle} or \c{context.fillStyle} attributes,
+whatever value you set becomes the default value for all subsequently drawn
+shapes, until you set a new value.
+
+ \section2 Applying Gradients
+
+ A gradient is a smooth transition between colors. There are two types of
+ gradients: linear and radial.
+
+ A linear gradient transitions the color along a line between two points. To
+ create a linear gradient, call the \c{createLinearGradient} method:
+
+ \code
+ createLinearGradient(x0, y0, x1, y1)
+ \endcode
+
+ where \c{(x0, y0)} is the starting point and \c{(x1, y1)} is the ending
+ point for the linear gradient.
+
+ A radial gradient transitions the color along a cone between two circles. To
+ create a radial gradient, call the \c{createRadialGradient} method:
+
+ \code
+ createRadialGradient(x0, y0, r0, x1, y1, r1)
+ \endcode
+ where:
+ \list
+ \o \c{(x0, y0, r0)} represents the starting circle, whose origin is \c{(x0,
+ y0)} and whose radius is \c{r0}.
+ \o \c{(x1, y1, r1)} represents the ending circle, whose origin is \c{(x1, y1)}
+ and whose radius is \c{r1}.
+ \endlist
+
+ Gradients must have two or more \e{color stops}, representing color
+ shifts positioned from \c 0 to \c 1 between to the gradient's starting and
+ end points or circles:
+
+ \code
+ addColorStop(position,color)
+ \endcode
+
+ where:
+ \list
+ \o \c{position} specifies the position of the color within the already
+ defined starting and end points or circles, expressed as a number from \c 0
+ to \c 1.
+ \o \c{color} specifies the CSS color at that position.
+ \endlist
+
+ For example, to define a gradient that varies from red to blue horizontally
+ along a rectangular area:
+ \list 1
+ \o Create a gradient object:
+ \code
+ var redbluegradient = context.createLinearGradient(0,0,100,0);
+ \endcode
+ \o Define the color stops:
+ \code
+ redbluegradient.addColorStop(0, "rgb(255,0,0)"); // red at the left side of the rectangle
+ redbluegradient.addColorStop(1, "rgb(0,0,255)"); // blue at the right side of the rectangle
+ \endcode
+ \o Draw the shape and set a \c{fillStyle} or \c{strokeStyle}:
+ \code
+ context.fillStyle = redbluegradient;
+ context.fillRect(0,0,100,150);
+ \endcode
+ \endlist
+
+ To define a gradient that varies from red to blue vertically along a
+ rectangle:
+ \list 1
+ \o Create a gradient object:
+ \code
+ var redbluegradient = context.createLinearGradient(0,0,0,150);
+ \endcode
+ \o Define the color stops:
+ \code
+ redbluegradient.addColorStop(0, "rgb(255,0,0)"); // red at the top of the rectangle
+ redbluegradient.addColorStop(1, "rgb(0,0,255)"); // blue at the bottom of the rectangle
+ \endcode
+ \o Draw the shape and set a \c{fillStyle} or \c{strokeStyle}:
+ \code
+ context.fillStyle = redbluegradient;
+ context.fillRect(0,0,100,150);
+ \endcode
+ \endlist
+
+ \note A canvas gradient's color stops behave slightly differently than those
+ used within non-canvas \l{Gradients}{gradients}. Webkit gradients specify
+ mandatory \c{from} and \c{to} colors, with optional \c{color-stop} values
+ for additional color shifts within the overall range of the gradient. For
+ canvas gradients, even the initial and final colors are defined as color
+ stops.
+
+ \section2 Applying Shadows
+
+ To add a shadow effect to a drawing on a canvas, set the following
+ attributes:
+
+ \list
+ \o \c{shadowColor} sets the color of the shadow. The value can be any CSS
+ color value. The default value is transparent black (\c{"rgba(0,0,0,0)"}).
+
+ \o \c{shadowBlur} sets the amount of blur in the shadow, in pixels. The
+ value can be any positive number or 0. A value of 0 produces a sharp shadow
+ with no blur.
+
+ \o \c{shadowOffsetX} sets the number of pixels the shadow extends
+ horizontally from the object drawn. If this value is a positive number, the
+ shadow extends to the right of the object. If negative, the shadow extends
+ to the left of the object. The default value is 0 pixels.
+
+ \o \c{shadowOffsetY} sets the number of pixels the shadow extends vertically
+ from the object drawn. If this value is a positive number, the shadow
+ extends below the object. If negative, the shadow extends above the object.
+ The default value is 0 pixels.
+ \endlist
+
+ The following example code adds a semi-transparent black shadow to the
+ bottom right of a blue rectangle:
+
+ \code
+ var context = canvas.getContext("2d");
+ context.shadowOffsetX = 5;
+ context.shadowOffsetY = 5;
+ context.shadowBlur = 10;
+ context.shadowColor = "rgba(0,0,0,0.5)";
+ context.fillStyle = "#0000FF";
+ context.fillRect = (0,0,100,50)
+ \endcode
+
+\section1 Transforming Graphics
+
+When drawing shapes and paths, you can translate the canvas's origin, rotate the
+canvas around the origin, scale the units in the canvas grid, and modify the
+transformation matrix directly.
+
+ \section2 Translating the Canvas Origin
+
+ Translating the origin enables you to draw patterns of different objects on
+ the canvas without having to measure the coordinates manually for each
+ shape. To translate the origin of the canvas, use the \c{translate} method:
+ \code
+ context.translate(x,y);
+ \endcode
+ where:
+ \list
+ \o \c{x} is the horizontal distance that the origin is translated, in
+ coordinate space units
+ \o \c{y} is the vertical distance that the origin is translated, in
+ coordinate space units
+ \endlist
+
+ \section2 Rotating the Canvas
+
+ To rotate the canvas around the current origin, call the \c{rotate()}
+ method:
+ \code
+ context.rotate(angle);
+ \endcode
+ where \c{angle} is the clockwise rotation angle in radians.
+ The number of radians is the number of degrees multiplied by \pi/180,
+ expressed in JavaScript as:
+ \code
+ var radians = (Math.PI/180)*degrees;
+ \endcode
+ \image webkit-guide/canvas_rotate.png
+
+ \section2 Scaling the Canvas Grid
+
+ To increase or decrease the size of each unit in the canvas grid, call the
+ \c{scale} method:
+
+ \code
+ context.scale(x,y);
+ \endcode
+
+ where:
+
+ \list
+
+ \o \c{x} is the scale factor in the horizontal direction
+
+ \o \c{y} is the scale factor in the vertical direction
+
+ \endlist
+
+ The scale factors are in multiples. For example, \c{scale(2.0, 0.5)} would
+ double the horizontal size of an object drawn on the canvas and half its
+ vertical size, as shown below:
+
+ \image webkit-guide/canvas_scale.png
+
+ \section2 Manipulating the Transformation Matrix
+
+ Modifying the transformation matrix directly enables you to perform scaling,
+ rotating, and translating transformations in a single step.
+
+ The transformation matrix is an \e{affine transformation} matrix from linear
+ algebra. Affine transformations preserve colinearity and relative distance
+ in the transformed coordinate space. This means that points in a line remain
+ in a line, parallel lines remain parallel, and the distance between lines
+ and objects maintains the same ratio, even if a scale factor is applied.
+ Repositioning by translation, rotation, or skewing is also possible.
+
+ Each point on the canvas is multiplied by the matrix before anything is
+ drawn. The \l{HTML5 Canvas API} defines the transformation matrix as:
+
+ \image webkit-guide/canvas_math.png
+ where:
+ \list
+ \o \c{a} is the scale factor in the horizontal (x) direction
+ \image webkit-guide/canvas_scalex.png
+ \o \c{c} is the skew factor in the x direction
+ \image webkit-guide/canvas_skewx.png
+ \o \c{e} is the translation in the x direction
+ \image webkit-guide/canvas_translate.png
+ \o \c{b} is the skew factor in the y (vertical) direction
+ \image webkit-guide/canvas_skewy.png
+ \o \c{d} is the scale factor in the y direction
+ \image webkit-guide/canvas_scaley.png
+ \o \c{f} is the translation in the y direction
+ \image webkit-guide/canvas_translatey.png
+ \o the last row remains constant
+ \endlist
+
+ The scale factors and skew factors are multiples; \c{e} and \c{f} are
+ coordinate space units, just like the units in the \c{translate(x,y)}
+ method.
+
+ The rotation transformation matrix is as follows:
+
+ \image webkit-guide/canvas_math_rotate.png
+
+ where the \c angle of rotation is in radians.
+
+ \bold{See Also:}
+ \l{http://www.senocular.com/flash/tutorials/transformmatrix/}{senocular.com}
+ for a good explanation of how transformation matrices are used
+ identically within Adobe Flash.
+
+\section1 Canvas Animations
+
+You can animate a canvas drawing by repeatedly redrawing the canvas for each
+frame and translating, rotating, skewing, and scaling the drawn objects.
+
+To draw each frame by employing the HTML5 canvas API, you should define the
+original canvas state and save it for future reference. The drawing context
+maintains a stack of drawing states. Each state consists of the current
+transformation matrix, current clipping region, and current values of the
+following attributes:
+\list
+\o\c{strokeStyle}
+\o\c{fillStyle}
+\o\c{globalAlpha}
+\o\c{lineWidth}
+\o\c{lineCap}
+\o\c{lineJoin}
+\o\c{miterLimit}
+\o\c{shadowOffsetX}
+\o\c{shadowOffsetY}
+\o\c{shadowBlur}
+\o\c{shadowColor}
+\o\c{globalCompositeOperation}
+\o\c{font}
+\o\c{textAlign}
+\o\c{textBaseline}
+\endlist
+The current path and the current bitmap are NOT part of the drawing state.
+The path can be reset only by invoking the \c{beginPath()} method. The current
+bitmap is a property of the canvas, not of the context.
+
+To save the original canvas state, call the \c{save()} method:
+\code
+context.save();
+\endcode
+
+Before drawing each new frame, you must clear the canvas:
+\code
+canvas.clearRect(x,y,width,height);
+\endcode
+where:
+\list
+\o \c{x} is the position of the top left corner of the canvas on the horizontal
+axis
+\o \c{y} is the position of the top left corner of the canvas on the vertical
+axis
+\o \c{width} is the width of the canvas
+\o \c{height} is the height of the canvas
+\endlist
+
+Draw the new frame using any of the methods provided by the canvas API. Then
+save it by calling the \c{save()} method.
+
+If you wish to return to the state of the original frame as the basis for each
+new frame that you draw, call the \c{context.restore()} method.
+
+To execute the drawing methods repeatedly, use the standard JavaScript-based
+animation technique, calling the \c{setInterval()} and \c{clearInterval()}
+methods. The following shows how to execute an animation function every \c 50
+milliseconds (corresponding to 20 times per second, a typical animation frame
+rate), then subsequently halt the animation:
+\code
+var id = setInterval(functionName, 50);
+clearInterval(id);
+\endcode
+
+\bold{See Also:}
+\list
+\o
+\l{http://www.canvasdemos.com/2009/10/09/html-5-canvas-animation/}{CanvasDemos.com: animated cartoon}, which discusses how to use Canvas as an animation framework.
+
+\o
+\l{http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html}{nihilogic.dk:
+HTML5 Canvas Cheat Sheet}
+
+\o \l{QtWebKit Guide} -back to the main page
+\endlist
+
+*/
diff --git a/doc/src/webkit/guide/chapter_css.qdoc b/doc/src/webkit/guide/chapter_css.qdoc
new file mode 100644
index 0000000000..71005fcc97
--- /dev/null
+++ b/doc/src/webkit/guide/chapter_css.qdoc
@@ -0,0 +1,1519 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/*!
+
+\page qtwebkit-guide-css.html
+
+\title QtWebKit Guide - Level 3 CSS
+
+\chapter Level 3 CSS
+This section of the \l{QtWebKit Guide} serves as an introduction to various
+Level 3 CSS features supported by QtWebKit:
+
+\list
+
+\o The \l{Media Queries} section discusses a simple client-based technique to
+present different interfaces and functionality from a single source of content
+to different classes of mobile device.
+
+\o The \l{Selectors} section concentrates on recently introduced syntax elements
+that make applying formatting and gathering DOM elements more flexible.
+
+\o The \l{Visual Effects} section surveys numerous formatting properties,
+including new color models and advanced WebKit effects.
+
+\o Finally, the \l{Dynamic CSS} section discusses 2D transforms, transitions,
+and keyframe animations.
+
+\endlist
+
+This section features links to numerous sample pages that demonstrate how
+various CSS3 features may be applied within a mobile interface. For best
+results, view these samples with a modern Webkit-based browser such as Apple
+Safari or Google Chrome. Resize the window in which the sample appears to
+roughly match the dimensions of a touch-screen mobile device.
+
+\section1 Media Queries
+
+CSS \e{media queries} extend \e{media types} with more detailed capabilities.
+Media queries offer a simple client-side mechanism to customize interfaces
+comprehensively via CSS.
+
+Media queries are especially useful when extending a body of content for
+presentation on mobile browsers. Prior to support for this feature, there were
+two basic approaches to provisioning mobile web content, both server-based:
+
+\list
+\o \e{Mobile-specific domains}. Content providers might provide a separate
+access points for default content at \c{www.website.com}, with mobile content
+available at \c{m.website.com} or \c{website.mobi}. There might also be an
+additional \c{touch.website.com} access point targeted for higher-end
+touch-screen browsers.
+
+\o \e{Dynamic Server-based Adaptation}. In this case, there is a single access
+point, but the server sends different content, typically depending on the
+\e{User-Agent} header included in all browsers' HTTP requests.
+This approach may leverage databases of device characteristics such as
+\l{WURFL} or \l{DeviceAtlas}.
+\endlist
+
+This section describes how to provision CSS entirely on the mobile
+client.
+
+ \section2 Media Types and Media Queries
+
+ If you only want to serve interfaces for desktop browsers and low-end mobile
+ browsers, specify external CSS files within your HTML's \c{head} region
+ using media types:
+
+ \code
+ <link media="screen" href="/path/to/desktop.css" type="text/css" rel="stylesheet"/>
+ <link media="handheld" href="/path/to/mobile.css" type="text/css" rel="stylesheet"/>
+ \endcode
+
+ The \c{media} attribute specifies different \e{types} of browser: \c{screen}
+ for large-screen desktop browsers, and \c{handheld} for mobile browsers.
+ Browsers identifying themselves as \c{handheld} are served the
+ \c{mobile.css} file, which should specify a dramatically simplified
+ mobile interface.
+
+ A problem arises, however, when the majority of higher-end touch browsers
+ identify themselves as the \c{screen} media type, to avoid being served
+ overly simplified content that is beneath their capabilities. The example
+ above serves a desktop-oriented design to later-generation mobile browsers.
+ To target a higher-end mobile design to these browsers, you need to specify
+ additional media \c{queries}:
+
+ \code
+ <link media="only screen and (min-device-width: 481px)" href="/path/to/desktop.css" type="text/css" rel="stylesheet"/>
+ <link media="only screen and (max-device-width: 480px)" href="/path/to/touch.css" type="text/css" rel="stylesheet"/>
+ <link media="handheld" href="/path/to/mobile.css" type="text/css" rel="stylesheet"/>
+ \endcode
+
+ The first two lines specify any \c{screen}-typed browser whose window
+ is wider or narrower than 480 pixels.
+
+ Regions of content that are inappropriate for presentation within
+ either the touch-based or lower-end mobile design can then be easily
+ removed within the corresponding CSS files:
+
+ \code
+ .widget, .nested_nav, .sidebar, .video_ad, .related_items {
+ display: none;
+ }
+ \endcode
+
+ The following example demonstrates a simple message identifying your class
+ of browser, which appears dynamically based on CSS that is linked using
+ media types and media query syntax:
+
+ \l{mob_mediaquery}{\inlineimage webkit-guide/scr_mob_mediaquery.png
+ }
+
+ \e{Click on the image to view the example live in a browser or click on the
+ following links to view the CSS files.}
+
+ \l{mq_desktop_css}{(Desktop CSS)}
+ \l{mq_touch_css}{(Touch-Screen CSS)}
+ \l{mq_mobile_css}{(Low-end Mobile CSS)}
+
+ The following example shows a skeletal interface that appears differently
+ based on the type of browser viewing it. The image below shows how it
+ appears when viewed on a touch-based browser, but a desktop browser renders
+ a more elaborate three-column layout:
+
+ \l{mob_layout}{\inlineimage webkit-guide/scr_mob_layout.png
+ }
+
+ \l{mqlayout_desktop_css}{(Desktop CSS)}
+ \l{mqlayout_touch_css}{(Touch-Screen CSS)}
+ \l{mqlayout_mobile_css}{(Low-end Mobile CSS)}
+
+ When viewed with a desktop browser,
+ the page displays a typical desktop-style layout:
+ a main content column surrounded by navigation and sidebar columns,
+ with banner headers and footers that straddle the top and bottom of
+ the screen.
+ When viewed with a touch-based browser,
+ the sidebar element does not appear.
+ The main content extends to the full width of the screen,
+ while header and navigation elements share the top of the screen.
+ When viewed with other mobile browsers,
+ even the top of the screen is simplified to replace header information
+ with a simple icon.
+
+ Note that you can also use media queries to customize interfaces for
+ tablet devices such as the Apple iPad:
+
+ \code
+ <link rel="stylesheet" media="all and (min-device-width: 481px)
+ and (max-device-width: 1024px)" href="/path/to/ipad.css"/>
+ \endcode
+
+ \section2 In-line Media Queries
+
+ While it's generally good practice to keep CSS for different designs within
+ separate files, you can also consolidate them. The following example
+ provides a default san-serif font styling for \c{h1} elements, then
+ different sets of style sheets for three browser categories:
+
+ \code
+ h1 { font-family : Arial, sans-serif }
+ @media screen {
+ h1 { color: #00008B; }
+ }
+ @media only screen and (max-device-width: 480px) {
+ h1 { color: #00008B; font-size: medium; }
+ }
+ @media handheld {
+ h1 { font-size: medium; font-weight: bold }
+ }
+ \endcode
+
+ Consolidating style sheets in this manner may reduce the number of separate
+ HTTP requests, help web designers to keep track of variations among designs,
+ and reduce style sheet properties defined redundantly in more than one file.
+
+ \section2 Media Queries via JavaScript
+
+ Browsers that support media queries also support APIs to test them from
+ within JavaScript. Browsers based on QtWebKit use the \c{matchMedia} API.
+ Some other browsers use a slightly different (and older) \c{styleMedia} API,
+ which itself used to be called the \c{media} API. Each can be called from
+ the \c{window} object. The following function accounts for all three cases:
+
+ \code
+ function matchesMediaQuery(query) {
+ if (!!window.matchMedia)
+ return window.matchMedia(query).matches;
+ if (!!window.styleMedia && !!window.styleMedia.matchMedium)
+ return window.styleMedia.matchMedium(query);
+ if (!!window.media && window.media.matchMedium)
+ return window.media.matchMedium(query);
+ return false;
+ }
+ \endcode
+
+ The \c{query} argument corresponds to the media query string used to
+ activate the CSS. For example, the following higher-level function tests
+ whether the browser matches design categories provided simple labels such as
+ \c{desktop}, \c{touch}, or \c{mobile}:
+
+ \code
+ function isDesign(str) {
+ var design;
+ if (matchesMediaQuery('only screen and (min-device-width: 481px)')) {
+ design = 'desktop';
+ }
+ else if (matchesMediaQuery('only screen and (max-device-width: 480px)')) {
+ design = 'touch';
+ }
+ else if (matchesMediaQuery('handheld')) {
+ design = 'mobile';
+ }
+ return str == design;
+ }
+ \endcode
+
+ You can then use the test whenever there is a need to assign functionality
+ for a specific design. The following gathers a series of images and assigns
+ different panel-viewing functions for \c{desktop} and \c{touch} designs,
+ with no functionality assigned to the lower-end \c{mobile} design:
+
+ \code
+ var imgs = document.querySelectorAll("img.panel");
+ for ( var i = 0, len = imgs.length ; i < len ; i++ ) {
+ el = imgs[i];
+ if ( isDesign("desktop") ) {
+ imgs[i].addEventListener("mouseover", showHoverPanel);
+ imgs[i].addEventListener("mouseout", hideHoverPanel);
+ }
+ else if ( isDesign("touch") ) {
+ imgs[i].addEventListener("click", showTouchPanel);
+ }
+ }
+ \endcode
+
+ The following example uses this technique to produce a simple message,
+ dynamically generated by JavaScript,
+ that corresponds to the message generated by CSS:
+
+ \l{mob_condjs}{\inlineimage webkit-guide/scr_mob_condjs.png
+ }
+
+ \l{mob_condjs_css}{(CSS)}
+ \l{mob_condjs_js}{(JavaScript)}
+
+\section1 Selectors
+
+Level 3 CSS provides many useful new \e{selectors} that make it easier to apply
+formatting to page elements. In addition, the \l{Selectors API} makes DOM
+elements accessible using the same CSS expressions you use to apply formatting
+to them. The following show alternate ways to access elements:
+
+\code
+var element = document.getElementById('map');
+var element = document.querySelector('#map');
+
+var elements = document.getElementByClassName('active');
+var elements = document.querySelectorAll('ul > li.active');
+\endcode
+
+This section provides examples of how different kinds of Level 3
+selectors might be applied when formatting mobile interfaces.
+
+ \section2 Attribute Matching
+
+ It is often useful to offer visual hints marking different kinds of link.
+ Users might want to know the difference between a link to a page on the same
+ website and one on an external site. Links to non-HTML file types might pose
+ special challenges to mobile users. Alternately, mobile users might get
+ special benefit from telephone links.
+
+ You can automate this by using the CSS attribute prefix and suffix matching
+ selectors. The following uses \c{^=} to mark external HTTP links, email,
+ SMS, and telephone links, by inserting an icon after the text of the link:
+
+ \code
+ a[href^="http://"]:after, a[href^="https://"]:after
+ { content : url(icon/external.png); }
+ a[href^="mailto:"]:after { content : url(icon/email.png); }
+ a[href^="sms:"]:after { content : url(icon/sms.png); }
+ a[href^="tel:"]:after { content : url(icon/tel.gif); }
+ \endcode
+
+ The following uses \c{$=} to identify various file types by common suffixes:
+
+ \code
+ a[href$=".doc"]:after { content : url(icon/ms_word.gif) }
+ a[href$=".ppt"]:after { content : url(icon/powerpoint.gif) }
+ a[href$=".rss"]:after, a[href$=".xml"]:after
+ { content : url(icon/feed.gif) }
+ a[href$=".pdf"]:after { content : url(icon/pdf.jpg) }
+ a[href$=".xls"]:after { content : url(icon/excel.jpg) }
+ \endcode
+
+ You can also use \c{*=} to freely match substrings within any attribute
+ value. The following might distinguish links to a site's blog area based on
+ how the URL is organized:
+
+ \code
+ a[href*="/blog/"]:after { content : url(icon/blog.jpg )}
+ \endcode
+
+ The following example demonstrates links identified by dynamically generated
+ icons:
+
+ \l{layout_link-fmt}{\inlineimage webkit-guide/scr_layout_link-fmt.png
+ }
+
+ \l{layout_link-fmt_css}{(CSS)}
+
+ \section2 Form Input State
+
+ The \c{:checked} dynamic class allows you to style radio and checkbox inputs
+ based on their selection state:
+
+ \code
+ input[type=radio],
+ input[type=checkbox]
+ { text-align : right }
+
+ input[type=radio]:checked,
+ input[type=checkbox]:checked
+ { text-align : left }
+ \endcode
+
+ This enables the following mobile-friendly interface, which converts small
+ radio and check boxes to much more accessible toggle buttons:
+
+ \l{form_toggler}{\inlineimage webkit-guide/scr_form_toggler.png
+ }
+
+ \l{form_toggler_css}{(CSS)}
+
+ Using the dynamic \c{:checked} CSS class, the \c{text-align} property
+ toggles from \c{left} to \c{right} depending on whether the \c{input} is
+ checked or not. Note that to display button text, dynamic classes can be
+ chained together to form complex expressions:
+ \c{input[type=radio]:checked:before}.
+
+ The example also relies on the \c{-webkit-appearance} property, which allows
+ you to override the default visual presentation of specialized interface
+ elements such as radio and checkbox inputs.
+
+ The following example provides alternate styling for radio and checkbox
+ inputs, presenting them as tappable buttons:
+
+ \l{form_tapper}{\inlineimage webkit-guide/scr_form_tapper.png
+ }
+
+ \l{form_tapper_css}{(CSS)}
+
+ Form elements may also be re-styled based on whether they are \c{:enabled}
+ or \c{:disabled}. In addition, the \c{:focus} dynamic class allows you to
+ style text form inputs or other editable content regions that users have
+ currently selected for editing.
+
+ \section2 Navigational Selectors
+
+ Elements within a page that are the target of navigation can receive
+ distinct styling using the \c{:target} dynamic class. The act of navigating
+ to an element can alter its appearance, or even determine if it is to appear
+ at all.
+
+ The following example relies on anchor navigation to display successive rows
+ of a table within a mobile interface:
+
+ \l{layout_tbl-keyhole}{\inlineimage webkit-guide/scr_layout_tbl-keyhole.png
+ }
+
+ \l{layout_tbl-keyhole_css}{(CSS)}
+
+ While the example relies on table-related tags, they are re-styled with
+ block formatting to confine each row of information within the screen. Each
+ row features links to other rows, triggering their display. Other links
+ navigate away from the table, which suppresses its display altogether. This
+ is the main CSS driving the interface:
+
+ \code
+ .mobile > tbody > tr { display : none }
+ .mobile > tbody > tr:target { display : block }
+ \endcode
+
+ The same technique may be used to display or dismiss optional interface
+ elements such as panels, simply by providing navigation links to them within
+ the page.
+
+ \section2 Indirect Sibling Selector
+
+ The Level 2 \c{+} selector allows you to style elements that immediately
+ follow other specified elements. For example, the following refers to a
+ paragraph that immediately follows a heading at the same level of markup:
+
+ \code
+ h1 + p { font-weight: bold }
+ \endcode
+
+ In contrast, the Level 3 \c{~} indirect sibling selector allows you to style
+ any subsequent element at the same level within the markup. The following
+ example styles any element that follows an \c{h2} that is classed
+ \c{pullquote}:
+
+ \code
+ h2 ~ .pullquote { font-size: 90% }
+ \endcode
+
+ \note Webkit-based browsers do not yet allow you to style
+ elements dynamically via indirect sibling selectors.
+
+ \section2 Positional Selectors
+
+ Various dynamic classes allow you to style elements depending on their
+ position with a series of elements: either elements of the same type, or
+ other child elements of the same parent. The following example aligns a
+ series of icons to a grid:
+
+ \l{css3_sel-nth}{\inlineimage webkit-guide/scr_css3_sel-nth.png
+ }
+
+ \l{css3_sel-nth_css}{(CSS)}
+
+ Columns are specified with the \c{:nth-of-type()} selector, which accepts
+ numeric expressions as arguments. The following selectors refer to every
+ fourth \c{img} element, but offset by a specified number:
+
+ \code
+ img { position: absolute }
+ img:nth-of-type(4n-3) { left: 2% }
+ img:nth-of-type(4n-2) { left: 27% }
+ img:nth-of-type(4n-1) { left: 52% }
+ img:nth-of-type(4n-0) { left: 77% }
+ \endcode
+
+ Alternately, keywords \c{odd} and \c{even} correspond to \c{2n-1} and \c{2n}
+ expressions. These are useful, for example, when styling table rows with
+ alternating background colors.
+
+ Rows are represented as the number of the element within the series, plus a
+ fixed number. Each selector redefines the previous selector's upper range
+ of values:
+
+ \code
+ img:nth-of-type(n) { top: 5% }
+ img:nth-of-type(n+5) { top: 20% }
+ img:nth-of-type(n+9) { top: 35% }
+ img:nth-of-type(n+13) { top: 50% }
+ img:nth-of-type(n+17) { top: 65% }
+ img:nth-of-type(n+21) { top: 80% }
+ \endcode
+
+ Level 3 CSS defines the following positional selectors:
+
+ \list
+ \o \c{:first-child}, \c{:last-child}, and \c{:only-child} refer to the first
+ or last child element within a series, or when it is the only one.
+
+ \o \c{:first-of-type}, \c{:last-of-type}, and \c{:only-of-type} refer to the
+ first or last specified element within a series, or when it is the only one.
+
+ \o \c{:nth-first-child()} and \c{:nth-last-child()} refer to the specified
+ child element positioned from the start or end of the series.
+
+ \o \c{:nth-first-of-type()} and \c{:nth-last-of-type()} refer to the
+ specified element positioned from the start or end of the series.
+
+ \o \c{:nth-of-type()} refers to any series of specified elements.
+
+ \o \c{:nth-child()} refers to any series of child elements.
+
+ \endlist
+
+ \section2 Other Selectors
+
+ Level 3 CSS specifies several other potentially useful dynamic
+ classes that can be added to selectors:
+
+ \list
+
+ \o \c{:empty} refers to an element that contains no child elements,
+ including text nodes.
+
+ \o \c{:root} is a markup-independent way to refer to elements that are
+ postioned at the root of the document,
+ in most cases the \c{html} tag.
+
+ \o The \c{:not()} dynamic class allows you to narrow a range of
+ selectors.
+ This may be more useful when gathering elements via the Selectors API.
+ For example,
+ the following JavaScript gathers form inputs,
+ but not including submit buttons:
+
+ \code
+ var inputs = document.querySelectorAll("input:not([type=submit])");
+ \endcode
+
+ \endlist
+
+\section1 Visual Effects
+
+QtWebKit supports numerous Level 3 CSS visual features. This section briefly
+demonstrates how many of these recently available visual features may be used to
+refine mobile web designs.
+
+These more advanced CSS3 effects tend to be available only on the latest
+generation of mobile browsers. Still, it is safe to use them, even if the design
+degrades somewhat for devices that don't support them. When a browser
+encounters CSS properties or values it can't interpret, it simply ignores them.
+Designers can respond by providing fallback options to allow for \e{graceful
+degradation}. For example, the following CSS specifies a plain gray background
+in case the browser does not support gradients:
+
+\code
+background: #aaaaaa;
+background: -webkit-gradient(linear, center top, center bottom,
+ from(#777777), color-stop(50%,#dddddd), to(#777777) );
+\endcode
+
+Note that many of the CSS properties discussed in this section were implemented
+relatively recently, and vendors of browser rendering engines (such as WebKit)
+may still be in the process of testing and standardizing their behavior. These
+property names feature \e{vendor prefixes} such as \c{-webkit-} for WebKit,
+\c{-moz-} for Mozilla, and \c{-o-} for Opera.
+
+It may be possible to extend CSS properties to these various browsers by
+providing vendor-specific syntax. The following example shows how to extend the
+\c{border-image} property to the Opera browser or Mozilla-based Fennec or the
+Maemo Browser for Nokia N900. It also shows the property's final name following
+the process of standardization:
+
+\code
+-webkit-border-image : url(img/border-frame.gif) 10 stretch stretch;
+-moz-border-image : url(img/border-frame.gif) 10 stretch stretch;
+-o-border-image : url(img/border-frame.gif) 10 stretch stretch;
+border-image : url(img/border-frame.gif) 10 stretch stretch;
+\endcode
+
+In some cases, there are slight variations in the syntax each vendor expects as
+property values.
+
+ \section2 Specifying Color and Opacity
+
+ Prior to CSS3, there were three options when specifying color values: named
+ colors, hexadecimal color values, or RGB values. CSS3 provides additional
+ ways to specify colors:
+
+ \list
+ \o \e{HSL}. Colors defined with the HSL model specify the \e{hue} as a
+ radial or degree coordinate, then its \e{saturation} and \e{luminence}
+ as percentages. The following example specifies red and green values:
+
+ \code
+ background: hsl(0 , 100%, 60%);
+ background: hsl(128, 75% , 33%);
+ \endcode
+
+ \o \e{HSLA}.
+ Same as HSL,
+ but specifying an additional decimal \e{alpha} value that
+ corresponds to opacity.
+ The following specifies a fully opaque red,
+ followed by a partial transparency:
+
+ \code
+ background: hsla(0, 100%, 60%, 1.0);
+ background: hsla(0, 100%, 60%, 0.5);
+ \endcode
+
+ \o \e{RGBA}.
+ Same as RGB,
+ but specifying an additional decimal \e{alpha} value that
+ corresponds to opacity.
+ The following the same transition from opaque to transparent as shown
+ above:
+
+ \code
+ background: rgba(100%, 0%, 0%, 1.0);
+ background: rgba(100%, 0%, 0%, 0.5);
+ \endcode
+ \endlist
+
+ With the addition of opacity to color definitions, you can now also specify
+ \c{transparent} as a color name. Note that while RGBA and HSLA options are
+ now available, you can still use the familiar \c{opacity} property
+ independently of color definitions.
+
+ \section2 Rounded Corners
+
+ In addition to removing harsh edges, rounded corners often help distinguish
+ active items from static background elements. Rounded corners are
+ implemented using the \c{border-radius} property. The following rounds off
+ an edge to the same extent that interior elements are offset:
+
+ \code
+ .rounded {
+ border-radius : 1em;
+ padding : 1em;
+ }
+ \endcode
+
+ The following example demonstrates how rounded corners can enhance a mobile
+ design, by marking the start and end of large regions of content, such as a
+ list of links:
+
+ \l{layout_link-fmt}{\inlineimage webkit-guide/scr_layout_link-fmt.png
+ }
+
+ \l{layout_link-fmt_css}{(CSS)}
+
+ The greater the measurement applied to an element's \c{border-radius}, the
+ more dramatically rounded are its corners. For example, applying a
+ \c{border-radius} that is half an element's overall dimensions results in a
+ circle:
+
+ \code
+ .circle {
+ width : 4em;
+ height : 4em;
+ border-radius : 2em;
+ }
+ \endcode
+
+ You can also set each corner individually, and specify a pair of values to
+ achieve oval-shaped borders:
+
+ \code
+ border-top-left-radius : 2em/1em;
+ \endcode
+
+ \section2 Border Images
+
+ Border images allow you to apply customized marquee effects, as in the
+ following example:
+
+ \l{css3_border-img}{\inlineimage webkit-guide/scr_css3_border-img.png
+ }
+
+ \l{css3_border-img_css}{(CSS)}
+
+ In this case, the image stretches to fit an element's dimensions:
+
+ \code
+ -webkit-border-image : url(img/border-frame.gif) 10 stretch stretch;
+ \endcode
+
+ As is true of the \c{border} property, a single numeric argument specifies
+ the width of the border as a whole, or up to four values to modify the width
+ of each side.
+
+ Any border image you specify substitutes some or all of an element's normal
+ border. The \c{border-image} and \c{border-corner-image} each collectively
+ represent four more specific properties.
+
+ For \c{border-image}, these properties are:
+
+ \list
+ \o \c{border-top-image}
+ \o \c{border-right-image}
+ \o \c{border-bottom-image}
+ \o \c{border-left-image}
+ \endlist
+
+ For \c{border-corner-image}, these properties are:
+ \list
+ \o \c{border-top-left-image}
+ \o \c{border-top-right-image}
+ \o \c{border-bottom-right-image}
+ \o \c{border-bottom-left-image}
+ \endlist
+
+ The \c{border-image} property specifies a single image for all four edge
+ borders. The \c{border-corner-image} property specifies an image for all
+ four corner borders. To specify images individually for any of the edge or
+ corner borders, use any of the eight individual properties.
+
+ When specifying any border edge or corner image values:
+
+ \list
+ \o A \c{stretch} value stretches one image to fill the element border area,
+ as shown in the example above.
+
+ \o A \c{repeat} value repeats one image until it fills the element border
+ area and clips any overflow, for example:
+
+ \code
+ -webkit-border-image : url(img/border-frame.gif) 10 repeat repeat;
+ \endcode
+
+ In this case the first \c{repeat} applies to top and bottom edge borders,
+ and the second applies to left and right edge borders.
+ \endlist
+
+ \section2 Backgrounds
+
+ CSS3 allows you to specify more than one background image at a time.
+ The following example shows an accordion-style tabbed interface:
+
+ \l{css3_backgrounds}{\inlineimage webkit-guide/scr_css3_backgrounds.png
+ }
+
+ \l{css3_backgrounds_css}{(CSS)}
+ \l{css3_backgrounds_js}{(JavaScript)}
+
+ By default, tabs display a single icon image, but when selected feature an
+ additional gradient background image. The following CSS shows how both icon
+ and background can receive their own series of specifications, affecting
+ their offset or whether each image repeats:
+
+ \code
+ background-image : url(img/select.png) , url(img/gradient.jpg);
+ background-repeat : no-repeat , repeat-x;
+ background-position : 12px 12px , 0 0;
+ \endcode
+
+ In addition, you may set the \c{background-size} property to \c{contain} to
+ scale images to the size of the containing element. (Level 2 CSS allowed
+ only specific measurements or percentages of the image's size.)
+
+ \section2 Text Shadow and Stroke
+
+ Shadows can be applied to text. As the following example shows, text shadows
+ may interfere with the legibility of text, and are seldom appropriate unless
+ they're used for large, sans-serif display headings:
+
+ \l{css3_text-shadow}{\inlineimage webkit-guide/scr_css3_text-shadow.png
+ }
+
+ \l{css3_text-shadow_css}{(CSS)}
+
+ In addition to the shadow's color, the property accepts two measurements to
+ represent its offset from the text, while the third specifies the extent to
+ which the shadow is blurred:
+
+ \code
+ h1,h2,h3,h4 { text-shadow : 0.25em 0.25em 0.25em #aaaaaa; }
+ \endcode
+
+ CSS3 also allows you to apply a different colored fill to characters,
+ suitable mainly for larger display type or subtle animations:
+
+ \l{css3_text-stroke}{\inlineimage webkit-guide/scr_css3_text-stroke.png
+ }
+
+ \l{css3_text-stroke_css}{(CSS)}
+
+ In the following CSS, \c{-webkit-text-fill-color} is synonymous with the
+ standard \c{color} property:
+
+ \code
+ -webkit-text-stroke-color : #000000;
+ -webkit-text-stroke-width : 1px;
+ -webkit-text-fill-color : purple;
+ \endcode
+
+ \section2 Text Overflow
+
+ Web developers are familiar with the \c{overflow} property, which can be
+ used to hide content that exceeds an element's dimensions, or else to make
+ it accessible via scrolling. CSS3 specifies an additional \c{text-overflow}
+ property that allows you to add ellipses as a suffix to any text that
+ overflows the element, to indicate the presence of additional text.
+
+ The following example shows how the \c{text-overflow} property allows you to
+ present user-selectable links to expanded regions of text within a page:
+
+ \l{css3_text-overflow}{\inlineimage webkit-guide/scr_css3_text-overflow.png
+ }
+
+ \l{css3_text-overflow_css}{(CSS)}
+ \l{css3_text-overflow_js}{(JavaScript)}
+
+ Use the \c{text-overflow} property in conjunction with \c{overflow} and
+ \c{white-space}:
+
+ \code
+ text-overflow : ellipsis;
+ overflow : hidden;
+ white-space : nowrap;
+ \endcode
+
+ For \c{text-overflow} to work, the element's \c{white-space} must be set to
+ \c{nowrap}, overriding the default \c{normal} value. This prevents words
+ from wrapping onto another line as is standard behavior outside the \c{pre}
+ tag, and forces text past the right edge of the element.
+
+ (The element's \c{text-overflow} may specify both \c{ellipsis} and
+ \c{ellipsis-word}, the latter of which is not as widely implemented.)
+
+ \section2 Custom Scrollbars
+
+ In general, scrollable elements should be avoided wherever possible within
+ mobile interfaces. Drag gestures already allow users to scroll windows
+ vertically, and narrow mobile screens are not suitable for overly wide
+ content.
+
+ In cases where content can only be viewed within a scrolling window,
+ scrollbars can be reformatted to make them more accessible to mobile users.
+ The following example presents a block of code within a touch-enabled mobile
+ interface:
+
+ \l{css3_scroll}{\inlineimage webkit-guide/scr_css3_scroll.png
+ }
+
+ \l{css3_scroll_css}{(CSS)}
+
+ This interface uses standard scrollbars, but their appearance is enhanced
+ using low-level \e{pseudo-element} CSS classes that refer to individual
+ components within the scrollbar.
+
+ Simply by invoking the following CSS selector, you disable scrollbars'
+ default appearance:
+
+ \code
+ pre::-webkit-scrollbar { height : 3em }
+ \endcode
+
+ In this case, the specified property increases the scrollbar's default
+ \c{height} to make it easier for mobile users to tap it with their fingers.
+
+ Each additional scrollbar component must then be explicitly defined,
+ otherwise it does not render. The following CSS provides custom styling for
+ the horizontal panning buttons:
+
+ \code
+ ::-webkit-scrollbar-button:increment {
+ background-image : url(img/arrow_right.png);
+ background-size : contain;
+ background-repeat : no-repeat;
+ width : 3em;
+ height : 3em;
+ }
+ ::-webkit-scrollbar-button:decrement {
+ background-image : url(img/arrow_left.png);
+ background-size : contain;
+ background-repeat : no-repeat;
+ width : 3em;
+ height : 3em;
+ }
+ \endcode
+
+ In this case, the scrollbar region between the two navigation icons is still
+ active, but not obviously so since its visual formatting has been
+ overridden. The simpler set of controls is far more suitable for a mobile
+ interface.
+
+ Webkit provides pseudo-elements for the following components:
+
+ \list
+ \o \c{scrollbar} refers to scrollbar as a whole. Additional dynamic classes
+ can be appended to specify \c{:vertical} and \c{:horizontal} scrollbars. The
+ \c{:corner-present} dynamic class activates when both scrollbars are
+ present.
+
+ \o \c{scrollbar-button} refers to incremental navigation buttons. Each
+ button can be styled separately with \c{:increment} and \c{:decrement}
+ dynamic classes.
+
+ \o \c{scrollbar-thumb} refers to the scrollbar's slider control.
+
+ \o \c{scrollbar-track} refers to the active navigation region between
+ buttons.
+
+ \o \c{scrollbar-track-piece} refers to each portion of the track on either
+ side of the thumb control. These can be styled separately using \c{:start}
+ and \c{:end} dynamic classes.
+
+ \o \c{scrollbar-corner} refers to the corner where scrollbar tracks meet.
+ The \c{resizer} pseudo-element also refers to this corner, but for resizable
+ elements such as \c{textarea}.
+
+ \o The \c{:double-button} and \c{:single-button} dynamic classes refer to
+ whether incrementor and decrementors are paired together redundantly at each
+ end of the track, while \c{:no-button} refers to whether they display at
+ all.
+ \endlist
+
+ \bold{See Also:}
+ \l{http://webkit.org/blog/363/styling-scrollbars/}{Surfin' Safari:
+ Styling Scrollbars}
+
+ \section2 Gradients
+
+ Gradients provide a graduated shading effect that can add subtle texture to
+ background elements, and can provide buttons a three-dimensional, beveled
+ appearance. Explicit support for gradients means there's no longer a need to
+ implement them as repeating background images.
+
+ Specify gradients using CSS properties such as the following:
+
+ \code
+ background: #aaaaaa;
+ background: -webkit-gradient(linear, center top, center bottom,
+ from(#dddddd), to(#777777) );
+ \endcode
+
+ Note the pair of \c{background} statements. The first specifies a monochrome
+ fallback color for browsers that do not support gradients.
+
+ The function specifies a simple \c{linear} gradient from the top to the
+ bottom of the element, shifting from a light to a darker gray.
+
+ The following example shows how this gradient can be applied to a background
+ element:
+
+ \l{css3_gradientBack}{\inlineimage webkit-guide/scr_css3_gradientBack.png
+ }
+
+ \l{css3_gradientBack_css}{(CSS)}
+
+ Gradients cannot be applied to the \c{body} element. Instead, they are here
+ applied to an element that covers the background.
+
+ You can specify more than one gradient for the same element. The following
+ shifts from a dark to a light gray halfway down the element, then back to
+ dark:
+
+ \code
+ background: -webkit-gradient(linear, center top, center bottom,
+ from(#777777), color-stop(50%, #dddddd), to(#777777) );
+ \endcode
+
+ Here is how the additional \c{color-stop} appears when applied to the same
+ background element:
+
+ \l{css3_gradientBackStop}{\inlineimage webkit-guide/scr_css3_gradientBackStop.png
+ }
+
+ \l{css3_gradientBackStop_css}{(CSS)}
+
+ Gradients can also provide a textured, three-dimensional appearance for
+ buttons. In the following example, the gradient is inverted and darkened
+ when each button is pressed:
+
+ \l{css3_gradientButton}{\inlineimage webkit-guide/scr_css3_gradientButton.png
+ }
+
+ \l{css3_gradientButton_css}{(CSS)}
+
+ In addition to linear gradients, CSS3 also specifies \bold{radial} gradients
+ that emanate from a single point. The following example demonstrates a
+ colorful radial gradient used to mark where users touch the screen:
+
+ \l{css3_grad-radial}{\inlineimage webkit-guide/scr_css3_grad-radial.png
+ }
+
+ \l{css3_grad-radial_css}{(CSS)}
+ \l{css3_grad-radial_js}{(JavaScript)}
+
+ The syntax is slightly different than for linear gradients. The first two
+ comma-separated arguments after the \c{radial} statement specify the
+ coordinates of the inner circle, and its radius. The next two arguments
+ specify the coordinates and radius of the outer circle:
+
+ \code
+ background: -webkit-gradient(radial, 90 120, 5, 100 130, 48,
+ from(#777777), color-stop(50%, #dddddd), to(#777777) );
+ \endcode
+
+ The use of \c{from}, \c{to} values and \c{color-stop} in radial gradients
+ are the same as for linear gradients.
+
+ \section2 Reflections
+
+ Reflections offer a mirror-like effect which, in the following example, adds
+ a sense of weight to headings and images:
+
+ \l{css3_reflect}{\inlineimage webkit-guide/scr_css3_reflect.png
+ }
+
+ \l{css3_reflect_css}{(CSS)}
+
+ The property's syntax specifies the edge of the element at which to reflect,
+ the offset, and an overlay color. In this case, the color is a gradient,
+ which causes the reflection to gradually fade:
+
+ \code
+ -webkit-box-reflect : below -0.25em -webkit-gradient(linear, center
+ top, center bottom, from(transparent), color-stop(0.25,
+ transparent), to(black));
+ \endcode
+
+ \section2 Masks
+
+ Masks offer a way to modify an image by overlaying either another image, or
+ a gradient. The following example shows a series of thumbnail images that
+ appear faded at their bottom edge until selected:
+
+ \l{css3_mask-grad}{\inlineimage webkit-guide/scr_css3_mask-grad.png
+ }
+
+ \l{css3_mask-grad_css}{(CSS)}
+ \l{css3_mask-grad_js}{(JavaScript)}
+
+ The gradient's opacity shifts from \c 1 to \c 0, an effect that translates
+ to the image:
+
+ \code
+ -webkit-mask-box-image : -webkit-gradient(linear, left top, left
+ bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
+ \endcode
+
+ The following example demonstrates an image used as a mask to frame another
+ image:
+
+ \l{css3_mask-img}{\inlineimage webkit-guide/scr_css3_mask-img.png
+ }
+
+ \l{css3_mask-img_css}{(CSS)}
+
+ Separately, the component images look like these:
+
+ \inlineimage webkit-guide/mask0.png
+ \inlineimage webkit-guide/mask1.png
+
+
+ The syntax is the same for border images, and allows you to stretch one
+ image over the other:
+
+ \code
+ -webkit-mask-box-image : url(img/mask.png) 5% stretch;
+ \endcode
+
+\section1 Dynamic CSS
+
+Animations help enhance touch-based mobile interfaces in many ways. They help
+ease transitions from one display state to another that might otherwise appear
+jarring. They help provide a sense of navigational orientation. They also often
+simulate tactile feedback as users' touches result in a tangible visual effect.
+Overall, they add a sense of vibrancy that increases users' engagement with the
+content on display.
+
+Support by QtWebKit for HTML5 allows you to choose from among several flavors of
+web-based animation: Canvas, SVG, and Level 3 CSS. Web developers may also be
+familiar with lower-level JavaScript-based animation techniques, which form the
+basis of many popular JavaScript libraries such as jQuery and Prototype. This
+section focuses on CSS-based animations, since they are more appropriate to
+integrate throughout a web design, without the additional overhead JavaScript
+libraries require. Like Adobe Flash, SVG and Canvas offer more specialized,
+low-level graphics frameworks whose animation features are more appropriate for
+generating standalone effects.
+
+This section demonstrates animation techniques by offering a series of examples
+that apply to common mobile design tasks. While some of these tasks are
+addressed by existing JavaScript frameworks such as jQuery and Prototype, the
+examples provided here illustrate some CSS-only alternatives.
+
+ \section2 CSS Animation Concepts
+
+ Level 3 CSS introduces three distinct concepts that are relevant when
+ crafting dynamic effects, which are discussed in the following sections:
+
+ \list
+ \o \e{Transforms} offer a series of manipulations to screen elements. By
+ themselves, transforms present only static visual effects, but they become
+ especially useful as part of dynamic transitions and animations. Simple
+ transforms are two-dimensional, with three-dimensional transforms gaining
+ gradual support.
+
+ \o \e{Transitions} entail a graduated shift from one explicit display
+ state to another. Transitional shifts apply to any CSS property that
+ specifies numeric or color values.
+
+ \o \e{Animations} offer more complex sequences of transitions that can
+ specify many intermediate display states. Unlike simple transitions,
+ animations can also be initiated more freely.
+ \endlist
+
+ \section2 2D Transforms
+
+ Transforms allow you to freely displace box elements from where they would
+ ordinarily appear. Several transform functions are available, allowing you
+ to \e{scale}, \e{rotate}, \e{skew}, or \e{translate} (move) objects.
+
+ The \c{translate} function moves an element from its default location, and
+ accepts \c{x} and \c{y} measurements as arguments. The following moves an
+ element off the right edge of the screen:
+
+ \code
+ -webkit-transform: translate(120%, 0);
+ \endcode
+
+ Alternately, \c{translateX} and \c{translateY} functions allow you to
+ specify each axis independently. This moves the element off the top of the
+ screen:
+
+ \code
+ -webkit-transform: translateX(0.0) translateY(-120%);
+ \endcode
+
+ Scale transforms allow you enlarge or shrink an element, with the scale
+ expressed as a decimal. By itself, \c{scale} modifies height and width
+ proportionately, but the alternative \c{scaleX} and \c{scaleY} functions
+ allow you to constrain scaling to a single axis.
+
+ The following animation demonstrates a \c{translate} function, which moves
+ the element from off the screen, followed by series of \c{scale},
+ \c{scaleX}, and \c{scaleY} functions:
+
+ \l{anim_demo-scale}{\inlineimage webkit-guide/scr_anim_demo-scale.png
+ }
+
+ \l{anim_demo-scale_css}{(CSS)}
+
+ By default, transforms originate from the center of the element, but you can
+ specify any edge using the \c{-webkit-transform-origin} property. The
+ following reduces an element to 75% of its original size, while keeping it
+ at its original bottom edge:
+
+ \code
+ -webkit-transform : scale(0.75);
+ -webkit-transform-origin : bottom;
+ \endcode
+
+ The following example uses this scale transform to shrink icons that are
+ assigned to in-line links, with icons aligning to the text's baseline:
+
+ \l{layout_link-fmt}{\inlineimage webkit-guide/scr_layout_link-fmt.png
+ }
+
+ \l{layout_link-fmt_css}{(CSS)}
+
+ The \c{rotate} function accepts degree or radian arguments, with negative
+ arguments specifying counter-clockwise motion. The following animation
+ demonstrates two rotations: the first clockwise around the element's center
+ point, and the second counter-clockwise around the top left corner:
+
+ \l{anim_demo-rotate}{\inlineimage webkit-guide/scr_anim_demo-rotate.png
+ }
+
+ \l{anim_demo-rotate_css}{(CSS)}
+
+ The \c{skew} function also accepts positive or negative degree arguments,
+ specifying the extent to which to modify the bottom left corner's 90-degree
+ angle. The \c{skew} and \c{skewX} functions shift the element horizontally,
+ but the alternative \c{skewY} function shifts the element vertically. The
+ following animation demonstrates a \c{skewX} followed by a \c{skewY}:
+
+ \l{anim_demo-skew}{\inlineimage webkit-guide/scr_anim_demo-skew.png
+ }
+
+ \l{anim_demo-skew_css}{(CSS)}
+
+ In the following example, a variety of transforms make a set of three
+ navigational tab icons appear to be part of a cube:
+
+ \l{anim_tabbedSkew}{\inlineimage webkit-guide/scr_anim_tabbedSkew.png
+ }
+
+ \l{anim_tabbedSkew_css}{(CSS)}
+
+ The example also implements the tab icons as internal links that activate
+ display of content using the \c{:target} dynamic class. See the
+ \l{Navigational Selectors} section for more information.
+
+ Note that transforms can include any combination of the functions described
+ above:
+
+ \code
+ nav > a:nth-of-type(3) {
+ background-image : url(img/S_google.jpg);
+ -webkit-transform : rotate(-60deg) skew(-30deg) translate(1.7em, 0em);
+ }
+ \endcode
+
+ \section2 Transitions
+
+ Transitions allow you to gradually shift from one defined CSS state to
+ another. Any CSS property expressed as a numeric or color value (including a
+ color name or hex value) can be transitioned between two style sheets.
+ Properties such as \c{display} that have discrete sets of named values, such
+ as the \c{display} property's \c{block} or \c{none} values, cannot be
+ transitioned. In cases where named values translate internally to numeric
+ values, such as the \c{border-width} property's \c{thin} and \c{thick}
+ values, they can be transitioned.
+
+ The following example shows a series of transitions from a collapsed icon
+ state to an expanded panel:
+
+ \l{anim_panel}{\inlineimage webkit-guide/scr_anim_panel.png
+ }
+
+ \l{anim_panel_css}{(CSS)}
+ \l{anim_panel_js}{(JavaScript)}
+
+ Each style sheet specifies a different \c{max-width} value, and each
+ accompanying transition, defined separately for each state, allows the value
+ to shift over the course of half of a second:
+
+ \code
+ nav.expanded {
+ max-width : 95%;
+ -webkit-transition : max-width 0.5s ease-in-out;
+ }
+ nav.collapsed {
+ max-width : 10%;
+ -webkit-transition : max-width 0.5s ease-in-out;
+ }
+ \endcode
+
+ That shorthand syntax can be expanded to several different properties:
+
+ \code
+ nav.expanded {
+ max-width : 95%;
+ -webkit-transition-property : max-width;
+ -webkit-transition-duration : 0.5s;
+ -webkit-transition-timing-function : ease-in-out;
+ }
+ nav.collapsed {
+ max-width : 10%;
+ -webkit-transition-property : max-width;
+ -webkit-transition-duration : 0.5s;
+ -webkit-transition-timing-function : ease-in-out;
+ }
+ \endcode
+
+ Available transition functions include \c{linear}, \c{ease-in},
+ \c{ease-out}, \c{ease-in-out} and \c{cubic-bezier}.
+
+ Note that the \c{max-width} properties in both style sheets both use
+ percentages to specify measurements. Transitions may not work properly if
+ you shift from one unit to another.
+
+ The example above specifies an additional set of transitions affecting the
+ icons nested within the navigation panel:
+
+ \code
+ nav.expanded > .option {
+ opacity : 1;
+ -webkit-transform : scale(1.0);
+ -webkit-transition : all 0.5s linear;
+ }
+ nav.collapsed > .option {
+ opacity : 0;
+ -webkit-transform : scale(0.0);
+ -webkit-transition : all 0.5s linear;
+ }
+ \endcode
+
+ The shifting \c{scale} transform makes icons appear to zoom in to fill the
+ space, while \c{opacity} makes them fade in. Specifying \c{all} as the
+ transition property applies to any valid property that differs between the
+ two states.
+
+ These nested transitions execute at the same time as those assigned to the
+ parent \c{nav} element. The combined effect appears to be a single
+ transition.
+
+ \section2 Transitional Sequences
+
+ The prior example showed a single transition, but transitions can also be
+ run in sequence to form more complex animations. The following example
+ demonstrates an embedded navigation panel that, when pressed, expands
+ horizontally, then vertically to reveal numerous navigation options:
+
+ \l{anim_accord}{\inlineimage webkit-guide/scr_anim_accord.png
+ }
+
+ \l{anim_accord_css}{(CSS)}
+ \l{anim_accord_js}{(JavaScript)}
+
+ The style sheets specify separate, comma-separated transitions for \c{width}
+ and \c{height} properties:
+
+ \code
+ #accordion.expanded {
+ width: 80%;
+ height: 90%;
+ -webkit-transition:
+ width 0.5s ease-in-out 0.0s,
+ height 0.5s ease-in-out 0.5s
+ ;
+ }
+ #accordion.collapsed {
+ width: 10%;
+ height: 7%;
+ -webkit-transition:
+ height 0.5s ease-in-out 0.0s,
+ width 0.5s ease-in-out 0.5s
+ ;
+ }
+ \endcode
+
+ Each transition's additional time measurement specifies a delay. The
+ long-form syntax may make this clearer:
+
+ \code
+ #accordion.expanded {
+ width: 80%;
+ height: 90%;
+ -webkit-transition-property : width , height;
+ -webkit-transition-duration : 0.5s , 0.5s;
+ -webkit-transition-timing-function : ease-in-out , ease-in-out;
+ -webkit-transition-delay : 0.0s , 0.5s;
+ }
+ #accordion.collapsed {
+ width : 10%;
+ height : 7%;
+ -webkit-transition-property : height , width;
+ -webkit-transition-duration : 0.5s , 0.5s;
+ -webkit-transition-timing-function : ease-in-out , ease-in-out;
+ -webkit-transition-delay : 0.0s , 0.5s;
+ }
+ \endcode
+
+ The shift to the \c{expanded} state involves two transitions, each of which
+ lasts half a second and relies on the same \c{ease-in-out} function. The
+ first takes place immediately and affects the \c{width} property. The
+ second, affecting the \c{height} property, takes place after a delay that
+ matches the first transition's duration. The reverse transition is much the
+ same, only the \c{height} property transitions before the \c{width} to
+ reverse the effect.
+
+ In addition to the navigation element's sequence of transitions, nested
+ accordion-style animations activate when users expand top-level headings.
+ Subheadings are revealed using a \c{scaleY} transform, which makes them
+ appear as if they are flipping upwards.
+
+ The following example shows a photo gallery interface that uses the same
+ techniques. (Size the window to emulate a smaller mobile screen.)
+
+ \l{anim_gallery}{\inlineimage webkit-guide/scr_anim_gallery.png
+ }
+
+ \l{anim_gallery_css}{(CSS)}
+ \l{anim_gallery_js}{(JavaScript)}
+
+ The main interface uses simple transitions affecting \c{opacity}, along with
+ \c{scale} and \c{translate} transforms, which combined make queued images
+ appear dimmer, smaller, and horizontally offset from the main image.
+
+ A separate sequence of transitions activates when users tap selected images.
+ The first transition uses a \c{scaleX} transform to flip the image towards
+ the center. The second then flips out a panel featuring details on the
+ photo. When users navigate away to adjacent photos, the panel automatically
+ flips back to its original state as it is moved to the side.
+
+ Another example shows an interface featuring a simple list of items:
+
+ \l{anim_skew}{\inlineimage webkit-guide/scr_anim_skew.png
+ }
+
+ \l{anim_skew_css}{(CSS)}
+ \l{anim_skew_js}{(JavaScript)}
+
+ When dismissed, items are wiped off the screen using a \c{skew} transform
+ that provides the illusion of speed. Remaining items move upwards to fill
+ the space vacated by items that have been removed.
+
+ This example uses the same technique of sequential transitions. The first
+ transition applies to the combined \c{translate}/\c{skew} transform. The
+ second, delayed transition modifies the \c{top} property to align remaining
+ items to a grid.
+
+ Note that for items to reposition themselves in this example, a vertical
+ grid must be explicitly specified. You can only apply transitions between
+ properties you explicitly define and activate, not between values the
+ browser assigns internally to automatically position elements relative to
+ each other.
+
+ \section2 Keyframe Animations
+
+ The previous section showed how you can chain sequences of transitions to
+ produce complex effects. Animations also allow you to define many
+ intermediary interface states, but using a far simpler syntax, and not
+ assigned to transitions between CSS states.
+
+ The following example shows a simple animation of icons that pulse when
+ selected:
+
+ \l{anim_pulse}{\inlineimage webkit-guide/scr_anim_pulse.png
+ }
+
+ \l{anim_pulse_css}{(CSS)}
+
+ It uses the following CSS, shown here in both abbreviated and long form:
+
+ \code
+ nav > a:target { -webkit-animation : pulse 1s infinite; }
+
+ nav > a:target {
+ -webkit-animation-name : pulse;
+ -webkit-animation-duration : 1s;
+ -webkit-animation-iteration-count : infinite;
+ }
+ \endcode
+
+ You supply a \c{name} for the animation that corresponds to a
+ \c{keyframes} rule defined separately within your CSS:
+
+ \code
+ @-webkit-keyframes pulse {
+ 0% { opacity : 1.0 }
+ 50% { opacity : 0.7 }
+ }
+ \endcode
+
+ Percentages mark new animation states within the course of the animation,
+ and behave much like CSS selectors. In this case, the animation shifts
+ between two separate states over the course of a second: opaque and slightly
+ dimmed. With its \c{iteration-count} set to \c{infinite} rather than a set
+ number, the animation only stops when the link is no longer selected.
+
+ The following example demonstrates a popular mobile design pattern
+ implemented with CSS. Navigation to nested subheads appears to wipe to the
+ right, while navigating upwards in the hierarchy appears to wipe to the
+ left:
+
+ \l{anim_slide1}{\inlineimage webkit-guide/scr_anim_slide1.png
+ }
+
+ \l{anim_slide_css}{(CSS)}
+
+ It relies on keyframes rules such as the following, which define a simple
+ start and end state:
+
+ \code
+ @-webkit-keyframes slide_in {
+ from {
+ left : 80%;
+ right : -80%;
+ }
+ to {
+ left : 0em;
+ right : 0em;
+ }
+ }
+ \endcode
+
+ Unlike a transition, the animation is triggered immediately when the page
+ loads, but only if the target of navigation is an anchor whose ID is
+ \c{in} or \c{out}. If you navigate to the page itself, no animation
+ occurs.
+
+ The following example uses a keyframe animation to scroll through banner
+ options at the top of the screen:
+
+ \l{css3_multicol}{\inlineimage webkit-guide/scr_css3_multicol.png
+ }
+
+ \l{css3_multicol_css}{(CSS)}
+
+ The animation defines a set of rapid shifts alternating with long static
+ phases. It modifies the left offset of an element that is five times the
+ width of the window.
+
+ \code
+ @-webkit-keyframes banner_scroll {
+ 0% { left : 0%; }
+ 18% { left : 0%; }
+ 20% { left : -100%; }
+ 38% { left : -100%; }
+ 40% { left : -200%; }
+ 58% { left : -200%; }
+ 60% { left : -300%; }
+ 78% { left : -300%; }
+ 80% { left : -400%; }
+ 95% { left : -400%; }
+ 100% { left : 0%; }
+ }
+ \endcode
+
+ Finally, the demonstrations of \l{anim_demo-rotate}{rotate},
+ \l{anim_demo-scale}{scale}, and \l{anim_demo-skew}{skew} 2D transforms that
+ opened this section all rely on separate keyframe animations to slide in and
+ manipulate a series of panels. Separate \c{-webkit-animation-delay} settings
+ for each panel control the sequence of each presentation.
+
+
+\list
+\o \l{QtWebKit Guide} -back to the main page
+\endlist
+*/
+
+/*!
+\example webkit/webkit-guide
+\title QtWebKit Guide Files
+This is a listing of \l{QtWebKit Guide} code.
+\note The links to the HTML5 code is found within the guide.
+*/
+
diff --git a/doc/src/webkit/guide/guidelinks.qdoc b/doc/src/webkit/guide/guidelinks.qdoc
new file mode 100644
index 0000000000..b4f7f98769
--- /dev/null
+++ b/doc/src/webkit/guide/guidelinks.qdoc
@@ -0,0 +1,488 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+/*!
+\externalpage webkit-guide/storage.htm
+\title ex_storage
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-storage-css.html
+\title storage_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-storage-js.html
+\title storage_js
+*/
+
+/*!
+\externalpage webkit-guide/anim_accord.htm
+\title anim_accord
+*/
+
+/*!
+\externalpage webkit-guide/anim_demo-rotate.htm
+\title anim_demo-rotate
+*/
+
+/*!
+\externalpage webkit-guide/anim_demo-scale.htm
+\title anim_demo-scale
+*/
+
+/*!
+\externalpage webkit-guide/anim_demo-skew.htm
+\title anim_demo-skew
+*/
+
+/*!
+\externalpage webkit-guide/anim_gallery.htm
+\title anim_gallery
+*/
+
+/*!
+\externalpage webkit-guide/anim_panel.htm
+\title anim_panel
+*/
+
+/*!
+\externalpage webkit-guide/anim_pulse.htm
+\title anim_pulse
+*/
+
+/*!
+\externalpage webkit-guide/anim_skew.htm
+\title anim_skew
+*/
+
+/*!
+\externalpage webkit-guide/anim_slide1.htm
+\title anim_slide1
+*/
+
+/*!
+\externalpage webkit-guide/anim_tabbedSkew.htm
+\title anim_tabbedSkew
+*/
+
+/*!
+\externalpage webkit-guide/css3_backgrounds.htm
+\title css3_backgrounds
+*/
+
+/*!
+\externalpage webkit-guide/css3_border-img.htm
+\title css3_border-img
+*/
+
+/*!
+\externalpage webkit-guide/css3_grad-radial.htm
+\title css3_grad-radial
+*/
+
+/*!
+\externalpage webkit-guide/css3_gradientBack.htm
+\title css3_gradientBack
+*/
+
+/*!
+\externalpage webkit-guide/css3_gradientBackStop.htm
+\title css3_gradientBackStop
+*/
+
+/*!
+\externalpage webkit-guide/css3_gradientButton.htm
+\title css3_gradientButton
+*/
+
+/*!
+\externalpage webkit-guide/css3_mask-grad.htm
+\title css3_mask-grad
+*/
+
+/*!
+\externalpage webkit-guide/css3_mask-img.htm
+\title css3_mask-img
+*/
+
+/*!
+\externalpage webkit-guide/css3_multicol.htm
+\title css3_multicol
+*/
+
+/*!
+\externalpage webkit-guide/css3_reflect.htm
+\title css3_reflect
+*/
+
+/*!
+\externalpage webkit-guide/css3_scroll.htm
+\title css3_scroll
+*/
+
+/*!
+\externalpage webkit-guide/css3_sel-nth.htm
+\title css3_sel-nth
+*/
+
+/*!
+\externalpage webkit-guide/css3_text-overflow.htm
+\title css3_text-overflow
+*/
+
+/*!
+\externalpage webkit-guide/css3_text-shadow.htm
+\title css3_text-shadow
+*/
+
+/*!
+\externalpage webkit-guide/css3_text-stroke.htm
+\title css3_text-stroke
+*/
+
+/*!
+\externalpage webkit-guide/form_tapper.htm
+\title form_tapper
+*/
+
+/*!
+\externalpage webkit-guide/form_toggler.htm
+\title form_toggler
+*/
+
+/*!
+\externalpage webkit-guide/layout_link-fmt.htm
+\title layout_link-fmt
+*/
+
+/*!
+\externalpage webkit-guide/layout_tbl-keyhole.htm
+\title layout_tbl-keyhole
+*/
+
+/*!
+\externalpage webkit-guide/mob_condjs.htm
+\title mob_condjs
+*/
+
+/*!
+\externalpage webkit-guide/mob_layout.htm
+\title mob_layout
+*/
+
+/*!
+\externalpage webkit-guide/mob_mediaquery.htm
+\title mob_mediaquery
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-accord-css.html
+\title anim_accord_css
+*/
+
+/*!
+\externalpage wwebkit-webkit-guide-js-anim-accord-js.html
+\title anim_accord_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-demo-rotate-css.html
+\title anim_demo-rotate_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-demo-scale-css.html
+\title anim_demo-scale_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-demo-skew-css.html
+\title anim_demo-skew_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-gallery-css.html
+\title anim_gallery_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-anim-gallery-js.html
+\title anim_gallery_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-panel-css.html
+\title anim_panel_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-anim-panel-js.html
+\title anim_panel_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-pulse-css.html
+\title anim_pulse_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-skew-css.html
+\title anim_skew_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-anim-skew-js.html
+\title anim_skew_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-slide-css.html
+\title anim_slide_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-anim-tabbedskew-css.html
+\title anim_tabbedSkew_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-form-tapper-css.html
+\title form_tapper_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-form-toggler-css.html
+\title form_toggler_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-layout-link-fmt-css.html
+\title layout_link-fmt_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-layout-tbl-keyhole-css.html
+\title layout_tbl-keyhole_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-backgrounds-css.html
+\title css3_backgrounds_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-css3-backgrounds-js.html
+\title css3_backgrounds_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-border-img-css.html
+\title css3_border-img_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-grad-radial-css.html
+\title css3_grad-radial_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-css3-grad-radial-js.html
+\title css3_grad-radial_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-gradientback-css.html
+\title css3_gradientBack_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-gradientbackstop-css.html
+\title css3_gradientBackStop_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-gradientbutton-css.html
+\title css3_gradientButton_css
+*/
+
+/*!
+\externalpage webkit-guide/css/webkit-webkit-guide-css-css3-mask-grad-css.html
+\title css3_mask-grad_css
+*/
+
+/*!
+\externalpage webkit-guide/js/webkit-webkit-guide-js-css3-mask-grad-js.html
+\title css3_mask-grad_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-mask-img-css.html
+\title css3_mask-img_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-multicol-css.html
+\title css3_multicol_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-reflect-css.html
+\title css3_reflect_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-scroll-css.html
+\title css3_scroll_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-sel-nth-css.html
+\title css3_sel-nth_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-text-overflow-css.html
+\title css3_text-overflow_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-css3-text-overflow-js.html
+\title css3_text-overflow_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-text-shadow-css.html
+\title css3_text-shadow_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-css3-text-stroke-css.html
+\title css3_text-stroke_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mob-condjs-css.html
+\title mob_condjs_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-js-mob-condjs-js.html
+\title mob_condjs_js
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mqlayout-desktop-css.html
+\title mqlayout_desktop_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mqlayout-touch-css.html
+\title mqlayout_touch_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mqlayout-mobile-css.html
+\title mqlayout_mobile_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mq-desktop-css.html
+\title mq_desktop_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mq-touch-css.html
+\title mq_touch_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mq-mobile-css.html
+\title mq_mobile_css
+*/
+
+/*!
+\externalpage webkit-webkit-guide-css-mob-mediaquery-css.html
+\title mob_mediaquery_css
+*/
+
+/*!
+\externalpage http://deviceatlas.com/
+\title DeviceAtlas
+*/
+
+/*!
+\externalpage http://wurfl.sourceforge.net/
+\title WURFL
+*/
+
+/*!
+\externalpage http://www.w3.org/TR/selectors-api/
+\title Selectors API
+*/
+
+/*!
+\externalpage http://dev.w3.org/html5/webstorage/
+\title HTML5 Web Storage
+*/
+
+/*!
+\externalpage http://html5doctor.com/introducing-web-sql-databases
+\title HTML5 Doctor: Introducing Web SQL Databases
+*/
+
+/*!
+\externalpage http://dev.w3.org/html5/canvas-api/canvas-2d-api.html
+\title HTML5 Canvas API
+*/
+
+/*!
+\externalpage http://www.w3schools.com/css/css_colors.asp
+\title CSS Color Value
+*/
+
+/*!
+\externalpage http://www.w3.org/TR/2003/CR-css3-color-20030514/#numerical
+\title CSS3 Color Module specification
+*/
+
+/*!
+\externalpage http://www.canvasdemos.com/2009/10/09/html-5-canvas-animation
+\title CanvasDemos.com: animated cartoon
+*/
diff --git a/doc/src/webkit/webkit.qdoc b/doc/src/webkit/webkit.qdoc
new file mode 100644
index 0000000000..759a7f7e2e
--- /dev/null
+++ b/doc/src/webkit/webkit.qdoc
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+/*!
+\page qtwebkit-guide.html
+
+\title QtWebKit Guide
+
+\section1 Introduction to QtWebKit
+
+Qt WebKit is a web content rendering engine based on the open source
+WebKit project, featuring broad support for standard web technologies.
+QtWebKit is developed as a part of the WebKit community,
+which enables every new release of Qt WebKit
+to include the latest developments from the WebKit project.
+
+Qt SDK 1.1 supports the following Qt WebKit releases:
+
+\list
+\o QtWebKit 2.1 for Symbian^3 when using Qt 4.7.
+\o QtWebKit 2.0, as a standard part of Qt 4.7,
+for all other platforms when using Qt 4.7.
+\o When using Qt 4.6,
+the QtWebKit version of Qt 4.6 is used on all platforms.
+\endlist
+
+\section1 QtWebKit 2.1 for Web Developers
+
+The highlights of the QtWebKit 2.1 release for web developers
+are listed below.
+Please note that HTML5 and CSS3 features are based on draft
+specifications that are subject to change.
+
+\list
+\o HTML5 progress and meter elements
+\o HTML5 canvas element
+\o Web SQL Database
+\o Web Storage
+\o CSS Animations
+\o CSS Transitions
+\o CSS 2D Transforms
+\o CSS Text
+\o CSS Masks
+\o CSS Scrollbar Styles
+\o Native JSON parser
+\endlist
+
+\section1 Qt WebKit Module
+
+Information regarding the classes and API introduced in the Qt WebKit module
+are found in the \l{WebKit in Qt} page.
+
+\section1 Mobile HTML5 Developer's Guide for QtWebKit (BETA)
+
+This is a beta release of a guide for mobile web development with
+QtWebKit 2.1. It discusses how to use several standard web
+technologies to create mobile applications with QtWebKit.
+
+Contents:
+\list
+\o \l{QtWebKit Guide - Level 3 CSS}{Level 3 CSS: media queries, selectors, visual
+effects, transforms, transitions, and animations}
+\o \l{Canvas Graphics}{HTML5 canvas element}
+\o \l{QtWebKit Guide - Client Storage}{Client Storage}
+\endlist
+*/
+
diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc
index c3db5fac6a..1d8214bf15 100644
--- a/doc/src/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets-and-layouts/layout.qdoc
@@ -319,16 +319,16 @@
\section2 The Header File (\c card.h)
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 0
\section2 The Implementation File (\c card.cpp)
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 1
First we define \c{count()} to fetch the number of items in the list.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 2
Then we define two functions that iterate over the layout: \c{itemAt()}
and \c{takeAt()}. These functions are used internally by the layout system
@@ -341,7 +341,7 @@
structure, we may have to spend more effort defining a linear order for the
items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 3
\c{addItem()} implements the default placement strategy for layout items.
This function must be implemented. It is used by QLayout::add(), by the
@@ -351,26 +351,26 @@
QGridLayout::addItem(), QGridLayout::addWidget(), and
QGridLayout::addLayout().
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 4
The layout takes over responsibility of the items added. Since QLayoutItem
does not inherit QObject, we must delete the items manually. In the
destructor, we remove each item from the list using \c{takeAt()}, and
then delete it.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 5
The \c{setGeometry()} function actually performs the layout. The rectangle
supplied as an argument does not include \c{margin()}. If relevant, use
\c{spacing()} as the distance between items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 6
\c{sizeHint()} and \c{minimumSize()} are normally very similar in
implementation. The sizes returned by both functions should include
\c{spacing()}, but not \c{margin()}.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 7
\section2 Further Notes
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 8231fcbd41..9e9dd64610 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -283,12 +283,12 @@
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 0
The following code snippet illustrates how to use QStyle to
draw the focus rectangle from a custom widget's paintEvent():
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 1
The next example shows how to derive from an existing style to
customize the look of a graphical element:
@@ -542,7 +542,7 @@
We start with a look at how QCheckBox builds it style option,
which is QStyleOptionButton for checkboxes:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 0
First we let QStyleOption set up the option with the information
that is common for all widgets with \c initFrom(). We will look at
@@ -561,7 +561,7 @@
attributes that are common for all widgets. We print its
implementation here:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 1
The State_Enabled is set when the widget is enabled. When the
widget has focus the State_HasFocus flag is set. Equally, the
@@ -625,7 +625,7 @@
notably, it wraps the methods in QStyle used for painting. The
QCheckBox draws itself as follows:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 2
QCommonStyle handles the CE_CheckBox element. The QCheckBox
has two sub elements: SE_CheckBoxIndicator (the checked indicator)
@@ -633,7 +633,7 @@
checkbox label). QCommonStyle also implements these sub element
bounding rectangles. We have a look at the QCommonStyle code:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 3
As can be seen from the code extract, the common style gets
the bounding rectangles of the two sub elements of
@@ -644,7 +644,7 @@
handles CE_CheckboxLabel. We will examine each implementation and
start with CE_CheckBoxLabel:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 4
\l{QStyle::}{visualAlignment()} adjusts the alignment of text
according to the layout direction. We then draw an icon if it
diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
index be845c492a..8cfa2b4c73 100644
--- a/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -469,11 +469,11 @@
sheet. Consider the following example. First, we set a style
sheet on the QApplication:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 21
Then we set a style sheet on a QPushButton object:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 22
The style sheet on the QPushButton forces the QPushButton (and
any child widget) to have blue text, in spite of the more
@@ -481,7 +481,7 @@
The result would have been the same if we had written
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 23
except that if the QPushButton had children (which is unlikely),
the style sheet would have no impact on them.
@@ -500,14 +500,14 @@
For example, consider a QPushButton inside a QGroupBox:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 24
The QPushButton does not have an explicit color set. Hence, instead
of inheriting color of its parent QGroupBox, it has the system color.
If we want to set the color on a QGroupBox and its children,
we can write:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 25
In contrast, setting a font and propagate using QWidget::setFont() and
QWidget::setPalette() propagates to child widgets.
@@ -517,7 +517,7 @@
The Type Selector can be used to style widgets of a particular type. For
example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 26
Qt Style Sheet uses QObject::className() of the widget to determine
when to apply the Type Selector. When custom widgets are inside namespaces,
@@ -526,7 +526,7 @@
when using the Type Selector for widgets inside namespaces, we must
replace the "::" with "--". For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 27
\section1 Setting QObject properties
@@ -1328,7 +1328,7 @@
If you subclass from QWidget, you need to provide a paintEvent for your
custom QWidget as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 32
The above code is a no-operation if there is no stylesheet set.
@@ -3373,35 +3373,35 @@
\l{QLineEdit}s in an application. This could be achieved like
this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 88
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 88
If we want the property to apply only to the \l{QLineEdit}s that are
children (or grandchildren or grand-grandchildren) of a specific dialog,
we would rather do this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 89
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 89
If we want the property to apply only to one specific QLineEdit,
we can give it a name using QObject::setObjectName() and use an
ID Selector to refer to it:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 90
Alternatively, we can set the
\l{Qt Style Sheets Reference#background-prop}{background-color} property directly on the
QLineEdit, omitting the selector:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 91
To ensure a good contrast, we should also specify a suitable
color for the text:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 92
It might be a good idea to change the colors used for selected
text as well:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 93
\section2 Customizing Using Dynamic Properties
@@ -3422,7 +3422,7 @@
\c mandatoryField property on the fly and set it to true. For
example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 95
\section2 Customizing a QPushButton Using the Box Model
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index 0bf4909992..e7df50257f 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -198,7 +198,7 @@
the first time it is called. You can also call
QMainWindow::setMenuBar() to use a custom menu bar in the main window.
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 0
\dots
\snippet examples/mainwindows/menus/mainwindow.cpp 5
\dots
@@ -222,7 +222,7 @@
\snippet examples/mainwindows/sdi/mainwindow.cpp 0
\dots
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 1
In this example, the toolbar is restricted to the top and bottom
toolbar areas of the main window, and is initially placed in the
@@ -244,7 +244,7 @@
required, the default can be changed with the
QMainWindow::setCorner() function:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 2
The following diagram shows the configuration produced by the above code.
Note that the left and right dock widgets will occupy the top and bottom
@@ -255,7 +255,7 @@
Once all of the main window components have been set up, the central widget
is created and installed by using code similar to the following:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 3
The central widget can be any subclass of QWidget.
*/
diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
index ad2d702776..f734e43598 100644
--- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
@@ -41,7 +41,7 @@
现在您已经编写了一些小型可用的应用程序,并对 Qt 编程有更加广泛的了解。您可以直接着手做自己的项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}和\l{Signals and Slots}{信号和槽}。
- \div {float-left}
+ \div {class="float-left"}
\inlineimage qtdemo-small.png
\enddiv
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
index 172f895c56..843ac0f1f2 100644
--- a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/Bubble.qml b/examples/declarative/screenorientation/Core/Bubble.qml
index 273e70366b..446fa1f196 100644
--- a/examples/declarative/screenorientation/Core/Bubble.qml
+++ b/examples/declarative/screenorientation/Core/Bubble.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/Button.qml b/examples/declarative/screenorientation/Core/Button.qml
index e2ee162458..8fefe0c0cf 100644
--- a/examples/declarative/screenorientation/Core/Button.qml
+++ b/examples/declarative/screenorientation/Core/Button.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/screenorientation.js b/examples/declarative/screenorientation/Core/screenorientation.js
index 4e0cc283eb..ffc6dc8fe6 100644
--- a/examples/declarative/screenorientation/Core/screenorientation.js
+++ b/examples/declarative/screenorientation/Core/screenorientation.js
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/screenorientation.qml b/examples/declarative/screenorientation/screenorientation.qml
index 5e71516e1b..2575274b53 100644
--- a/examples/declarative/screenorientation/screenorientation.qml
+++ b/examples/declarative/screenorientation/screenorientation.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml
index d02a317e10..4b51f4ea53 100644
--- a/examples/declarative/text/textselection/textselection.qml
+++ b/examples/declarative/text/textselection/textselection.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml
index ac2dea37e0..fe838b57b6 100644
--- a/examples/declarative/ui-components/tabwidget/TabWidget.qml
+++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml
@@ -45,7 +45,7 @@ Item {
// Setting the default property to stack.children means any child items
// of the TabWidget are actually added to the 'stack' item's children.
- // See the "Writing QML Components: Properties, Methods and Signals"
+ // See the "Property Binding"
// documentation for details on default properties.
default property alias content: stack.children
diff --git a/examples/graphicsview/diagramscene/arrow.h b/examples/graphicsview/diagramscene/arrow.h
index 070f74aa2e..cc6ff9732d 100644
--- a/examples/graphicsview/diagramscene/arrow.h
+++ b/examples/graphicsview/diagramscene/arrow.h
@@ -74,8 +74,6 @@ public:
DiagramItem *endItem() const
{ return myEndItem; }
-
-public slots:
void updatePosition();
protected:
diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp
index 5c9554fb96..517cb7b202 100644
--- a/examples/ja_JP/linguist/hellotr/main.cpp
+++ b/examples/ja_JP/linguist/hellotr/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples 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_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$
**
****************************************************************************/
diff --git a/examples/phonon/phonon.pro b/examples/phonon/phonon.pro
index aa6ac139e2..c6a0bffe99 100644
--- a/examples/phonon/phonon.pro
+++ b/examples/phonon/phonon.pro
@@ -3,6 +3,9 @@ CONFIG += ordered
SUBDIRS = qmusicplayer \
capabilities
+# Disable capabilities example for symbian-gcce due to a bug in elf2e32.
+symbian-gcce:SUBDIRS -= capabilities
+
# install
target.path = $$[QT_INSTALL_EXAMPLES]/phonon
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS phonon.pro README
diff --git a/examples/tools/undoframework/commands.cpp b/examples/tools/undoframework/commands.cpp
index 9e81c3ec77..ff7b0b7f1d 100644
--- a/examples/tools/undoframework/commands.cpp
+++ b/examples/tools/undoframework/commands.cpp
@@ -136,6 +136,12 @@ AddCommand::AddCommand(DiagramItem::DiagramType addType,
}
//! [7]
+AddCommand::~AddCommand()
+{
+ if (!myDiagramItem->scene())
+ delete myDiagramItem;
+}
+
//! [8]
void AddCommand::undo()
{
diff --git a/examples/tools/undoframework/commands.h b/examples/tools/undoframework/commands.h
index ba27e2d51c..a4e4ab9549 100644
--- a/examples/tools/undoframework/commands.h
+++ b/examples/tools/undoframework/commands.h
@@ -87,6 +87,7 @@ class AddCommand : public QUndoCommand
public:
AddCommand(DiagramItem::DiagramType addType, QGraphicsScene *graphicsScene,
QUndoCommand *parent = 0);
+ ~AddCommand();
void undo();
void redo();
diff --git a/examples/tutorials/gettingStarted/gsQt/gsqt.pro b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
new file mode 100755
index 0000000000..72f09c114b
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
@@ -0,0 +1,13 @@
+TEMPLATE = subdirs
+
+SUBDIRS = part1 \
+ part2 \
+ part3 \
+ part4 \
+ part5
+
+# install
+sources.files = *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt
+INSTALLS += sources
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
new file mode 100755
index 0000000000..eaf04256d9
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 examples 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>
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QTextEdit textEdit;
+ textEdit.show();
+
+ return app.exec();
+}
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
new file mode 100755
index 0000000000..24b4d77abc
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 examples 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>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QTextEdit textEdit;
+ QPushButton quitButton("&Quit");
+
+ QObject::connect(&quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+ QVBoxLayout layout;
+ layout.addWidget(&textEdit);
+ layout.addWidget(&quitButton);
+
+ QWidget window;
+ window.setLayout(&layout);
+
+ window.show();
+
+ return app.exec();
+}
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
new file mode 100755
index 0000000000..59ff9c40ea
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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 examples 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>
+
+class Notepad : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Notepad();
+
+private slots:
+ void quit();
+
+private:
+ QTextEdit *textEdit;
+ QPushButton *quitButton;
+
+};
+
+Notepad::Notepad()
+{
+ textEdit = new QTextEdit;
+ quitButton = new QPushButton(tr("Quit"));
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(textEdit);
+ layout->addWidget(quitButton);
+
+ setLayout(layout);
+
+ setWindowTitle(tr("Notepad"));
+}
+
+void Notepad::quit()
+{
+ QMessageBox messageBox;
+ messageBox.setWindowTitle(tr("Notepad"));
+ messageBox.setText(tr("Do you really want to quit?"));
+ messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+ messageBox.setDefaultButton(QMessageBox::No);
+ if (messageBox.exec() == QMessageBox::Yes)
+ qApp->quit();
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Notepad notepad;
+ notepad.show();
+
+ return app.exec();
+}
+
+#include "main.moc"
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
new file mode 100755
index 0000000000..ba18afb749
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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 examples 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>
+
+class Notepad : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ Notepad();
+
+private slots:
+ void load();
+ void save();
+
+private:
+ QTextEdit *textEdit;
+
+ QAction *loadAction;
+ QAction *saveAction;
+ QAction *exitAction;
+
+ QMenu *fileMenu;
+};
+
+Notepad::Notepad()
+{
+
+ loadAction = new QAction(tr("&Load"), this);
+ saveAction = new QAction(tr("&Save"), this);
+ exitAction = new QAction(tr("E&xit"), this);
+
+ connect(loadAction, SIGNAL(triggered()), this, SLOT(load()));
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(loadAction);
+ fileMenu->addAction(saveAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAction);
+
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ setWindowTitle(tr("Notepad"));
+}
+
+void Notepad::load()
+{
+
+}
+
+void Notepad::save()
+{
+
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Notepad notepad;
+ notepad.show();
+
+ return app.exec();
+};
+
+#include "main.moc"
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
new file mode 100755
index 0000000000..4a6257d10e
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** 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 examples 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>
+
+class Notepad : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ Notepad();
+
+private slots:
+ void open();
+ void save();
+
+private:
+ QTextEdit *textEdit;
+
+ QAction *openAction;
+ QAction *saveAction;
+ QAction *exitAction;
+
+ QMenu *fileMenu;
+};
+
+Notepad::Notepad()
+{
+
+ openAction = new QAction(tr("&Load"), this);
+ saveAction = new QAction(tr("&Save"), this);
+ exitAction = new QAction(tr("E&xit"), this);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAction);
+ fileMenu->addAction(saveAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAction);
+
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ setWindowTitle(tr("Notepad"));
+}
+
+void Notepad::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
+ tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+
+ if (fileName != "") {
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::critical(this, tr("Error"), tr("Could not open file"));
+ return;
+ }
+ QTextStream in(&file);
+ textEdit->setText(in.readAll());
+ file.close();
+ }
+}
+
+void Notepad::save()
+{
+
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), "",
+ tr("Text Files (*.txt);;C++ Files (*.cpp *.h)"));
+
+ if (fileName != "") {
+ QFile file(fileName);
+ if (!file.open(QIODevice::WriteOnly)) {
+ // error message
+ } else {
+ QTextStream stream(&file);
+ stream << textEdit->toPlainText();
+ stream.flush();
+ file.close();
+ }
+ }
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Notepad notepad;
+ notepad.show();
+
+ return app.exec();
+}
+
+#include "main.moc"
+
diff --git a/examples/tutorials/threads/clock/clock.pro b/examples/tutorials/threads/clock/clock.pro
new file mode 100755
index 0000000000..450bfe4a4e
--- /dev/null
+++ b/examples/tutorials/threads/clock/clock.pro
@@ -0,0 +1,14 @@
+CONFIG += console
+TEMPLATE = app
+SOURCES += main.cpp \
+ clockthread.cpp
+HEADERS += clockthread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/clock
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS clock.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/clock
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
diff --git a/examples/tutorials/threads/clock/clockthread.cpp b/examples/tutorials/threads/clock/clockthread.cpp
new file mode 100644
index 0000000000..01d3f1f697
--- /dev/null
+++ b/examples/tutorials/threads/clock/clockthread.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 examples 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 "clockthread.h"
+
+ //This class starts another thread where it emits a signal for every new second.
+
+//! [1]
+// clock/clockthread.cpp
+void ClockThread::run()
+{
+ QTimer timer;
+ connect(&timer, SIGNAL(timeout()), this, SLOT(timerHit()), Qt::DirectConnection);
+ timer.setInterval(10);
+ timer.start(); // puts one event in the threads event queue
+ exec();
+ timer.stop();
+}
+
+void ClockThread::timerHit()
+{
+ QString newTime= QDateTime::currentDateTime().toString("ddd MMMM d yy, hh:mm:ss");
+ if(m_lastTime != newTime ){
+ m_lastTime = newTime;
+ emit sendTime(newTime) ;
+ }
+}
+//! [1]
diff --git a/examples/tutorials/threads/clock/clockthread.h b/examples/tutorials/threads/clock/clockthread.h
new file mode 100644
index 0000000000..966dbeaa73
--- /dev/null
+++ b/examples/tutorials/threads/clock/clockthread.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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 examples 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 CLOCKTHREAD_H
+#define CLOCKTHREAD_H
+
+#include <QString>
+#include <QThread>
+
+
+
+//! [1]
+// clock/clockthread.h
+class ClockThread : public QThread
+{
+ Q_OBJECT
+signals:
+ void sendTime(QString time);
+private:
+ void run();
+ QString m_lastTime;
+private slots:
+ void timerHit();
+
+};
+//! [1]
+#endif // CLOCKTHREAD_H \ No newline at end of file
diff --git a/examples/tutorials/threads/clock/main.cpp b/examples/tutorials/threads/clock/main.cpp
new file mode 100755
index 0000000000..a0f86d6bc7
--- /dev/null
+++ b/examples/tutorials/threads/clock/main.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 examples 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 "clockthread.h"
+
+//A clock that does time formatting in another thread
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ // build gui
+ QWidget widget;
+ QLabel *label = new QLabel;
+ QHBoxLayout *layout = new QHBoxLayout(&widget);
+ layout->addWidget(label);
+ widget.setWindowTitle("clock");
+
+ //instantiate thread object
+ ClockThread clockThread;
+ QObject::connect(&clockThread, SIGNAL(sendTime(QString)), label, SLOT(setText(QString)), Qt::QueuedConnection);
+ clockThread.start();
+ widget.show();
+ app.exec();
+ clockThread.quit();
+ clockThread.wait();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
new file mode 100755
index 0000000000..26ee2557a9
--- /dev/null
+++ b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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 examples 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 <QtCore>
+/*
+ says hello from main thread and secondary thread using QtConcurrent
+*/
+
+//! [1]
+// helloconcurrent/main.cpp
+void hello()
+{
+ qDebug() << "Hello from thread " << QThread::currentThread();
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QFuture<void> future = QtConcurrent::run(hello);
+ qDebug() << "hello from GUI thread " << QThread::currentThread();
+ future.waitForFinished();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro b/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro
new file mode 100755
index 0000000000..30e9413ea7
--- /dev/null
+++ b/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro
@@ -0,0 +1,16 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += helloconcurrent.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/helloconcurrent
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS helloconcurrent.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/helloconcurrent
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+
diff --git a/examples/tutorials/threads/hellothread/hellothread.cpp b/examples/tutorials/threads/hellothread/hellothread.cpp
new file mode 100755
index 0000000000..01cd0f5b3c
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 examples 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 <QDebug>
+#include "hellothread.h"
+/*
+ * demonstrates use of QThread, says hello in another thread and terminates
+ */
+
+//! [1]
+// hellothread/hellothread.cpp
+void HelloThread::run()
+{
+ qDebug() << "hello from worker thread " << thread()->currentThreadId();
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothread/hellothread.h b/examples/tutorials/threads/hellothread/hellothread.h
new file mode 100755
index 0000000000..a3202c6396
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 examples 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 HELLOTHREAD_H
+#define HELLOTHREAD_H
+
+#include <QThread>
+//! [1]
+// hellothread/hellothread.h
+class HelloThread : public QThread
+{
+ Q_OBJECT
+private:
+ void run();
+};
+//! [1]
+#endif // HELLOTHREAD_H
diff --git a/examples/tutorials/threads/hellothread/hellothread.pro b/examples/tutorials/threads/hellothread/hellothread.pro
new file mode 100755
index 0000000000..fee7025f37
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.pro
@@ -0,0 +1,17 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ hellothread.cpp
+HEADERS += hellothread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothread
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellothread.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothread
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
diff --git a/examples/tutorials/threads/hellothread/main.cpp b/examples/tutorials/threads/hellothread/main.cpp
new file mode 100755
index 0000000000..9a548ea96a
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 examples 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 <QtCore>
+#include "hellothread.h"
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ HelloThread thread;
+ thread.start();
+ qDebug() << "hello from GUI thread " << app.thread()->currentThreadId();
+ thread.wait(); // do not exit before the thread is completed!
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
new file mode 100755
index 0000000000..30410a5570
--- /dev/null
+++ b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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 examples 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 <QtCore>
+// A hello world program to demonstrate the use of the global thread pool
+
+//! [1]
+// hellothreadpool/main.cpp
+class Work : public QRunnable
+{
+public:
+ void run()
+ {
+ qDebug() << "Hello from thread " << QThread::currentThread();
+ }
+};
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ Work work;
+ work.setAutoDelete(false);
+ QThreadPool *threadPool = QThreadPool::globalInstance();
+ threadPool->start(&work);
+ qDebug() << "hello from GUI thread " << QThread::currentThread();
+ threadPool->waitForDone();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro b/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro
new file mode 100755
index 0000000000..9cf9c73faf
--- /dev/null
+++ b/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro
@@ -0,0 +1,17 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += hellothreadpool.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothreadpool
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellothreadpool.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothreadpool
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+
+
diff --git a/examples/tutorials/threads/movedobject/main.cpp b/examples/tutorials/threads/movedobject/main.cpp
new file mode 100755
index 0000000000..a244316689
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 examples 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 <QtCore>
+#include "workerobject.h"
+#include "thread.h"
+
+/*
+ * moves a class derived from QObject (WorkerObject) to another thread
+ * and calls methods over thread boundaries.
+ */
+
+//![1]
+// movedobject/main.cpp
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ Thread thread;
+ qDebug() << "main thread ID: " << app.thread()->currentThreadId();
+ WorkerObject *worker = new WorkerObject;
+ thread.launchWorker(worker);
+ QMetaObject::invokeMethod(worker, "doWork", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(worker, "startPolling", Qt::QueuedConnection, Q_ARG(int, 500));
+ //let application produce output for 3 seconds and quit
+ QTimer::singleShot(3000, &app, SLOT(quit()));
+ app.exec();
+ thread.stop();
+ thread.wait();
+ delete worker;
+ return 0;
+}
+//![1]
diff --git a/examples/tutorials/threads/movedobject/movedobject.pro b/examples/tutorials/threads/movedobject/movedobject.pro
new file mode 100755
index 0000000000..678d1d9217
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/movedobject.pro
@@ -0,0 +1,18 @@
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ workerobject.cpp \
+ thread.cpp
+
+HEADERS += \
+ workerobject.h \
+ thread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/movedobject
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS movedobject.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/movedobject
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp
new file mode 100644
index 0000000000..6dfe8ff159
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/thread.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 examples 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 "thread.h"
+
+/*
+ * QThread derived class with additional capability to move a QObject to the
+ * new thread, to stop the thread and move the QObject back to the thread where
+ *it came from.
+ */
+
+Thread::Thread( QObject *parent)
+ : QThread (parent)
+{
+ //we need a class that receives signals from other threads and emits a signal in response
+ shutDownHelper=new QSignalMapper;
+ shutDownHelper->setMapping(this,0);
+ connect(this, SIGNAL(started()), this, SLOT(setReadyStatus() ), Qt::DirectConnection);
+ connect(this, SIGNAL(aboutToStop()), shutDownHelper, SLOT(map()) );
+}
+
+//------------------------------------------------------
+Thread::~Thread()
+{
+ delete shutDownHelper;
+}
+
+//------------------------------------------------------
+// starts thread, moves worker to this thread and blocks
+void Thread::launchWorker(QObject *worker)
+{
+ worker = worker;
+ start();
+ int i=0;
+ worker->moveToThread(this);
+ shutDownHelper->moveToThread(this);
+ connect(shutDownHelper, SIGNAL(mapped(int) ), this, SLOT(stopExecutor()), Qt::DirectConnection );
+ mutex.lock();
+ waitCondition.wait(&mutex);
+}
+
+//------------------------------------------------------
+// puts a command to stop processing in the event queue of worker thread
+void Thread::stop()
+{
+ emit aboutToStop();
+}
+
+//------------------------------------------------------
+
+// methods above this line should be called in gui thread context
+// methods below this line are private and will be run in secondary thread context
+
+//------------------------------------------------------
+void Thread::stopExecutor() //secondary thread context
+{
+ exit();
+}
+
+//------------------------------------------------------
+void Thread::setReadyStatus()
+{
+ waitCondition.wakeAll();
+}
diff --git a/examples/tutorials/threads/movedobject/thread.h b/examples/tutorials/threads/movedobject/thread.h
new file mode 100644
index 0000000000..e941e99123
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/thread.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 examples 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 THREAD_H
+#define THREAD_H
+
+#include <QtCore>
+
+class Thread :public QThread
+{
+ Q_OBJECT
+public:
+ Thread( QObject *parent=0);
+ ~Thread();
+ void stop();
+ void launchWorker(QObject *worker);
+private:
+ QObject *worker;
+ QSignalMapper *shutDownHelper;
+ QWaitCondition waitCondition;
+ QMutex mutex;
+private slots:
+ void stopExecutor();
+ void setReadyStatus();
+signals:
+ void aboutToStop();
+};
+
+#endif // THREAD_H
diff --git a/examples/tutorials/threads/movedobject/workerobject.cpp b/examples/tutorials/threads/movedobject/workerobject.cpp
new file mode 100644
index 0000000000..819da20bc2
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/workerobject.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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 examples 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 <QtCore>
+#include "workerobject.h"
+
+/*
+ * represents an object that lives in another thread where it polls a resource
+ * and communicates with the gui thread
+ */
+
+WorkerObject::WorkerObject(QObject *parent)
+ : QObject(parent)
+{
+ timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(poll()));
+}
+
+//---------------------------------------------------------------
+void WorkerObject::doWork()
+{
+
+ qDebug() << "doing work in thread " << thread()->currentThreadId() ;
+}
+
+//---------------------------------------------------------------
+WorkerObject::~WorkerObject()
+{
+ qDebug() << "destruction WorkerObject in thread " << thread()->currentThreadId();
+}
+
+//---------------------------------------------------------------
+void WorkerObject::startPolling(int milliseconds)
+{
+ count=0;
+ timer->start(milliseconds);
+}
+
+//---------------------------------------------------------------
+void WorkerObject::stopPolling()
+{
+ timer->stop();
+}
+
+//---------------------------------------------------------------
+void WorkerObject::poll()
+{
+ qDebug() << QString("timer hit %1").arg(count);
+ count++;
+}
+
diff --git a/examples/tutorials/threads/movedobject/workerobject.h b/examples/tutorials/threads/movedobject/workerobject.h
new file mode 100644
index 0000000000..09a827c4da
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/workerobject.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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 examples 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 WORKEROBJECT_H
+#define WORKEROBJECT_H
+
+#include <QtCore>
+
+class WorkerObject : public QObject
+{
+ Q_OBJECT
+public:
+ explicit WorkerObject(QObject *parent = 0);
+ ~WorkerObject();
+public slots:
+ void doWork();
+ void startPolling(int milliseconds);
+ void stopPolling();
+private slots:
+ void poll();
+private:
+ QTimer *timer;
+ int count;
+};
+
+#endif // WORKEROBJECT_H
diff --git a/examples/tutorials/threads/threads.pro b/examples/tutorials/threads/threads.pro
new file mode 100644
index 0000000000..d737513567
--- /dev/null
+++ b/examples/tutorials/threads/threads.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+
+SUBDIRS = hellothread \
+ hellothreadpool \
+ helloconcurrent \
+ clock \
+ movedobject
+
diff --git a/examples/tutorials/tutorials.pro b/examples/tutorials/tutorials.pro
index 34723c222f..1b4667ea8f 100644
--- a/examples/tutorials/tutorials.pro
+++ b/examples/tutorials/tutorials.pro
@@ -1,7 +1,8 @@
TEMPLATE = subdirs
SUBDIRS = \
addressbook \
- modelview
+ modelview \
+ threads
# install
diff --git a/examples/webkit/fancybrowser/fancybrowser.pro b/examples/webkit/fancybrowser/fancybrowser.pro
index 3786d9c305..df4dbe3da2 100644
--- a/examples/webkit/fancybrowser/fancybrowser.pro
+++ b/examples/webkit/fancybrowser/fancybrowser.pro
@@ -12,5 +12,7 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000CF6C
+ TARGET.EPOCHEAPSIZE = 0020000 04000000
+ TARGET.CAPABILITY += Location NetworkServices
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
}
diff --git a/examples/webkit/webkit-guide/_copyright.txt b/examples/webkit/webkit-guide/_copyright.txt
new file mode 100644
index 0000000000..e545ac3d90
--- /dev/null
+++ b/examples/webkit/webkit-guide/_copyright.txt
@@ -0,0 +1,40 @@
+<!--
+
+This file is part of _PACKAGE_NAME_
+
+Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+\1
diff --git a/examples/webkit/webkit-guide/_image_assets.htm b/examples/webkit/webkit-guide/_image_assets.htm
new file mode 100644
index 0000000000..5c3f3a076f
--- /dev/null
+++ b/examples/webkit/webkit-guide/_image_assets.htm
@@ -0,0 +1,331 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<title>image assets</title>
+
+<style>
+img { max-height: 72px; }
+</style>
+
+</head>
+<body>
+<h1>image assets</h1>
+
+Notes:
+
+<ul>
+
+<li>Some of these may be redundant; feel free to merge
+
+<li>Feel free to rename files, but give me before & after list of filenames so I can reflect the change
+
+<li>use neutral grayscale if possible
+
+<li>use PNG file format if possible
+
+<li>I plan to cut new set of generic icons
+(e.g., <a href="anim_skew.htm">HERE</a> to be white text on darkish
+gray, probably #777777)
+
+<li>No more need for online/offline indicators (red/green circles) for
+this draft.
+
+</ul>
+
+<table border="1" width="100%">
+
+<tr>
+<th>FILENAME</th>
+<th>IMAGE (thumbnail & link)</th>
+<th>USED ON PAGE</th>
+<th>DESCRIPTION</th>
+</tr>
+
+<tr>
+<td>icon_dismiss.png,<br/>icon_dismiss_x22.png</td>
+<td>
+<a target="elsewhere" href="img/icon_dismiss.png"><img src="img/icon_dismiss.png"/></a>
+<a target="elsewhere" href="img/icon_dismiss_x22.png"><img src="img/icon_dismiss_x22.png"/></a>
+</td>
+<td>
+<a target="elsewhere" href="anim_skew.htm">HERE</a>
+<a target="elsewhere" href="storage.htm">HERE</a>
+<a target="elsewhere" href="css3_text-overflow.htm">HERE</a>
+<a target="elsewhere" href="layout_tbl-keyhole.htm">HERE</a>
+</td>
+<td>Dismiss panel or listed item</td>
+</tr>
+
+<tr>
+<td>icon_expand-nav.png</td>
+<td><a target="elsewhere" href="img/icon_expand-nav.png"><img src="img/icon_expand-nav.png"/></a></td>
+<td><a target="elsewhere" href="anim_accord.htm">HERE</a></td>
+<td>expand complex set of navigation options</td>
+</tr>
+
+<tr>
+<td>icon_nav-up.png</td>
+<td><a target="elsewhere" href="img/icon_nav-up.png"><img src="img/icon_nav-up.png"/></a></td>
+<td><a target="elsewhere" href="layout_tbl-keyhole.htm">HERE</a></td>
+<td>navigate within listings (up arrow also serves as down arrow using rotate transform)</td>
+</tr>
+
+<tr>
+<td>icon_drill-up.png,<br/>icon_drill-up_x32.png</td>
+<td>
+<a target="elsewhere" href="img/icon_drill-up.png"><img src="img/icon_drill-up.png"/></a>
+<a target="elsewhere" href="img/icon_drill-up_x32.png"><img src="img/icon_drill-up_x32.png"/></a>
+</td>
+<td><a target="elsewhere" href="anim_slide1.htm">HERE</a></td>
+<td>navigate up one level within sliding drilldown UI</td>
+</tr>
+
+<tr>
+<td>icon_drill-down.png,<br/>icon_drill-down_x32.png</td>
+<td>
+<a target="elsewhere" href="img/icon_drill-down.png"><img src="img/icon_drill-down.png"/></a>
+<a target="elsewhere" href="img/icon_drill-down_x32.png"><img src="img/icon_drill-down_x32.png"/></a>
+</td>
+<td><a target="elsewhere" href="anim_slide1.htm">HERE</a></td>
+<td>navigate down one level within sliding drilldown UI</td>
+</tr>
+
+<tr>
+<td>icon_scroll-left.png</td>
+<td><a target="elsewhere" href="img/icon_scroll-left.png"><img src="img/icon_scroll-left.png"/></a></td>
+<td><a target="elsewhere" href="css3_scroll.htm">HERE</a></td>
+<td>custom horizontal scroll button</td>
+</tr>
+
+<tr>
+<td>icon_scroll-right.png</td>
+<td><a target="elsewhere" href="img/icon_scroll-right.png"><img src="img/icon_scroll-right.png"/></a></td>
+<td><a target="elsewhere" href="css3_scroll.htm">HERE</a></td>
+<td>custom horizontal scroll button</td>
+</tr>
+
+<tr>
+<td>icon_head-expanded.png,<br/>icon_head-expanded_x13.png</td>
+<td>
+<a target="elsewhere" href="img/icon_head-expanded.png"><img src="img/icon_head-expanded.png"/></a>
+<a target="elsewhere" href="img/icon_head-expanded_x13.png"><img src="img/icon_head-expanded_x13.png"/></a>
+</td>
+<td><a target="elsewhere" href="anim_accord.htm">HERE</a>
+<a target="elsewhere" href="css3_backgrounds.htm">HERE</a></td>
+<td>marks accordion heading expanded state</td>
+</tr>
+
+<tr>
+<td>icon_head-collapsed.png,<br/>icon_head-collapsed_x13.png</td>
+<td>
+<a target="elsewhere" href="img/icon_head-collapsed.png"><img src="img/icon_head-collapsed.png"/></a>
+<a target="elsewhere" href="img/icon_head-collapsed_x13.png"><img src="img/icon_head-collapsed_x13.png"/></a>
+</td>
+<td><a target="elsewhere" href="anim_accord.htm">HERE</a>
+<a target="elsewhere" href="css3_backgrounds.htm">HERE</a></td>
+<td>marks accordion heading collapsed state</td>
+</tr>
+
+<tr>
+<td>icon_info.png,<br/>icon_info_x24.png</td>
+<td>
+<a target="elsewhere" href="img/icon_info.png"><img src="img/icon_info.png"/></a>
+<a target="elsewhere" href="img/icon_info_x24.png"><img src="img/icon_info_x24.png"/></a>
+</td>
+<td><a target="elsewhere" href="storage.htm">HERE</a></td>
+<td>link to panel specifying user preferences</td>
+</tr>
+
+<tr>
+<td>icon_list-all.png,<br/>icon_list-all_circ.png</td>
+<td>
+<a target="elsewhere" href="img/icon_list-all.png"><img src="img/icon_list-all.png"/></a>
+<a target="elsewhere" href="img/icon_list-all_circ.png"><img src="img/icon_list-all_circ.png"/></a>
+</td>
+<td><a target="elsewhere" href="anim_skew.htm">HERE</a></td>
+<td>within UI listing items users can filter by category, this indicates LIST ALL ITEMS</td>
+</tr>
+
+<tr>
+<td>gradient.jpg</td>
+<td><a target="elsewhere" href="img/gradient.jpg"><img src="img/gradient.jpg"/></a></td>
+<td><a target="elsewhere" href="css3_backgrounds.htm">HERE</a></td>
+<td>serves as background for expanded accordion heads (demonstrates CSS's >1 background image feature)</td>
+</tr>
+
+<tr>
+<td>border-frame.png</td>
+<td><a target="elsewhere" href="img/border-frame.png"><img src="img/border-frame.png"/></a></td>
+<td><a target="elsewhere" href="css3_border-img.htm">HERE</a></td>
+<td>border around chunk of text (got this from Wei Lu's sample; simply demo's this feature)</td>
+</tr>
+
+<tr>
+<td>mask.png</td>
+<td><a target="elsewhere" href="img/mask.png"><img src="img/mask.png"/></a></td>
+<td><a target="elsewhere" href="css3_mask-img.htm">HERE</a></td>
+<td>Used as a gradient to mask an image; think I got this one from <a href="http://webkit.org/blog/181/css-masks/">webkit.org</a></td>
+</tr>
+
+<tr>
+<td>icon_check.png,<br/>icon_check_x24green.png</td>
+<td>
+<a target="elsewhere" href="img/icon_check.png"><img src="img/icon_check.png"/></a>
+<a target="elsewhere" href="img/icon_check_x24green.png"><img src="img/icon_check_x24green.png"/></a>
+</td>
+<td><a target="elsewhere" href="form_tapper.htm">HERE</a></td>
+<td>This is not available as a separate file; it's specified within
+CSS using the "data:" URL scheme. It indicates radio/checkbox
+selection state within tappable UI; keep green if possible to match
+border</td>
+</tr>
+
+<tr>
+<th colspan="4">FILE FORMATS</th>
+<tr>
+
+<tr>
+<td>icon_link-sms.png</td>
+<td><a target="elsewhere" href="img/icon_link-sms.png"><img src="img/icon_link-sms.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>provides visual hint marking context of hyperlink, in this case a link to initiate an instant message</td>
+</tr>
+
+<tr>
+<td>icon_link-tel.png</td>
+<td><a target="elsewhere" href="img/icon_link-tel.png"><img src="img/icon_link-tel.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to make phone call</td>
+</tr>
+
+<tr>
+<td>icon_link-xls.png</td>
+<td><a target="elsewhere" href="img/icon_link-xls.png"><img src="img/icon_link-xls.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to excel file</td>
+</tr>
+
+<tr>
+<td>icon_link-doc.png</td>
+<td><a target="elsewhere" href="img/icon_link-doc.png"><img src="img/icon_link-doc.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to MS Word file</td>
+</tr>
+
+<tr>
+<td>icon_link-email.png</td>
+<td><a target="elsewhere" href="img/icon_link-email.png"><img src="img/icon_link-email.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...email link</td>
+</tr>
+
+<tr>
+<td>icon_link-external.png</td>
+<td><a target="elsewhere" href="img/icon_link-external.png"><img src="img/icon_link-external.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to web page external to current site</td>
+</tr>
+
+<tr>
+<td>icon_link-pdf.png</td>
+<td><a target="elsewhere" href="img/icon_link-pdf.png"><img src="img/icon_link-pdf.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...loink to PDF file</td>
+</tr>
+
+<tr>
+<td>icon_link-ppt.png</td>
+<td><a target="elsewhere" href="img/icon_link-ppt.png"><img src="img/icon_link-ppt.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to PowerPoint file</td>
+</tr>
+
+<tr>
+<td>icon_link-rss.png</td>
+<td><a target="elsewhere" href="img/icon_link-rss.png"><img src="img/icon_link-rss.png"/></a></td>
+<td><a target="elsewhere" href="layout_link-fmt.htm">HERE</a></td>
+<td>...link to RSS feed</td>
+</tr>
+
+<tr>
+<th colspan="4">UNUSED</th>
+<tr>
+
+<tr>
+<td>icon_nav-top.png</td>
+<td><a target="elsewhere" href="img/icon_nav-top.png"><img src="img/icon_nav-top.png"/></a></td>
+<td></td>
+<td></td>
+</tr>
+
+<tr>
+<td>icon_nav-start.png</td>
+<td><a target="elsewhere" href="img/icon_nav-start.png"><img src="img/icon_nav-start.png"/></a></td>
+<td></td>
+<td></td>
+</tr>
+
+<tr>
+<td>icon_nav_end.png</td>
+<td><a target="elsewhere" href="img/icon_nav_end.png"><img src="img/icon_nav_end.png"/></a></td>
+<td></td>
+<td></td>
+</tr>
+
+<tr>
+<td>icon_question.png</td>
+<td><a target="elsewhere" href="img/icon_question.png"><img src="img/icon_question.png"/></a></td>
+<td></td>
+<td></td>
+</tr>
+
+<tr>
+<td>icon_trash.png</td>
+<td><a target="elsewhere" href="img/icon_trash.png"><img src="img/icon_trash.png"/></a></td>
+<td></td>
+<td></td>
+</tr>
+
+</table>
+
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/_index.html b/examples/webkit/webkit-guide/_index.html
new file mode 100644
index 0000000000..709f951c8f
--- /dev/null
+++ b/examples/webkit/webkit-guide/_index.html
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- examples.qdoc -->
+ <title>CSS: SAMPLE PAGES</title>
+ <link rel="stylesheet" type="text/css" href="style/style.css" />
+ <script src="scripts/jquery.js" type="text/javascript"></script>
+ <script src="scripts/functions.js" type="text/javascript"></script>
+ <script src="./scripts/superfish.js" type="text/javascript"></script>
+ <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <script src="./scripts/narrow.js" type="text/javascript"></script>
+ <link rel="stylesheet" type="text/css" href="style/narrow.css" />
+</head>
+<body class="" onload="CheckEmptyAndLoadList();">
+
+ <style>
+div.header, div.toolbar, div.feedback, div#feedbackBox, div.footer, div.sidebar { display: none; background: pink }
+div.toc {
+ background: #dddddd;
+ border: thin solid #777777;
+ padding: 1em;
+ border-radius: 1em;
+ margin: 1em
+}
+div.toc li:before { color: lightcoral; text-transform: uppercase; }
+h3 { border-top: thick pink solid }
+h4 { border-top: medium gold solid }
+h5 { border-top: medium lightgreen solid }
+h3,h4,h5 { padding-top: 1em }
+li.level1 { margin-left: 0 }
+li.level2 { margin-left: 2em }
+li.level3 { margin-left: 4em }
+li.level4 { margin-left: 6em }
+li.level5 { margin-left: 8em }
+table { border: solid #777777 thin }
+tr:nth-of-type(even) { background: beige }
+tr:nth-of-type(odd) { background: lightblue }
+th {
+ background: #777777;
+ color: #ffffff;
+}
+
+img[src^='images/cnd_'] { float: right; margin: 1em ; padding: 1em; border-radius: 1em; border: thin #777777 solid; }
+tt, pre { background: #dddddd; border: thin #dddddd solid; }
+a[href^='http://waplabdc.nokia-boston.com'] { color: black; }
+a[href^='http://waplabdc.nokia-boston.com']:before { content: url(http://waplabdc.nokia-boston.com/browser/users/sierra/x/img/html.jpg); }
+ </style>
+ <div class="header" id="qtdocheader">
+ <div class="content">
+ <div id="nav-logo">
+ <a href="index.html">Home</a></div>
+ <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
+ <div id="narrowsearch"></div>
+ <div id="nav-topright">
+ <ul>
+ <li class="nav-topright-home"><a href="http://qt.nokia.com/">Qt HOME</a></li>
+ <li class="nav-topright-dev"><a href="http://developer.qt.nokia.com/">DEV</a></li>
+ <li class="nav-topright-labs"><a href="http://labs.qt.nokia.com/blogs/">LABS</a></li>
+ <li class="nav-topright-doc nav-topright-doc-active"><a href="http://doc.qt.nokia.com/">
+ DOC</a></li>
+ <li class="nav-topright-blog"><a href="http://blog.qt.nokia.com/">BLOG</a></li>
+ </ul>
+ </div>
+ <div id="shortCut">
+ <ul>
+ <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.7</a></span></li>
+ <li class="shortCut-topleft-active"><a href="http://doc.qt.nokia.com">ALL VERSIONS </a></li>
+ </ul>
+ </div>
+ <ul class="sf-menu" id="narrowmenu">
+ <li><a href="#">API Lookup</a>
+ <ul>
+ <li><a href="classes.html">Class index</a></li>
+ <li><a href="functions.html">Function index</a></li>
+ <li><a href="modules.html">Modules</a></li>
+ <li><a href="namespaces.html">Namespaces</a></li>
+ <li><a href="qtglobal.html">Global Declarations</a></li>
+ <li><a href="qdeclarativeelements.html">QML elements</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Qt Topics</a>
+ <ul>
+ <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>
+ <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>
+ <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>
+ <li><a href="developing-with-qt.html">Cross-platform and Platform-specific</a></li>
+ <li><a href="platform-specific.html">Platform-specific info</a></li>
+ <li><a href="technology-apis.html">Qt and Key Technologies</a></li>
+ <li><a href="best-practices.html">How-To's and Best Practices</a></li>
+ </ul>
+ </li>
+ <li><a href="#">Examples</a>
+ <ul>
+ <li><a href="all-examples.html">Examples</a></li>
+ <li><a href="tutorials.html">Tutorials</a></li>
+ <li><a href="demos.html">Demos</a></li>
+ <li><a href="qdeclarativeexamples.html">QML Examples</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="wrapper">
+ <div class="hd">
+ <span></span>
+ </div>
+ <div class="bd group">
+ <div class="sidebar">
+ <div class="searchlabel">
+ Search index:</div>
+ <div class="search" id="sidebarsearch">
+ <form id="qtdocsearch" action="" onsubmit="return false;">
+ <fieldset>
+ <input type="text" name="searchstring" id="pageType" value="" />
+ <div id="resultdialog">
+ <a href="#" id="resultclose">Close</a>
+ <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p>
+ <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p>
+ <ul id="resultlist" class="all">
+ </ul>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+ <div class="box first bottombar" id="lookup">
+ <h2 title="API Lookup"><span></span>
+ API Lookup</h2>
+ <div id="list001" class="list">
+ <ul id="ul001" >
+ <li class="defaultLink"><a href="classes.html">Class index</a></li>
+ <li class="defaultLink"><a href="functions.html">Function index</a></li>
+ <li class="defaultLink"><a href="modules.html">Modules</a></li>
+ <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
+ <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
+ <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="box bottombar" id="topics">
+ <h2 title="Qt Topics"><span></span>
+ Qt Topics</h2>
+ <div id="list002" class="list">
+ <ul id="ul002" >
+ <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li>
+ <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>
+ <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li>
+ <li class="defaultLink"><a href="developing-with-qt.html">Cross-platform and Platform-specific</a></li>
+ <li class="defaultLink"><a href="platform-specific.html">Platform-specific info</a></li>
+ <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li>
+ <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="box" id="examples">
+ <h2 title="Examples"><span></span>
+ Examples</h2>
+ <div id="list003" class="list">
+ <ul id="ul003">
+ <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
+ <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
+ <li class="defaultLink"><a href="demos.html">Demos</a></li>
+ <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="wrap">
+ <div class="toolbar">
+ <div class="breadcrumb toolblock">
+ <ul>
+ <li class="first"><a href="index.html">Home</a></li>
+ <!-- Bread crumbs goes here -->
+ <li>CSS: SAMPLE PAGES</li> </ul>
+ </div>
+ <div class="toolbuttons toolblock">
+ <ul>
+ <li id="smallA" class="t_button">A</li>
+ <li id="medA" class="t_button active">A</li>
+ <li id="bigA" class="t_button">A</li>
+ <li id="print" class="t_button"><a href="javascript:this.print();">
+ <span>Print</span></a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="content mainContent">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#css-sample-pages">CSS: SAMPLE PAGES</a></li>
+<li class="level2"><a href="#media-queries">Media Queries</a></li>
+<li class="level2"><a href="#selectors">Selectors</a></li>
+<li class="level2"><a href="#visual-effects">Visual Effects</a></li>
+<li class="level2"><a href="#dynamic-css">Dynamic CSS</a></li>
+<li class="level1"><a href="#storage">Storage</a></li>
+</ul>
+</div>
+<h1 class="title">CSS: SAMPLE PAGES</h1>
+<span class="subtitle"></span>
+<!-- $$$examples-description -->
+<div class="descr"> <a name="details"></a>
+<a name="css-sample-pages"></a>
+<h2>CSS: SAMPLE PAGES</h2>
+<a name="media-queries"></a>
+<h3>1. Media Queries</h3>
+<ol type="1">
+<li><a target="test" href="mob_mediaquery.htm">MEDIA-QUERY, BASIC</a>: produces message indicating browser class (desktop/touch/low-end mobile)</li>
+<li><a target="test" href="mob_layout.htm">MEDIA-QUERY, LAYOUT</a>: same, but produces various skeletal layouts using media query criteria; large 3-column layout must appear only on desktop browser</li>
+<li><a target="test" href="mob_condjs.htm">MEDIA-QUERY, STYLEMEDIA</a>: Same as #1, but JS produces corresponding message via StyleMedia API</li>
+</ol>
+<a name="selectors"></a>
+<h3>2. Selectors</h3>
+<ol type="1">
+<li><a target="test" href="layout_link-fmt.htm">SELECTOR, ATTRIBUTE PREFIX/SUFFIX</a>: links appear w/different icons based on URL prefix/suffix; linebreaks should not appear within inline links</li>
+<li><a target="test" href="form_tapper.htm">SELECTOR, FORMS, TAP</a>: radio/checkbox inputs can be tapped (only 1 at a time within 'radio' set; any number within 'checkbox' set)</li>
+<li><a target="test" href="form_toggler.htm">SELECTOR, FORMS, TOGGLE</a>: radio/checkbox inputs can be toggled (only 1 at a time within 'radio' inputs; any number within 'checkbox' inputs); 2 "binary" examples at bottom use custom text</li>
+<li><a target="test" href="layout_tbl-keyhole.htm">SELECTOR, NAVIGATIONAL, TABLE</a>: pressing &quot;view listings&quot; displays stacked table rows, one at a time</li>
+<li><a target="test" href="css3_sel-nth.htm">SELECTOR, POSITIONAL</a>: displays 4x6 icon grid, implemted via nth-of-type()</li>
+</ol>
+<a name="visual-effects"></a>
+<h3>3. Visual Effects</h3>
+<ol type="1">
+<li><a target="test" href="css3_backgrounds.htm">CSS, BACKGROUNDS</a>: selected accordion tabs display both gradient background and icon; unselected only displays icon; uses scaleY transition</li>
+<li><a target="test" href="css3_border-img.htm">CSS, BORDER IMAGE</a>: border image surrounds box</li>
+<li><a target="test" href="css3_shadow.htm">CSS, BOX-SHADOW, PLAIN</a>: nav element has shadow; icons appear smaller while pressed</li>
+<li><a target="test" href="css3_gradientBack.htm">CSS, GRADIENT, BACKGROUND</a>: background fades vertically from light to dark</li>
+<li><a target="test" href="css3_gradientBackStop.htm">CSS, GRADIENT, BACKGROUND, COLOR-STOP</a>: as you scroll down page, background fades vertically from dark to light and back to dark again</li>
+<li><a target="test" href="css3_gradientButton.htm">CSS, GRADIENT, BUTTON</a>: buttons appear with vertical shading, appearing w/inverted gradient when pressed</li>
+<li><a target="test" href="css3_grad-radial.htm">CSS, GRADIENT, RADIAL</a>: touching within box produces colorful *splat* effect for duration of touch</li>
+<li><a target="test" href="css3_mask-grad.htm">CSS, MASK, GRADIENT</a>: images appear w/gradient; touching them removes gradient</li>
+<li><a target="test" href="css3_mask-img.htm">CSS, MASK, IMAGE</a>: image fills screen but fades to black around the edges</li>
+<li><a target="test" href="css3_reflect.htm">CSS, REFLECTION</a>: heading and image both appear w/mirror reflections along bottom</li>
+<li><a target="test" href="css3_scroll.htm">CSS, SCROLLBARS</a>: code block scrollable via big buttons</li>
+<li><a target="test" href="css3_text-overflow.htm">CSS, TEXT-OVERFLOW</a>: items appear w/ellipses; touching them expands them; pressing (X) collapses them</li>
+<li><a target="test" href="css3_text-shadow.htm">CSS, TEXT-SHADOW</a>: heading text appears with shadow</li>
+<li><a target="test" href="css3_text-stroke.htm">CSS, TEXT-STROKE</a>: first heading appears w/black outline</li>
+</ol>
+<a name="dynamic-css"></a>
+<h3>4. Dynamic CSS</h3>
+<ol type="1">
+<li><a target="test" href="anim_demo-rotate.htm">ANIMATION, DEMO, ROTATE</a>: animated demo of rotating boxes</li>
+<li><a target="test" href="anim_demo-scale.htm">ANIMATION, DEMO, SCALE</a>: animated demo of shrinking/expanding box</li>
+<li><a target="test" href="anim_demo-skew.htm">ANIMATION, DEMO, SKEW</a>: animated demo of box being pushed and piulled around</li>
+<li><a target="test" href="anim_pulse.htm">ANIMATION, KEYFRAME, PULSE</a>: pressing icons causes them to pulse indefinitely</li>
+<li><a target="test" href="anim_slide1.htm">ANIMATION, KEYFRAME, SLIDING</a>: drill-down menus</li>
+<li><a target="test" href="css3_multicol.htm">ANIMATION, KEYFRAME, BANNER</a>: banner scrolls through 5 colorful items</li>
+<li><a target="test" href="anim_tabbedSkew.htm">ANIMATION, TRANSFORM, SKEWED TABS</a>: touching parts of cube displays different tabbed text</li>
+<li><a target="test" href="anim_accord.htm">ANIMATION, TRANSITION, CHAINED, ACCORDION</a>: tapping icon animates in collapsed accordions; tapping them animates in display of subheads; tapping anywhere else reverses animation sequence, collapsing back to initial icon</li>
+<li><a target="test" href="anim_panel.htm">ANIMATION, TRANSITION, MAX-WIDTH, PANEL</a>: pressing icon animates to expand panel of choices; pressing anywhere collapses panel back down to initial icon</li>
+<li><a target="test" href="anim_skew.htm">ANIMATION, TRANSITION, SKEW</a>: tapping items causes them to wipe off right edge w/skew effect; remainder re-pack vertically; touching each category icon removes non-matching items and drops down matching ones</li>
+<li><a target="test" href="anim_gallery.htm">ANIMATION, TRANSITION, TRANSLATE, GALLERY</a>: tapping images adjacent to main image animates them in; tapping current image flips to display text; w/text displaying, tapping adjacent image animates both effects @ same time</li>
+</ol>
+
+<a name="storage"></a>
+<h2>5. Storage</h2>
+
+<ol type="1">
+<li><a target="test" href="storage.htm">LOCAL/SESSION STORAGE</a>:
+When opened for first time, form opens featuring
+login/password/credit-card fields. Fill them out. Each input's
+background will go pink if input is invalid. Login & password
+validate simply as "required" so any string will do. Credit card
+validates as 16-digit numeral. After filling out, press dismiss box.
+Then quit & reopen browser, go back to page, and press (i) info icon
+to get back into form. login/password should be same as initially
+entered (localStorage), but credit-card data s/b absent
+(sessionStorage).
+
+</li>
+</ol>
+
+</div>
+<!-- @@@examples -->
+ <div class="feedback t_button">
+ [+] Documentation Feedback</div>
+ </div>
+ </div>
+ </div>
+ <div class="ft">
+ <span></span>
+ </div>
+ </div>
+ <div class="footer">
+ <p>
+ <acronym title="Copyright">&copy;</acronym> 2008-2010 Nokia Corporation and/or its
+ subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation
+ in Finland and/or other countries worldwide.</p>
+ <p>
+ All other trademarks are property of their respective owners. <a title="Privacy Policy"
+ href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
+ <br />
+ <p>
+ Licensees holding valid Qt Commercial licenses may use this document 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.</p>
+ <p>
+ Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
+ Free Documentation License version 1.3</a>
+ as published by the Free Software Foundation.</p>
+ </div>
+ <div id="feedbackBox">
+ <div id="feedcloseX" class="feedclose t_button">X</div>
+ <form id="feedform" action="http://doc.qt.nokia.com/docFeedbck/feedback.php" method="get">
+ <p id="noteHead">Thank you for giving your feedback.</p> <p class="note">Make sure it is related to this specific page. For more general bugs and
+ requests, please use the <a href="http://bugreports.qt.nokia.com/secure/Dashboard.jspa">Qt Bug Tracker</a>.</p>
+ <p><textarea id="feedbox" name="feedText" rows="5" cols="40"></textarea></p>
+ <p><input id="feedsubmit" class="feedclose" type="submit" name="feedback" /></p>
+ </form>
+ </div>
+ <div id="blurpage">
+ </div>
+ <script src="scripts/functions.js" type="text/javascript"></script>
+ <!-- <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-4457116-5']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script> -->
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_accord.htm b/examples/webkit/webkit-guide/anim_accord.htm
new file mode 100644
index 0000000000..9efd3b1a0e
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_accord.htm
@@ -0,0 +1,122 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Nested Accordion</title>
+<link href='css/anim_accord.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="main">
+<article>
+
+<dl id="accordion" class="collapsed">
+
+<dt><a href="#">Event Info</a></dt>
+<dd>
+<ul>
+<li><a href="#">Travel</a></li>
+<li><a href="#">Area Info</a></li>
+<li><a href="#">Hospitality</a></li>
+<li><a href="#">Schedule of Events</a></li>
+<li><a href="#">Spectator Guide</a></li>
+<li><a href="#">Contact Us</a></li>
+</ul>
+</dd>
+<dt><a href="#">Team Info</a></dt>
+<dd>
+<ul>
+<li><a href="#">Team Captain</a></li>
+<li><a href="#">Team Members</a></li>
+<li><a href="#">Team Standings</a></li>
+</ul>
+</dd>
+<dt><a href="#">Course</a></dt>
+<dd>
+<ul>
+<li><a href="#">Overview</a></li>
+<li><a href="#">Tour</a></li>
+<li><a href="#">History</a></li>
+</ul>
+</dd>
+<dt><a href="#">History</a></dt>
+<dd>
+<ul>
+<li><a href="#">Past Results</a></li>
+<li><a href="#">U.S. Player Records</a></li>
+<li><a href="#">European Player Records</a></li>
+<li><a href="#">All-Time Records</a></li>
+<li><a href="#">The Trophy</a></li>
+</ul>
+</dd>
+<dt><a href="#">News</a></dt>
+<dd>
+<ul>
+<li><a href="#">News Stotries</a></li>
+<li><a href="#">Interviews</a></li>
+<li><a href="#">Photo Gallery</a></li>
+<li><a href="#">Videos</a></li>
+</ul>
+</dd>
+</dl>
+
+<h4>Nested Accordion</h4>
+
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+
+</article>
+</section>
+<script src="js/anim_accord.js"></script>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_demo-rotate.htm b/examples/webkit/webkit-guide/anim_demo-rotate.htm
new file mode 100644
index 0000000000..299fd98327
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_demo-rotate.htm
@@ -0,0 +1,63 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>transforms: rotate</title>
+
+<link href='css/anim_demo-rotate.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="rotate">
+Rotate: from 0 to 180&deg;, then to 360&deg;<br/>(Origin: center)
+</section>
+
+<section class="rotateOrigin">
+Rotate: from 0 to -180&deg;, then to -360&deg;<br/>(Origin: top left)
+</section>
+
+<section class="end">
+(The End)
+</section>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_demo-scale.htm b/examples/webkit/webkit-guide/anim_demo-scale.htm
new file mode 100644
index 0000000000..e6f0f79c26
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_demo-scale.htm
@@ -0,0 +1,67 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>transforms: scale</title>
+
+<link href='css/anim_demo-scale.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="scale">
+Scale: from 0 to 0.5, to 1.5 and back.<br/>(Origin: bottom)
+</section>
+
+<section class="scaleX">
+ScaleX: from 0 to 0.5, to 1.5 and back.<br/>(Origin: left)
+</section>
+
+<section class="scaleY">
+ScaleY: from 0 to 0.5, to 1.5 and back.<br/>(Origin: center)
+</section>
+
+<section class="end">
+(The End)
+</section>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_demo-skew.htm b/examples/webkit/webkit-guide/anim_demo-skew.htm
new file mode 100644
index 0000000000..c183f646d2
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_demo-skew.htm
@@ -0,0 +1,62 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>transforms: skew</title>
+<link href='css/anim_demo-skew.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="skew">
+Skew: from 30&deg; to -30&deg; and back.<br/>(Origin: bottom)
+</section>
+
+<section class="skewY">
+SkewY: from 30&deg; to -30&deg; and back.<br/>(Origin: left)
+</section>
+
+<section class="end">
+(The End)
+</section>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_gallery.htm b/examples/webkit/webkit-guide/anim_gallery.htm
new file mode 100644
index 0000000000..3bb7e07f2c
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_gallery.htm
@@ -0,0 +1,114 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Image Gallery</title>
+<link href='css/anim_gallery.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="gallery"><div>
+<img src="img/gal1.jpg"/>
+<div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</div>
+</div><div>
+<img src="img/gal2.jpg"/>
+<div>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+Aenean elementum arcu sed nibh faucibus pellentesque.
+Aenean vestibulum egestas metus, eu sodales dolor venenatis quis.
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
+Donec a massa felis, a congue purus. Nullam et turpis diam.
+Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</div>
+</div><div>
+<img src="img/gal3.jpg"/>
+<div>
+Aliquam erat volutpat. Mauris tempor, urna at dignissim pellentesque, velit lacus dictum sem, non porttitor felis nulla nec risus.
+Donec a massa felis, a congue purus. Nullam et turpis diam.
+Donec feugiat gravida viverra.
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
+Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</div>
+</div><div>
+<img src="img/gal4.jpg"/>
+<div>
+Donec feugiat gravida viverra.
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+Aliquam erat volutpat. Mauris tempor, urna at dignissim pellentesque, velit lacus dictum sem, non porttitor felis nulla nec risus.
+</div>
+</div><div>
+<img src="img/gal5.jpg"/>
+<div>
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
+Aliquam erat volutpat. Mauris tempor, urna at dignissim pellentesque, velit lacus dictum sem, non porttitor felis nulla nec risus.
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+</div>
+</div><div>
+<img src="img/gal6.jpg"/>
+<div>
+Donec feugiat gravida viverra.
+Aenean elementum arcu sed nibh faucibus pellentesque.
+Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</div>
+</div><div>
+<img src="img/gal7.jpg"/>
+<div>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+Aliquam erat volutpat. Mauris tempor, urna at dignissim pellentesque, velit lacus dictum sem, non porttitor felis nulla nec risus.
+</div>
+</div><div>
+<img src="img/gal8.jpg"/>
+<div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+Aliquam erat volutpat. Mauris tempor, urna at dignissim pellentesque, velit lacus dictum sem, non porttitor felis nulla nec risus.
+Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</div>
+</div></section>
+<script src="js/anim_gallery.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_panel.htm b/examples/webkit/webkit-guide/anim_panel.htm
new file mode 100644
index 0000000000..07ecd62177
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_panel.htm
@@ -0,0 +1,63 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Slide-out Panel</title>
+<link href='css/anim_panel.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section onclick="javascript:void(0)">
+<nav id="panel" class="collapsed">
+<img class="button" src="img/ic_c_032.png" onclick="share()"/>
+<img class="option" src="img/ic_ni_032.png" onclick="debug('Ni')"/>
+<img class="option" src="img/ic_fe_032.png" onclick="debug('Fe')"/>
+<img class="option" src="img/ic_he_032.png" onclick="debug('He')"/>
+<img class="option" src="img/ic_o_032.png" onclick="debug('O')"/>
+<img class="option" src="img/ic_na_032.png" onclick="debug('Na')"/>
+<img class="option" src="img/ic_zn_032.png" onclick="debug('Zn')"/>
+<span class="force">&nbsp;</span>
+</nav>
+<div id="dbg">Press the icon, then choose an option if you wish.</div>
+</section>
+<script src="js/anim_panel.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_pulse.htm b/examples/webkit/webkit-guide/anim_pulse.htm
new file mode 100644
index 0000000000..97666c997f
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_pulse.htm
@@ -0,0 +1,71 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Pulse</title>
+<link href='css/anim_pulse.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<nav>
+<a href="#a" id="a"></a>
+<a href="#b" id="b"></a>
+<a href="#c" id="c"></a>
+<a href="#d" id="d"></a>
+<a href="#e" id="e"></a>
+<a href="#f" id="f"></a>
+<span class="force">&nbsp;</span>
+</nav>
+<h3>Animated Pulse</h3>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_skew.htm b/examples/webkit/webkit-guide/anim_skew.htm
new file mode 100644
index 0000000000..077fe17a5e
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_skew.htm
@@ -0,0 +1,80 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Transitions with Skew Transforms</title>
+<link href="css/anim_skew.css" rel="stylesheet" type="text/css" />
+<style id="custom"></style>
+</head>
+<body>
+<section class="items">
+<div title="cat1">Item #1</div>
+<div title="cat2">Item #2</div>
+<div title="cat1">Item #3</div>
+<div title="cat3">Item #4</div>
+<div title="cat4">Item #5</div>
+<div title="cat1">Item #6</div>
+<div title="cat3">Item #7</div>
+<div title="cat2">Item #8</div>
+<div title="cat4">Item #9</div>
+<div title="cat1">Item #10</div>
+<div title="cat2">Item #11</div>
+<div title="cat3">Item #12</div>
+<div title="cat4">Item #13</div>
+<div title="cat1">Item #14</div>
+<div title="cat2">Item #15</div>
+</section>
+
+<nav>
+<div>&nbsp;</div>
+<div class="cat1">&nbsp;</div>
+<div class="cat2">&nbsp;</div>
+<div class="cat4">&nbsp;</div>
+<div class="cat3">&nbsp;</div>
+</nav>
+
+<script src="js/anim_skew.js"></script>
+<!--
+<script src="js/mobile.js"></script>
+-->
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_slide1.htm b/examples/webkit/webkit-guide/anim_slide1.htm
new file mode 100644
index 0000000000..866cecc44b
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_slide1.htm
@@ -0,0 +1,61 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Drilldown Sliders</title>
+<link href="css/anim_slide.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<a id='out'></a>
+<div id='in' class='panel'>
+<h1>Level 1</h1>
+<ul>
+<li><a href='anim_slide2.htm#in'>Level 2, Option A</a></li>
+<li><a href='anim_slide2.htm#in'>Level 2, Option B</a></li>
+<li><a href='anim_slide2.htm#in'>Level 2, Option C</a></li>
+<li><a href='anim_slide2.htm#in'>Level 2, Option D</a></li>
+<li><a href='anim_slide2.htm#in'>Level 2, Option E</a></li>
+</ul>
+</div>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_slide2.htm b/examples/webkit/webkit-guide/anim_slide2.htm
new file mode 100644
index 0000000000..474de36d6f
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_slide2.htm
@@ -0,0 +1,62 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Drilldown Sliders</title>
+<link href="css/anim_slide.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<a id='out'></a>
+<div id='in' class='panel'>
+<h1>Level 2</h1>
+<a class='go_out' href='anim_slide1.htm#out'></a>
+<ul>
+<li><a href='anim_slide3.htm#in'>Level 3, Option A</a></li>
+<li><a href='anim_slide3.htm#in'>Level 3, Option B</a></li>
+<li><a href='anim_slide3.htm#in'>Level 3, Option C</a></li>
+<li><a href='anim_slide3.htm#in'>Level 3, Option D</a></li>
+<li><a href='anim_slide3.htm#in'>Level 3, Option E</a></li>
+</ul>
+</div>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_slide3.htm b/examples/webkit/webkit-guide/anim_slide3.htm
new file mode 100644
index 0000000000..0da926ea63
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_slide3.htm
@@ -0,0 +1,65 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Drilldown Sliders</title>
+<link href="css/anim_slide.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<a id='out'></a>
+<div id='in' class='panel'>
+<h1>Level 3</h1>
+
+<a class='go_out' href='anim_slide2.htm#out'></a>
+
+<article>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque.
+</article>
+
+</div>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/anim_tabbedSkew.htm b/examples/webkit/webkit-guide/anim_tabbedSkew.htm
new file mode 100644
index 0000000000..387e0a7bb1
--- /dev/null
+++ b/examples/webkit/webkit-guide/anim_tabbedSkew.htm
@@ -0,0 +1,88 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Transformed Tabs</title>
+<link href='css/anim_tabbedSkew.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<nav>
+<a id="l1" href="#a1">&nbsp;</a>
+<a id="l2" href="#a2">&nbsp;</a>
+<a id="l3" href="#a3">&nbsp;</a>
+</nav>
+<article id="a1">
+<h3>Tab #1</h3>
+<div>&nbsp;</div>
+<p>Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis
+ante, id mollis risus lectus ornare nisl. Lorem ipsum dolor sit amet,
+consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus
+ipsum felis, cursus sed venenatis nec, tempus ac tellus. Aenean
+elementum arcu sed nibh faucibus pellentesque. </p>
+</article>
+<article id="a2">
+<h3>Tab #2</h3>
+<div>&nbsp;</div>
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl.
+
+</article>
+<article id="a3">
+<h3>Tab #3</h3>
+<div>&nbsp;</div>
+
+Donec feugiat gravida viverra. Vivamus ipsum felis, cursus sed
+venenatis nec, tempus ac tellus. Praesent luctus, risus eu vestibulum
+mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+Nullam et turpis diam. Aenean vestibulum egestas metus, eu sodales
+dolor venenatis quis. Aenean augue orci, facilisis et convallis ut,
+egestas at neque.
+
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css/anim_accord.css b/examples/webkit/webkit-guide/css/anim_accord.css
new file mode 100755
index 0000000000..c9c013affa
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_accord.css
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ width : 100;
+}
+
+body > section {
+ border-radius : 1em;
+ background : #ffffff;
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ min-height : 70%;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
+.nav > a {
+ display : inline-block;
+ width : 48px;
+ height : 48px;
+}
+
+h1, h2, h3, h4 {
+ margin-top : 0.0em;
+ font-size : smaller;
+ padding-top : 1em;
+}
+
+body > section.main {
+ position : absolute;
+ left : 1em;
+ right : 1em;
+ top : 1em;
+ min-height : 50%;
+ border-radius : 0.5em;
+ background : #aaaaaa;
+ padding : 0;
+}
+
+section.main > article {
+ background : #ffffff;
+ padding : 1em;
+ margin-bottom : 10em;
+ border-radius : 0.5em;
+}
+
+#accordion,
+#accordion > dt,
+#accordion > dd,
+{
+ display : block;
+}
+
+#accordion > dt {
+ border-top : thin solid #777777;
+}
+
+#accordion > dd {
+ border-bottom : thin solid #777777;
+}
+
+#accordion > dd {
+ background-image : -webkit-gradient(linear,center top,center bottom,from(#aaaaaa),to(#ffffff));
+}
+
+#accordion.collapsed {
+ background-size : auto;
+ background-image : url(../img/icon_expand-nav.png);
+ background-repeat : no-repeat;
+ background-position : 0.25em 0.25em;
+}
+
+#accordion {
+ position : absolute;;
+ right : 2em;
+ top : 0em;
+ overflow : hidden;
+ background : #ffffff;
+ cursor : pointer;
+ z-index : 100;
+ font-weight : bold;
+}
+
+#accordion.expanded {
+ border : thin solid #206ead;
+ width : 80%;
+ height : 90%;
+ -webkit-transition:
+ width 0.5s ease-in-out 0.0s,
+ height 0.5s ease-in-out 0.5s
+ ;
+}
+
+#accordion.collapsed {
+ width : 15%;
+ height : 9%;
+ -webkit-transition:
+ height 0.5s ease-in-out 0.0s,
+ width 0.5s ease-in-out 0.5s
+ ;
+}
+
+#accordion.collapsed > dt,
+#accordion.collapsed > dd {
+ -webkit-transform : translate(100%);
+ -webkit-transition : -webkit-transform 0.5s ease-in-out 0.5s;
+}
+
+#accordion.expanded > dt,
+#accordion.expanded > dd {
+ -webkit-transform : translate(0%);
+ -webkit-transition : -webkit-transform 0.5s ease-in-out 0.0s;
+}
+
+#accordion > dt > a {
+ margin-left : 0.5em;
+}
+
+#accordion > dt ,
+#accordion > dd {
+ padding : 0.5em;
+}
+
+#accordion > dt ~ dd {
+ margin : 0;
+}
+
+#accordion > dd > ul,
+#accordion > dd > ul > li
+{
+ padding : 0;
+ margin : 0;
+}
+
+#accordion a,
+#accordion a:active,
+#accordion a:hover,
+#accordion a:visited
+{
+ text-decoration : none;
+ color : #000000;
+}
+
+#accordion > dt.expanded:before {
+ content : url(../img/icon_head-expanded_x13.png);
+}
+
+#accordion > dt.collapsed:before {
+ content : url(../img/icon_head-collapsed_x13.png);
+}
+
+#accordion > dt.expanded {
+ background-image : -webkit-gradient(linear, center top, center bottom, from(#aaaaaa), to(#ffffff));
+}
+
+#accordion > dt.collapsed {
+ background-image : -webkit-gradient(linear, center top, center bottom, from(#aaaaaa), to(#ffffff));
+}
+
+#accordion > dt + dd {
+ background : #ffffff;
+ display : block;
+}
+
+#accordion dd {
+ overflow : none;
+}
+
+#accordion > dt.collapsed + dd {
+ max-height : 0%;
+ opacity : 0;
+ -webkit-transform : scaleY(0);
+ -webkit-transition : all 0.5s ease-in-out;
+}
+
+#accordion > dt.expanded + dd {
+ max-height : 50%;
+ opacity : 1;
+ -webkit-transform : scaleY(1);
+ -webkit-transition : all 0.5s ease-in-out;
+}
+
+#accordion > dd {
+ margin : 0;
+ padding : 0;
+}
+
+#accordion > dd > ul > li {
+ padding-top : 0.25em;
+ padding-bottom : 0.5em;
+ padding-left : 1.0em;
+ padding-right : 1.0em;
+}
+
+#accordion> dt.collapsed:last-of-type {
+ border-bottom : thin solid #aaaaaa;
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_demo-rotate.css b/examples/webkit/webkit-guide/css/anim_demo-rotate.css
new file mode 100755
index 0000000000..fa3bd0dee8
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_demo-rotate.css
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+body {
+ background : #aaaaaa;
+ font-weight : bold;
+}
+
+section {
+ color : #ffffff;
+ background : #777777;
+ font-size : x-large;
+ -webkit-transform : translate(-150%) scale(1);
+ position : absolute;
+ text-align : center;
+ padding : 1em;
+ top : 3em;
+ left : 3em;
+ bottom : 3em;
+ right : 3em;
+}
+
+@-webkit-keyframes demoRotate {
+ 0% { -webkit-transform : translate(-150%); }
+ 10% { -webkit-transform : rotate(0deg) translate(0); }
+ 50% { -webkit-transform : rotate(180deg) translate(0); }
+ 90% { -webkit-transform : rotate(360deg) translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+@-webkit-keyframes demoRotateOrigin {
+ 0% { -webkit-transform : rotate(0deg) translate(-150%); }
+ 10% { -webkit-transform : rotate(0deg) translate(0); }
+ 50% { -webkit-transform : rotate(-180deg) translate(0); }
+ 90% { -webkit-transform : rotate(-360deg) translate(0); }
+ 100% { -webkit-transform : rotate(-360deg) translate(150%) }
+}
+
+@-webkit-keyframes end {
+ 0% { -webkit-transform : translate(150%); }
+ 30% { -webkit-transform : translate(0); }
+ 70% { -webkit-transform : translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+.rotate {
+ -webkit-animation : demoRotate 9s 2s;
+ -webkit-transform-origin : center;
+ -webkit-animation-timing-function : linear;
+}
+.rotateOrigin {
+ -webkit-animation : demoRotateOrigin 9s 12s;
+ -webkit-transform-origin : top left;
+ -webkit-animation-timing-function : linear;
+}
+.end {
+ -webkit-animation : end 3s 22s;
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_demo-scale.css b/examples/webkit/webkit-guide/css/anim_demo-scale.css
new file mode 100755
index 0000000000..4af469a61e
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_demo-scale.css
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-weight : bold;
+}
+
+section {
+ color : #ffffff;
+ background : #777777;
+ font-size : x-large;
+ -webkit-transform : translate(-150%) scale(1);
+ position : absolute;
+ text-align : center;
+ padding : 1em;
+ top : 3em;
+ left : 3em;
+ bottom : 3em;
+ right : 3em;
+}
+
+@-webkit-keyframes demoScale {
+ 0% { -webkit-transform : translate(-150%) scale(1); }
+ 10% { -webkit-transform : scale(1.0) translate(0); }
+ 30% { -webkit-transform : scale(0.5) translate(0); }
+ 50% { -webkit-transform : scale(1.0) translate(0); }
+ 70% { -webkit-transform : scale(1.5) translate(0); }
+ 90% { -webkit-transform : scale(1.0) translate(0); }
+ 100% { -webkit-transform : translate(150%) scale(1); }
+}
+
+@-webkit-keyframes demoScaleX {
+ 0% { -webkit-transform : translate(-150%) scale(1); }
+ 10% { -webkit-transform : scaleX(1.0) translate(0); }
+ 30% { -webkit-transform : scaleX(0.5) translate(0); }
+ 50% { -webkit-transform : scaleX(1.0) translate(0); }
+ 70% { -webkit-transform : scaleX(1.5) translate(0); }
+ 90% { -webkit-transform : scaleX(1.0) translate(0); }
+ 100% { -webkit-transform : translate(150%) scale(1); }
+}
+
+@-webkit-keyframes demoScaleY {
+ 0% { -webkit-transform : translate(-150%) scale(1); }
+ 10% { -webkit-transform : scaleY(1.0) translate(0); }
+ 30% { -webkit-transform : scaleY(0.5) translate(0); }
+ 50% { -webkit-transform : scaleY(1.0) translate(0); }
+ 70% { -webkit-transform : scaleY(1.5) translate(0); }
+ 90% { -webkit-transform : scaleY(1.0) translate(0); }
+ 100% { -webkit-transform : translate(150%) scale(1); }
+}
+
+@-webkit-keyframes end {
+ 0% { -webkit-transform : translate(150%); }
+ 30% { -webkit-transform : translate(0); }
+ 70% { -webkit-transform : translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+.scale {
+ -webkit-animation : demoScale 9s 2s;
+ -webkit-transform-origin : bottom;
+}
+.scaleX {
+ -webkit-animation : demoScaleX 9s 12s;
+ -webkit-transform-origin : left;
+}
+.scaleY {
+ -webkit-animation : demoScaleY 9s 22s;
+ -webkit-transform-origin : center;
+}
+.end {
+ -webkit-animation : end 3s 32s;
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_demo-skew.css b/examples/webkit/webkit-guide/css/anim_demo-skew.css
new file mode 100755
index 0000000000..2d90bf9574
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_demo-skew.css
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-weight : bold;
+}
+
+section {
+ color : #ffffff;
+ background : #777777;
+ font-size : x-large;
+ -webkit-transform : translate(-150%) scale(1);
+ position : absolute;
+ text-align : center;
+ padding : 1em;
+ top : 3em;
+ left : 3em;
+ bottom : 3em;
+ right : 3em;
+}
+
+@-webkit-keyframes demoSkew {
+ 0% { -webkit-transform : translate(-150%); }
+ 10% { -webkit-transform : skew(0deg) translate(0); }
+ 30% { -webkit-transform : skew(30deg) translate(0); }
+ 50% { -webkit-transform : skew(0deg) translate(0); }
+ 70% { -webkit-transform : skew(-30deg) translate(0); }
+ 90% { -webkit-transform : skew(0deg) translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+@-webkit-keyframes demoSkewY {
+ 0% { -webkit-transform : translate(-150%); }
+ 10% { -webkit-transform : skewY(0deg) translate(0); }
+ 30% { -webkit-transform : skewY(30deg) translate(0); }
+ 50% { -webkit-transform : skewY(0deg) translate(0); }
+ 70% { -webkit-transform : skewY(-30deg) translate(0); }
+ 90% { -webkit-transform : skewY(0deg) translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+@-webkit-keyframes end {
+ 0% { -webkit-transform : translate(150%); }
+ 30% { -webkit-transform : translate(0); }
+ 70% { -webkit-transform : translate(0); }
+ 100% { -webkit-transform : translate(150%); }
+}
+
+.skew {
+ -webkit-animation : demoSkew 9s 2s;
+ -webkit-transform-origin : bottom;
+}
+.skewY {
+ -webkit-animation : demoSkewY 9s 12s;
+ -webkit-transform-origin : left;
+}
+.end {
+ -webkit-animation : end 3s 22s;
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_gallery.css b/examples/webkit/webkit-guide/css/anim_gallery.css
new file mode 100755
index 0000000000..fe14aa263c
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_gallery.css
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+ background : #444444;
+}
+.gallery > div > div {
+ border-radius : 1.0em;
+ padding : 1em;
+ background : #dddddd;
+ min-height : 75%;
+}
+.gallery > div {
+ -webkit-transition : all 0.5s ease-in-out;
+ z-index : 0;
+ position : absolute;
+ top : 2.0em;
+ bottom : 2.0em;
+ left : 2.0em;
+ right : 2.0em;
+}
+.gallery > div.selected {
+ -webkit-transform : translate(0) scale(1);
+ opacity : 1.0;
+ z-index : 1;
+}
+.gallery > div.queueR {
+ -webkit-transform : translate(70%) scale(0.5);
+ opacity : 0.75;
+}
+.gallery > div.queueL {
+ -webkit-transform : translate(-70%) scale(0.5);
+ opacity : 0.75;
+}
+.gallery > div.hideR {
+ -webkit-transform : translate(200%) scale(0.5);
+ opacity : 0.0;
+}
+.gallery > div.hideL {
+ -webkit-transform : translate(-200%) scale(0.5);
+ opacity : 0.0;
+}
+.gallery img {
+ max-width : 100%;
+ max-height : 100%;
+ border-radius : 1.0em;
+}
+
+.gallery > #reveal > div, .gallery > div > img {
+ -webkit-transform : scaleX(1) scaleY(1);
+ -webkit-transition : -webkit-transform 0.25s ease-out 0.25s;
+}
+.gallery > div > div, .gallery > #reveal > img {
+ -webkit-transform : scaleX(0) scaleY(1);
+ -webkit-transition : -webkit-transform 0.25s ease-out;
+}
+
+section > div {
+ text-align : center;
+}
+
+section > div > img {
+ display : inline-block;
+}
+
+section > div > div {
+ position : absolute;
+ top : 0;
+ left : 1.5em;
+ right : 1.5em;
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_panel.css b/examples/webkit/webkit-guide/css/anim_panel.css
new file mode 100755
index 0000000000..87037c9a9e
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_panel.css
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+section {
+ background : #aaaaaa;
+ position : absolute;
+ left : 1em;
+ right : 1em;
+ top : 1em;
+ bottom : 1em;
+}
+
+.force {
+ padding-right : 5in;
+}
+
+#panel {
+ text-align : justify;
+ padding : 0.5em;
+ border-radius : 0.5em;
+ background : #ffffff;
+ max-height : 2.0em;
+ float : right;
+ overflow : hidden;
+}
+
+nav.expanded {
+ max-width : 95%;
+ -webkit-transition : max-width 0.5s ease-in-out;
+}
+
+nav.collapsed {
+ max-width : 12%;
+ -webkit-transition : max-width 0.5s ease-in-out;
+
+}
+
+nav.expanded > .button {
+ display : none;
+}
+
+nav.collapsed > .button {
+ display : inline-block;
+}
+
+nav.expanded > .option {
+ opacity : 1;
+ -webkit-transform : scale(1);
+ -webkit-transition : all 0.5s linear;
+}
+nav.collapsed > .option {
+ opacity : 0;
+ -webkit-transform : scale(0);
+ -webkit-transition : all 0.5s linear;
+}
+
+#dbg {
+ padding : 1em;
+ border-radius : 1em;
+ position : absolute;
+ top : 75%;
+ bottom : 1em;
+ left : 1em;
+ right : 1em;
+ background : #ffffff;
+}
+
+.measure {
+ position : absolute;
+ top : 0;
+ left : 0;
+ width : 320px;
+ background : green;
+}
diff --git a/examples/webkit/webkit-guide/css/anim_pulse.css b/examples/webkit/webkit-guide/css/anim_pulse.css
new file mode 100755
index 0000000000..4b850b9bc8
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_pulse.css
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+.force {
+ padding-left : 100%
+}
+
+nav {
+ text-align : justify;
+}
+
+nav > a {
+ background-size : contain;
+ background-repeat : no-repeat;
+}
+
+nav > a {
+ display : inline-block;
+ width : 2em;
+ height : 2em;
+}
+
+nav > a:nth-of-type(1) { background-image : url(../img/ic_fe_032.png); }
+nav > a:nth-of-type(2) { background-image : url(../img/ic_ni_032.png); }
+nav > a:nth-of-type(3) { background-image : url(../img/ic_he_032.png); }
+nav > a:nth-of-type(4) { background-image : url(../img/ic_na_032.png); }
+nav > a:nth-of-type(5) { background-image : url(../img/ic_zn_032.png); }
+nav > a:nth-of-type(6) { background-image : url(../img/ic_o_032.png); }
+
+h1,h2,h3 { margin-top : 0; }
+
+nav > a:target { -webkit-animation : pulse 1s infinite; }
+
+@-webkit-keyframes pulse {
+ 0% { opacity : 1.0 }
+ 50% { opacity : 0.7 }
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_skew.css b/examples/webkit/webkit-guide/css/anim_skew.css
new file mode 100755
index 0000000000..e44a633e96
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_skew.css
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ padding : 1em;
+ font-family : "Helvetica";
+ font-weight : bold;
+}
+
+span {
+ background : #ffffff;
+ font-weight : bold;
+ cursor : pointer;
+}
+
+.items > div {
+ cursor : pointer;
+ background : #ffffff;
+ height : 2em;
+ padding : 0.5em 0.5em 0.0em 0.5em;
+ border-radius : 0.25em;
+ position : absolute;
+ left : 1em;
+ right : 1em;
+ -webkit-transition-property : -webkit-transform, top;
+ -webkit-transition-duration : 0.5s, 0.5s;
+ -webkit-transition-delay : 0s, 0.5s;
+ -webkit-transition-timing-function : ease-in-out;
+}
+
+.hide {
+ -webkit-transform-origin : bottom left;
+ -webkit-transform : skew(40deg) translate(140%,0em);
+}
+
+.items > div:after {
+ content : url(../img/icon_dismiss_x22.png);
+ float : right;
+}
+
+.row1 {
+ top : 3.5em;
+}
+.row2 {
+ top : 6.5em;
+}
+.row3 {
+ top : 9.5em;
+}
+.row4 {
+ top : 12.5em;
+}
+.row5 {
+ top : 15.5em;
+}
+.row6 {
+ top : 18.5em;
+}
+.row7 {
+ top : 21.5em;
+}
+.row8 {
+ top : 24.5em;
+}
+.row9 {
+ top : 27.5em;
+}
+.row10 {
+ top : 30.5em;
+}
+.row11 {
+ top : 33.5em;
+}
+.row12 {
+ top : 36.5em;
+}
+.row13 {
+ top : 39.5em;
+}
+.row14 {
+ top : 42.5em;
+}
+.row15 {
+ top : 45.5em;
+}
+
+.items > div {
+ padding-left : 3.0em;
+ color : #444444;
+ background-size : contain;
+ background-repeat : no-repeat;
+}
+
+.items > div[title='cat1'] {
+ background-image : url(../img/ic_fe_036.png);
+}
+
+.items > div[title='cat2'] {
+ background-image : url(../img/ic_na_036.png);
+}
+
+.items > div[title='cat3'] {
+ background-image : url(../img/ic_ni_036.png);
+}
+
+.items > div[title='cat4'] {
+ background-image : url(../img/ic_mg_036.png);
+}
+
+nav {
+ position : absolute;
+ background : #aaaaaa;
+ top : 0;
+ left : 0;
+ right : 0;
+ z-index : 10;
+ height : 2em;
+ text-align : center;
+ padding : 0.5em;
+}
+
+nav > div {
+ background-size : contain;
+ background-repeat : no-repeat;
+ display : inline-block;
+ width : 36px;
+ height : 36px;
+ margin-left : 0.25em;
+ margin-right : 0.25em;
+ background-image : -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#eeeeee));
+}
+
+nav > div {
+ background-image : url(../img/icon_list-all.png);
+}
+nav > .cat1 {
+ background-image : url(../img/ic_fe_036.png);
+}
+nav > .cat2 {
+ background-image : url(../img/ic_na_036.png);
+}
+nav > .cat3 {
+ background-image : url(../img/ic_ni_036.png);
+}
+nav > .cat4 {
+ background-image : url(../img/ic_mg_036.png);
+}
+
diff --git a/examples/webkit/webkit-guide/css/anim_slide.css b/examples/webkit/webkit-guide/css/anim_slide.css
new file mode 100755
index 0000000000..7997cc2c2b
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_slide.css
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* main layout */
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1 {
+ min-height : 1.5em;
+ background : #ffffff;
+ margin-left : 1em;
+ margin-right : 1em;
+ text-align : center;
+ font-size : 18px;
+ padding-top : 0.25em;
+ padding-bottom : 0.25em;
+ border-radius : 0.5em;
+}
+
+.panel {
+ position : absolute;
+ top : 0em;
+ bottom : 0em;
+ left : 0em;
+ right : 0em;
+}
+
+article {
+ background : #ffffff;
+ padding : 1em;
+ border-radius : 1em;
+ margin : 1em;
+}
+
+.panel > ul {
+ padding : 0em;
+ list-style-type : none;
+}
+.panel > ul > li {
+ background : #fff;
+ margin : 0.5em 1.0em 0.5em 1.0em;
+ padding : 0.5em;
+ display : block;
+ border-radius : 0.5em;
+}
+.panel > ul > li > a {
+ width : 100%;
+ display : block;
+ text-decoration : none;
+ text-align : justify;
+ color : #000000;
+}
+.panel > a {
+ background : #fff;
+ margin : 0 1.0em 1.0em 0em;
+ padding : 0.5em;
+}
+/* navigational hints */
+
+a.go_out {
+ background : transparent;
+ position : absolute;
+ top : 0.5em;
+ left : 1.2em;
+ content : url(../img/icon_drill-up_x32.png);
+ padding : 0.25em;
+ border-radius : 1em;
+ display : block;
+}
+
+.panel > ul > li > a:after {
+ text-align : right;
+ float : right;
+ font-size : 1em;
+ font-weight : bold;
+}
+.panel > ul > li > a:after {
+ -webkit-transform : translate(0, -0.5em);
+ content : url(../img/icon_drill-down_x32.png);
+}
+
+/* animations */
+#in:target {
+ -webkit-animation : slide_in 0.25s;
+}
+#out:target + .panel {
+ -webkit-animation : slide_out 0.25s;
+}
+@-webkit-keyframes slide_in {
+ from {
+ left : 80%;
+ right : -80%;
+ }
+ to {
+ left : 0em;
+ right : 0em;
+ }
+}
+@-webkit-keyframes slide_out {
+ from {
+ left : -80%;
+ right : 80%;
+ }
+ to {
+ left : 0em;
+ right : 0em;
+ }
+}
diff --git a/examples/webkit/webkit-guide/css/anim_tabbedSkew.css b/examples/webkit/webkit-guide/css/anim_tabbedSkew.css
new file mode 100755
index 0000000000..1c03e48966
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/anim_tabbedSkew.css
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+section {
+ background : #ffffff;
+ position : absolute;
+ left : 1em;
+ right : 1em;
+ top : 1em;
+ min-height : 60%;
+ padding : 1.0em;
+ border-radius : 0.5em;
+}
+
+nav {
+ text-align : right;
+ width : 3.5em;
+ height : 4em;
+ float : right;
+}
+
+nav > a {
+ border-radius : 0.25em;
+ width : 1em;
+ height : 1em;
+ text-align : center;
+ font-weight : bold;
+ font-size : 2em;
+ text-decoration : none;
+ color : black;
+ position : relative;
+ background-size : contain;
+ display : block;
+}
+
+nav > a:nth-of-type(1) {
+ margin-bottom : 0.1em;
+ background-image : url(../img/ic_he_032.png);
+ -webkit-transform : skew(-30deg);
+}
+
+nav > a:nth-of-type(2) {
+ background-image : url(../img/ic_o_032.png);
+ -webkit-transform : skew(30deg);
+}
+
+nav > a:nth-of-type(3) {
+ background-image : url(../img/ic_na_032.png);
+ -webkit-transform : rotate(-60deg) skew(-30deg) translate(1.7em, -1px);
+}
+
+article {
+ display : none;
+ margin-bottom : 4em;
+}
+
+article:target {
+ display : block;
+}
+
+h3 + div {
+ display : inline-block;
+ float : right;
+ width : 12px;
+ height : 3em;
+}
+
+h1,h2,h3,h4 {
+ margin-top : 0.5em;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_backgrounds.css b/examples/webkit/webkit-guide/css/css3_backgrounds.css
new file mode 100755
index 0000000000..c2a3a300e0
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_backgrounds.css
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+ background : #aaaaaa;
+}
+
+h1,h2,h3,h4 {
+ background : #ffffff;
+ text-align : center;
+ margin : 0.5em;
+ padding : 0.5em;
+ border-radius : 0.5em;
+}
+
+.accordion {
+ margin : 0.5em 0.5em 6em 0.5em;
+ border-radius : 0.5em;
+ border : thin solid #aaa;
+ background : #ffffff;
+ overflow : hidden;
+ padding : 1.0em 0.5em 1.0em 0.5em;
+
+}
+
+.accordion > dt {
+ cursor : pointer;
+ border-top : thin solid #aaa;
+ border-radius : 0.5em;
+ padding : 0.5em 0.5em 0.5em 2.5em;
+ font-weight : bold;
+ background-size : auto;
+ background-image : url(../img/icon_head-collapsed_x13.png);
+ background-repeat : no-repeat;
+ background-position : 12px 12px;
+}
+
+.accordion > dt:first-of-type {
+ border-top : none;
+}
+
+.accordion > dt.selected {
+ background-image : url(../img/icon_head-expanded_x13.png) , url(../img/gradient.jpg);
+ background-repeat : no-repeat , repeat-x;
+ background-position : 12px 12px , 0 0;
+ margin-bottom : 0em;
+}
+
+dt + dd {
+ max-height : 0%;
+ margin : 0;
+ opacity : 0;
+ padding : 0.5em;
+ overflow-y : hidden;
+ max-height : 0;
+ -webkit-transform : scaleY(0);
+ -webkit-transition : all 0.5s linear;
+}
+
+dt.selected + dd {
+ -webkit-transform : scaleY(1);
+ -webkit-transform-origin : center;
+ max-height : 1000px;
+ -webkit-transition : all 0.5s linear;
+ opacity : 1;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_border-img.css b/examples/webkit/webkit-guide/css/css3_border-img.css
new file mode 100755
index 0000000000..1293e2e27c
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_border-img.css
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+.fruit {
+ padding : 2.5em;
+ -webkit-border-image : url(../img/border-frame.png) 2 stretch stretch;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_grad-radial.css b/examples/webkit/webkit-guide/css/css3_grad-radial.css
new file mode 100755
index 0000000000..7799153dbd
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_grad-radial.css
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 70%;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_gradientBack.css b/examples/webkit/webkit-guide/css/css3_gradientBack.css
new file mode 100755
index 0000000000..48f9d68633
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_gradientBack.css
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+}
+
+section {
+ position : absolute;
+ top : 0.0em;
+ left : 0.0em;
+ right : 0.0em;
+ background : #aaaaaa;
+ background : -webkit-gradient(linear, center top, center bottom, from(#dddddd), to(#777777) );
+ padding : 1em;
+}
+
+article {
+ background : #ffffff;
+ padding : 1em;
+ border-radius : 0.5em;
+ border : thin #aaaaaa solid;
+ margin-bottom : 12em;
+}
+
+h1, h2, h3, h4 {
+ text-align : center;
+ margin-top : 0.5em;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_gradientBackStop.css b/examples/webkit/webkit-guide/css/css3_gradientBackStop.css
new file mode 100755
index 0000000000..0fbaf526ef
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_gradientBackStop.css
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+}
+
+section {
+ position : absolute;
+ top : 0.0em;
+ left : 0.0em;
+ right : 0.0em;
+ background : #aaaaaa;
+ background : -webkit-gradient(linear, center top, center bottom, from(#777777), color-stop(50%,#dddddd), to(#777777) );
+ padding : 1em;
+}
+
+article {
+ background : #ffffff;
+ padding : 1em;
+ border-radius : 0.5em;
+ border : thin #aaaaaa solid;
+ margin-bottom : 12em;
+}
+
+h1, h2, h3, h4 {
+ text-align : center;
+ margin-top : 0.5em;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_gradientButton.css b/examples/webkit/webkit-guide/css/css3_gradientButton.css
new file mode 100755
index 0000000000..6d0c9f77c8
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_gradientButton.css
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #ffffff;
+}
+
+article {
+ background : #ffffff;
+ position : absolute;
+ margin : 0;
+ left : 0;
+ right : 0;
+ top : 0;
+ bottom : 0;
+}
+
+ul {
+ font-weight : bold;
+ padding : 0;
+ list-style : none;
+ margin : 0.5em 0.5em 6em 0.5em;
+}
+
+ul > li {
+ margin-bottom : 0.5em;
+}
+
+ul > li > a {
+ padding : 0.5em;
+ display : block;
+ text-decoration : none;
+ color : #000000;
+ border : thin #aaaaaa solid;
+ border-radius : 0.5em;
+ background : #dddddd;
+ background : -webkit-gradient(linear, center top, center bottom,
+ from(#cccccc), to(#ffffff) );
+}
+
+ul > li > a:active {
+ color : #ffffff;
+ background : #ffffff;
+ background : -webkit-gradient(linear, center top, center bottom,
+ from(#dddddd), to(#444444) );
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
diff --git a/doc/src/snippets/declarative/animation-elements.qml b/examples/webkit/webkit-guide/css/css3_mask-grad.css
index d9bfc28c1a..24f0b227a7 100644..100755
--- a/doc/src/snippets/declarative/animation-elements.qml
+++ b/examples/webkit/webkit-guide/css/css3_mask-grad.css
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,30 +37,24 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-Row {
-
-//![color]
-Rectangle {
- width: 100; height: 100
+body {
+ font-family : sans-serif;
+ background : #ffffff;
+}
- ColorAnimation on color { from: "red"; to: "yellow"; duration: 1000 }
+h1,h2,h3,h4 {
+ text-align : center;
}
-//![color]
-//![rotation]
-Item {
- width: 300; height: 300
-
- Rectangle {
- width: 100; height: 100; anchors.centerIn: parent
- color: "red"
-
- RotationAnimation on rotation { to: 90; direction: RotationAnimation.Clockwise }
- }
+img {
+ -webkit-mask-box-image : -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
+ border-radius : 0.25em;
+ margin : 0.1em;
}
-//![rotation]
+img.select {
+ -webkit-mask-box-image : none;
+ -webkit-box-shadow : 0.2em 0.2em 0.4em #aaaaaa;
}
+
diff --git a/examples/webkit/webkit-guide/css/css3_mask-img.css b/examples/webkit/webkit-guide/css/css3_mask-img.css
new file mode 100755
index 0000000000..0203d814fc
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_mask-img.css
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+ background : #333333;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+img {
+ position : absolute;
+ left : 5%;
+ top : 5%;
+ height : 90%;
+ width : 90%;
+ -webkit-mask-box-image : url(../img/mask.png) 5% stretch;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_multicol.css b/examples/webkit/webkit-guide/css/css3_multicol.css
new file mode 100755
index 0000000000..3c07f8b604
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_multicol.css
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ font-family : sans-serif;
+ background : #aaaaaa;
+}
+
+section {
+ bottom : 0;
+ left : 0;
+ top : 12%;
+ right : 0;
+ position : absolute;
+ padding-bottom : 6em;
+}
+
+article {
+ border-radius : 1em;
+ margin : 1em;
+ padding : 1em;
+ background : #ffffff;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+ margin-top : 0.0em;
+}
+
+nav.ad {
+ width : 500%;
+ border : thin #aaaaaa solid;
+ background : #dddddd;
+ position : absolute;
+ top : 0%;
+ height : 10%;
+ column-count : 5;
+ column-width : 100%;
+ -webkit-animation : banner_scroll 30s infinite;
+}
+
+nav.ad > a {
+ width : 20%;
+ height : 100%;
+ display : inline-block;
+ text-align : center;
+ padding-top : 0.5em;
+ text-decoration : none;
+ font-weight : bold;
+ color : #000000;
+ font-size : larger;
+}
+
+nav.ad > a:nth-of-type(5n-0) { background : lightgreen; }
+nav.ad > a:nth-of-type(5n-1) { background : pink; }
+nav.ad > a:nth-of-type(5n-2) { background : plum; }
+nav.ad > a:nth-of-type(5n-3) { background : lightblue; }
+nav.ad > a:nth-of-type(5n-4) { background : lightcoral; }
+
+@-webkit-keyframes banner_scroll {
+ 0% { left : 0%; }
+ 18% { left : 0%; }
+ 20% { left : -100%; }
+ 38% { left : -100%; }
+ 40% { left : -200%; }
+ 58% { left : -200%; }
+ 60% { left : -300%; }
+ 78% { left : -300%; }
+ 80% { left : -400%; }
+ 95% { left : -400%; }
+ 100% { left : 0%; }
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_reflect.css b/examples/webkit/webkit-guide/css/css3_reflect.css
new file mode 100755
index 0000000000..1f2e4542e8
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_reflect.css
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+body > section {
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ margin-bottom : 10em;
+ min-height : 70%;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
+.nav > a {
+ display : inline-block;
+ width : 48px;
+ height : 48px;
+}
+
+body > section.main {
+ position : absolute;
+ left : 0em;
+ right : 0em;
+ top : 0em;
+ min-height : 50%;
+ border-radius : 0.5em;
+ background : #aaaaaa;
+ padding : 0;
+}
+
+section.main > article {
+ background : #ffffff;
+ padding : 1em;
+ margin : 1em 1em 10em 1em;
+ border-radius : 0.5em;
+}
+
+h1, h2, h3 {
+ color : #206ead;
+ margin-top : 0em;
+ text-align : center;
+ margin-bottom : 1em;
+ -webkit-box-reflect : below -0.25em -webkit-gradient(linear, center top, center bottom, from(transparent), color-stop(0.25, transparent), to(black));
+}
+
+.nav1 { background-image : url(../img/ic_he_032.png) }
+.nav2 { background-image : url(../img/ic_o_032.png) }
+.nav3 { background-image : url(../img/ic_ni_032.png) }
+.nav4 { background-image : url(../img/ic_fe_032.png) }
+.nav5 { background-image : url(../img/ic_na_032.png) }
+.nav6 { background-image : url(../img/ic_zn_032.png) }
+
+h1 { font-size : 1.5em; }
+h2 { font-size : 1.2em; }
+h3 { font-size : 1.0em; }
+
+figure {
+ display : block;
+ text-align : center;
+}
+
+figure > img {
+ width : 70%;
+ margin-bottom : 3em;
+ -webkit-box-reflect : below 0.25em -webkit-gradient(linear, center top, center bottom, from(transparent), color-stop(0.50, transparent), to(black));
+}
+
+p:first-line {
+ font-weight : bold;
+}
+
+p:first-letter {
+ font-size : 200%;
+ float : left;
+ padding-right : 0.1em;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_scroll.css b/examples/webkit/webkit-guide/css/css3_scroll.css
new file mode 100755
index 0000000000..ae37c34d1e
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_scroll.css
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background-color : #aaaaaa;
+ font-family : sans-serif;
+}
+
+h1,h2,h3,h4 {
+ margin-top : 0.5em;
+ font-size : 18px;
+ text-align : center;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1.0em 0.5em 6.0em 0.5em;
+ min-height : 50%;
+}
+
+pre {
+ font-weight : bold;
+ font-family : monospace;
+ padding : 1.0em 3em 1.0em 1.0em;
+ border : thin solid #aaaaaa;
+ border-radius : 1.5em;
+ overflow-x : auto;
+ background-image : -webkit-gradient(linear,left center,right center,from(#ffffff),to(#777777));
+}
+
+pre::-webkit-scrollbar {
+ height : 3em;
+}
+
+pre::-webkit-scrollbar-button:increment {
+ background-image : url(../img/icon_scroll-right.png);
+x background-size : contain;
+ background-repeat : no-repeat;
+ width : 3em;
+ height : 3em;
+}
+
+pre::-webkit-scrollbar-button:decrement {
+ background-image : url(../img/icon_scroll-left.png);
+ background-size : contain;
+ background-repeat : no-repeat;
+ width : 3em;
+ height : 3em;
+}
+
+pre::-webkit-scrollbar-track {
+ display : none;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_sel-nth.css b/examples/webkit/webkit-guide/css/css3_sel-nth.css
new file mode 100755
index 0000000000..aa1e04b52a
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_sel-nth.css
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+img {
+ position : absolute;
+ width : 48px;
+ height : 48px;
+ padding : 0.25em;
+ border : #ffffff medium solid;
+ border-radius : 0.5em;
+}
+
+/* columns */
+img:nth-of-type(4n-3) { left : 2% }
+img:nth-of-type(4n-2) { left : 27% }
+img:nth-of-type(4n-1) { left : 52% }
+img:nth-of-type(4n-0) { left : 77% }
+
+/* rows */
+img:nth-of-type(n) { top : 5% }
+img:nth-of-type(n+5) { top : 20% }
+img:nth-of-type(n+9) { top : 35% }
+img:nth-of-type(n+13) { top : 50% }
+img:nth-of-type(n+17) { top : 65% }
+img:nth-of-type(n+21) { top : 80% }
+
diff --git a/examples/webkit/webkit-guide/css/css3_shadow.css b/examples/webkit/webkit-guide/css/css3_shadow.css
new file mode 100755
index 0000000000..d2f3040a4a
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_shadow.css
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+body > section {
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ margin-bottom : 10em;
+ min-height : 70%;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
+.nav > a {
+ display : inline-block;
+ width : 48px;
+ height : 48px;
+}
+
+nav > a:active {
+ -webkit-transform : scale(0.8);
+}
+
+h1, h2 {
+ margin-top : 0em;
+ font-size : 18px;
+ text-align : center;
+}
+
+h2 {
+ border-top : solid thin #aaaaaa;
+}
+
+body > section.main {
+ position : absolute;
+ left : 0em;
+ right : 0em;
+ top : 5em;
+ min-height : 50%;
+ border-radius : 0.5em;
+ background : #aaaaaa;
+ padding : 0;
+}
+
+section.main > article {
+ background : #ffffff;
+ padding : 1em;
+ margin : 1em 1em 10em 1em;
+ border-radius : 0.5em;
+}
+
+section.nav {
+ z-index : 10;
+ border-radius : 0;
+ background : #aaaaaa;
+ background : transparent;
+ position : absolute;;
+ padding : 1em;
+ top : 0;
+ right : 0.0em;
+ left : 0.0em;
+}
+
+nav {
+ padding : 0.5em;
+ border-radius : 0.5em;
+ background : #ffffff;
+ top : 10px;
+ text-align : justify;
+ height : 36px;
+ overflow : hidden;
+}
+
+nav > a {
+ display : inline-block;
+ background-repeat : no-repeat;
+ height : 36px;
+ width : 36px;
+}
+
+#force_justify {
+ padding-left : 100%;
+}
+
+.nav1 { background-image : url(../img/ic_he_032.png) }
+.nav2 { background-image : url(../img/ic_o_032.png) }
+.nav3 { background-image : url(../img/ic_ni_032.png) }
+.nav4 { background-image : url(../img/ic_fe_032.png) }
+.nav5 { background-image : url(../img/ic_na_032.png) }
+.nav6 { background-image : url(../img/ic_zn_032.png) }
+
+nav {
+ -webkit-box-shadow : 0.5em 0.5em #777777;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_shadowBlur.css b/examples/webkit/webkit-guide/css/css3_shadowBlur.css
new file mode 100755
index 0000000000..f44892735d
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_shadowBlur.css
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+body > section {
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ margin-bottom : 10em;
+ min-height : 70%;
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
+.nav > a {
+ display : inline-block;
+ width : 48px;
+ height : 48px;
+}
+
+h1, h2 {
+ margin-top : 0em;
+ font-size : 18px;
+ text-align : center;
+}
+
+h2 {
+ border-top : solid thin #aaaaaa;
+}
+
+body > section.main {
+ position : absolute;
+ left : 0em;
+ right : 0em;
+ top : 5em;
+ min-height : 50%;
+ border-radius : 0.5em;
+ background : #aaaaaa;
+ padding : 0;
+}
+
+section.main > article {
+ background : #ffffff;
+ padding : 1em;
+ margin : 1em 1em 10em 1em;
+ border-radius : 0.5em;
+}
+
+section.nav {
+ z-index : 10;
+ border-radius : 0;
+ background : #aaaaaa;
+ background : transparent;
+ position : absolute;;
+ padding : 1em;
+ top : 0;
+ right : 0.0em;
+ left : 0.0em;
+}
+
+nav {
+ padding : 0.5em;
+ border-radius : 0.5em;
+ background : #ffffff;
+ top : 10px;
+ text-align : justify;
+ height : 36px;
+ overflow : hidden;
+}
+
+nav > a {
+ display : inline-block;
+ background-repeat : no-repeat;
+ height : 36px;
+ width : 36px;
+}
+
+nav > a:active {
+ -webkit-transform : scale(0.8);
+}
+
+#force_justify {
+ padding-left : 100%;
+}
+
+.nav1 { background-image : url(../img/ic_he_032.png) }
+.nav2 { background-image : url(../img/ic_o_032.png) }
+.nav3 { background-image : url(../img/ic_ni_032.png) }
+.nav4 { background-image : url(../img/ic_fe_032.png) }
+.nav5 { background-image : url(../img/ic_na_032.png) }
+.nav6 { background-image : url(../img/ic_zn_032.png) }
+
+nav {
+ -webkit-box-shadow : 0.5em 0.5em 0.5em #444444;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_text-overflow.css b/examples/webkit/webkit-guide/css/css3_text-overflow.css
new file mode 100755
index 0000000000..ba491c41ae
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_text-overflow.css
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+.accordion {
+ border : #777777 solid thin;
+ padding : 0.0em;
+ border-radius : 0.5em;
+ list-style : none;
+}
+
+.accordion > li {
+ padding : 0.5em;
+ border-bottom : #777777 solid thin;
+ white-space : nowrap;
+ max-height : 1.5em;
+ overflow : hidden;
+ text-overflow : clip;
+ text-overflow : ellipsis;
+ text-overflow : ellipsis-word;
+ -webkit-transition : max-height 1s ease-in-out;
+}
+
+.accordion > li:last-of-type {
+ border-bottom : none;
+}
+
+.accordion > li.selected {
+ -webkit-transition : max-height 1s ease-in-out;
+ max-height : 100em;
+ white-space : normal;
+ font-weight : normal;
+}
+
+.accordion > li.selected:first-line {
+ font-weight : bold;
+}
+
+.accordion > li.selected:first-letter {
+ font-size : 200%;
+ float : left;
+ padding-right : 0.1em;
+}
+
+.dismiss {
+ content : url(../img/icon_dismiss.png);
+}
+
+.accordion > li > .dismiss {
+ display : none;
+}
+
+.accordion > li.selected > .dismiss {
+ display : block;
+ float : right;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_text-shadow.css b/examples/webkit/webkit-guide/css/css3_text-shadow.css
new file mode 100755
index 0000000000..9f06662c95
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_text-shadow.css
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+ text-shadow : 0.20em 0.20em 0.20em #999;
+ color : #206ead;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
diff --git a/examples/webkit/webkit-guide/css/css3_text-stroke.css b/examples/webkit/webkit-guide/css/css3_text-stroke.css
new file mode 100755
index 0000000000..4116de8223
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/css3_text-stroke.css
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+h1,h2,h3,h4 {
+ margin-top : 0.5em;
+ text-align : center;
+}
+
+h1 {
+ -webkit-text-stroke : 2px #000000;
+ font-size : 40px;
+}
+
+h1, h2, h3 {
+ color : #206ead;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
diff --git a/examples/webkit/webkit-guide/css/form_tapper.css b/examples/webkit/webkit-guide/css/form_tapper.css
new file mode 100755
index 0000000000..75142b5b19
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/form_tapper.css
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* MOBILE UI */
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+body > section {
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ margin : 1em 1em 10em 1em;
+ min-height : 70%
+}
+
+h1, h2 {
+ margin-top : 1em;
+ font-size : smaller;
+ text-align : center;
+ padding-top : 1em;
+}
+
+h2 {
+ border-top : solid thin #dddddd;
+}
+
+/* FORM */
+
+form {
+ font-weight : bold;
+ font-size : small;
+}
+
+input[type=radio],
+input[type=checkbox] {
+ -webkit-appearance : button;
+ float : right;
+ margin-bottom : -2em;
+ opacity : 0;
+}
+
+label,
+input[type=radio],
+input[type=checkbox] {
+ width : 90%;
+ display : block;
+ padding : 0.5em;
+ height : 2em;
+}
+
+label {
+ padding-top : 0.5em;
+ border : medium solid #aaaaaa;
+ border-radius : 1.0em;
+}
+
+input[type=radio]:checked + label,
+input[type=checkbox]:checked + label {
+ border : medium solid green;
+}
+
+input[type=radio]:checked + label:after,
+input[type=checkbox]:checked + label:after {
+ float : right;
+ padding-right : 0.5em;
+ content : url(../img/icon_check_x24green.png);
+}
+
diff --git a/examples/webkit/webkit-guide/css/form_toggler.css b/examples/webkit/webkit-guide/css/form_toggler.css
new file mode 100755
index 0000000000..224053f834
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/form_toggler.css
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* MOBILE UI */
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+body > section {
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ margin : 1em 1em 10em 1em;
+ min-height : 70%
+}
+
+h1, h2 {
+ margin-top : 1em;
+ font-size : smaller;
+ text-align : center;
+ padding-top : 1em;
+}
+
+h2 {
+ border-top : solid thin #dddddd;
+}
+
+ /* FORM */
+
+form
+{
+ line-height : 250%;
+ font-weight : bold;
+ font-size : small;
+}
+
+ /* DEFAULT INPUT */
+
+input[type=radio],
+input[type=checkbox]
+{
+ text-align : right;
+ padding-top : 0.1em;
+ text-transform : uppercase;
+ float : right;
+ -webkit-appearance : button;
+ border : 0.25em #aaaaaa solid;
+ background : #aaaaaa;
+ background : -webkit-gradient(linear,center top,center bottom,from(#999999),to(#ffffff));
+ border-radius : 0.5em;
+ min-width : 6em;
+ height : 2em;
+ display : inline-block;
+}
+
+ /* CHECKED INPUT */
+
+input[type=radio]:checked,
+input[type=checkbox]:checked
+{
+ text-align : left;
+}
+
+ /* FLIPPED INPUT */
+
+input.invert
+{
+ text-align : left;
+}
+
+input.invert:checked
+{
+ text-align : right;
+}
+
+ /* DEFAULT TEXT */
+
+input[type=radio]:before,
+input[type=checkbox]:before
+{
+ color : #888888;
+ height : 1.4em;
+ display : inline-block;
+ background : pink;
+ background : -webkit-gradient(linear,center top,center bottom,from(pink),to(#ffffff));
+ min-width : 50%;
+ content : "off";
+ text-align : center;
+ font-weight : bold;
+ padding-left : 0.5em;
+ padding-right : 0.5em;
+ border-radius : 0.25em;
+}
+
+ /* CHECKED TEXT */
+
+input[type=radio]:checked:before,
+input[type=checkbox]:checked:before
+{
+ color : #ffffff;
+ content : "on";
+ background : #00aa00;
+ background : -webkit-gradient(linear,center top,center bottom,from(green),to(cyan));
+}
+
+ /* ALTERNATE DISPLAY */
+
+input.yn:before
+{
+ content : "no";
+}
+
+input.yn:checked:before
+{
+ content : "yes";
+}
+
+input.tf:before
+{
+ content : "false";
+}
+
+input.tf:checked:before
+{
+ content : "true";
+}
+
+ /* BINARY */
+
+input.binary {
+ display : inline-block;
+}
+
+input.binary:checked {
+ display : none;
+}
+
+input.binary:before {
+ background : #00aa00;
+ background : -webkit-gradient(linear,center top,center bottom,from(green),to(cyan));
+ color : #ffffff;
+}
+
+input.binary:nth-of-type(odd) {
+ text-align : left;
+}
+
+input.binary:nth-of-type(even) {
+ text-align : right;
+}
+
+ /* CUSTOM */
+
+input.ampm:nth-of-type(odd):before { content : "am"; }
+input.ampm:nth-of-type(even):before { content : "pm"; }
+
+input.sex:nth-of-type(odd):before { content : "male"; }
+input.sex:nth-of-type(even):before { content : "female"; }
+
+input.sex { width : 8em }
+
diff --git a/examples/webkit/webkit-guide/css/layout_link-fmt.css b/examples/webkit/webkit-guide/css/layout_link-fmt.css
new file mode 100755
index 0000000000..5a31aa0736
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/layout_link-fmt.css
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+p {
+ font-weight : normal;
+}
+
+a {
+ text-wrap : suppress;
+ -webkit-text-wrap : suppress;
+}
+
+article {
+ background : #ffffff;
+ position : absolute;
+ top : 1em;
+ left : 1em;
+ right : 1em;
+ padding : 1em;
+ border-radius : 1em;
+ margin-bottom : 2em;
+}
+
+ol {
+ padding-left : 1em;
+}
+
+ol.links {
+ margin-bottom : 1em;
+ border : #aaaaaa thin solid;
+ list-style : none;
+ padding-top : 0.5em;
+ padding-bottom : 0.5em;
+ padding-left : 0em;
+ border-radius : 1.0em;
+}
+
+ol.links > li {
+ min-height : 2em;
+ border-bottom : #aaaaaa thin solid;
+ padding-left : 0.5em;
+ padding-right : 0.5em;
+ padding-top : 0.5em;
+}
+
+ol.links > li:last-of-type {
+ border : none;
+}
+
+p a[href]:after {
+ -webkit-transform : scale(0.6);
+ -webkit-transform-origin : bottom;
+ padding-left : 0.25em;
+ padding-right : 0.0em;
+ display : inline-block;
+}
+
+a[href] {
+ text-decoration : none;
+}
+
+ol.links > li > a {
+ display : block;
+}
+
+ol.links a:after {
+ -webkit-transform : scale(0.8);
+ -webkit-transform-origin : top;
+}
+
+a[href^="http://"]:after, a[href^="https://"]:after {
+ content : url(../img/icon_link-external.png);
+}
+
+a[href^="mailto:"]:after { content : url(../img/icon_link-email.png); }
+
+a[href^="sms:"]:after { content : url(../img/icon_link-sms.png); }
+
+a[href^="tel:"]:after { content : url(../img/icon_link-tel.png); }
+
+a[href$=".doc"]:after { content : url(../img/icon_link-doc.png); }
+
+a[href$=".ppt"]:after { content : url(../img/icon_link-ppt.png); }
+
+a[href$=".rss"]:after,
+a[href$=".xml"]:after { content : url(../img/icon_link-rss.png); }
+
+a[href$=".pdf"]:after { content : url(../img/icon_link-pdf.png); }
+
+a[href$=".xls"]:after { content : url(../img/icon_link-xls.png); }
+
+ol.links a:after {
+ float : right;
+}
diff --git a/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css b/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css
new file mode 100755
index 0000000000..1205822e6d
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+}
+
+.mobile {
+ display : block;
+}
+
+.mobile > thead > th,
+.mobile > thead > tr {
+ display : none;
+}
+
+.mobile > tbody > tr {
+ display : none;
+ background : #ffffff;
+ padding : 0.5em;
+ padding-top : 0.5em;
+ border-radius : 0.25em;
+}
+
+.mobile > tbody > tr:target {
+ display : block;
+ border : medium solid #aaaaaa;
+}
+
+.mobile > tbody > tr:nth-of-type(1) {
+ padding-top : 0.5em;
+}
+
+.mobile td {
+ display : block;
+}
+
+.mobile td:before {
+ font-style : italic;
+ font-weight : bold;
+}
+
+.mobile td:nth-of-type(5n+1) {
+ font-weight : bold;
+ color : #206ead;
+}
+
+.mobile td:nth-of-type(5n+2):before {
+ content : 'Price: ';
+}
+.mobile td:nth-of-type(5n+3):before {
+ content : 'Location: ';
+}
+.mobile td:nth-of-type(5n+4):before {
+ content : 'Posted: ';
+}
+
+table th.nav {
+ display : none;
+}
+
+.mobile tbody th.nav {
+ display : block;
+ width : 36px;
+ float : right;
+}
+
+th.nav a {
+ display : inline-block;
+ width : 36px;
+ height : 36px;
+ background : #ffffff;
+ content : url(../img/icon_nav-up.png);
+ margin-bottom : 0.5em;
+}
+
+th.nav a:nth-of-type(even) {
+ -webkit-transform : rotate(180deg);
+}
+
+tr:first-of-type th.nav a:nth-of-type(odd),
+tr:last-of-type th.nav a:nth-of-type(even)
+{
+ content : url(../img/icon_dismiss.png);
+}
+
+tr th.nav a {
+ display : none;
+}
+
+tr:first-of-type th.nav a,
+tr:last-of-type th.nav a,
+tr:target th.nav a {
+ display : block;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 0.5em;
+ margin : 0.5em;
+ padding : 0.5em;
+}
+
+h1 {
+ margin-top : 0.5em;
+ text-align : center;
+ font-size : 18px;
+}
+
diff --git a/doc/src/snippets/declarative/animation-easing.qml b/examples/webkit/webkit-guide/css/mob_condjs.css
index 64ba44c6df..6e312926ec 100644..100755
--- a/doc/src/snippets/declarative/animation-easing.qml
+++ b/examples/webkit/webkit-guide/css/mob_condjs.css
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,15 +37,19 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-Rectangle {
- width: 100; height: 100
- color: "red"
-
- PropertyAnimation on x { to: 50; duration: 1000; easing.type: Easing.OutBounce }
- PropertyAnimation on y { to: 50; duration: 1000; easing.type: Easing.OutBounce }
+#js {
+ background : pink;
+ padding : 0.5em;
+ border-radius : 0.5em;
+}
+#js, #design {
+ padding : 0.5em;
+ border-radius : 0.5em;
+}
+#js {
+ background : pink;
+}
+#design {
+ background : lightgreen;
}
-//![0]
-
diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/examples/webkit/webkit-guide/css/mob_mediaquery.css
index b25accc16d..bbd0fbcc88 100644..100755
--- a/doc/src/snippets/declarative/qml-intro/rectangle.qml
+++ b/examples/webkit/webkit-guide/css/mob_mediaquery.css
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -38,13 +38,12 @@
**
****************************************************************************/
-//! [document]
-import QtQuick 1.0
+#design {
+ padding : 0.5em;
+ border-radius : 0.5em;
+ background : lightgreen;
+}
-// This is a comment. And below myRectangle is defined.
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
+#design {
+ background : lightgreen;
}
-//! [document]
diff --git a/examples/webkit/webkit-guide/css/mobile.css b/examples/webkit/webkit-guide/css/mobile.css
new file mode 100755
index 0000000000..5b9332c3ce
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mobile.css
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ width : 100;
+}
+
+body > section {
+ border-radius : 1em;
+ background : #ffffff;
+ border-radius : 1em;
+ padding : 1em;
+ background : #ffffff;
+ min-height : 70%
+}
+
+.hidden {
+ display : none;
+}
+
+.active {
+ color : blue;
+ cursor : pointer;
+ text-decoration : none;
+}
+
+.nav > a {
+ display : inline-block;
+ width : 48px;
+ height : 48px;
+}
+
+h1, h2 {
+ margin-top : 1em;
+ font-size : smaller;
+ text-align : center;
+ padding-top : 1em;
+}
+
+h2 {
+ border-top : solid thin #dddddd;
+}
+
diff --git a/examples/webkit/webkit-guide/css/mq_desktop.css b/examples/webkit/webkit-guide/css/mq_desktop.css
new file mode 100755
index 0000000000..32d49bfa63
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mq_desktop.css
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+#design:before {
+ content : "CSS thinks you are viewing this page with a full desktop browser."
+}
+
diff --git a/examples/webkit/webkit-guide/css/mq_mobile.css b/examples/webkit/webkit-guide/css/mq_mobile.css
new file mode 100755
index 0000000000..f1e87f67ce
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mq_mobile.css
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+#design:before {
+ content : "CSS thinks you are viewing this page with a non-touch mobile browser."
+}
diff --git a/examples/webkit/webkit-guide/css/mq_touch.css b/examples/webkit/webkit-guide/css/mq_touch.css
new file mode 100755
index 0000000000..3d2a5b6cd5
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mq_touch.css
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background : #aaaaaa;
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+h1,h2,h3,h4 {
+ text-align : center;
+}
+
+section {
+ position : absolute;
+ top : 0;
+ left : 0;
+ right : 0;
+ bottom : 0;
+}
+
+article {
+ background : #ffffff;
+ border-radius : 1.0em;
+ padding : 1.0em;
+ margin : 1em;
+ min-height : 50%;
+}
+
+#design:before {
+ content : "CSS thinks you are viewing this page with a touch-based mobile browser."
+}
diff --git a/examples/webkit/webkit-guide/css/mqlayout_desktop.css b/examples/webkit/webkit-guide/css/mqlayout_desktop.css
new file mode 100755
index 0000000000..0875732145
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mqlayout_desktop.css
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* Desktop UI */
+
+body {
+ font-family : sans-serif;
+ font-weight : bold;
+ min-width : 60em;
+}
+
+nav, body > section, header, footer {
+ border-radius : 0.5em;
+ padding : 0.5em;
+}
+
+nav, section {
+ min-height : 30em;
+}
+
+header {
+ background-color : pink;
+ height : 3em;
+ margin-bottom : 1em;
+}
+
+section#main {
+ background-color : lightgreen;
+ float : left;
+ margin-bottom : 1em;
+ margin-left : 2%;
+ min-width : 60%;
+}
+
+nav {
+ background-color : lightblue;
+ float : left;
+ margin-bottom : 1em;
+ width : 15%;
+}
+
+section#sidebar {
+ background-color : plum;
+ float : left;
+ margin-bottom : 1em;
+ margin-left : 2%;
+ width : 15%;
+}
+
+footer {
+ background-color : gold;
+ clear : both;
+ height : 3em;
+}
+
diff --git a/examples/webkit/webkit-guide/css/mqlayout_mobile.css b/examples/webkit/webkit-guide/css/mqlayout_mobile.css
new file mode 100755
index 0000000000..dcd4943749
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mqlayout_mobile.css
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* Mobile UI */
+
+body {
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+nav, body > section, header, footer {
+ padding : 0.5em;
+}
+
+header {
+ display : none;
+}
+
+section#main {
+ background-color : lightgreen;
+ margin-bottom : 1em;
+}
+
+nav:after {
+ float : right;
+ content : '[ICON]';
+}
+
+nav:before {
+ content : 'SIMPLE ';
+}
+
+nav {
+ background-color : lightblue;
+ margin-bottom : 1em;
+}
+
+section#sidebar {
+ display : none;
+}
+
+footer {
+ background-color : gold;
+}
+
diff --git a/examples/webkit/webkit-guide/css/mqlayout_touch.css b/examples/webkit/webkit-guide/css/mqlayout_touch.css
new file mode 100755
index 0000000000..78ed1741c3
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/mqlayout_touch.css
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+/* Touch UI */
+
+body {
+ font-family : sans-serif;
+ font-weight : bold;
+}
+
+nav, body > section, header, footer {
+ border-radius : 0.5em;
+ padding : 0.5em;
+}
+
+header {
+ background-color : pink;
+ margin-bottom : 1em;
+ float : left;
+ width : 30%;
+ height : 3em;
+}
+
+section#main {
+ background-color : lightgreen;
+ margin-bottom : 1em;
+ min-height : 20em;
+}
+
+nav:before {
+ content : 'TOUCH ';
+}
+
+nav {
+ background-color : lightblue;
+ margin-bottom : 1em;
+ margin-left : 40%;
+ max-width : 60%;
+ height : 3em;
+}
+
+section#sidebar {
+ display : none;
+}
+
+footer {
+ background-color : gold;
+}
+
diff --git a/examples/webkit/webkit-guide/css/storage.css b/examples/webkit/webkit-guide/css/storage.css
new file mode 100755
index 0000000000..a1f1a13921
--- /dev/null
+++ b/examples/webkit/webkit-guide/css/storage.css
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+
+body {
+ background-color : #aaaaaa;
+ font-family : sans-serif;
+ padding: 1em;
+}
+
+body.off > h1 {
+ background-color : pink;
+ background-image : url(../img/offline.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff))
+;
+}
+
+body.on > h1 {
+ background-color : lightgreen;
+ background-image : url(../img/online.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff))
+;
+}
+
+body.unknown > h1 {
+ background-image : url(../img/offline_idle.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff));
+}
+
+
+h1 {
+ background-color : #ffffff;
+ background-repeat : no-repeat;
+ background-position : 0.5em center, 0 0;
+ height : 1.25em;
+ border-radius : 0.5em;
+ margin : 0.0em;
+ padding : 0.5em;
+ text-align : center;
+ font-size : 18px;
+}
+
+form.show {
+ display : block;
+ z-index : 99;
+}
+
+form.hide {
+ display : none;
+}
+
+#cred {
+ background : #ffffff;
+ padding : 1em;
+ border-radius : 1.0em;
+ position : absolute;
+ left : 1.0em;;
+ right : 1.0em;;
+ top : 1.0em;;
+ bottom : 1.0em;;
+}
+
+#cred > input, #email > input {
+ height : 2.0em;
+ width : 95%;
+ border-radius : 0.5em;
+ padding-left : 0.5em;
+}
+
+#cred > img {
+ float : right;
+}
+
+#cred > div:first-of-type {
+ margin-top : 2em;
+}
+
+#cred > div, #email > div {
+ font-weight : bold;
+ margin : 0.5em;
+}
+
+#cred > input[type='submit'] {
+ background : lightgreen;
+ font-weight : bold;
+}
+
+#cred > input[type='submit']:active {
+ background : #777777;
+ color : #ffffff;
+}
+
+#cred > input.validate:invalid {
+ background : pink;
+}
+
+#cred > input.validate:invalid:after {
+ content : "need!";
+}
+
+#cred > input {
+ background : #ffffff;
+ -webkit-transition : all 1s linear;
+}
+
+#openform {
+ float : right;
+}
+
+#email {
+ background : #ffffff;
+ min-height : 6em;
+ margin-top : 1em;
+ border-radius : 0.5em;
+ padding : 0.5em;
+}
+
+textarea {
+ min-height : 10em;
+ width : 95%;
+ border-radius : 0.5em;
+}
+
diff --git a/examples/webkit/webkit-guide/css3_backgrounds.htm b/examples/webkit/webkit-guide/css3_backgrounds.htm
new file mode 100644
index 0000000000..0739830125
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_backgrounds.htm
@@ -0,0 +1,87 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Accordion Tabs</title>
+<link href='css/css3_backgrounds.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<h3>Accordion Tabs</h3>
+<dl class="accordion">
+<dt>Option 1</dt>
+<dd>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
+minim veniam, quis nostrud exercitation ullamco laboris nisi ut
+aliquip ex ea commodo consequat.
+</dd>
+<dt>Option 2</dt>
+<dd>
+Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet,
+consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
+labore et dolore magna aliqua.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
+minim veniam, quis nostrud exercitation ullamco laboris nisi ut
+aliquip ex ea commodo consequat.
+</dd>
+<dt>Option 3</dt>
+<dd>
+Lorem ipsum dolor sit amet, quis nostrud exercitation ullamco laboris
+nisi ut aliquip ex ea commodo consequat.
+</dd>
+<dt>Option 4</dt>
+<dd>
+Lorem ipsum dolor sit amet, sed do eiusmod tempor incididunt ut labore
+et dolore magna aliqua. Ut enim ad minim veniam, consectetur
+adipisicing elit, quis nostrud exercitation ullamco laboris nisi ut
+aliquip ex ea commodo consequat. Consectetur adipisicing elit, ut
+enim ad minim veniam, sed do eiusmod tempor incididunt ut labore et
+dolore magna aliqua.
+</dd>
+</dl>
+<script src="js/css3_backgrounds.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
+
diff --git a/examples/webkit/webkit-guide/css3_border-img.htm b/examples/webkit/webkit-guide/css3_border-img.htm
new file mode 100644
index 0000000000..b991104f86
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_border-img.htm
@@ -0,0 +1,78 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>border-image</title>
+<link href='css/css3_border-img.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>border-image</h3>
+
+<p>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante.
+</p>
+
+<div class="fruit">
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus.
+
+</div>
+
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque.
+</p>
+
+</article>
+</section>
+<script src="js/css3_border-img.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_grad-radial.htm b/examples/webkit/webkit-guide/css3_grad-radial.htm
new file mode 100644
index 0000000000..3bbb7f0be1
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_grad-radial.htm
@@ -0,0 +1,61 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Radial Gradient</title>
+<link href='css/css3_grad-radial.css' type='text/css' rel='stylesheet'/>
+<style id="localStyles"></style>
+</head>
+<body>
+<section>
+<article id="main">
+<h3>Radial Gradient</h3>
+
+Touch within the main content area.
+
+</article>
+</section>
+<script src="js/css3_grad-radial.js">
+</script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_gradientBack.htm b/examples/webkit/webkit-guide/css3_gradientBack.htm
new file mode 100644
index 0000000000..1d025cf730
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_gradientBack.htm
@@ -0,0 +1,79 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Background Gradient</title>
+<link href='css/css3_gradientBack.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h4>Background Gradient</h4>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_gradientBackStop.htm b/examples/webkit/webkit-guide/css3_gradientBackStop.htm
new file mode 100644
index 0000000000..4558fe3466
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_gradientBackStop.htm
@@ -0,0 +1,92 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Background Gradient + stop-color</title>
+<link href='css/css3_gradientBackStop.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h4>Background Gradient<br/>with stop-color</h4>
+
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p><p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_gradientButton.htm b/examples/webkit/webkit-guide/css3_gradientButton.htm
new file mode 100644
index 0000000000..c765e45590
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_gradientButton.htm
@@ -0,0 +1,66 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Beveled Buttons</title>
+<link href='css/css3_gradientButton.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<article>
+<h3>Beveled Buttons</h3>
+<ul>
+<li><a href="#">Option 1</a></li>
+<li><a href="#">Option 2</a></li>
+<li><a href="#">Option 3</a></li>
+<li><a href="#">Option 4</a></li>
+<li><a href="#">Option 5</a></li>
+<li><a href="#">Option 6</a></li>
+<li><a href="#">Option 7</a></li>
+<li><a href="#">Option 8</a></li>
+<li><a href="#">Option 9</a></li>
+</ul>
+<p>&nbsp;</p>
+
+</article>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_mask-grad.htm b/examples/webkit/webkit-guide/css3_mask-grad.htm
new file mode 100644
index 0000000000..9014e5d5d9
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_mask-grad.htm
@@ -0,0 +1,66 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Webkit Masks</title>
+<link href='css/css3_mask-grad.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>Webkit Masks</h3>
+
+<img src="img/tnail_gal1.png"/>
+<img src="img/tnail_gal2.png"/>
+<img src="img/tnail_gal3.png"/>
+<img src="img/tnail_gal4.png"/>
+<img src="img/tnail_gal5.png"/>
+<img src="img/tnail_gal6.png"/>
+<img src="img/tnail_gal7.png"/>
+<img src="img/tnail_gal8.png"/>
+
+</article>
+</section>
+<script src="js/css3_mask-grad.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_mask-img.htm b/examples/webkit/webkit-guide/css3_mask-img.htm
new file mode 100644
index 0000000000..c102e96a1a
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_mask-img.htm
@@ -0,0 +1,56 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Webkit Masks</title>
+<link href='css/css3_mask-img.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<img src="img/gal3.jpg" width="240" height="360"/>
+</article>
+</section>
+<script src="js/css3_mask-img.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_multicol.htm b/examples/webkit/webkit-guide/css3_multicol.htm
new file mode 100644
index 0000000000..4b3fb6a792
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_multicol.htm
@@ -0,0 +1,91 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Animated Banners</title>
+<link href='css/css3_multicol.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>Animated Banners</h3>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+
+</article>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+</section>
+
+<nav class="ad">
+<a href="#">Item #1</a><a href="#">Item #2</a><a href="#">Item #3</a><a href="#">Item #4</a><a href="#">Item #5</a>
+</nav>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_reflect.htm b/examples/webkit/webkit-guide/css3_reflect.htm
new file mode 100644
index 0000000000..97e6ee20ce
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_reflect.htm
@@ -0,0 +1,100 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Webkit Reflections</title>
+<link href='css/css3_reflect.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="main">
+<article>
+<h1>Webkit Reflections</h1>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque.
+</p>
+
+<figure>
+<img src="img/land5.jpg">
+</figure>
+
+<p>Aliquam erat volutpat. Mauris tempor, urna at dignissim
+pellentesque, velit lacus dictum sem, non porttitor felis nulla nec
+risus. Donec a massa felis, a congue purus. Nullam et turpis
+diam. Aenean vestibulum egestas metus, eu sodales dolor venenatis
+quis. Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</p>
+
+<h2>Webkit Reflections</h2>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+<h3>Webkit Reflections</h3>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_scroll.htm b/examples/webkit/webkit-guide/css3_scroll.htm
new file mode 100644
index 0000000000..c2d3ea7b08
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_scroll.htm
@@ -0,0 +1,94 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Custom Scrollbars</title>
+<link href='css/css3_scroll.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>Custom Scrollbars</h3>
+
+<p>
+Unlike standard text, linebreaks cannot appear arbitrarily within
+blocks of code. Wide lines may be difficult to read within a
+narrow-screen mobile interface:
+</p>
+
+<pre>
+window.onload = function() {
+ var aside = document.querySelector('#related');
+ document.querySelector('#main').addEventListener('mouseup', function(event){
+ var thresholdDec = 0.5;
+ var totalHeight = event.currentTarget.scrollHeight;
+ var tapHeight = event.layerY;
+ var tapHeightDec = tapHeight / totalHeight;
+ var minHeight = 360;
+ if ( tapHeight < minHeight ) aside.className = '';
+ if (tapHeightDec > thresholdDec ) {
+ aside.className = 'visible';
+ }
+ else {
+ aside.className = '';
+ }
+ });
+};
+</pre>
+
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+
+</article>
+</section>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_sel-nth.htm b/examples/webkit/webkit-guide/css3_sel-nth.htm
new file mode 100644
index 0000000000..29f0605d05
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_sel-nth.htm
@@ -0,0 +1,80 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>CSS-only Grid Layout</title>
+<link href='css/css3_sel-nth.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+
+<img src="img/ic_ag_048.png"/>
+<img src="img/ic_al_048.png"/>
+<img src="img/ic_ar_048.png"/>
+<img src="img/ic_be_048.png"/>
+<img src="img/ic_b_048.png"/>
+<img src="img/ic_ca_048.png"/>
+<img src="img/ic_cl_048.png"/>
+<img src="img/ic_cu_048.png"/>
+<img src="img/ic_c_048.png"/>
+<img src="img/ic_fe_048.png"/>
+<img src="img/ic_f_048.png"/>
+<img src="img/ic_he_048.png"/>
+<img src="img/ic_h_048.png"/>
+<img src="img/ic_k_048.png"/>
+<img src="img/ic_li_048.png"/>
+<img src="img/ic_mg_048.png"/>
+<img src="img/ic_na_048.png"/>
+<img src="img/ic_ne_048.png"/>
+<img src="img/ic_ni_048.png"/>
+<img src="img/ic_n_048.png"/>
+<img src="img/ic_o_048.png"/>
+<img src="img/ic_pt_048.png"/>
+<img src="img/ic_si_048.png"/>
+<img src="img/ic_zn_048.png"/>
+
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_shadow.htm b/examples/webkit/webkit-guide/css3_shadow.htm
new file mode 100644
index 0000000000..7028047983
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_shadow.htm
@@ -0,0 +1,78 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Navigation Icon Feedback</title>
+<link href='css/css3_shadow.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section class="nav">
+<nav>
+<a class="nav1" href="#"></a>
+<a class="nav2" href="#"></a>
+<a class="nav3" href="#"></a>
+<a class="nav4" href="#"></a>
+<a class="nav5" href="#"></a>
+<a class="nav6" href="#"></a>
+<span id="force_justify">&nbsp;</span>
+</nav>
+</section>
+<section class="main">
+<article>
+<h1>Navigation Icon Feedback</h1>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu
+sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor,
+urna at dignissim pellentesque, velit lacus dictum sem, non porttitor
+felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_text-overflow.htm b/examples/webkit/webkit-guide/css3_text-overflow.htm
new file mode 100644
index 0000000000..d56ac778b6
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_text-overflow.htm
@@ -0,0 +1,117 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>text-overflow</title>
+<link href='css/css3_text-overflow.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>text-overflow</h3>
+
+<ul class="accordion">
+<li id="l1">
+<div class="dismiss"></div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus. Mauris tempor, urna at dignissim pellentesque, velit lacus
+dictum sem, non porttitor felis nulla nec risus.
+</li>
+<li id="l2">
+<div class="dismiss"></div>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante,
+id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh
+faucibus pellentesque. Aliquam erat volutpat. Donec a massa felis, a
+congue purus. Nullam et turpis diam. Aenean vestibulum egestas metus,
+eu sodales dolor venenatis quis. Aenean augue orci, facilisis et
+convallis ut, egestas at neque.
+</li>
+<li id="l3">
+<div class="dismiss"></div>
+Donec a massa felis, a congue purus. Nullam et turpis diam. Aenean
+vestibulum egestas metus, eu sodales dolor venenatis quis. Aenean
+augue orci, facilisis et convallis ut, egestas at neque. Lorem ipsum
+dolor sit amet, consectetur adipiscing elit. Donec feugiat gravida
+viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus ac
+tellus.
+</li>
+<li id="l4">
+<div class="dismiss"></div>
+Aenean vestibulum egestas metus, eu sodales dolor venenatis quis.
+Aenean augue orci, facilisis et convallis ut, egestas at neque.
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
+Donec a massa felis, a congue purus.
+</li>
+<li id="l5">
+<div class="dismiss"></div>
+Nullam et turpis diam. Vivamus ipsum felis, cursus sed venenatis nec,
+tempus ac tellus. Lorem ipsum dolor sit amet, consectetur adipiscing
+elit. Donec a massa felis, a congue purus. Aenean vestibulum egestas
+metus, eu sodales dolor venenatis quis. Donec feugiat gravida
+viverra. Praesent luctus, risus eu vestibulum mollis, arcu mauris
+mollis ante, id mollis risus lectus ornare nisl.
+</li>
+<li id="l6">
+<div class="dismiss"></div>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
+Aenean elementum arcu sed nibh faucibus pellentesque. Aliquam erat
+volutpat.
+Donec a massa felis, a congue purus.
+Aenean vestibulum egestas metus, eu sodales dolor venenatis quis.
+</li>
+<li id="l7">
+<div class="dismiss"></div>
+Donec feugiat gravida viverra. Praesent luctus, risus eu vestibulum
+mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl.
+Aliquam erat volutpat. Nullam et turpis diam. Aenean augue orci,
+facilisis et convallis ut, egestas at neque.
+</li>
+</ul>
+
+</article>
+</section>
+<script src="js/css3_text-overflow.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_text-shadow.htm b/examples/webkit/webkit-guide/css3_text-shadow.htm
new file mode 100644
index 0000000000..60e2d22471
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_text-shadow.htm
@@ -0,0 +1,74 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Text Shadow</title>
+<link href='css/css3_text-shadow.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h1>Text Shadow</h1>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus.
+</p>
+<h2>Subhead</h2>
+<p>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante,
+id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh
+faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, urna at
+dignissim pellentesque, velit lacus dictum sem, non porttitor felis
+nulla nec risus. Donec a massa felis, a congue purus. Nullam et turpis
+diam.
+</p>
+<h3>Subhead</h3>
+<p>
+Aenean vestibulum egestas metus, eu sodales dolor venenatis
+quis. Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/css3_text-stroke.htm b/examples/webkit/webkit-guide/css3_text-stroke.htm
new file mode 100644
index 0000000000..25dfb1c4aa
--- /dev/null
+++ b/examples/webkit/webkit-guide/css3_text-stroke.htm
@@ -0,0 +1,74 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Text Stroke</title>
+<link href='css/css3_text-stroke.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h1>Text Stroke</h1>
+<p>
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus.
+</p>
+<h2>Subhead</h2>
+<p>
+Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante,
+id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh
+faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, urna at
+dignissim pellentesque, velit lacus dictum sem, non porttitor felis
+nulla nec risus. Donec a massa felis, a congue purus. Nullam et turpis
+diam.
+</p>
+<h3>Subhead</h3>
+<p>
+Aenean vestibulum egestas metus, eu sodales dolor venenatis
+quis. Aenean augue orci, facilisis et convallis ut, egestas at neque.
+</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/form_tapper.htm b/examples/webkit/webkit-guide/form_tapper.htm
new file mode 100644
index 0000000000..94751dc9a3
--- /dev/null
+++ b/examples/webkit/webkit-guide/form_tapper.htm
@@ -0,0 +1,74 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>CSS-only Tap Button Inputs</title>
+<link href='css/form_tapper.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<h1>CSS-only Tap Button Inputs</h1>
+<form>
+<h2>radio</h2>
+<input type="radio" name="radio_basic" value="one"/>
+<label>Option One</label>
+<br/>
+<input type="radio" name="radio_basic" value="two"/>
+<label>Option Two</label>
+<br/>
+<input type="radio" name="radio_basic" value="three"/>
+<label>Option Three</label>
+<h2>checkbox</h2>
+<input type="checkbox" name="checkbox_basic" value="one"/>
+<label>Option One</label>
+<br/>
+<input type="checkbox" name="checkbox_basic" value="two"/>
+<label>Option Two</label>
+<br/>
+<input type="checkbox" name="checkbox_basic" value="three"/>
+<label>Option Three</label>
+</form>
+</section>
+<script src="js/form_tapper.js"></script>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/form_toggler.htm b/examples/webkit/webkit-guide/form_toggler.htm
new file mode 100644
index 0000000000..f4b170253e
--- /dev/null
+++ b/examples/webkit/webkit-guide/form_toggler.htm
@@ -0,0 +1,140 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>CSS-only Toggle Button Inputs</title>
+<link href='css/form_toggler.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<h1>CSS-only Toggle Button Inputs</h1>
+<form>
+<h2>radio (default)</h2>
+<label>Option One</label>
+<input type="radio" name="radio_basic" value="one"/>
+<br/>
+<label>Option Two</label>
+<input type="radio" name="radio_basic" value="two"/>
+<br/>
+<label>Option Three</label>
+<input type="radio" name="radio_basic" value="three"/>
+<h2>checkbox (default)</h2>
+<input type="checkbox" name="checkbox_basic" value="one"/>
+<label>Option One</label>
+<br/>
+<input type="checkbox" name="checkbox_basic" value="two"/>
+<label>Option Two</label>
+<br/>
+<input type="checkbox" name="checkbox_basic" value="three"/>
+<label>Option Three</label>
+<h2>radio class="invert"</h2>
+<label>Option One</label>
+<input class="invert" type="radio" name="radio_invert" value="one"/>
+<br/>
+<label>Option Two</label>
+<input class="invert" type="radio" name="radio_invert" value="two"/>
+<br/>
+<label>Option Three</label>
+<input class="invert" type="radio" name="radio_invert" value="three"/>
+<h2>checkbox class="invert"</h2>
+<input class="invert" type="checkbox" name="checkbox_invert" value="one"/>
+<label>Option One</label>
+<br/>
+<input class="invert" type="checkbox" name="checkbox_invert" value="two"/>
+<label>Option Two</label>
+<br/>
+<input class="invert" type="checkbox" name="checkbox_invert" value="three"/>
+<label>Option Three</label>
+<h2>radio class="yn"</h2>
+<label>Option One</label>
+<input class="yn" type="radio" name="radio_yn" value="one"/>
+<br/>
+<label>Option Two</label>
+<input class="yn" type="radio" name="radio_yn" value="two"/>
+<br/>
+<label>Option Three</label>
+<input class="yn" type="radio" name="radio_yn" value="three"/>
+<h2>checkbox class="yn"</h2>
+<input class="yn" type="checkbox" name="checkbox_yn" value="one"/>
+<label>Option One</label>
+<br/>
+<input class="yn" type="checkbox" name="checkbox_yn" value="two"/>
+<label>Option Two</label>
+<br/>
+<input class="yn" type="checkbox" name="checkbox_yn" value="three"/>
+<label>Option Three</label>
+<h2>radio class="tf"</h2>
+<label>Option One</label>
+<input class="tf" type="radio" name="radio_tf" value="one"/>
+<br/>
+<label>Option Two</label>
+<input class="tf" type="radio" name="radio_tf" value="two"/>
+<br/>
+<label>Option Three</label>
+<input class="tf" type="radio" name="radio_tf" value="three"/>
+<h2>checkbox class="tf"</h2>
+<input class="tf" type="checkbox" name="checkbox_tf" value="one"/>
+<label>Option One</label>
+<br/>
+<input class="tf" type="checkbox" name="checkbox_tf" value="two"/>
+<label>Option Two</label>
+<br/>
+<input class="tf" type="checkbox" name="checkbox_tf" value="three"/>
+<label>Option Three</label>
+<h2>radio class="binary"</h2>
+<label>Time of Day</label>
+<input class="binary ampm" type="radio" name="radio_binary" value="am"/>
+<input class="binary ampm" type="radio" name="radio_binary" value="pm" checked/>
+<br/>
+<label>Sex</label>
+<input class="binary sex" type="radio" name="radio_sex" value="male" checked/>
+<input class="binary sex" type="radio" name="radio_sex" value="female"/>
+<br/>
+<br/>
+<p>(These use custom button values)</p>
+<br/>
+<br/>
+</form>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/img/border-frame.png b/examples/webkit/webkit-guide/img/border-frame.png
new file mode 100755
index 0000000000..7a0894cabc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/border-frame.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal1.jpg b/examples/webkit/webkit-guide/img/gal1.jpg
new file mode 100644
index 0000000000..8f9edcb2ca
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal1.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal2.jpg b/examples/webkit/webkit-guide/img/gal2.jpg
new file mode 100644
index 0000000000..a2301ef22f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal2.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal3.jpg b/examples/webkit/webkit-guide/img/gal3.jpg
new file mode 100644
index 0000000000..a768530a8c
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal3.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal4.jpg b/examples/webkit/webkit-guide/img/gal4.jpg
new file mode 100644
index 0000000000..96c00015c0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal4.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal5.jpg b/examples/webkit/webkit-guide/img/gal5.jpg
new file mode 100644
index 0000000000..6ec78fc43a
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal5.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal6.jpg b/examples/webkit/webkit-guide/img/gal6.jpg
new file mode 100644
index 0000000000..25eb95cb22
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal6.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal7.jpg b/examples/webkit/webkit-guide/img/gal7.jpg
new file mode 100644
index 0000000000..b9fda2fb9d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal7.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gal8.jpg b/examples/webkit/webkit-guide/img/gal8.jpg
new file mode 100644
index 0000000000..c23e2260c3
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gal8.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gradient.jpg b/examples/webkit/webkit-guide/img/gradient.jpg
new file mode 100755
index 0000000000..014386e275
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gradient.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/gray_icon_close.png b/examples/webkit/webkit-guide/img/gray_icon_close.png
new file mode 100755
index 0000000000..8e7450153e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/gray_icon_close.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_016.png b/examples/webkit/webkit-guide/img/ic_ag_016.png
new file mode 100755
index 0000000000..bb961cb393
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ag_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_032.png b/examples/webkit/webkit-guide/img/ic_ag_032.png
new file mode 100755
index 0000000000..edb051f50e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ag_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_036.png b/examples/webkit/webkit-guide/img/ic_ag_036.png
new file mode 100755
index 0000000000..e555e92071
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ag_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ag_048.png b/examples/webkit/webkit-guide/img/ic_ag_048.png
new file mode 100755
index 0000000000..d2d417da2e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ag_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_016.png b/examples/webkit/webkit-guide/img/ic_al_016.png
new file mode 100755
index 0000000000..0f1c0240fb
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_al_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_032.png b/examples/webkit/webkit-guide/img/ic_al_032.png
new file mode 100755
index 0000000000..5727a5104e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_al_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_036.png b/examples/webkit/webkit-guide/img/ic_al_036.png
new file mode 100755
index 0000000000..76382779b8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_al_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_al_048.png b/examples/webkit/webkit-guide/img/ic_al_048.png
new file mode 100755
index 0000000000..9671d86944
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_al_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_016.png b/examples/webkit/webkit-guide/img/ic_ar_016.png
new file mode 100755
index 0000000000..fa91e96dca
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ar_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_032.png b/examples/webkit/webkit-guide/img/ic_ar_032.png
new file mode 100755
index 0000000000..d899c41fdb
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ar_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_036.png b/examples/webkit/webkit-guide/img/ic_ar_036.png
new file mode 100755
index 0000000000..836593f4bc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ar_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ar_048.png b/examples/webkit/webkit-guide/img/ic_ar_048.png
new file mode 100755
index 0000000000..e1c77aca74
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ar_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_016.png b/examples/webkit/webkit-guide/img/ic_b_016.png
new file mode 100755
index 0000000000..a0ebdf7964
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_b_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_032.png b/examples/webkit/webkit-guide/img/ic_b_032.png
new file mode 100755
index 0000000000..f5571f2bb9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_b_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_036.png b/examples/webkit/webkit-guide/img/ic_b_036.png
new file mode 100755
index 0000000000..4aff7eb601
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_b_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_b_048.png b/examples/webkit/webkit-guide/img/ic_b_048.png
new file mode 100755
index 0000000000..b84434cec4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_b_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_016.png b/examples/webkit/webkit-guide/img/ic_be_016.png
new file mode 100755
index 0000000000..0297cd827d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_be_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_032.png b/examples/webkit/webkit-guide/img/ic_be_032.png
new file mode 100755
index 0000000000..5c5b9cd9e1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_be_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_036.png b/examples/webkit/webkit-guide/img/ic_be_036.png
new file mode 100755
index 0000000000..96ec4bb4ca
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_be_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_be_048.png b/examples/webkit/webkit-guide/img/ic_be_048.png
new file mode 100755
index 0000000000..afcdf183dd
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_be_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_016.png b/examples/webkit/webkit-guide/img/ic_c_016.png
new file mode 100755
index 0000000000..a3cc4cfadf
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_c_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_032.png b/examples/webkit/webkit-guide/img/ic_c_032.png
new file mode 100755
index 0000000000..404babecf1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_c_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_036.png b/examples/webkit/webkit-guide/img/ic_c_036.png
new file mode 100755
index 0000000000..78d71500d9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_c_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_c_048.png b/examples/webkit/webkit-guide/img/ic_c_048.png
new file mode 100755
index 0000000000..73462ad394
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_c_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_016.png b/examples/webkit/webkit-guide/img/ic_ca_016.png
new file mode 100755
index 0000000000..af4c37b0e5
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ca_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_032.png b/examples/webkit/webkit-guide/img/ic_ca_032.png
new file mode 100755
index 0000000000..6ac8db4ce6
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ca_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_036.png b/examples/webkit/webkit-guide/img/ic_ca_036.png
new file mode 100755
index 0000000000..19988c165d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ca_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ca_048.png b/examples/webkit/webkit-guide/img/ic_ca_048.png
new file mode 100755
index 0000000000..0349061038
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ca_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_016.png b/examples/webkit/webkit-guide/img/ic_cl_016.png
new file mode 100755
index 0000000000..e9b421e70c
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cl_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_032.png b/examples/webkit/webkit-guide/img/ic_cl_032.png
new file mode 100755
index 0000000000..f5968d5dfe
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cl_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_036.png b/examples/webkit/webkit-guide/img/ic_cl_036.png
new file mode 100755
index 0000000000..2a6721d780
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cl_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cl_048.png b/examples/webkit/webkit-guide/img/ic_cl_048.png
new file mode 100755
index 0000000000..f32981fe81
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cl_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_016.png b/examples/webkit/webkit-guide/img/ic_cu_016.png
new file mode 100755
index 0000000000..129f99ffd1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cu_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_032.png b/examples/webkit/webkit-guide/img/ic_cu_032.png
new file mode 100755
index 0000000000..a07933ea68
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cu_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_036.png b/examples/webkit/webkit-guide/img/ic_cu_036.png
new file mode 100755
index 0000000000..5eb6ed6363
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cu_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_cu_048.png b/examples/webkit/webkit-guide/img/ic_cu_048.png
new file mode 100755
index 0000000000..f21593cf78
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_cu_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_016.png b/examples/webkit/webkit-guide/img/ic_f_016.png
new file mode 100755
index 0000000000..ff2e3fb5f4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_f_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_032.png b/examples/webkit/webkit-guide/img/ic_f_032.png
new file mode 100755
index 0000000000..3424799317
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_f_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_036.png b/examples/webkit/webkit-guide/img/ic_f_036.png
new file mode 100755
index 0000000000..019b7032a6
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_f_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_f_048.png b/examples/webkit/webkit-guide/img/ic_f_048.png
new file mode 100755
index 0000000000..567d30310a
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_f_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_016.png b/examples/webkit/webkit-guide/img/ic_fe_016.png
new file mode 100755
index 0000000000..e6d9b829b9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_fe_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_032.png b/examples/webkit/webkit-guide/img/ic_fe_032.png
new file mode 100755
index 0000000000..f2b4e4b417
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_fe_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_036.png b/examples/webkit/webkit-guide/img/ic_fe_036.png
new file mode 100755
index 0000000000..2aa81b5fec
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_fe_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_fe_048.png b/examples/webkit/webkit-guide/img/ic_fe_048.png
new file mode 100755
index 0000000000..b6914735d9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_fe_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_016.png b/examples/webkit/webkit-guide/img/ic_h_016.png
new file mode 100755
index 0000000000..957a1ffabe
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_h_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_032.png b/examples/webkit/webkit-guide/img/ic_h_032.png
new file mode 100755
index 0000000000..824620d4a2
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_h_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_036.png b/examples/webkit/webkit-guide/img/ic_h_036.png
new file mode 100755
index 0000000000..fba59a5d27
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_h_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_h_048.png b/examples/webkit/webkit-guide/img/ic_h_048.png
new file mode 100755
index 0000000000..f75822c3aa
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_h_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_016.png b/examples/webkit/webkit-guide/img/ic_he_016.png
new file mode 100755
index 0000000000..33fe83677f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_he_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_032.png b/examples/webkit/webkit-guide/img/ic_he_032.png
new file mode 100755
index 0000000000..425c525b69
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_he_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_036.png b/examples/webkit/webkit-guide/img/ic_he_036.png
new file mode 100755
index 0000000000..a976aece8b
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_he_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_he_048.png b/examples/webkit/webkit-guide/img/ic_he_048.png
new file mode 100755
index 0000000000..f8f9d4d853
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_he_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_016.png b/examples/webkit/webkit-guide/img/ic_k_016.png
new file mode 100755
index 0000000000..860bd62f96
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_k_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_032.png b/examples/webkit/webkit-guide/img/ic_k_032.png
new file mode 100755
index 0000000000..a14f2c65e9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_k_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_036.png b/examples/webkit/webkit-guide/img/ic_k_036.png
new file mode 100755
index 0000000000..49f19e6df0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_k_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_k_048.png b/examples/webkit/webkit-guide/img/ic_k_048.png
new file mode 100755
index 0000000000..a7515cd782
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_k_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_016.png b/examples/webkit/webkit-guide/img/ic_li_016.png
new file mode 100755
index 0000000000..c16d81a4bc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_li_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_032.png b/examples/webkit/webkit-guide/img/ic_li_032.png
new file mode 100755
index 0000000000..3a34f37066
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_li_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_036.png b/examples/webkit/webkit-guide/img/ic_li_036.png
new file mode 100755
index 0000000000..e5b97a7a2e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_li_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_li_048.png b/examples/webkit/webkit-guide/img/ic_li_048.png
new file mode 100755
index 0000000000..7b030e4cd7
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_li_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_016.png b/examples/webkit/webkit-guide/img/ic_mg_016.png
new file mode 100755
index 0000000000..2606336415
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_mg_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_032.png b/examples/webkit/webkit-guide/img/ic_mg_032.png
new file mode 100755
index 0000000000..2f9d03e6b0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_mg_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_036.png b/examples/webkit/webkit-guide/img/ic_mg_036.png
new file mode 100755
index 0000000000..584078db84
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_mg_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_mg_048.png b/examples/webkit/webkit-guide/img/ic_mg_048.png
new file mode 100755
index 0000000000..8cd2f3acc7
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_mg_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_016.png b/examples/webkit/webkit-guide/img/ic_n_016.png
new file mode 100755
index 0000000000..90e8f9fec9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_n_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_032.png b/examples/webkit/webkit-guide/img/ic_n_032.png
new file mode 100755
index 0000000000..afeb47a105
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_n_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_036.png b/examples/webkit/webkit-guide/img/ic_n_036.png
new file mode 100755
index 0000000000..0b7a11deed
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_n_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_n_048.png b/examples/webkit/webkit-guide/img/ic_n_048.png
new file mode 100755
index 0000000000..c0d7c0699e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_n_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_016.png b/examples/webkit/webkit-guide/img/ic_na_016.png
new file mode 100755
index 0000000000..7888d0f9c0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_na_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_032.png b/examples/webkit/webkit-guide/img/ic_na_032.png
new file mode 100755
index 0000000000..801ddca50b
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_na_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_036.png b/examples/webkit/webkit-guide/img/ic_na_036.png
new file mode 100755
index 0000000000..a6878d45d7
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_na_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_na_048.png b/examples/webkit/webkit-guide/img/ic_na_048.png
new file mode 100755
index 0000000000..76adaf479c
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_na_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_016.png b/examples/webkit/webkit-guide/img/ic_ne_016.png
new file mode 100755
index 0000000000..64562fc2d5
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ne_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_032.png b/examples/webkit/webkit-guide/img/ic_ne_032.png
new file mode 100755
index 0000000000..fab5cd8fcb
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ne_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_036.png b/examples/webkit/webkit-guide/img/ic_ne_036.png
new file mode 100755
index 0000000000..41092bf3e7
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ne_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ne_048.png b/examples/webkit/webkit-guide/img/ic_ne_048.png
new file mode 100755
index 0000000000..4ec0db0806
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ne_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_016.png b/examples/webkit/webkit-guide/img/ic_ni_016.png
new file mode 100755
index 0000000000..9b88e368a2
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ni_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_032.png b/examples/webkit/webkit-guide/img/ic_ni_032.png
new file mode 100755
index 0000000000..fc4fcf3ebc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ni_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_036.png b/examples/webkit/webkit-guide/img/ic_ni_036.png
new file mode 100755
index 0000000000..9d527470bb
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ni_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_ni_048.png b/examples/webkit/webkit-guide/img/ic_ni_048.png
new file mode 100755
index 0000000000..b563c50361
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_ni_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_016.png b/examples/webkit/webkit-guide/img/ic_o_016.png
new file mode 100755
index 0000000000..a95460d457
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_o_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_032.png b/examples/webkit/webkit-guide/img/ic_o_032.png
new file mode 100755
index 0000000000..1d4864dded
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_o_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_036.png b/examples/webkit/webkit-guide/img/ic_o_036.png
new file mode 100755
index 0000000000..7f5dd02ed2
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_o_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_o_048.png b/examples/webkit/webkit-guide/img/ic_o_048.png
new file mode 100755
index 0000000000..7461a8e9e4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_o_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_016.png b/examples/webkit/webkit-guide/img/ic_pt_016.png
new file mode 100755
index 0000000000..513eb97a30
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_pt_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_032.png b/examples/webkit/webkit-guide/img/ic_pt_032.png
new file mode 100755
index 0000000000..1550c399c8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_pt_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_036.png b/examples/webkit/webkit-guide/img/ic_pt_036.png
new file mode 100755
index 0000000000..7eec4d0ce4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_pt_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_pt_048.png b/examples/webkit/webkit-guide/img/ic_pt_048.png
new file mode 100755
index 0000000000..50dece6610
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_pt_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_016.png b/examples/webkit/webkit-guide/img/ic_si_016.png
new file mode 100755
index 0000000000..e639b683ae
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_si_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_032.png b/examples/webkit/webkit-guide/img/ic_si_032.png
new file mode 100755
index 0000000000..8657e6276f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_si_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_036.png b/examples/webkit/webkit-guide/img/ic_si_036.png
new file mode 100755
index 0000000000..ffe0ee27fc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_si_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_si_048.png b/examples/webkit/webkit-guide/img/ic_si_048.png
new file mode 100755
index 0000000000..5b9400dbdc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_si_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_016.png b/examples/webkit/webkit-guide/img/ic_zn_016.png
new file mode 100755
index 0000000000..11e5705130
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_zn_016.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_032.png b/examples/webkit/webkit-guide/img/ic_zn_032.png
new file mode 100755
index 0000000000..cb78a5c139
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_zn_032.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_036.png b/examples/webkit/webkit-guide/img/ic_zn_036.png
new file mode 100755
index 0000000000..66abffd40d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_zn_036.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/ic_zn_048.png b/examples/webkit/webkit-guide/img/ic_zn_048.png
new file mode 100755
index 0000000000..d8361ad6c0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/ic_zn_048.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_check.png b/examples/webkit/webkit-guide/img/icon_check.png
new file mode 100755
index 0000000000..294b62d24d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_check.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_check_x24green.png b/examples/webkit/webkit-guide/img/icon_check_x24green.png
new file mode 100755
index 0000000000..803928c231
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_check_x24green.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_dismiss.png b/examples/webkit/webkit-guide/img/icon_dismiss.png
new file mode 100755
index 0000000000..e7a842640a
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_dismiss.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png
new file mode 100755
index 0000000000..e52a62a598
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-down.png b/examples/webkit/webkit-guide/img/icon_drill-down.png
new file mode 100755
index 0000000000..7928c6e59e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_drill-down.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png
new file mode 100755
index 0000000000..477d7cda0d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-up.png b/examples/webkit/webkit-guide/img/icon_drill-up.png
new file mode 100755
index 0000000000..ff7594054d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_drill-up.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png
new file mode 100755
index 0000000000..d63fe083a1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_expand-nav.png b/examples/webkit/webkit-guide/img/icon_expand-nav.png
new file mode 100755
index 0000000000..7ec5aa68d1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_expand-nav.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed.png b/examples/webkit/webkit-guide/img/icon_head-collapsed.png
new file mode 100755
index 0000000000..ed47838b5b
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_head-collapsed.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png
new file mode 100755
index 0000000000..6892dc08a6
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded.png b/examples/webkit/webkit-guide/img/icon_head-expanded.png
new file mode 100755
index 0000000000..ee7e0a767a
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_head-expanded.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png
new file mode 100755
index 0000000000..40e8eeb4c1
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_info.png b/examples/webkit/webkit-guide/img/icon_info.png
new file mode 100755
index 0000000000..b70c760621
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_info.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_info_x24.png b/examples/webkit/webkit-guide/img/icon_info_x24.png
new file mode 100755
index 0000000000..9f4f352c84
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_info_x24.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-doc.png b/examples/webkit/webkit-guide/img/icon_link-doc.png
new file mode 100755
index 0000000000..fc9bd54e06
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-doc.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-email.png b/examples/webkit/webkit-guide/img/icon_link-email.png
new file mode 100755
index 0000000000..ef5f95d318
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-email.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-external.png b/examples/webkit/webkit-guide/img/icon_link-external.png
new file mode 100755
index 0000000000..47ddd807e4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-external.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-pdf.png b/examples/webkit/webkit-guide/img/icon_link-pdf.png
new file mode 100755
index 0000000000..fb90a6a2b9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-pdf.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-ppt.png b/examples/webkit/webkit-guide/img/icon_link-ppt.png
new file mode 100755
index 0000000000..c6a532878c
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-ppt.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-rss.png b/examples/webkit/webkit-guide/img/icon_link-rss.png
new file mode 100755
index 0000000000..d3cf2c4916
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-rss.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-sms.png b/examples/webkit/webkit-guide/img/icon_link-sms.png
new file mode 100755
index 0000000000..f36de100f8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-sms.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-tel.png b/examples/webkit/webkit-guide/img/icon_link-tel.png
new file mode 100755
index 0000000000..7b665ee5de
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-tel.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_link-xls.png b/examples/webkit/webkit-guide/img/icon_link-xls.png
new file mode 100755
index 0000000000..977c868eae
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_link-xls.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_list-all.png b/examples/webkit/webkit-guide/img/icon_list-all.png
new file mode 100755
index 0000000000..97ce879fb8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_list-all.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_list-all_circ.png b/examples/webkit/webkit-guide/img/icon_list-all_circ.png
new file mode 100755
index 0000000000..6c5828e835
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_list-all_circ.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-start.png b/examples/webkit/webkit-guide/img/icon_nav-start.png
new file mode 100755
index 0000000000..cbe127fdc9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_nav-start.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-top.png b/examples/webkit/webkit-guide/img/icon_nav-top.png
new file mode 100755
index 0000000000..d57d3efa11
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_nav-top.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav-up.png b/examples/webkit/webkit-guide/img/icon_nav-up.png
new file mode 100755
index 0000000000..bab32593e3
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_nav-up.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_nav_end.png b/examples/webkit/webkit-guide/img/icon_nav_end.png
new file mode 100755
index 0000000000..6d7dd319b4
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_nav_end.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_question.png b/examples/webkit/webkit-guide/img/icon_question.png
new file mode 100755
index 0000000000..28c2ae1f12
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_question.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_scroll-left.png b/examples/webkit/webkit-guide/img/icon_scroll-left.png
new file mode 100755
index 0000000000..38b3c3fa0e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_scroll-left.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_scroll-right.png b/examples/webkit/webkit-guide/img/icon_scroll-right.png
new file mode 100755
index 0000000000..4d6191942b
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_scroll-right.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/icon_trash.png b/examples/webkit/webkit-guide/img/icon_trash.png
new file mode 100755
index 0000000000..b5f6eaae73
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/icon_trash.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land1.jpg b/examples/webkit/webkit-guide/img/land1.jpg
new file mode 100644
index 0000000000..05b11d5393
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land1.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land2.jpg b/examples/webkit/webkit-guide/img/land2.jpg
new file mode 100644
index 0000000000..0f504b4106
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land2.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land3.jpg b/examples/webkit/webkit-guide/img/land3.jpg
new file mode 100644
index 0000000000..fd86c950e8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land3.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land4.jpg b/examples/webkit/webkit-guide/img/land4.jpg
new file mode 100644
index 0000000000..bcf33daf7f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land4.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land5.jpg b/examples/webkit/webkit-guide/img/land5.jpg
new file mode 100644
index 0000000000..c8d550923d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land5.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land6.jpg b/examples/webkit/webkit-guide/img/land6.jpg
new file mode 100644
index 0000000000..2762864634
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land6.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land7.jpg b/examples/webkit/webkit-guide/img/land7.jpg
new file mode 100644
index 0000000000..6ac6d88966
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land7.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/land8.jpg b/examples/webkit/webkit-guide/img/land8.jpg
new file mode 100644
index 0000000000..37c51df15e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/land8.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/mask.png b/examples/webkit/webkit-guide/img/mask.png
new file mode 100755
index 0000000000..f9764b54aa
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/mask.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal1.jpg b/examples/webkit/webkit-guide/img/tmp/gal1.jpg
new file mode 100644
index 0000000000..8f9edcb2ca
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal1.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal2.jpg b/examples/webkit/webkit-guide/img/tmp/gal2.jpg
new file mode 100644
index 0000000000..a2301ef22f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal2.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal3.jpg b/examples/webkit/webkit-guide/img/tmp/gal3.jpg
new file mode 100644
index 0000000000..a768530a8c
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal3.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal4.jpg b/examples/webkit/webkit-guide/img/tmp/gal4.jpg
new file mode 100644
index 0000000000..96c00015c0
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal4.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal5.jpg b/examples/webkit/webkit-guide/img/tmp/gal5.jpg
new file mode 100644
index 0000000000..6ec78fc43a
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal5.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal6.jpg b/examples/webkit/webkit-guide/img/tmp/gal6.jpg
new file mode 100644
index 0000000000..25eb95cb22
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal6.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal7.jpg b/examples/webkit/webkit-guide/img/tmp/gal7.jpg
new file mode 100644
index 0000000000..b9fda2fb9d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal7.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/gal8.jpg b/examples/webkit/webkit-guide/img/tmp/gal8.jpg
new file mode 100644
index 0000000000..c23e2260c3
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/gal8.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land1.jpg b/examples/webkit/webkit-guide/img/tmp/land1.jpg
new file mode 100644
index 0000000000..05b11d5393
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land1.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land2.jpg b/examples/webkit/webkit-guide/img/tmp/land2.jpg
new file mode 100644
index 0000000000..0f504b4106
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land2.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land3.jpg b/examples/webkit/webkit-guide/img/tmp/land3.jpg
new file mode 100644
index 0000000000..fd86c950e8
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land3.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land4.jpg b/examples/webkit/webkit-guide/img/tmp/land4.jpg
new file mode 100644
index 0000000000..bcf33daf7f
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land4.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land5.jpg b/examples/webkit/webkit-guide/img/tmp/land5.jpg
new file mode 100644
index 0000000000..c8d550923d
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land5.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land6.jpg b/examples/webkit/webkit-guide/img/tmp/land6.jpg
new file mode 100644
index 0000000000..2762864634
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land6.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land7.jpg b/examples/webkit/webkit-guide/img/tmp/land7.jpg
new file mode 100644
index 0000000000..6ac6d88966
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land7.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tmp/land8.jpg b/examples/webkit/webkit-guide/img/tmp/land8.jpg
new file mode 100644
index 0000000000..37c51df15e
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tmp/land8.jpg
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal1.png b/examples/webkit/webkit-guide/img/tnail_gal1.png
new file mode 100644
index 0000000000..6c83482e25
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal1.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal2.png b/examples/webkit/webkit-guide/img/tnail_gal2.png
new file mode 100644
index 0000000000..f090b68959
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal2.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal3.png b/examples/webkit/webkit-guide/img/tnail_gal3.png
new file mode 100644
index 0000000000..6cc257b490
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal3.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal4.png b/examples/webkit/webkit-guide/img/tnail_gal4.png
new file mode 100644
index 0000000000..ae9983ccbc
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal4.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal5.png b/examples/webkit/webkit-guide/img/tnail_gal5.png
new file mode 100644
index 0000000000..58d764c9a9
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal5.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal6.png b/examples/webkit/webkit-guide/img/tnail_gal6.png
new file mode 100644
index 0000000000..f5d0b8b657
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal6.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal7.png b/examples/webkit/webkit-guide/img/tnail_gal7.png
new file mode 100644
index 0000000000..8d33ea69f6
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal7.png
Binary files differ
diff --git a/examples/webkit/webkit-guide/img/tnail_gal8.png b/examples/webkit/webkit-guide/img/tnail_gal8.png
new file mode 100644
index 0000000000..61e1431ab5
--- /dev/null
+++ b/examples/webkit/webkit-guide/img/tnail_gal8.png
Binary files differ
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/examples/webkit/webkit-guide/js/anim_accord.js
index b2b1a57525..8d58a18c7e 100644..100755
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml
+++ b/examples/webkit/webkit-guide/js/anim_accord.js
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,37 +37,42 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+window.onload = function() {
-import QtQuick 1.0
-
-Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
-
-//! [adding a sequential animation]
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 100; height: 100
-
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 450; easing.type: "InOutQuad";
- duration: 2000
- }
- PauseAnimation { duration: 500 }
+ initDT();
+ document.querySelector('body').addEventListener('click', function(event){
+ var dl = document.querySelector('#accordion');
+ var ct = event.currentTarget;
+ var t = event.target;
+ var dt;
+ if (t.id == 'accordion' && t.className == 'collapsed') {
+ dl.className = 'expanded';
+ }
+ else if (t.tagName == 'DT' && t.parentNode.id == 'accordion') {
+ if ( t.className == 'collapsed' ) {
+ t.className = 'expanded';
+ }
+ else {
+ t.className = 'collapsed';
+ }
}
- }
-//! [adding a sequential animation]
+ else {
+ dl.className = 'collapsed';
+ initDT();
+ }
+ });
+};
+
+function initDT() {
+ var el = nlToAr(document.querySelectorAll('#accordion > dt'));
+ el.forEach( function(l){ l.className = 'collapsed'; });
+}
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
- }
+function nlToAr(nl) {
+ var a = new Array();
+ var l = nl.length;
+ var i = l - 1;
+ a[i] = true;
+ for ( i = 0; i < l ; i++ ) { a[i] = nl[i]; }
+ return(a);
}
diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/examples/webkit/webkit-guide/js/anim_gallery.js
index 7be22b576c..3e00bc6f30 100644..100755
--- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml
+++ b/examples/webkit/webkit-guide/js/anim_gallery.js
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,30 +37,43 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+var app = new Function();
-//! [document]
-import QtQuick 1.0
-
-Rectangle {
- id: mainRec
- width: 600
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 200; y: 100
- width: 100; height: 100
+app.init = function() {
+ var divs = document.querySelectorAll('section > div');
+ if ( divs.length < 2 ) return false;
+ for (var i = 0, l = divs.length ; i < l ; i++ ) {
+ if (i > 1) divs[i].className = 'hideR';
+ divs[i].addEventListener('click', app.navigate );
+ }
+ divs[0].className = 'selected';
+ divs[1].className = 'queueR';
+};
- // Animate a rotation
- transform: Rotation {
- origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0
- NumberAnimation on angle {
- from: 0; to: 360;
- duration: 3000;
- loops: Animation.Infinite
- }
+app.navigate = function(event) {
+ var el, n1, n2, p1, p2;
+ el = event.currentTarget;
+ n1 = el.nextSibling;
+ if (n1) n2 = el.nextSibling.nextSibling;
+ p1 = el.previousSibling;
+ if (p1) p2 = el.previousSibling.previousSibling;
+ if ( el.className == 'selected' ) {
+ if ( el.id == 'reveal') {
+ el.id = '';
}
+ else {
+ el.id = 'reveal';
+ }
+ return false;
}
-}
-//! [document]
+ if (n1) { n1.className = 'queueR'; n1.id = ''}
+ if (n2) { n2.className = 'hideR'; n2.id = '' }
+ if (p1) { p1.className = 'queueL'; p1.id = '' }
+ if (p2) { p2.className = 'hideL'; p2.id = '' }
+ el.className = 'selected';
+};
+
+window.onload = function() {
+ // alert(app.init);
+ app.init();
+};
diff --git a/examples/webkit/webkit-guide/js/anim_panel.js b/examples/webkit/webkit-guide/js/anim_panel.js
new file mode 100755
index 0000000000..365210d84a
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/anim_panel.js
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ document.querySelector('body').addEventListener('click', function(event){
+ document.querySelector('#panel').className = 'collapsed';
+ });
+}
+
+function share() {
+ document.querySelector('#panel').className = 'expanded';
+ event.stopPropagation();
+}
+
+function debug(str) {
+ document.querySelector('#dbg').innerHTML = 'You chose the <b>' + str.toUpperCase() + '</b> option.';
+}
diff --git a/examples/webkit/webkit-guide/js/anim_skew.js b/examples/webkit/webkit-guide/js/anim_skew.js
new file mode 100755
index 0000000000..1a80a6d7a8
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/anim_skew.js
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+var app = new Function();
+
+app.init = function() {
+ app.elements = document.querySelectorAll('.items > div');
+ app.navs = document.querySelectorAll('nav > div');
+
+ // elements
+ for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) {
+ app.elements[i].className = 'row' + (i + 1);
+ app.elements[i].addEventListener('click', app.remove);
+ }
+
+ // navigation
+ for ( var i = 0, ln = app.navs.length ; i < ln ; i++ ) {
+ app.navs[i].addEventListener('click', app.filter );
+ }
+};
+
+app.filter = function(event) {
+ var type = event.target.className;
+
+ var hiddenCount = 0;
+
+ if (! type ) {
+ app.init();
+ return false;
+ }
+
+ for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) {
+ if ( app.elements[i].title == type ) {
+ app.elements[i].className = 'row' + ((i + 1) - hiddenCount);
+ }
+ else {
+ app.elements[i].className = 'hide';
+ hiddenCount++;
+ }
+ }
+};
+
+app.remove = function() {
+ event.currentTarget.className = 'hide';
+ app.rearrange();
+};
+
+app.rearrange = function() {
+ var hiddenCount = 0;
+ for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) {
+ if ( app.elements[i].className.match(/hide/) ) {
+ hiddenCount++;
+ }
+ else {
+ app.elements[i].className = 'row' + ((i + 1) - hiddenCount);
+ }
+ }
+};
+
+window.onload = function() { app.init() };
+
diff --git a/doc/src/snippets/declarative/animation-signalhandler.qml b/examples/webkit/webkit-guide/js/css3_backgrounds.js
index 416417fbc7..0c834d1dc8 100644..100755
--- a/doc/src/snippets/declarative/animation-signalhandler.qml
+++ b/examples/webkit/webkit-guide/js/css3_backgrounds.js
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,19 +37,13 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-
-Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- MouseArea {
- anchors.fill: parent
- onClicked: PropertyAnimation { target: rect; properties: "x,y"; to: 50; duration: 1000 }
+document.querySelector('body').addEventListener('click', function(event) {
+ var l = event.target;
+ if (l.tagName != 'DT') return false ;
+ if ( l.className ) {
+ l.className = '';
}
-}
-
-//![0]
-
+ else {
+ l.className = 'selected';
+ }
+});
diff --git a/examples/webkit/webkit-guide/js/css3_border-img.js b/examples/webkit/webkit-guide/js/css3_border-img.js
new file mode 100755
index 0000000000..b440afbfb5
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/css3_border-img.js
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ var el = document.querySelectorAll('input');
+ for (var i = 0, l = el.length ; i < l ; i++ ) {
+ }
+}
diff --git a/examples/webkit/webkit-guide/js/css3_grad-radial.js b/examples/webkit/webkit-guide/js/css3_grad-radial.js
new file mode 100755
index 0000000000..46601e4d69
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/css3_grad-radial.js
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ var el = document.querySelector('#main');
+ el.addEventListener('mousedown', function(event){
+
+ var colors = [ 'beige', 'crimson', 'darkcyan', 'turquoise',
+ 'darkgoldenrod', 'darkorange', 'fuchsia',
+ 'greenyellow', 'lightblue', 'lightcoral',
+ 'lightgreen', 'mediumorchid', 'pink', 'plum',
+ 'skyblue', 'springgreen', 'tan', 'tomato',
+ 'violet', 'yellow', 'teal'];
+
+ var x = event.offsetX;
+ var y = event.offsetY;
+
+ var loc = document.querySelector('#localStyles');
+ var style = '#main:active {' + 'background: -webkit-gradient(radial, ';
+ style += (x + ' ');
+ style += (y + ' ');
+ style += ',5,';
+ style += ((x + 10) + ' ');
+ style += ((y + 10) + ' ');
+ style += ', 48, ';
+ style += 'from(' + colors[r(5)] + '),';
+ style += 'color-stop(20%, ' + colors[r(5)] + '),';
+ style += 'color-stop(40%, ' + colors[r(5)] + '),';
+ style += 'color-stop(60%, ' + colors[r(5)] + '),';
+ style += 'color-stop(80%, ' + colors[r(5)] + '),';
+ style += 'to(#ffffff) );'
+ style += '}'
+ loc.innerHTML = style;
+ });
+}
+
+function r(i) {
+ return Math.floor( (Math.random() * i ) );
+}
diff --git a/examples/webkit/webkit-guide/js/css3_mask-grad.js b/examples/webkit/webkit-guide/js/css3_mask-grad.js
new file mode 100755
index 0000000000..5d516aa93c
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/css3_mask-grad.js
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+document.querySelector('body').addEventListener('click', function(event) {
+ var l = event.target;
+ if (l.tagName != 'IMG') return false ;
+ event.target.className = 'select';
+});
diff --git a/examples/webkit/webkit-guide/js/css3_mask-img.js b/examples/webkit/webkit-guide/js/css3_mask-img.js
new file mode 100755
index 0000000000..b440afbfb5
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/css3_mask-img.js
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ var el = document.querySelectorAll('input');
+ for (var i = 0, l = el.length ; i < l ; i++ ) {
+ }
+}
diff --git a/examples/webkit/webkit-guide/js/css3_text-overflow.js b/examples/webkit/webkit-guide/js/css3_text-overflow.js
new file mode 100755
index 0000000000..1a87cb3c83
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/css3_text-overflow.js
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ var el = document.querySelectorAll('.accordion > li');
+ for (var i = 0, l = el.length ; i < l ; i++ ) {
+ el[i].addEventListener('click', function(event){
+ var tgt = event.target;
+ if ( tgt.tagName == 'LI' && ( ! tgt.className ) ) {
+ tgt.className = 'selected';
+ }
+ if ( tgt.tagName == 'DIV' && ( tgt.className == 'dismiss') ) {
+ tgt.parentNode.className = '';
+ }
+
+ });
+ }
+}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/examples/webkit/webkit-guide/js/form_tapper.js
index 7357282c06..bb0c9dca19 100644..100755
--- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml
+++ b/examples/webkit/webkit-guide/js/form_tapper.js
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,29 +37,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-//! [document]
-import QtQuick 1.0
-
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
- Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
+window.onload = function() {
+ return false;
+ var el = document.querySelectorAll('input[type=radio]');
+ for ( var i = 0, l = el.length ; i < l ; i++ ) {
+ el[i].addEventListener('click', resetRadio);
}
+}
-//! [positioning the image]
- Image {
- source: "images/qt-logo.svg"
- x: 100; y: 150
- width: 150; height: 150
+function resetRadio(event) {
+ if (event.target._checked == true) {
+ event.target._checked = false;
+ event.target.checked = false;
+ event.target.indeterminate = true;
+ }
+ else {
+ event.target._checked = true;
}
-//! [positioning the image]
-
- color: "lightgray"
}
-//! [document]
diff --git a/examples/webkit/webkit-guide/js/mob_condjs.js b/examples/webkit/webkit-guide/js/mob_condjs.js
new file mode 100755
index 0000000000..1ba445e4b2
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/mob_condjs.js
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+window.onload = function() {
+ var msg = 'JavaScript thinks you are viewing this page with a ';
+ if ( isDesign('desktop') ) {
+ msg += 'full desktop browser';
+ }
+ else if ( isDesign('touch') ) {
+ msg += 'touch-based mobile browser';
+ }
+ else if ( isDesign('mobile') ) {
+ msg += 'non-touch mobile browser';
+ }
+ else {
+ msg = window.styleMedia.matchMedium;
+ }
+ document.getElementById('js').innerHTML = msg;
+};
+
+function isDesign(str) {
+ var design;
+ if (matchesMedia('only screen and (min-device-width: 481px)')) {
+ design = 'desktop';
+ }
+ else if (matchesMedia('only screen and (max-device-width: 480px)')) {
+ design = 'touch';
+ }
+ else if (matchesMedia('handheld')) {
+ design = 'mobile';
+ }
+ return str == design;
+}
+
+function matchesMedia(query) {
+ if (!!window.matchMedia)
+ return window.matchMedia(query).matches;
+ if (!!window.styleMedia && !!window.styleMedia.matchMedium)
+ return window.styleMedia.matchMedium(query);
+ if (!!window.media && window.media.matchMedium)
+ return window.media.matchMedium(query);
+ return false;
+}
diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/examples/webkit/webkit-guide/js/mobile.js
index f73dec9b4b..880d6e45bc 100644..100755
--- a/doc/src/snippets/declarative/listview/listview-snippet.qml
+++ b/examples/webkit/webkit-guide/js/mobile.js
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the Qt WebKit module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,16 +37,14 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+var app = new Function();
-//! [document]
-import QtQuick 1.0
-
-ListView {
- width: 50; height: 200
- model: 4
- delegate: Text {
- text: index;
- font.pixelSize: 40
+app.toggleDisplay = function(id) {
+ var el = document.getElementById(id);
+ if (el.className.match(/hidden/)) {
+ el.className = '';
+ }
+ else {
+ el.className = 'hidden';
}
}
-//! [document]
diff --git a/examples/webkit/webkit-guide/js/storage.js b/examples/webkit/webkit-guide/js/storage.js
new file mode 100755
index 0000000000..62dca84808
--- /dev/null
+++ b/examples/webkit/webkit-guide/js/storage.js
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** 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 Qt WebKit module 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$
+**
+****************************************************************************/
+var app = new Function();
+
+app.dbg = false;
+
+window.onload = function() {
+
+ app.cred = document.querySelector('#cred');
+
+ // open form:
+ document.querySelector('#openform').addEventListener('mousedown', app.getInfo);
+ // dismiss form:
+ document.querySelector('#dismiss').addEventListener('mousedown', app.dismiss);
+
+ // form validation:
+ app.inputs = document.querySelectorAll('input:not([type="submit"])');
+ for (var i = 0, l = app.inputs.length ; i < l ; i++ ) {
+ app.inputs[i].addEventListener('blur', app.checkEdit);
+ }
+
+ // storage
+ app.db_loc = window.localStorage;
+ app.db_ses = window.sessionStorage;
+
+ if (!!app.db_loc) {
+ // no login info yet...
+ if ( !app.db_loc.getItem('login') || !app.db_loc.getItem('password') ) app.getInfo();
+ }
+ else {
+ alert("This application needs to run on a recent WebKit-based browser.");
+ }
+
+};
+
+app.hint = function(str) {
+ document.querySelector('body').className = str;
+};
+
+app.checkEdit = function(ev) {
+ ev.currentTarget.className = 'validate';
+}
+
+app.getInfo = function(ev) {
+ app.cred.className = 'show';
+ app.inputs[0].value = app.db_loc.getItem('login');
+ app.inputs[1].value = app.db_loc.getItem('password');
+ app.inputs[2].value = app.db_ses.getItem('credit');
+}
+
+app.dismiss = function(ev) {
+ app.db_loc.setItem('login', app.inputs[0].value);
+ app.db_loc.setItem('password', app.inputs[1].value);
+ app.db_ses.setItem('credit', app.inputs[2].value);
+ ev.currentTarget.parentNode.className = 'hide';
+}
+
diff --git a/examples/webkit/webkit-guide/layout_link-fmt.htm b/examples/webkit/webkit-guide/layout_link-fmt.htm
new file mode 100644
index 0000000000..436d97c1f9
--- /dev/null
+++ b/examples/webkit/webkit-guide/layout_link-fmt.htm
@@ -0,0 +1,81 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Link Context Hints</title>
+<link href='css/layout_link-fmt.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<article>
+<h3>Link Context Hints</h3>
+<ol class="links">
+<li> <a href="#">Link to internal page</a></li>
+<li> <a href="http://www.google.com" target="new">Link to external page</a></li>
+<li> <a href="mailto:who@where.com">Email Link</a></li>
+<li> <a href="tel:+2125551212">Phone: 212.555.1212</a></li>
+<li> <a href="sms:+2125551212%3Fbody=hello world">SMS Link</a></li>
+<li> <a href="http://whmp.com/pages/podcast/122411.rss">Link to RSS feed</a></li>
+<li> <a href="http://www.ous.edu/about/polipro/files/Budget%20Outline.doc">Link to Word file</a></li>
+<li> <a href="http://www.greenfield-nh.gov/Public_Documents/GreenfieldNH_Admin/BudgetReport2006.pdf">List to PDF file</a></li>
+<li> <a href="http://www.agmconnect.org/cpf/CPF_Budget_Template.xls">Link to Excel file</a></li>
+<li> <a href="http://www.unh.edu/hr/banner/position-budget-training.ppt">Link to Powerpoint file</a></li>
+</ol>
+<h3>Inline Links</h3>
+<p>
+Links to an
+<a href="item2.htm">internal page</a>, an
+<a href="http://example.com/item1.htm" target="new">external page</a>,
+<a href="mailto:who@where.com">email link</a>,
+phone link
+<a href="tel:+2125551212">212.555.1212</a>,
+<a href="sms:+2125551212%3Fbody=hello world">SMS Link</a>,
+<a href="http://whmp.com/pages/podcast/122411.rss">RSS feed</a>,
+<a href="http://www.ous.edu/about/polipro/files/Budget%20Outline.doc">Word file</a>,
+<a href="http://www.greenfield-nh.gov/Public_Documents/GreenfieldNH_Admin/BudgetReport2006.pdf">PDF</a>,
+<a href="http://www.agmconnect.org/cpf/CPF_Budget_Template.xls">Excel</a>,
+<a href="http://www.unh.edu/hr/banner/position-budget-training.ppt">Powerpoint</a>.
+</p>
+</article>
+<p>&nbsp</p>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/layout_tbl-keyhole.htm b/examples/webkit/webkit-guide/layout_tbl-keyhole.htm
new file mode 100644
index 0000000000..73d332d0c6
--- /dev/null
+++ b/examples/webkit/webkit-guide/layout_tbl-keyhole.htm
@@ -0,0 +1,141 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Mobilized Tables</title>
+<link href='css/layout_tbl-keyhole.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+
+<article id="r0">
+
+<h1>Mobilized Tables</h1>
+
+<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
+feugiat gravida viverra. Vivamus ipsum felis, cursus sed venenatis
+nec, tempus ac tellus.</p>
+
+<p><a href="#r1">View Listings</a></p>
+
+<table class="mobile">
+
+<thead>
+<tr>
+<th class="nav"></th>
+<th>Item</th>
+<th>Price</th>
+<th>Location</th>
+<th>Posted</th>
+<th>Description</th>
+</tr>
+</thead>
+
+<tbody>
+
+<tr id="r1">
+<th class="nav"><a href="#"></a><a href="#r2"></a></th>
+<td>Keiser Indoor Cycling Bike / Platform</td>
+<td>$250</td>
+<td>Santa Monica, CA</td>
+<td>4 days ago</td>
+<td>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
+officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit
+amet, consectetur adipiscing elit. Donec feugiat gravida viverra.
+Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.</td>
+</tr>
+
+<tr id="r2">
+<th class="nav"><a href="#r1"></a><a href="#r3"></a></th>
+<td>Ladies Diamondback Mountain Bike</td>
+<td>$300</td>
+<td>North Hollywood, CA</td>
+<td>3 hours ago</td>
+<td>Duis aute irure dolor in reprehenderit in voluptate velit esse
+cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet,
+consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus
+ipsum felis, cursus sed venenatis nec, tempus ac tellus.</td>
+</tr>
+
+<tr id="r3">
+<th class="nav"><a href="#r2"></a><a href="#r4"></a></th>
+<td>AA Cycle 10 Speed Road Bike</td>
+<td>$150</td>
+<td>Burbank, CA</td>
+<td>2 days ago</td>
+<td>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet,
+consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus
+ipsum felis, cursus sed venenatis nec, tempus ac tellus.</td>
+</tr>
+
+<tr id="r4">
+<th class="nav"><a href="#r3"></a><a href="#"></a></th>
+<td>Magna Dual Suspection Mountain Bike 24</td>
+<td>$60</td>
+<td>El Segundo, CA</td>
+<td>2 weeks ago</td>
+<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem
+ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat
+gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus
+ac tellus.</td>
+</tr>
+
+</tbody>
+
+</table>
+
+<p>
+Text continues here. Donec a massa felis, a congue purus. Nullam et
+turpis diam. Aenean vestibulum egestas metus, eu sodales dolor
+venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas
+at neque.
+</p>
+</article>
+
+<script src="js/mobile.js"></script>
+
+</section>
+
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/mob_condjs.htm b/examples/webkit/webkit-guide/mob_condjs.htm
new file mode 100644
index 0000000000..710a3710fb
--- /dev/null
+++ b/examples/webkit/webkit-guide/mob_condjs.htm
@@ -0,0 +1,65 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Media Queries + JavaScript</title>
+<link media='only screen and (min-device-width: 481px)' href='css/mq_desktop.css' type='text/css' rel='stylesheet'/>
+<link media='only screen and (max-device-width: 480px)' href='css/mq_touch.css' type='text/css' rel='stylesheet'/>
+<link media='handheld' href='css/mqmobile.css' type='text/css' rel='stylesheet'/>
+<link href='css/mob_condjs.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>Media Queries + JavaScript</h3>
+<p id="design">...</p>
+
+<p id="js">...</p>
+
+</article>
+</section>
+
+<script src="js/mob_condjs.js"></script>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/mob_layout.htm b/examples/webkit/webkit-guide/mob_layout.htm
new file mode 100644
index 0000000000..cad6f6c635
--- /dev/null
+++ b/examples/webkit/webkit-guide/mob_layout.htm
@@ -0,0 +1,59 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). All
+rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<title>Media Query-Driven Layout</title>
+<meta name='viewport' content='width=device-width' />
+<title>media-driven layout</title>
+<link media='only screen and (min-device-width: 480px)' href='css/mqlayout_desktop.css' type='text/css' rel='stylesheet'/>
+<link media='only screen and (max-device-width: 480px)' href='css/mqlayout_touch.css' type='text/css' rel='stylesheet'/>
+<link media='handheld' href='css/mqlayout_mobile.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<header>HEADER</header>
+<nav>NAVIGATION</nav>
+<section id="main">MAIN CONTENT</section>
+<section id="sidebar">SIDEBAR</section>
+<footer>FOOTER</footer>
+
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/mob_mediaquery.htm b/examples/webkit/webkit-guide/mob_mediaquery.htm
new file mode 100644
index 0000000000..3b0e3b4e9c
--- /dev/null
+++ b/examples/webkit/webkit-guide/mob_mediaquery.htm
@@ -0,0 +1,59 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Media Queries</title>
+<link media='only screen and (min-device-width: 481px)' href='css/mq_desktop.css' type='text/css' rel='stylesheet'/>
+<link media='only screen and (max-device-width: 480px)' href='css/mq_touch.css' type='text/css' rel='stylesheet'/>
+<link media='handheld' href='css/mq_mobile.css' type='text/css' rel='stylesheet'/>
+<link href='css/mob_mediaquery.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<section>
+<article>
+<h3>Media Queries</h3>
+<p id="design">...</p>
+</article>
+</section>
+<script src="js/mobile.js"></script>
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/storage.htm b/examples/webkit/webkit-guide/storage.htm
new file mode 100644
index 0000000000..d154c81567
--- /dev/null
+++ b/examples/webkit/webkit-guide/storage.htm
@@ -0,0 +1,71 @@
+<!--
+
+This file is part of QtWebKit
+
+Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
+
+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:
+
+o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+o 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.
+
+o 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."
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='viewport' content='width=device-width' />
+<title>Local/Session Storage</title>
+<link href='css/storage.css' type='text/css' rel='stylesheet'/>
+</head>
+<body>
+<h1>
+<img id="openform" src="img/icon_info_x24.png"/>
+Local/Session Storage</h1>
+
+<form id="cred" class="hide">
+
+<img id="dismiss" src="img/icon_dismiss.png"/>
+
+<div>login</div>
+<input id="login" required type="text"/>
+<br/>
+
+<div>password</div>
+<input id="password" required type="password"/>
+
+<div>credit card</div>
+<input id="credit" required type="number" min="999999999999999" max="9999999999999999"/>
+
+</form>
+
+<script src="js/storage.js"></script>
+
+</body>
+</html>
diff --git a/examples/webkit/webkit-guide/webkit-guide.pro b/examples/webkit/webkit-guide/webkit-guide.pro
new file mode 100644
index 0000000000..b4291a5e01
--- /dev/null
+++ b/examples/webkit/webkit-guide/webkit-guide.pro
@@ -0,0 +1,257 @@
+#A simple .pro file to make Qt aware of the webkit-guide files.
+#For documentation generation
+#TEMPLATE += subdirs
+
+SOURCES = anim_accord.htm \
+anim_demo-rotate.htm \
+anim_demo-scale.htm \
+anim_demo-skew.htm \
+anim_gallery.htm \
+anim_panel.htm \
+anim_pulse.htm \
+anim_skew.htm \
+anim_slide1.htm \
+anim_slide2.htm \
+anim_slide3.htm \
+anim_tabbedSkew.htm \
+_copyright.txt \
+css3_backgrounds.htm \
+css3_border-img.htm \
+css3_gradientBack.htm \
+css3_gradientBackStop.htm \
+css3_gradientButton.htm \
+css3_grad-radial.htm \
+css3_mask-grad.htm \
+css3_mask-img.htm \
+css3_multicol.htm \
+css3_reflect.htm \
+css3_scroll.htm \
+css3_sel-nth.htm \
+css3_shadow.htm \
+css3_text-overflow.htm \
+css3_text-shadow.htm \
+css3_text-stroke.htm \
+form_tapper.htm \
+form_toggler.htm \
+_image_assets.htm \
+_index.html \
+layout_link-fmt.htm \
+layout_tbl-keyhole.htm \
+mob_condjs.htm \
+mob_layout.htm \
+mob_mediaquery.htm \
+storage.htm \
+css/anim_accord.css \
+css/anim_demo-rotate.css \
+css/anim_demo-scale.css \
+css/anim_demo-skew.css \
+css/anim_gallery.css \
+css/anim_panel.css \
+css/anim_pulse.css \
+css/anim_skew.css \
+css/anim_slide.css \
+css/anim_tabbedSkew.css \
+css/css3_backgrounds.css \
+css/css3_border-img.css \
+css/css3_gradientBack.css \
+css/css3_gradientBackStop.css \
+css/css3_gradientButton.css \
+css/css3_grad-radial.css \
+css/css3_mask-grad.css \
+css/css3_mask-img.css \
+css/css3_multicol.css \
+css/css3_reflect.css \
+css/css3_scroll.css \
+css/css3_sel-nth.css \
+css/css3_shadowBlur.css \
+css/css3_shadow.css \
+css/css3_text-overflow.css \
+css/css3_text-shadow.css \
+css/css3_text-stroke.css \
+css/form_tapper.css \
+css/form_toggler.css \
+css/layout_link-fmt.css \
+css/layout_tbl-keyhole.css \
+css/mob_condjs.css \
+css/mobile.css \
+css/mob_mediaquery.css \
+css/mq_desktop.css \
+css/mqlayout_desktop.css \
+css/mqlayout_mobile.css \
+css/mqlayout_touch.css \
+css/mq_mobile.css \
+css/mq_touch.css \
+css/storage.css \
+img/border-frame.png \
+img/gal1.jpg \
+img/gal2.jpg \
+img/gal3.jpg \
+img/gal4.jpg \
+img/gal5.jpg \
+img/gal6.jpg \
+img/gal7.jpg \
+img/gal8.jpg \
+img/gradient.jpg \
+img/gray_icon_close.png \
+img/ic_ag_016.png \
+img/ic_ag_032.png \
+img/ic_ag_036.png \
+img/ic_ag_048.png \
+img/ic_al_016.png \
+img/ic_al_032.png \
+img/ic_al_036.png \
+img/ic_al_048.png \
+img/ic_ar_016.png \
+img/ic_ar_032.png \
+img/ic_ar_036.png \
+img/ic_ar_048.png \
+img/ic_b_016.png \
+img/ic_b_032.png \
+img/ic_b_036.png \
+img/ic_b_048.png \
+img/ic_be_016.png \
+img/ic_be_032.png \
+img/ic_be_036.png \
+img/ic_be_048.png \
+img/ic_c_016.png \
+img/ic_c_032.png \
+img/ic_c_036.png \
+img/ic_c_048.png \
+img/ic_ca_016.png \
+img/ic_ca_032.png \
+img/ic_ca_036.png \
+img/ic_ca_048.png \
+img/ic_cl_016.png \
+img/ic_cl_032.png \
+img/ic_cl_036.png \
+img/ic_cl_048.png \
+img/ic_cu_016.png \
+img/ic_cu_032.png \
+img/ic_cu_036.png \
+img/ic_cu_048.png \
+img/ic_f_016.png \
+img/ic_f_032.png \
+img/ic_f_036.png \
+img/ic_f_048.png \
+img/ic_fe_016.png \
+img/ic_fe_032.png \
+img/ic_fe_036.png \
+img/ic_fe_048.png \
+img/ic_h_016.png \
+img/ic_h_032.png \
+img/ic_h_036.png \
+img/ic_h_048.png \
+img/ic_he_016.png \
+img/ic_he_032.png \
+img/ic_he_036.png \
+img/ic_he_048.png \
+img/ic_k_016.png \
+img/ic_k_032.png \
+img/ic_k_036.png \
+img/ic_k_048.png \
+img/ic_li_016.png \
+img/ic_li_032.png \
+img/ic_li_036.png \
+img/ic_li_048.png \
+img/ic_mg_016.png \
+img/ic_mg_032.png \
+img/ic_mg_036.png \
+img/ic_mg_048.png \
+img/ic_n_016.png \
+img/ic_n_032.png \
+img/ic_n_036.png \
+img/ic_n_048.png \
+img/ic_na_016.png \
+img/ic_na_032.png \
+img/ic_na_036.png \
+img/ic_na_048.png \
+img/ic_ne_016.png \
+img/ic_ne_032.png \
+img/ic_ne_036.png \
+img/ic_ne_048.png \
+img/ic_ni_016.png \
+img/ic_ni_032.png \
+img/ic_ni_036.png \
+img/ic_ni_048.png \
+img/ic_o_016.png \
+img/ic_o_032.png \
+img/ic_o_036.png \
+img/ic_o_048.png \
+img/icon_check.png \
+img/icon_check_x24green.png \
+img/icon_dismiss.png \
+img/icon_dismiss_x22.png \
+img/icon_drill-down.png \
+img/icon_drill-down_x32.png \
+img/icon_drill-up.png \
+img/icon_drill-up_x32.png \
+img/icon_expand-nav.png \
+img/icon_head-collapsed.png \
+img/icon_head-collapsed_x13.png \
+img/icon_head-expanded.png \
+img/icon_head-expanded_x13.png \
+img/icon_info.png \
+img/icon_info_x24.png \
+img/icon_link-doc.png \
+img/icon_link-email.png \
+img/icon_link-external.png \
+img/icon_link-pdf.png \
+img/icon_link-ppt.png \
+img/icon_link-rss.png \
+img/icon_link-sms.png \
+img/icon_link-tel.png \
+img/icon_link-xls.png \
+img/icon_list-all_circ.png \
+img/icon_list-all.png \
+img/icon_nav_end.png \
+img/icon_nav-start.png \
+img/icon_nav-top.png \
+img/icon_nav-up.png \
+img/icon_question.png \
+img/icon_scroll-left.png \
+img/icon_scroll-right.png \
+img/icon_trash.png \
+img/ic_pt_016.png \
+img/ic_pt_032.png \
+img/ic_pt_036.png \
+img/ic_pt_048.png \
+img/ic_si_016.png \
+img/ic_si_032.png \
+img/ic_si_036.png \
+img/ic_si_048.png \
+img/ic_zn_016.png \
+img/ic_zn_032.png \
+img/ic_zn_036.png \
+img/ic_zn_048.png \
+img/land1.jpg \
+img/land2.jpg \
+img/land3.jpg \
+img/land4.jpg \
+img/land5.jpg \
+img/land6.jpg \
+img/land7.jpg \
+img/land8.jpg \
+img/mask.png \
+img/tnail_gal1.png \
+img/tnail_gal2.png \
+img/tnail_gal3.png \
+img/tnail_gal4.png \
+img/tnail_gal5.png \
+img/tnail_gal6.png \
+img/tnail_gal7.png \
+img/tnail_gal8.png \
+js/anim_accord.js \
+js/anim_gallery.js \
+js/anim_panel.js \
+js/anim_skew.js \
+js/css3_backgrounds.js \
+js/css3_border-img.js \
+js/css3_grad-radial.js \
+js/css3_mask-grad.js \
+js/css3_mask-img.js \
+js/css3_text-overflow.js \
+js/form_tapper.js \
+js/mob_condjs.js \
+js/mobile.js \
+js/storage.js \
+
diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro
index 6a1d8f8b5d..62d3762468 100644
--- a/examples/webkit/webkit.pro
+++ b/examples/webkit/webkit.pro
@@ -5,7 +5,7 @@ SUBDIRS += domtraversal \
fancybrowser \
simpleselector \
imageanalyzer \
- framecapture
+ framecapture \
contains(QT_CONFIG, openssl):SUBDIRS += googlechat
diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf
index 2c765bcdff..4f178d745e 100644
--- a/mkspecs/common/armcc.conf
+++ b/mkspecs/common/armcc.conf
@@ -37,5 +37,6 @@ QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_THREAD +=
QMAKE_AR = armar --create
+QMAKE_LIB = armar --create
QMAKE_RANLIB =
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index e51de1df66..a725df3553 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -2,10 +2,25 @@
# qmake configuration for makefile based symbian
#
-MAKEFILE_GENERATOR = SYMBIAN_UNIX
+contains(QMAKE_HOST.os,Windows) {
+ MAKEFILE_GENERATOR = SYMBIAN_MINGW
+} else {
+ MAKEFILE_GENERATOR = SYMBIAN_UNIX
+}
include(symbian.conf)
+QMAKE_INCDIR_OPENGL = $${EPOCROOT}epoc32/include
+QMAKE_LIBDIR_OPENGL = $${EPOCROOT}epoc32/release/armv5/lib
+QMAKE_INCDIR_OPENGL_ES1 = $${EPOCROOT}epoc32/include/GLES
+QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
+QMAKE_INCDIR_OPENGL_ES2 = $${EPOCROOT}epoc32/include/GLES2
+QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
+QMAKE_INCDIR_EGL = $${EPOCROOT}epoc32/include/EGL
+QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL
+QMAKE_INCDIR_OPENVG = $${EPOCROOT}epoc32/include/VG
+QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL
+
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
@@ -24,10 +39,18 @@ CONFIG *= no_plugin_name_prefix
QMAKE_PREFIX_STATICLIB =
QMAKE_SYMBIAN_SHLIB = 1
+QMAKE_LINK_OBJECT_SCRIPT = objects
+
is_using_gnupoc {
- DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\>
-} else {
- DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh\\>
+ DEFINES *= __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
+}
+QMAKE_SYMBIAN_INCLUDES = $$IN_PWD/symbianincludes.h
+symbian-armcc {
+ QMAKE_CFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
+ QMAKE_CXXFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
+} else:symbian-gcce {
+ QMAKE_CFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
+ QMAKE_CXXFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
}
DEFINES *= \
__SYMBIAN32__ \
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 0bb3a294c9..f955e3c743 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -3,7 +3,7 @@
#
TEMPLATE = app
-CONFIG += qt warn_on release incremental link_prl sis_targets run_on_phone
+CONFIG += prepend_includepath qt warn_on release incremental link_prl sis_targets run_on_phone
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
@@ -57,7 +57,8 @@ QMAKE_INCDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
QMAKE_LFLAGS =
-QMAKE_LFLAGS.ARMCC =
+QMAKE_LFLAGS.ARMCC =
+QMAKE_LFLAGS.GCCE =
QMAKE_LFLAGS_EXCEPTIONS_ON =
QMAKE_LFLAGS_EXCEPTIONS_OFF =
QMAKE_LFLAGS_RELEASE =
@@ -70,16 +71,17 @@ QMAKE_LINK_OBJECT_SCRIPT=
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal -lbafl -lapparc
-QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lcentralrepository
+QMAKE_LIBS_CFBSBITMAP = -lfbscli -lbitgdi -lgdi
+QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE $$QMAKE_LIBS_CFBSBITMAP -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lcentralrepository
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL = -llibGLESv2
QMAKE_LIBS_OPENGL_ES1 = -llibGLESv1_CM
QMAKE_LIBS_OPENGL_ES2 = -llibGLESv2
-QMAKE_LIBS_OPENGL_QT = -llibGLESv2 -lcone -lws32
-QMAKE_LIBS_OPENGL_ES1_QT = -llibGLESv1_CM -lcone -lws32
-QMAKE_LIBS_OPENGL_ES2_QT = -llibGLESv2 -lcone -lws32
-QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi
+QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32
+QMAKE_LIBS_OPENGL_ES1_QT = $$QMAKE_LIBS_OPENGL_ES1 $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32
+QMAKE_LIBS_OPENGL_ES2_QT = $$QMAKE_LIBS_OPENGL_ES2 $$QMAKE_LIBS_CFBSBITMAP -lcone -lws32
+QMAKE_LIBS_OPENVG = $$QMAKE_LIBS_CFBSBITMAP -llibOpenVG
QMAKE_LIBS_THREAD = -llibpthread
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_S60 = -lavkon -leikcoctl
@@ -92,7 +94,7 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = move
- QMAKE_DEL_FILE = del 2> NUL
+ QMAKE_DEL_FILE = del /q 2> NUL
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
QMAKE_DEL_TREE = rmdir /s /q
@@ -117,11 +119,11 @@ contains(QMAKE_HOST.os,Windows) {
}
QMAKE_IDL = midl
-QMAKE_LIB = ar -ru
-QMAKE_RC = windres
QMAKE_ZIP = zip -r -9
QMAKE_UNZIP = unzip -o
+QMAKE_WRITE_DEFAULT_RC = 1
+
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
@@ -161,28 +163,35 @@ exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) {
}
# Try to detect SDK version if it wasn't set by environment.prf
-isEmpty(SYMBIAN_VERSION) {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Symbianv4.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/Symbianv4.sis) {
- SYMBIAN_VERSION = Symbian4
+isEmpty(SYMBIAN_VERSION)|isEmpty(S60_VERSION) {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.3.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.3.sis) {
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3
+ isEmpty(S60_VERSION): S60_VERSION = 5.3
} else {
# The Symbian^3 PDK does not necessarily contain the required sis files.
# However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too.
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) {
- SYMBIAN_VERSION = Symbian3
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3
+ isEmpty(S60_VERSION): S60_VERSION = 5.2
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) {
- SYMBIAN_VERSION = Symbian2
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian2
+ isEmpty(S60_VERSION): S60_VERSION = 5.1
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
- SYMBIAN_VERSION = 9.4
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.4
+ isEmpty(S60_VERSION): S60_VERSION = 5.0
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
- SYMBIAN_VERSION = 9.3
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.3
+ isEmpty(S60_VERSION): S60_VERSION = 3.2
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.1.sis) {
- SYMBIAN_VERSION = 9.2
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.2
+ isEmpty(S60_VERSION): S60_VERSION = 3.1
} else {
- SYMBIAN_VERSION = Unknown
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Unknown
+ isEmpty(S60_VERSION): S60_VERSION = Unknown
}
}
}
@@ -191,22 +200,6 @@ isEmpty(SYMBIAN_VERSION) {
}
}
-isEmpty(S60_VERSION) {
- contains(SYMBIAN_VERSION, "9\\.2") {
- S60_VERSION = 3.1
- } else:contains(SYMBIAN_VERSION, "9\\.3") {
- S60_VERSION = 3.2
- } else:contains(SYMBIAN_VERSION, "9\\.4") {
- S60_VERSION = 5.0
- } else:contains(SYMBIAN_VERSION, "Symbian2") {
- S60_VERSION = 5.1
- } else:contains(SYMBIAN_VERSION, "Symbian3") {
- S60_VERSION = 5.2
- } else {
- S60_VERSION = Unknown
- }
-}
-
# pkg_depends_webkit, pkg_depends_core, and pkg_platform_dependencies can be removed by developer
# if multiple languages need to be supported by pkg file. In that case the developer should declare
# multiple language compatible dependency statements him/herself.
@@ -229,16 +222,44 @@ defineReplace(symbianRemoveSpecialCharacters) {
# Determines translations that are Symbian supported
defineTest(matchSymbianLanguages) {
+ # Qt language codes for which we need to parse .ts file
SYMBIAN_MATCHED_LANGUAGES =
+ # List of translation files for matched languages
SYMBIAN_MATCHED_TRANSLATIONS =
+ # List of Qt language codes for which we have no mapped Symbian code but we have a fallback code
+ # and therefore need to generate a mapping for in localize_deployment.prf.
+ # The fallback code means plain language code for languages that have both language and country codes.
+ # E.g. the fallback code for language "zh_CN" would be "zh".
+ SYMBIAN_UNMAPPED_LANGUAGES =
+ # List of handled Qt language codes to avoid duplicate Symbian language codes in case both
+ # unmapped language+country combination and its fallback code, or multiple unmapped language+country
+ # combinations that have same fallback code are included.
+ HANDLED_LANGUAGES =
# Cannot parse .ts file for language here, so detect it from filename.
# Allow two and three character language and country codes.
for(translation, TRANSLATIONS) {
language = $$replace(translation, "^(.*/)?[^/]+_(([^_]{2,3}_)?[^_]{2,3})\\.ts$", \\2)
- contains(SYMBIAN_SUPPORTED_LANGUAGES, $$language) {
- SYMBIAN_MATCHED_LANGUAGES += $$language
- SYMBIAN_MATCHED_TRANSLATIONS += $$translation
+ !contains(HANDLED_LANGUAGES, $$language) {
+ HANDLED_LANGUAGES += $$language
+ # Make sure translation path is absolute or shadow builds will not work
+ !contains(translation, "(^/|^\\\\|^.:).*"): translation = $$_PRO_FILE_PWD_/$$translation
+
+ contains(SYMBIAN_SUPPORTED_LANGUAGES, $$language) {
+ SYMBIAN_MATCHED_LANGUAGES += $$language
+ SYMBIAN_MATCHED_TRANSLATIONS += $$translation
+ } else {
+ # No direct mapping for specified language found. Check if a fallback language code can be used.
+ strippedLanguage = $$replace(language, "_.*$",)
+ contains(SYMBIAN_SUPPORTED_LANGUAGES, $$strippedLanguage):!contains(HANDLED_LANGUAGES, $$strippedLanguage) {
+ HANDLED_LANGUAGES += $$strippedLanguage
+ SYMBIAN_UNMAPPED_LANGUAGES += $$language
+ SYMBIAN_MATCHED_LANGUAGES += $$language
+ SYMBIAN_MATCHED_TRANSLATIONS += $$translation
+ SYMBIAN_LANGUAGE_FALLBACK.$$language = $$strippedLanguage
+ export(SYMBIAN_LANGUAGE_FALLBACK.$$language)
+ }
+ }
}
}
@@ -246,6 +267,7 @@ defineTest(matchSymbianLanguages) {
export(SYMBIAN_MATCHED_LANGUAGES)
export(SYMBIAN_MATCHED_TRANSLATIONS)
+ export(SYMBIAN_UNMAPPED_LANGUAGES)
}
# Symbian pkg files that define multiple languages require a language specific string to be
diff --git a/mkspecs/common/symbian/symbianincludes.h b/mkspecs/common/symbian/symbianincludes.h
new file mode 100644
index 0000000000..5d7f488fdb
--- /dev/null
+++ b/mkspecs/common/symbian/symbianincludes.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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 mkspecs 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$
+**
+****************************************************************************/
+
+#ifndef __PRODUCT_INCLUDE__
+# ifdef __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
+# define __PRODUCT_INCLUDE__ <variant/symbian_os.hrh>
+# else
+# define __PRODUCT_INCLUDE__ <variant/Symbian_OS.hrh>
+# endif
+#endif
+
+#ifndef __QT_SYMBIAN_RESOURCE__
+# if defined(__ARMCC__) || defined(__CC_ARM)
+# ifdef __QT_RVCT_HEADER_IS_2_2__
+# include <rvct2_2.h>
+# else
+# include <rvct.h>
+# endif
+# endif
+#endif
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
index a81a0ccde1..97ccc44066 100644
--- a/mkspecs/features/incredibuild_xge.prf
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -1,4 +1,4 @@
-contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") {
+contains(TEMPLATE, "vc.*") {
EOC = $$escape_expand(\\n\\t)
# The VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 89e9b40a2f..d0b36e41b2 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -16,7 +16,7 @@ win32:count($$list($$INCLUDEPATH), 40, >) {
EOC = $$escape_expand(\\n\\t)
- if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) {
+ contains(TEMPLATE, "vc.*") {
# the VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
if(win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\\r\\h)
@@ -42,7 +42,7 @@ win32:count($$list($$INCLUDEPATH), 40, >) {
defineReplace(mocCmdBase) {
!isEmpty(WIN_INCLUDETEMP) {
RET =
- if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) {
+ contains(TEMPLATE, "vc.*") {
RET += $$mocinclude.commands
}
RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
@@ -59,7 +59,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK
moc_header.input = HEADERS
moc_header.variable_out = SOURCES
moc_header.name = MOC ${QMAKE_FILE_IN}
-if(!contains(TEMPLATE, "vc.*"):!contains(TEMPLATE_PREFIX, "vc")) {
+!contains(TEMPLATE, "vc.*") {
!isEmpty(INCLUDETEMP):moc_header.depends += $$INCLUDETEMP
}
silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands
@@ -73,7 +73,7 @@ moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_
moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
moc_source.input = SOURCES OBJECTIVE_SOURCES
moc_source.name = MOC ${QMAKE_FILE_IN}
-if(!contains(TEMPLATE, "vc.*"):!contains(TEMPLATE_PREFIX, "vc")) {
+!contains(TEMPLATE, "vc.*") {
!isEmpty(INCLUDETEMP):moc_source.depends += $$INCLUDETEMP
}
silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 4a59116e58..746de6a242 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -7,6 +7,18 @@ CONFIG -= def_files_disabled
equals(QMAKE_TARGET_PRODUCT, Qt4)|equals(QMAKE_TARGET_PRODUCT, QTestLib):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
else:clean_TARGET = $$TARGET
+defineTest(qtTestIfDirExists) {
+ contains(QMAKE_HOST.os,Windows) {
+ dirToTest = $$1
+ $$dirToTest ~= s,/,\\,
+ # Windows trick. Test for existence of nul, which every directory has.
+ retValue = $$system("if exist $$dirToTest\\nul echo true")
+ contains(retValue, true):return(true)|return(false)
+ } else {
+ system("test -d $$1"):return(true)|return(false)
+ }
+}
+
symbian-abld|symbian-sbsv2 {
# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
@@ -52,9 +64,11 @@ symbian-abld|symbian-sbsv2 {
} else {
defFile = .
}
- system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
+ qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) {
!exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
- system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
+ dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi
+ contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\,
+ system("$$QMAKE_MKDIR $$dirToCreate")
}
elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def
} else {
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 126981e78f..ce3453a857 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -53,13 +53,45 @@ isEmpty(TARGET.UID2) {
}
}
-# Supports Symbian^3 and Symbian^4 by default and also S60 3.1, 3.2, and 5.0 if built against any of those.
+# Add dependency to Qt package to all other projects besides Qt libs.
+# Note: Qt libs package with full capabilities has UID3 of 0x2001E61C,
+# while self-signed version typically has temporary UID3 of 0xE001E61C.
+contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C):isEmpty(QT_LIBINFIX) {
+ qt_pkg_name = Qt
+ pkg_depends_qt += \
+ "; Default dependency to Qt libraries" \
+ "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(qt_pkg_name)}"
+
+ # Projects linking to webkit need dependency to webkit
+ contains(QT, webkit): {
+ # these can be overridden by mkspecs/modules/qt_webkit.pri
+ isEmpty(QT_WEBKIT_MAJOR_VERSION) {
+ QT_WEBKIT_MAJOR_VERSION = $${QT_MAJOR_VERSION}
+ QT_WEBKIT_MINOR_VERSION = $${QT_MINOR_VERSION}
+ QT_WEBKIT_PATCH_VERSION = $${QT_PATCH_VERSION}
+ }
+
+ webkit_pkg_name = QtWebKit
+ pkg_depends_webkit += \
+ "; Dependency to Qt Webkit" \
+ "(0x200267C2), $${QT_WEBKIT_MAJOR_VERSION}, $${QT_WEBKIT_MINOR_VERSION}, $${QT_WEBKIT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(webkit_pkg_name)}"
+ } else {
+ default_deployment.pkg_prerules -= pkg_depends_webkit
+ }
+} else {
+ default_deployment.pkg_prerules -= pkg_depends_webkit pkg_depends_qt
+}
+
+isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
+isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+
+# Supports Symbian^3 platforms by default and also S60 3.1, 3.2, and 5.0 if built against any of those.
platform_product_id = S60ProductID
platform_product_id = $$addLanguageDependentPkgItem(platform_product_id)
pkg_platform_dependencies = \
"; Default HW/platform dependencies" \
"[0x20022E6D],0,0,0,{$$platform_product_id}" \
- "[0x20032DE7],0,0,0,{$$platform_product_id}"
+ "[0x2003A678],0,0,0,{$$platform_product_id}"
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
pkg_platform_dependencies += \
"[0x102032BE],0,0,0,{$$platform_product_id}" \
diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf
index 60d9382c2c..91a63c2263 100644
--- a/mkspecs/features/symbian/do_not_build_as_thumb.prf
+++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf
@@ -1,8 +1,13 @@
symbian-abld|symbian-sbsv2 {
MMP_RULES += ALWAYS_BUILD_AS_ARM
-} else:linux-armcc {
+} else:symbian-armcc {
QMAKE_CFLAGS -= --thumb
QMAKE_CFLAGS += --arm
QMAKE_CXXFLAGS -= --thumb
QMAKE_CXXFLAGS += --arm
+} else:symbian-gcce {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += -marm -mthumb-interwork -mapcs
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += -marm -mthumb-interwork -mapcs
}
diff --git a/mkspecs/features/symbian/localize_deployment.prf b/mkspecs/features/symbian/localize_deployment.prf
index 26a254b6be..185c7130c0 100644
--- a/mkspecs/features/symbian/localize_deployment.prf
+++ b/mkspecs/features/symbian/localize_deployment.prf
@@ -101,6 +101,15 @@ isEmpty(SYMBIAN_MATCHED_LANGUAGES) {
matchSymbianLanguages()
}
+# If there are translations that do not have Symbian language code defined for that exact
+# language + country combination, but have Symbian language code defined for just the language,
+# map the language + country combination to the same value as the plain language.
+for(language, SYMBIAN_UNMAPPED_LANGUAGES) {
+ languageVar = SYMBIAN_LANG.$${language}
+ fallbackLanguageVar = SYMBIAN_LANG.$$eval(SYMBIAN_LANGUAGE_FALLBACK.$$language)
+ $$languageVar = $$eval($$fallbackLanguageVar)
+}
+
!isEmpty(SYMBIAN_MATCHED_TRANSLATIONS) {
# Generate dependencies to .ts files for pkg files
template_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS
diff --git a/mkspecs/features/symbian/prepend_includepath.prf b/mkspecs/features/symbian/prepend_includepath.prf
new file mode 100644
index 0000000000..d9fd4fe46e
--- /dev/null
+++ b/mkspecs/features/symbian/prepend_includepath.prf
@@ -0,0 +1,14 @@
+# Allow .pro files to specify include path(s) to be prepended to the list.
+#
+# This allows the project to override the default ordering, whereby paths
+# relative to $$QMAKE_INCDIR_QT always come first. This ordering can cause
+# problems when both the epoc32/include tree and a Qt include directory
+# contain a header of the same name - in this case, the Qt header is always
+# included by virtue of its path appearing first in the SYSTEMINCLUDE
+# directives in the generated MMP file.
+#
+# To work around this situation, the following line can be added to the .pro
+# file:
+# PREPEND_INCLUDEPATH = /epoc32/include
+#
+INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index c8f97aa439..c376b642d1 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -6,53 +6,6 @@ CONFIG += qtmain
load(qt)
-# Allow .pro files to specify include path(s) to be prepended to the list.
-#
-# This allows the project to override the default ordering, whereby paths
-# relative to $$QMAKE_INCDIR_QT always come first. This ordering can cause
-# problems when both the epoc32/include tree and a Qt include directory
-# contain a header of the same name - in this case, the Qt header is always
-# included by virtue of its path appearing first in the SYSTEMINCLUDE
-# directives in the generated MMP file.
-#
-# To work around this situation, the following line can be added to the .pro
-# file:
-# PREPEND_INCLUDEPATH = /epoc32/include
-#
-INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH
-
-# Add dependency to Qt package to all other projects besides Qt libs.
-# Note: Qt libs package with full capabilities has UID3 of 0x2001E61C,
-# while self-signed version typically has temporary UID3 of 0xE001E61C.
-contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C):isEmpty(QT_LIBINFIX) {
- qt_pkg_name = Qt
- pkg_depends_qt += \
- "; Default dependency to Qt libraries" \
- "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(qt_pkg_name)}"
-
- # Projects linking to webkit need dependency to webkit
- contains(QT, webkit): {
- # these can be overridden by mkspecs/modules/qt_webkit.pri
- isEmpty(QT_WEBKIT_MAJOR_VERSION) {
- QT_WEBKIT_MAJOR_VERSION = $${QT_MAJOR_VERSION}
- QT_WEBKIT_MINOR_VERSION = $${QT_MINOR_VERSION}
- QT_WEBKIT_PATCH_VERSION = $${QT_PATCH_VERSION}
- }
-
- webkit_pkg_name = QtWebKit
- pkg_depends_webkit += \
- "; Dependency to Qt Webkit" \
- "(0x200267C2), $${QT_WEBKIT_MAJOR_VERSION}, $${QT_WEBKIT_MINOR_VERSION}, $${QT_WEBKIT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(webkit_pkg_name)}"
- } else {
- default_deployment.pkg_prerules -= pkg_depends_webkit
- }
-} else {
- default_deployment.pkg_prerules -= pkg_depends_webkit pkg_depends_qt
-}
-
-isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
-isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-
# Workaround for the fact that Gnupoc and Symbian chose different approaches to
# the letter casing of headers.
contains(CONFIG, is_using_gnupoc) {
diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf
index 2f446dc830..82c18621b7 100644
--- a/mkspecs/features/symbian/qt_config.prf
+++ b/mkspecs/features/symbian/qt_config.prf
@@ -3,7 +3,7 @@ load(qt_config)
!contains(QMAKE_HOST.os, "Windows") {
# Test for the existence of lower cased headers, a sign of using Gnupoc.
# Note that the qmake "exists" test won't do because it is case insensitive.
- system("test -f $${EPOCROOT}/epoc32/include/akndoc.h") {
+ system("test -f $${EPOCROOT}epoc32/include/akndoc.h") {
CONFIG += is_using_gnupoc
}
}
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index 0d2e05387b..8c757077d3 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -1,9 +1,16 @@
-linux-armcc {
+symbian-armcc {
QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
-} else:linux-gcce {
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS.ARMCC
+ # This is to prevent inclusion of the shipped RVCT headers, which are often in the
+ # environment variable RVCTxxINC by default. -J prevents the searching of that location,
+ # but needs a path, so just specify somewhere guaranteed not to contain header files.
+ QMAKE_CFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
+ QMAKE_CXXFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
+} else:symbian-gcce {
QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS.GCCE
}
# We need a target name without the INFIX'ed part, since flags are not infixed.
@@ -16,7 +23,7 @@ else:clean_TARGET = $$TARGET
!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS)
!isEmpty(TMPVAR) {
QMAKE_LFLAGS += $$TMPVAR
-} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains
+} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains
QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
}
@@ -62,8 +69,8 @@ for(libToProcess, libsToProcess) {
} else {
qt_newLib = $$processSymbianLibrary($$qt_library)
contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib
- linux-gcce:qt_newLib = "-l:$$qt_newLib"
- eval($$libToProcess += \$\$qt_newLib)
+ symbian-gcce:qt_newLib = "-l:$$qt_newLib"
+ eval($$libToProcess *= \$\$qt_newLib)
}
}
}
@@ -89,12 +96,13 @@ count(splitVersion, 0) {
decVersion = "10.0"
} else {
count(splitVersion, 3) {
- hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'")
- hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")
- hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")
- decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'").
+ hexVersion = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"")
+ hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")
+ hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")
+ decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\"").
hexVersion = $$hexVersion$$hexPart2
- decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'")
+ decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"")
+
!contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}"
} else { # app code may have different numbering...
hexVersion = $$VERSION
@@ -117,7 +125,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
&& $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \
--sid=$$TARGET.SID \
--uid1=0x10000079 \
@@ -129,7 +139,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
--tmpdso=$${symbianObjdir}/$${baseTarget}.dso \
--dso=$${symbianDestdir}/$${baseTarget}.dso \
--defoutput=$$symbianObjdir/$${baseTarget}.def \
- --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \
--heap=$$epoc_heap_size \
--stack=$$TARGET.EPOCSTACKSIZE \
$$elf2e32_LIBPATH \
@@ -142,10 +152,15 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso
QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def
- linux-armcc: {
- LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
- LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
- } else :linux-gcce {
+ symbian-armcc: {
+ LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso
+ # Quotation unfortunately is different on Windows and unix.
+ contains(QMAKE_HOST.os, Windows) {
+ LIBS += \"h_t__uf.l(switch8.o)\" edllstub.lib \"edll.lib(uc_dll_.o)\"
+ } else {
+ LIBS += h_t__uf.l\\(switch8.o\\) edllstub.lib edll.lib\\(uc_dll_.o\\)
+ }
+ } else :symbian-gcce {
LIBS += \
-l:edllstub.lib \
-l:edll.lib \
@@ -157,13 +172,15 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
-lgcc
}
- QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\"
DEFINES += __DLL__
}
contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym \
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
&& $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \
--sid=$$TARGET.SID \
--uid1=0x1000007a \
@@ -172,7 +189,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
--targettype=EXE \
--elfinput=$${symbianDestdir}/$${baseTarget}.sym \
--output=$${symbianDestdir}/$${baseTarget}.exe \
- --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \
--heap=$$epoc_heap_size \
--stack=$$TARGET.EPOCSTACKSIZE \
$$elf2e32_LIBPATH \
@@ -185,7 +202,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe
QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget}
- linux-armcc: {
+ symbian-armcc: {
QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
contains(CONFIG, "qt") {
@@ -195,7 +212,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
QMAKE_LIBS -= $$QMAKE_LIBS_NO_QT_ENTRY
QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY
}
- } else :linux-gcce {
+ } else :symbian-gcce {
# notice that we can't merge these as ordering of arguments is important.
QMAKE_LIBS += \
-l:eexe.lib \
@@ -220,18 +237,14 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
QMAKE_LFLAGS += --shared
}
- QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\"
DEFINES += __EXE__
}
# Symbian resource files
-linux-armcc: {
- SYMBIAN_RVCT22INC=$$(RVCT22INC)
- !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC}
-}
-symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
-symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
+symbian_resources_INCLUDES = $$join(INCLUDEPATH, " -I", "-I")
symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
+symbian_resources_DEFINES += -D__QT_SYMBIAN_RESOURCE__
symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR"
@@ -246,6 +259,7 @@ for(symbian_resource, SYMBIAN_RESOURCES) {
symbianresources.input = SYMBIAN_RESOURCES
symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg
symbianresources.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
${QMAKE_FILE_NAME} \
@@ -261,46 +275,79 @@ symbianresources.CONFIG = no_link target_predeps
QMAKE_EXTRA_COMPILERS += symbianresources
+# This section generates the rsg and rsc files for symbian.
contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
- # Make our own extra target in order to get dependencies for generated
- # files right. This also avoids the warning about files not found.
- symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
- symbianGenResource.commands = cpp -nostdinc -undef \
- $$symbian_resources_INCLUDES \
- $$symbian_resources_DEFINES \
- $${baseTarget}.rss \
- > $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
- && rcomp -u -m045,046,047 \
- -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
- -o$${symbianDestdir}/$${baseTarget}.rsc \
- -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \
- -i$${baseTarget}.rss
- silent:symbianGenResource.commands = @echo rcomp $${baseTarget}.rss && $$symbianGenResource.commands
- symbianGenResource.depends = $${baseTarget}.rss
- PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
- QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
- QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
- QMAKE_DISTCLEAN += $${baseTarget}.rss
- QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc
-
- symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
- symbianGenRegResource.commands = cpp -nostdinc -undef \
- $$symbian_resources_INCLUDES \
- $$symbian_resources_DEFINES \
- $${baseTarget}_reg.rss \
- > $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
- && rcomp -u -m045,046,047 \
- -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
- -o$${symbianDestdir}/$${baseTarget}_reg.rsc \
- -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \
- -i$${baseTarget}_reg.rss
- silent:symbianGenRegResource.commands = @echo rcomp $${baseTarget}_reg.rss && $$symbianGenRegResource.commands
- symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
- PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
- QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
- QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
- QMAKE_DISTCLEAN += $${baseTarget}_reg.rss
- QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}_reg.rsc
+ # Look for extra languages for the resources, and then generate a target for each one.
+ localize_deployment:symbianGenResourceLanguages = $$SYMBIAN_MATCHED_LANGUAGES default
+ else:symbianGenResourceLanguages = default
+ for(language, symbianGenResourceLanguages) {
+ # Special languages get their language number appended to the filename.
+ contains(language, default) {
+ symbianGenResource_DEFINES = $$symbian_resources_DEFINES
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}.rsc
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ } else {
+ languageNo = $$eval(SYMBIAN_LANG.$$language)
+ symbianGenResource_DEFINES = $$symbian_resources_DEFINES -DLANGUAGE_$${languageNo}
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}.r$${languageNo}
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rsg
+ }
+
+ # Make our own extra target in order to get dependencies for generated
+ # files right. This also avoids the warning about files not found.
+ eval(symbianGenResource_$${language}.target = $$rsg)
+ eval(symbianGenResource_$${language}.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
+ $$symbian_resources_INCLUDES \
+ $$symbianGenResource_DEFINES \
+ $${baseTarget}.rss \
+ > $$rpp \
+ && rcomp -u -m045,046,047 \
+ -s$$rpp \
+ -o$$rsc \
+ -h$$rsg \
+ -i$${baseTarget}.rss)
+ silent:eval(symbianGenResource_$${language}.commands = @echo rcomp $${baseTarget}.rss && $$eval(symbianGenResource_$${language}.commands))
+ eval(symbianGenResource_$${language}.depends = $${baseTarget}.rss)
+ PRE_TARGETDEPS += $$rsg
+ QMAKE_CLEAN += $$rsg $$rpp
+ QMAKE_DISTCLEAN += $$rsc
+
+ QMAKE_EXTRA_TARGETS += symbianGenResource_$${language}
+
+ # Note that we depend on the base rsg file, even if dealing with a specific language.
+ # hence we don't use $$rsg on the next line.
+ eval(symbianGenRegResource_$${language}.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg)
+ contains(language, default) {
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}_reg.rsc
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ } else {
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}_reg.r$${languageNo}
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rsg
+ }
+ eval(symbianGenRegResource_$${language}.target = $$rsg)
+ eval(symbianGenRegResource_$${language}.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
+ $$symbian_resources_INCLUDES \
+ $$symbianGenResource_DEFINES \
+ $${baseTarget}_reg.rss \
+ > $$rpp \
+ && rcomp -u -m045,046,047 \
+ -s$$rpp \
+ -o$$rsc \
+ -h$$rsg \
+ -i$${baseTarget}_reg.rss)
+ silent:eval(symbianGenRegResource_$${language}.commands = @echo rcomp $${baseTarget}_reg.rss && $$eval(symbianGenRegResource_$${language}.commands))
+ PRE_TARGETDEPS += $$rsg
+ QMAKE_CLEAN += $$rsg $$rpp
+ QMAKE_DISTCLEAN += $$rsc
+
+ QMAKE_EXTRA_TARGETS += symbianGenRegResource_$${language}
+ }
# Trick to get qmake to create the RCC_DIR for us.
symbianRccDirCreation.input = SOURCES
@@ -308,14 +355,15 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy
symbianRccDirCreation.CONFIG = no_link combine
- QMAKE_EXTRA_TARGETS += symbianGenResource symbianGenRegResource
QMAKE_EXTRA_COMPILERS += symbianRccDirCreation
- QMAKE_DISTCLEAN += $${baseTarget}.loc
+ QMAKE_DISTCLEAN += $${baseTarget}.rss \
+ $${baseTarget}_reg.rss \
+ $${baseTarget}.loc
}
# Generated pkg files
-QMAKE_DISTCLEAN += $${baseTarget}_template.pkg
-QMAKE_DISTCLEAN += $${baseTarget}_installer.pkg
-QMAKE_DISTCLEAN += $${baseTarget}_stub.pkg
+QMAKE_DISTCLEAN += $${baseTarget}_template.pkg \
+ $${baseTarget}_installer.pkg \
+ $${baseTarget}_stub.pkg
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 0a18b478ce..74a26833a4 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -77,6 +77,7 @@ uic3 {
uic3_moc.input = UIC3_HEADERS
uic3_moc.variable_out = GENERATED_SOURCES
uic3_moc.name = $$moc_header.name
+ !contains(TEMPLATE, "vc.*"):!isEmpty(INCLUDETEMP):uic3_moc.depends += $$INCLUDETEMP
QMAKE_EXTRA_COMPILERS += uic3_moc
}
diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf
index 69c9d1d3d0..5545a62c45 100644
--- a/mkspecs/features/win32/embed_manifest_dll.prf
+++ b/mkspecs/features/win32/embed_manifest_dll.prf
@@ -1,4 +1,4 @@
-!if(plugin:no_plugin_manifest):if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!static:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "lib") {
+!if(plugin:no_plugin_manifest):if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!static:equals(TEMPLATE, "lib") {
MANIFEST_DIR = $$OBJECTS_DIR
isEmpty(MANIFEST_DIR):MANIFEST_DIR = .
NOPATH_TARGET = $$TARGET
diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
index 44aadfa15a..c6d012e55c 100644
--- a/mkspecs/features/win32/embed_manifest_exe.prf
+++ b/mkspecs/features/win32/embed_manifest_exe.prf
@@ -1,4 +1,4 @@
-if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") {
+if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):equals(TEMPLATE, "app") {
MANIFEST_DIR = $$OBJECTS_DIR
isEmpty(MANIFEST_DIR):MANIFEST_DIR = .
NOPATH_TARGET = $$TARGET
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
index 2899976644..a6c0869540 100644
--- a/mkspecs/features/win32/qaxserver.prf
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -8,12 +8,7 @@ isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0
DEFINES += QAXSERVER
-ACTIVEQT_IDE = makefile
-equals(TEMPLATE_PREFIX, "vc"):ACTIVEQT_IDE = VisualStudio
-equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
-equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
-
-equals(ACTIVEQT_IDE, "VisualStudio") {
+contains(TEMPLATE, "vc.*") {
ACTIVEQT_IDC = $${QMAKE_IDC} ### Qt5: remove me
qtPrepareTool(ACTIVEQT_IDC, idc)
ACTIVEQT_IDL = $${QMAKE_IDL}
@@ -27,8 +22,7 @@ equals(ACTIVEQT_IDE, "VisualStudio") {
}
ACTIVEQT_TLBOUT = "$(TargetDir)/$${TARGET}.tlb"
GENERATED += $${OBJECTS_DIR}/$${TARGET}.idl $${ACTIVEQT_TLBOUT}
-}
-equals(ACTIVEQT_IDE, "makefile") {
+} else {
ACTIVEQT_IDC = -$(IDC)
ACTIVEQT_IDL = -$(IDL)
ACTIVEQT_NEWLINE = $$escape_expand(\\n\\t)
diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian-armcc/features/default_post.prf
index 7aa1f4d2b3..7aa1f4d2b3 100644
--- a/mkspecs/symbian/linux-armcc/features/default_post.prf
+++ b/mkspecs/symbian-armcc/features/default_post.prf
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf
index f058421e51..2de32182c4 100644
--- a/mkspecs/symbian/linux-armcc/qmake.conf
+++ b/mkspecs/symbian-armcc/qmake.conf
@@ -1,10 +1,10 @@
#
-# qmake configuration for symbian/linux-armcc
+# qmake configuration for symbian-armcc
#
-include(../../common/symbian/symbian-makefile.conf)
+include(../common/symbian/symbian-makefile.conf)
-include(../../common/armcc.conf)
+include(../common/armcc.conf)
QMAKE_RVCT_LINKSTYLE = 1
@@ -12,7 +12,7 @@ QMAKE_RVCT_LINKSTYLE = 1
#QMAKE_qtmain_CXXFLAGS = --arm
#QMAKE_QtCore_CXXFLAGS =
-QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
+#QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
#QMAKE_QtDBus_CXXFLAGS =
#QMAKE_QtDeclarative_CXXFLAGS =
#QMAKE_QtMultimedia_CXXFLAGS =
@@ -27,9 +27,9 @@ QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
#QMAKE_QtTest_CXXFLAGS =
#QMAKE_QtXmlPatterns_CXXFLAGS =
#QMAKE_QtXml_CXXFLAGS =
-QMAKE_QtWebKit_CXXFLAGS = --arm
+#QMAKE_QtWebKit_CXXFLAGS = --arm
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
-QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000
+#QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000
QMAKE_CFLAGS += --dllimport_runtime --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
@@ -53,10 +53,7 @@ INCLUDEPATH = $${EPOCROOT}epoc32/include \
exists($${EPOCROOT}epoc32/include/rvct2_2) {
INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2
- QMAKE_CFLAGS += --preinclude rvct2_2.h
- QMAKE_CXXFLAGS += --preinclude rvct2_2.h
+ DEFINES *= __QT_RVCT_HEADER_IS_2_2__
} else {
INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct
- QMAKE_CFLAGS += --preinclude rvct.h
- QMAKE_CXXFLAGS += --preinclude rvct.h
}
diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian-armcc/qplatformdefs.h
index 19c97ff889..0eb74ca854 100644
--- a/mkspecs/symbian/linux-armcc/qplatformdefs.h
+++ b/mkspecs/symbian-armcc/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../../common/symbian/qplatformdefs.h"
+#include "../common/symbian/qplatformdefs.h"
diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian-gcce/features/default_post.prf
index 7aa1f4d2b3..7aa1f4d2b3 100644
--- a/mkspecs/symbian/linux-gcce/features/default_post.prf
+++ b/mkspecs/symbian-gcce/features/default_post.prf
diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf
index 62cc9aee98..38042e9984 100644
--- a/mkspecs/symbian/linux-gcce/qmake.conf
+++ b/mkspecs/symbian-gcce/qmake.conf
@@ -1,10 +1,10 @@
#
-# qmake configuration for symbian/linux-gcce
+# qmake configuration for symbian-gcce
#
-include(../../common/symbian/symbian-makefile.conf)
+include(../common/symbian/symbian-makefile.conf)
-include(../../common/g++.conf)
+include(../common/g++.conf)
QMAKE_CC = arm-none-symbianelf-gcc
QMAKE_CXX = arm-none-symbianelf-g++
@@ -19,7 +19,7 @@ QMAKE_AR = arm-none-symbianelf-ar cqs
QMAKE_qtmain_CXXFLAGS = -mthumb
QMAKE_QtCore_CXXFLAGS = -mthumb
-QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+#QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
QMAKE_QtDBus_CXXFLAGS = -mthumb
QMAKE_QtDeclarative_CXXFLAGS = -mthumb
QMAKE_QtMultimedia_CXXFLAGS = -mthumb
@@ -34,8 +34,7 @@ QMAKE_QtSvg_CXXFLAGS = -mthumb
QMAKE_QtTest_CXXFLAGS = -mthumb
QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb
QMAKE_QtXml_CXXFLAGS = -mthumb
-#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b]
-QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+#QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
# never use -fPIC, gcce-linker doesn't like it.
# g++ conf above adds it if the host platform is 64 bit, so we remove it again
@@ -53,40 +52,40 @@ DEFINES += __GCCE__ \
UNICODE
QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup
-QMAKE_LFLAGS_SHLIB += --default-symver --entry=_E32Dll -u _E32Dll
+QMAKE_LFLAGS_SHLIB += -shared --default-symver --entry=_E32Dll -u _E32Dll
QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
-gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script
+gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script
QMAKE_CFLAGS += $${gcceExtraFlags}
-QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden -Os
#If we are not going to link to Qt or qtmain.lib, we need to include this at least once.
isEmpty(QT):contains(TEMPLATE, app) {
- QMAKE_CXXFLAGS += --include=${EPOCROOT}/epoc32/include/stdapis/staticlibinit_gcce.h
+ QMAKE_CXXFLAGS += --include=$${EPOCROOT}epoc32/include/stdapis/staticlibinit_gcce.h
}
QMAKE_LFLAGS += --target1-abs \
--no-undefined \
--nostdlib
-QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb/
# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
-QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs)
-for(line, QMAKE_GCC_SEARCH_DIRS) {
- contains(line, "libraries:") {
- foundIt="1"
- } else {
- contains(foundIt, "1") {
- QMAKE_LFLAGS += $$replace(line, "[=:]", " -L")
- }
- }
+QMAKE_GCC_SEARCH_DIRS = $$system($$QMAKE_CXX -print-search-dirs)
+QMAKE_GCC_SEARCH_DIRS = "$$join(QMAKE_GCC_SEARCH_DIRS, " ")"
+QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, ".*libraries: *", "")
+QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, "=", "")
+contains(QMAKE_HOST.os,Windows) {
+ QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, ;)
+} else {
+ QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, :)
}
+for(line, QMAKE_GCC_SEARCH_DIRS):QMAKE_LIBDIR += $$line
-QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
-INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \
- $${EPOCROOT}/epoc32/include/variant \
- $${EPOCROOT}/epoc32/include/stdapis \
- $${EPOCROOT}/epoc32/include/gcce \
+INCLUDEPATH = $${EPOCROOT}epoc32/include/ \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $${EPOCROOT}epoc32/include/gcce \
$$INCLUDEPATH
diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian-gcce/qplatformdefs.h
index ae46e15849..9d95a37966 100644
--- a/mkspecs/symbian/linux-gcce/qplatformdefs.h
+++ b/mkspecs/symbian-gcce/qplatformdefs.h
@@ -39,5 +39,5 @@
**
****************************************************************************/
-#include "../../common/symbian/qplatformdefs.h"
+#include "../common/symbian/qplatformdefs.h"
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
index fe35e6ef4d..c9a88fc4ca 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
@@ -13,6 +13,6 @@ SINGLETON:=$(call sanitise,QMAKE_CLEAN_SINGLETON_$(EXTENSION_ROOT))
ifeq ($($(SINGLETON)),)
# Prevent duplicate targets from being created
$(SINGLETON):=1
-$(eval $(call GenerateStandardCleanTarget,$(CLEAN_FILES),''))
+$(eval $(call GenerateStandardCleanTarget,$(wildcard $(patsubst "%",%,$(CLEAN_FILES)))))
endif
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
index 39ab0f090c..8791a47f5b 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
@@ -33,5 +33,6 @@ ifeq ($($(SINGLETON)),)
$(eval $(call qmake_emulator_deployment, $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_TARGET)), $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_SOURCE))))
$(call makepath,$(dir $(DEPLOY_TARGET)))
$(eval $(call GenerateStandardCleanTarget,$(CLEAN_TARGET),''))
+$(eval $(call whatmacro,$(CLEAN_TARGET)))
endif
diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf
index 7e077a178b..01e2f106f3 100644
--- a/mkspecs/unsupported/win32-g++-cross/qmake.conf
+++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf
@@ -52,8 +52,8 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
QMAKE_LINK = i686-pc-mingw32-g++
QMAKE_LINK_C = i686-pc-mingw32-gcc
-QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
-QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
QMAKE_LFLAGS_EXCEPTIONS_OFF =
QMAKE_LFLAGS_RELEASE = -Wl,-s
QMAKE_LFLAGS_DEBUG =
@@ -65,7 +65,7 @@ QMAKE_LINK_OBJECT_SCRIPT= object_script
QMAKE_LIBS =
-QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
+QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
QMAKE_LIBS_NETWORK = -lws2_32
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 65ae590cfc..220af32c54 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -52,7 +52,7 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
QMAKE_LINK = g++
QMAKE_LINK_C = gcc
-QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+QMAKE_LFLAGS =
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
QMAKE_LFLAGS_EXCEPTIONS_OFF =
QMAKE_LFLAGS_RELEASE = -Wl,-s
@@ -62,10 +62,12 @@ QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
QMAKE_LFLAGS_DLL = -shared
QMAKE_LINK_OBJECT_MAX = 10
QMAKE_LINK_OBJECT_SCRIPT= object_script
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a
QMAKE_LIBS =
-QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
+QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
QMAKE_LIBS_NETWORK = -lws2_32
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
@@ -80,7 +82,7 @@ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
QMAKE_COPY_DIR = cp -r
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm
- QMAKE_MKDIR = mkdir
+ QMAKE_MKDIR = mkdir -p
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
} else {
diff --git a/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf b/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf
index 3dab72ae80..900d758cc3 100644
--- a/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf
+++ b/mkspecs/wince50standard-armv4i-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+equals(TEMPLATE, "vc.*") {
DEFINES -= _M_ARM
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf b/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf
index d3e49aba08..4dbcf35d6c 100644
--- a/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf
+++ b/mkspecs/wince50standard-mipsii-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+contains(TEMPLATE, "vc.*") {
DEFINES -= _M_MRX000=3000
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wince50standard-x86-msvc2005/default_post.prf b/mkspecs/wince50standard-x86-msvc2005/default_post.prf
index 6790c60695..2436efb207 100644
--- a/mkspecs/wince50standard-x86-msvc2005/default_post.prf
+++ b/mkspecs/wince50standard-x86-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+equals(TEMPLATE, "vc.*") {
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wincewm50pocket-msvc2005/default_post.prf b/mkspecs/wincewm50pocket-msvc2005/default_post.prf
index 3dab72ae80..84ea15e095 100644
--- a/mkspecs/wincewm50pocket-msvc2005/default_post.prf
+++ b/mkspecs/wincewm50pocket-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+contains(TEMPLATE, "vc.*") {
DEFINES -= _M_ARM
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wincewm50smart-msvc2005/default_post.prf b/mkspecs/wincewm50smart-msvc2005/default_post.prf
index 3dab72ae80..84ea15e095 100644
--- a/mkspecs/wincewm50smart-msvc2005/default_post.prf
+++ b/mkspecs/wincewm50smart-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+contains(TEMPLATE, "vc.*") {
DEFINES -= _M_ARM
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wincewm60professional-msvc2005/default_post.prf b/mkspecs/wincewm60professional-msvc2005/default_post.prf
index 3dab72ae80..84ea15e095 100644
--- a/mkspecs/wincewm60professional-msvc2005/default_post.prf
+++ b/mkspecs/wincewm60professional-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+contains(TEMPLATE, "vc.*") {
DEFINES -= _M_ARM
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/mkspecs/wincewm60standard-msvc2005/default_post.prf b/mkspecs/wincewm60standard-msvc2005/default_post.prf
index 3dab72ae80..84ea15e095 100644
--- a/mkspecs/wincewm60standard-msvc2005/default_post.prf
+++ b/mkspecs/wincewm60standard-msvc2005/default_post.prf
@@ -1,6 +1,6 @@
# Visual Studio has some definitions set internally.
# Thus we do not need to redefine these.
-if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+contains(TEMPLATE, "vc.*") {
DEFINES -= _M_ARM
QMAKE_CXXFLAGS += -fp:precise
}
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index 29fbd0af7a..5a46e4138a 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT
CXXFLAGS = $(CFLAGS)
LFLAGS = -static-libgcc -static-libstdc++ -s
-LIBS = -lole32 -luuid
+LIBS = -lole32 -luuid -ladvapi32 -lkernel32
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 9c7942c3ca..6ca75149dd 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT
CXXFLAGS = $(CFLAGS)
LFLAGS = -static-libgcc -static-libstdc++ -s
-LIBS = -lole32 -luuid
+LIBS = -lole32 -luuid -ladvapi32 -lkernel32
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index c13f38ebdb..3c5948fd34 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -364,7 +364,7 @@ MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &v
dir = regex.left(regex.lastIndexOf(Option::dir_sep) + 1);
real_dir = dir;
if(!(flags & VPATH_NoFixify))
- real_dir = fileFixify(real_dir, qmake_getpwd(), Option::output_dir);
+ real_dir = fileFixify(real_dir, qmake_getpwd(), Option::output_dir) + '/';
regex.remove(0, dir.length());
}
if(real_dir.isEmpty() || exists(real_dir)) {
@@ -383,16 +383,15 @@ MakefileGenerator::findFilesInVPATH(QStringList l, uchar flags, const QString &v
for(int i = (int)files.count()-1; i >= 0; i--) {
if(files[i] == "." || files[i] == "..")
continue;
- a = dir + files[i];
+ a = real_dir + files[i];
if(!(flags & VPATH_NoFixify))
a = fileFixify(a);
l.insert(val_it, a);
}
}
} else {
- debug_msg(1, "%s:%d Cannot match %s%c%s, as %s does not exist.",
+ debug_msg(1, "%s:%d Cannot match %s%s, as %s does not exist.",
__FILE__, __LINE__, real_dir.toLatin1().constData(),
- QDir::separator().toLatin1(),
regex.toLatin1().constData(), real_dir.toLatin1().constData());
if(flags & VPATH_RemoveMissingFiles)
remove_file = true;
@@ -484,19 +483,22 @@ MakefileGenerator::init()
subs.at(i).toLatin1().constData());
continue;
}
- inn = tinn.first();
- outn = toutn.first();
+ inn = fileFixify(tinn.first(), qmake_getpwd());
+ outn = fileFixify(toutn.first(), qmake_getpwd(), Option::output_dir);
} else {
- inn = subs.at(i);
+ inn = fileFixify(subs.at(i), qmake_getpwd());
+ if (!QFile::exists(inn)) {
+ // random insanity for backwards compat: .in file specified with absolute out dir
+ inn = fileFixify(subs.at(i));
+ }
if(!inn.endsWith(".in")) {
warn_msg(WarnLogic, "Substitute '%s' does not end with '.in'",
inn.toLatin1().constData());
continue;
}
- outn = inn.left(inn.length()-3);
+ outn = fileFixify(inn.left(inn.length()-3), qmake_getpwd(), Option::output_dir);
}
- QFile in(fileFixify(inn));
- QFile out(fileFixify(outn, qmake_getpwd(), Option::output_dir));
+ QFile in(inn);
if(in.open(QFile::ReadOnly)) {
QString contents;
QStack<int> state;
@@ -545,9 +547,10 @@ MakefileGenerator::init()
else
state.pop();
} else if(state.isEmpty() || state.top() == IN_CONDITION) {
- contents += project->expand(line).join(QString(Option::field_sep));
+ contents += project->expand(line, in.fileName(), count);
}
}
+ QFile out(outn);
if(out.exists() && out.open(QFile::ReadOnly)) {
QString old = QString::fromUtf8(out.readAll());
if(contents == old) {
@@ -782,10 +785,8 @@ MakefileGenerator::init()
}
{ //get the output_dir into the pwd
- if(fileFixify(Option::output_dir) != fileFixify(qmake_getpwd()))
- project->values("INCLUDEPATH").append(fileFixify(Option::output_dir,
- Option::output_dir,
- Option::output_dir));
+ if(Option::output_dir != qmake_getpwd())
+ project->values("INCLUDEPATH").append(".");
}
//fix up the target deps
@@ -1746,7 +1747,7 @@ MakefileGenerator::writeExtraTargets(QTextStream &t)
deps += " " + escapeDependencyPath(dep);
}
if(project->values((*it) + ".CONFIG").indexOf("fix_target") != -1)
- targ = fileFixify(targ);
+ targ = fileFixify(targ, Option::output_dir, Option::output_dir);
if(project->isEmpty("QMAKE_NOFORCE") &&
project->values((*it) + ".CONFIG").indexOf("phony") != -1)
deps += QString(" ") + "FORCE";
@@ -2462,7 +2463,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
//qmake it
if(!subtarget->profile.isEmpty()) {
QString out = subtarget->makefile;
- QString in = fileFixify(in_directory + subtarget->profile, out_directory, QString(), FileFixifyAbsolute);
+ QString in = fileFixify(in_directory + subtarget->profile, FileFixifyAbsolute);
if(out.startsWith(in_directory))
out = out.mid(in_directory.length());
t << mkfile << ": " << "\n\t";
@@ -2825,9 +2826,6 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
return cacheVal;
//do the fixin'
- QString pwd = qmake_getpwd();
- if (!pwd.endsWith('/'))
- pwd += '/';
QString orig_file = ret;
if(ret.startsWith(QLatin1Char('~'))) {
if(ret.startsWith(QLatin1String("~/")))
@@ -2836,12 +2834,16 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
warn_msg(WarnLogic, "Unable to expand ~ in %s", ret.toLatin1().constData());
}
if(fix == FileFixifyAbsolute || (fix == FileFixifyDefault && project->isActiveConfig("no_fixpath"))) {
- if(fix == FileFixifyAbsolute && QDir::isRelativePath(ret)) //already absolute
+ if(fix == FileFixifyAbsolute && QDir::isRelativePath(ret)) { //already absolute
+ QString pwd = qmake_getpwd();
+ if (!pwd.endsWith(QLatin1Char('/')))
+ pwd += QLatin1Char('/');
ret.prepend(pwd);
+ }
ret = Option::fixPathToTargetOS(ret, false, canon);
} else { //fix it..
QString out_dir = QDir(Option::output_dir).absoluteFilePath(out_d);
- QString in_dir = QDir(pwd).absoluteFilePath(in_d);
+ QString in_dir = QDir(qmake_getpwd()).absoluteFilePath(in_d);
{
QFileInfo in_fi(fileInfo(in_dir));
if(in_fi.exists())
@@ -2895,6 +2897,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
//prepend
for(int o = 0; o < i; o++)
dot_prefix += ".." + Option::dir_sep;
+ break;
}
}
ret.prepend(dot_prefix);
@@ -2907,7 +2910,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
ret = ".";
debug_msg(3, "Fixed[%d,%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, canon, orig_file.toLatin1().constData(),
ret.toLatin1().constData(), in_d.toLatin1().constData(), out_d.toLatin1().constData(),
- pwd.toLatin1().constData(), Option::output_dir.toLatin1().constData());
+ qmake_getpwd().toLatin1().constData(), Option::output_dir.toLatin1().constData());
cache->insert(cacheKey, ret);
return ret;
}
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 6c43b6fd90..26d587d032 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -488,6 +488,8 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new SymbianSbsv2MakefileGenerator;
} else if(gen == "SYMBIAN_UNIX") {
mkfile = new SymbianMakefileTemplate<UnixMakefileGenerator>;
+ } else if(gen == "SYMBIAN_MINGW") {
+ mkfile = new SymbianMakefileTemplate<MingwMakefileGenerator>;
} else {
fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData());
}
@@ -544,7 +546,7 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen,
} else if (gen == "PROJECTBUILDER" || gen == "XCODE") {
*host_mode = Option::HOST_MACX_MODE;
*target_mode = Option::TARG_MACX_MODE;
- } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX") {
+ } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX" || gen == "SYMBIAN_MINGW") {
#if defined(Q_OS_MAC)
*host_mode = Option::HOST_MACX_MODE;
#elif defined(Q_OS_UNIX)
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 96d7725796..c0afaafc48 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -394,8 +394,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile,
t << manufacturerStr << endl;
}
- // ### FIXME: remove epocBuild check once makefile based mkspecs support localized resource generation
- if (epocBuild && symbianLocalizationList.size()) {
+ if (symbianLocalizationList.size()) {
// Add localized resources to DEPLOYMENT if default resource deployment is done
addLocalizedResourcesToDeployment("default_resource_deployment.sources", symbianLocalizationList);
addLocalizedResourcesToDeployment("default_reg_deployment.sources", symbianLocalizationList);
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index f94a63f06f..0fdef863b2 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -727,7 +727,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
QStringList absoluteCleanFiles;
foreach (QString cleanFile, cleanFiles) {
QFileInfo fi(cleanFile);
- absoluteCleanFiles << fi.absoluteFilePath();
+ QString fileName = QLatin1String("\"");
+ fileName.append(fi.absoluteFilePath());
+ fileName.append(QLatin1String("\""));
+ absoluteCleanFiles << fileName;
}
t << "START EXTENSION qt/qmake_clean" << endl;
t << "OPTION CLEAN_FILES " << absoluteCleanFiles.join(" ") << endl;
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index c660855e94..c0c0aaaefc 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -787,7 +787,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
ddir = project->first("QMAKE_DISTDIR");
QString ddir_c = escapeFilePath(fileFixify((project->isEmpty("OBJECTS_DIR") ? QString(".tmp/") :
- project->first("OBJECTS_DIR")) + ddir));
+ project->first("OBJECTS_DIR")) + ddir,
+ Option::output_dir, Option::output_dir));
t << "dist: " << "\n\t"
<< mkdir_p_asstring(ddir_c) << "\n\t"
<< "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && ";
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index ea9e9e17e2..60640809e3 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -199,8 +199,31 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
}
}
+void createRvctObjectScriptFile(const QString &fileName, const QStringList &objList)
+{
+ QString filePath = Option::output_dir + QDir::separator() + fileName;
+ QFile file(filePath);
+ if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ QTextStream t(&file);
+ for (QStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
+ if (QDir::isRelativePath(*it))
+ t << "./" << *it << endl;
+ else
+ t << *it << endl;
+ }
+ t.flush();
+ file.close();
+ }
+}
+
void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
{
+ if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
+ t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(";") << endl;
+ t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(";") << endl;
+ t << "\n\n";
+ }
+
writeStandardParts(t);
if (!preCompHeaderOut.isEmpty()) {
@@ -267,7 +290,7 @@ void MingwMakefileGenerator::init()
if(configs.indexOf("qt") == -1)
configs.append("qt");
- if(project->isActiveConfig("dll")) {
+ if(project->isActiveConfig("dll") && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty()) {
QString destDir = "";
if(!project->first("DESTDIR").isEmpty())
destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false);
@@ -276,7 +299,7 @@ void MingwMakefileGenerator::init()
project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
}
- if(!project->values("DEF_FILE").isEmpty())
+ if(!project->values("DEF_FILE").isEmpty() && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty())
project->values("QMAKE_LFLAGS").append(QString("-Wl,") + project->first("DEF_FILE"));
MakefileGenerator::init();
@@ -312,12 +335,9 @@ void MingwMakefileGenerator::init()
void MingwMakefileGenerator::fixTargetExt()
{
if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
- project->values("TARGET_EXT").append(".a");
project->values("QMAKE_LFLAGS").append("-static");
- project->values("TARGET").first() = "lib" + project->first("TARGET");
- } else {
- Win32MakefileGenerator::fixTargetExt();
}
+ Win32MakefileGenerator::fixTargetExt();
}
void MingwMakefileGenerator::writeIncPart(QTextStream &t)
@@ -345,17 +365,28 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
t << "LIBS = ";
if(!project->values("QMAKE_LIBDIR").isEmpty())
writeLibDirPart(t);
- t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
- << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
+ if (project->isActiveConfig("rvct_linker")) {
+ t << var("QMAKE_LIBS") << ' '
+ << var("QMAKE_LIBS_PRIVATE") << endl;
+ } else {
+ t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
+ << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
+ }
}
}
void MingwMakefileGenerator::writeLibDirPart(QTextStream &t)
{
QStringList libDirs = project->values("QMAKE_LIBDIR");
- for (int i = 0; i < libDirs.size(); ++i)
+ QString libArg = QString::fromLatin1("-L");
+ if (project->isActiveConfig("rvct_linker"))
+ libArg = QString::fromLatin1("--userlibpath ");
+ for (int i = 0; i < libDirs.size(); ++i) {
libDirs[i].remove("\"");
- t << valGlue(libDirs,"-L"+quote,quote+" -L" +quote,quote) << " ";
+ if (libDirs[i].endsWith("\\"))
+ libDirs[i].chop(1);
+ }
+ t << valGlue(libDirs, libArg+quote, quote+" "+libArg+quote, quote) << " ";
}
void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
@@ -367,20 +398,33 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
if (!var("BUILD_NAME").isEmpty()) {
ar_script_file += "." + var("BUILD_NAME");
}
- createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
// QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
- // Strip off any options since the ar commands will be read from file.
- QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
- if (ar_cmd.isEmpty())
- ar_cmd = "ar";
- objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
+ if (project->isActiveConfig("rvct_linker")) {
+ createRvctObjectScriptFile(ar_script_file, project->values("OBJECTS"));
+ QString ar_cmd = project->values("QMAKE_LIB").join(" ");
+ if (ar_cmd.isEmpty())
+ ar_cmd = "armar --create";
+ objectsLinkLine = ar_cmd + " " + var("DEST_TARGET") + " --via " + ar_script_file;
+ } else {
+ // Strip off any options since the ar commands will be read from file.
+ QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
+ if (ar_cmd.isEmpty())
+ ar_cmd = "ar";
+ createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
+ objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
+ }
} else {
QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
if (!var("BUILD_NAME").isEmpty()) {
ld_script_file += "." + var("BUILD_NAME");
}
- createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
- objectsLinkLine = ld_script_file;
+ if (project->isActiveConfig("rvct_linker")) {
+ createRvctObjectScriptFile(ld_script_file, project->values("OBJECTS"));
+ objectsLinkLine = QString::fromLatin1("--via ") + ld_script_file;
+ } else {
+ createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
+ objectsLinkLine = ld_script_file;
+ }
}
Win32MakefileGenerator::writeObjectsPart(t);
}
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index 007b48b2f4..5bc9c7b3b4 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -54,17 +54,17 @@ public:
protected:
QString escapeDependencyPath(const QString &path) const;
QString getLibTarget();
+ bool writeMakefile(QTextStream &);
+ void init();
private:
bool isWindowsShell() const;
void writeMingwParts(QTextStream &);
void writeIncPart(QTextStream &t);
void writeLibsPart(QTextStream &t);
void writeLibDirPart(QTextStream &t);
- bool writeMakefile(QTextStream &);
void writeObjectsPart(QTextStream &t);
void writeBuildRulesPart(QTextStream &t);
void writeRcFilePart(QTextStream &t);
- void init();
void processPrlVariable(const QString &var, const QStringList &l);
QStringList &findDependencies(const QString &file);
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index bd941787c6..01f730ac38 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -2438,6 +2438,9 @@ bool VCXFilter::addExtraCompiler(const VCXFilterFile &info)
char buff[256];
QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd, Option::fixPathToLocalOS(inFile, true, false), out);
if(Project->canExecute(dep_cmd)) {
+ dep_cmd.prepend(QLatin1String("cd ")
+ + Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
+ + QLatin1String(" && "));
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -2452,7 +2455,7 @@ bool VCXFilter::addExtraCompiler(const VCXFilterFile &info)
for (int i = 0; i < extradeps.count(); ++i) {
QString dd = extradeps.at(i).simplified();
if (!dd.isEmpty())
- deps += Project->fileFixify(dd);
+ deps += Project->fileFixify(dd, QString(), Option::output_dir);
}
}
}
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 87c89435ba..0a24a01953 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2218,6 +2218,9 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
Option::fixPathToLocalOS(inFile, true, false),
out);
if(Project->canExecute(dep_cmd)) {
+ dep_cmd.prepend(QLatin1String("cd ")
+ + Project->escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
+ + QLatin1String(" && "));
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -2232,7 +2235,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
for (int i = 0; i < extradeps.count(); ++i) {
QString dd = extradeps.at(i).simplified();
if (!dd.isEmpty())
- deps += Project->fileFixify(dd);
+ deps += Project->fileFixify(dd, QString(), Option::output_dir);
}
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 364eca034e..5005190e71 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -352,6 +352,25 @@ QUuid VcprojGenerator::increaseUUID(const QUuid &id)
return result;
}
+QStringList VcprojGenerator::collectSubDirs(QMakeProject *proj)
+{
+ QStringList subdirs;
+ QStringList tmp_proj_subdirs = proj->variables()["SUBDIRS"];
+ for(int x = 0; x < tmp_proj_subdirs.size(); ++x) {
+ QString tmpdir = tmp_proj_subdirs.at(x);
+ if(!proj->isEmpty(tmpdir + ".file")) {
+ if(!proj->isEmpty(tmpdir + ".subdir"))
+ warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
+ tmpdir.toLatin1().constData());
+ tmpdir = proj->first(tmpdir + ".file");
+ } else if(!proj->isEmpty(tmpdir + ".subdir")) {
+ tmpdir = proj->first(tmpdir + ".subdir");
+ }
+ subdirs += tmpdir;
+ }
+ return subdirs;
+}
+
void VcprojGenerator::writeSubDirs(QTextStream &t)
{
// Check if all requirements are fulfilled
@@ -386,7 +405,6 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
QHash<QString, VcsolutionDepend*> solution_depends;
QList<VcsolutionDepend*> solution_cleanup;
- QStringList subdirs = project->values("SUBDIRS");
QString oldpwd = qmake_getpwd();
// Make sure that all temp projects are configured
@@ -395,16 +413,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
QStringList old_after_vars = Option::after_user_vars;
Option::after_user_vars.append("CONFIG+=release");
+ QStringList subdirs = collectSubDirs(project);
for(int i = 0; i < subdirs.size(); ++i) {
QString tmp = subdirs.at(i);
- if(!project->isEmpty(tmp + ".file")) {
- if(!project->isEmpty(tmp + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmp.toLatin1().constData());
- tmp = project->first(tmp + ".file");
- } else if(!project->isEmpty(tmp + ".subdir")) {
- tmp = project->first(tmp + ".subdir");
- }
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true)));
if(fi.exists()) {
if(fi.isDir()) {
@@ -428,19 +439,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
continue;
}
if(tmp_proj.first("TEMPLATE") == "vcsubdirs") {
- QStringList tmp_proj_subdirs = tmp_proj.variables()["SUBDIRS"];
- for(int x = 0; x < tmp_proj_subdirs.size(); ++x) {
- QString tmpdir = tmp_proj_subdirs.at(x);
- if(!tmp_proj.isEmpty(tmpdir + ".file")) {
- if(!tmp_proj.isEmpty(tmpdir + ".subdir"))
- warn_msg(WarnLogic, "Cannot assign both file and subdir for subdir %s",
- tmpdir.toLatin1().constData());
- tmpdir = tmp_proj.first(tmpdir + ".file");
- } else if(!tmp_proj.isEmpty(tmpdir + ".subdir")) {
- tmpdir = tmp_proj.first(tmpdir + ".subdir");
- }
+ foreach(const QString &tmpdir, collectSubDirs(&tmp_proj))
subdirs += fileFixify(tmpdir);
- }
} else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") {
// Initialize a 'fake' project to get the correct variables
// and to be able to extract all the dependencies
@@ -1302,6 +1302,9 @@ void VcprojGenerator::initResourceFiles()
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
if(canExecute(dep_cmd)) {
+ dep_cmd.prepend(QLatin1String("cd ")
+ + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
+ + QLatin1String(" && "));
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -1312,7 +1315,8 @@ void VcprojGenerator::initResourceFiles()
}
QT_PCLOSE(proc);
if(!indeps.isEmpty())
- deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
+ deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '),
+ QString(), Option::output_dir);
}
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 8e55211cf4..d66c029fd9 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -130,6 +130,7 @@ protected:
QList<VcprojGenerator*> mergedProjects;
private:
+ QStringList collectSubDirs(QMakeProject *proj);
QUuid increaseUUID(const QUuid &id);
friend class VCFilter;
};
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 2b628a5755..e2464ec2d0 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -654,6 +654,9 @@ void VcxprojGenerator::initResourceFiles()
dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false);
if(canExecute(dep_cmd)) {
+ dep_cmd.prepend(QLatin1String("cd ")
+ + escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
+ + QLatin1String(" && "));
if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) {
QString indeps;
while(!feof(proc)) {
@@ -664,7 +667,8 @@ void VcxprojGenerator::initResourceFiles()
}
QT_PCLOSE(proc);
if(!indeps.isEmpty())
- deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '));
+ deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' '),
+ QString(), Option::output_dir);
}
}
}
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index d92eb698b5..947bd23edf 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -303,7 +303,8 @@ void Win32MakefileGenerator::processVars()
// TARGET_VERSION_EXT will be used to add a version number onto the target name
if (project->values("TARGET_VERSION_EXT").isEmpty()
- && !project->values("VER_MAJ").isEmpty())
+ && !project->values("VER_MAJ").isEmpty()
+ && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty())
project->values("TARGET_VERSION_EXT").append(project->values("VER_MAJ").first());
if(project->isEmpty("QMAKE_COPY_FILE"))
@@ -331,16 +332,43 @@ void Win32MakefileGenerator::processVars()
if(!(*libDir_it).isEmpty())
(*libDir_it) = Option::fixPathToTargetOS((*libDir_it), false, false);
}
+
+ if (project->values("TEMPLATE").contains("app")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_APP");
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_APP");
+ } else if (project->values("TEMPLATE").contains("lib") && project->isActiveConfig("dll")) {
+ if(!project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_SHLIB");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_SHLIB");
+ }
+ if (project->isActiveConfig("plugin")) {
+ project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
+ project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
+ } else {
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
+ }
+ }
}
void Win32MakefileGenerator::fixTargetExt()
{
- if (!project->values("QMAKE_APP_FLAG").isEmpty())
+ if (project->isEmpty("QMAKE_EXTENSION_STATICLIB"))
+ project->values("QMAKE_EXTENSION_STATICLIB").append("lib");
+ if (project->isEmpty("QMAKE_EXTENSION_SHLIB"))
+ project->values("QMAKE_EXTENSION_SHLIB").append("dll");
+
+ if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
project->values("TARGET_EXT").append(".exe");
- else if (project->isActiveConfig("shared"))
- project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + ".dll");
- else
- project->values("TARGET_EXT").append(".lib");
+ } else if (project->isActiveConfig("shared")) {
+ project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
+ + project->first("QMAKE_EXTENSION_SHLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
+ } else {
+ project->values("TARGET_EXT").append("." + project->first("QMAKE_EXTENSION_STATICLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET");
+ }
}
void Win32MakefileGenerator::processRcFileVar()
@@ -662,10 +690,10 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
if(project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) {
QStringList dlldirs = project->values("DLLDESTDIR");
for (QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
- t << "\n\t" << "-$(COPY_FILE) \"$(DESTDIR_TARGET)\" " << Option::fixPathToTargetOS(*dlldir, false);
+ t << "\t" << "-$(COPY_FILE) \"$(DESTDIR_TARGET)\" " << Option::fixPathToTargetOS(*dlldir, false) << endl;
}
}
- t << endl << endl;
+ t << endl;
writeRcFilePart(t);
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 9c99c444a0..177ab2fbd4 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1345,10 +1345,10 @@ QMakeProject::read(uchar cmd)
}
if(QDir::isRelativePath(qmakespec)) {
- if (QFile::exists(qmakespec+"/qmake.conf")) {
- Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
- } else if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
+ if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
qmakespec = Option::mkfile::qmakespec = QFileInfo(Option::output_dir+"/"+qmakespec).absoluteFilePath();
+ } else if (QFile::exists(qmakespec+"/qmake.conf")) {
+ Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
} else {
bool found_mkspec = false;
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
@@ -1654,7 +1654,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL
if(file.indexOf(Option::dir_sep) == -1 || !QFile::exists(file)) {
static QStringList *feature_roots = 0;
if(!feature_roots) {
- validateModes();
feature_roots = new QStringList(qmake_feature_paths(prop));
qmakeAddCacheClear(qmakeDeleteCacheClear_QStringList, (void**)&feature_roots);
}
@@ -2774,6 +2773,20 @@ QMakeProject::expand(const QString &str)
return QStringList();
}
+QString
+QMakeProject::expand(const QString &str, const QString &file, int line)
+{
+ bool ok;
+ parser_info pi = parser;
+ parser.file = file;
+ parser.line_no = line;
+ parser.from_file = false;
+ QMap<QString, QStringList> tmp = vars;
+ const QStringList ret = doVariableReplaceExpand(str, tmp, &ok);
+ parser = pi;
+ return ok ? ret.join(QString(Option::field_sep)) : QString();
+}
+
QStringList
QMakeProject::expand(const QString &func, const QList<QStringList> &args)
{
@@ -3029,17 +3042,17 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
if(!Option::user_template.isEmpty()) {
var = ".BUILTIN.USER." + var;
place[var] = QStringList(Option::user_template);
- } else if(!place[var].isEmpty()) {
- QString orig_template = place["TEMPLATE"].first(), real_template;
+ } else {
+ QString orig_template, real_template;
+ if(!place[var].isEmpty())
+ orig_template = place[var].first();
+ real_template = orig_template.isEmpty() ? "app" : orig_template;
if(!Option::user_template_prefix.isEmpty() && !orig_template.startsWith(Option::user_template_prefix))
- real_template = Option::user_template_prefix + orig_template;
- if(!real_template.isEmpty()) {
+ real_template.prepend(Option::user_template_prefix);
+ if(real_template != orig_template) {
var = ".BUILTIN." + var;
place[var] = QStringList(real_template);
}
- } else {
- var = ".BUILTIN." + var;
- place[var] = QStringList("app");
}
} else if(var.startsWith(QLatin1String("QMAKE_HOST."))) {
QString ret, type = var.mid(11);
diff --git a/qmake/project.h b/qmake/project.h
index 09aa45e730..0e6131d3a2 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -144,6 +144,7 @@ public:
QMap<QString, QStringList> &place);
QStringList expand(const QString &v);
+ QString expand(const QString &v, const QString &file, int line);
QStringList expand(const QString &func, const QList<QStringList> &args);
bool test(const QString &v);
bool test(const QString &func, const QList<QStringList> &args);
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 8f46a2eb7f..3a0ab124a4 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -135,7 +135,7 @@ bootstrap { #Qt code
SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp \
qsystemlibrary.cpp
win32-msvc*:LIBS += ole32.lib advapi32.lib
- win32-g++*:LIBS += -lole32 -luuid
+ win32-g++*:LIBS += -lole32 -luuid -ladvapi32 -lkernel32
}
qnx {
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h
index f8bace47be..9349b48b83 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h
@@ -190,7 +190,7 @@ inline float deg2turn(float d) { return d / 360.0f; }
inline float rad2grad(float r) { return r * 200.0f / piFloat; }
inline float grad2rad(float g) { return g * piFloat / 200.0f; }
-#if !COMPILER(MSVC) && !COMPILER(RVCT) && !OS(ANDROID) && !COMPILER(WINSCW)
+#if !COMPILER(MSVC) && !OS(ANDROID) && !OS(SYMBIAN)
using std::isfinite;
using std::isinf;
using std::isnan;
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 37d216df07..c70a168a10 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -37,15 +37,14 @@ symbian: {
# Need to guarantee that these come before system includes of /epoc32/include
MMP_RULES += "USERINCLUDE rendering"
MMP_RULES += "USERINCLUDE platform/text"
- symbian-abld|symbian-sbsv2 {
- # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
- # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
- MMP_RULES += ALWAYS_BUILD_AS_ARM
- } else {
- QMAKE_CFLAGS -= --thumb
- QMAKE_CXXFLAGS -= --thumb
- }
+
+ # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
+ # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
+ QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
+ QMAKE_LFLAGS.GCCE += -Tdata 0x1000000
+
+ CONFIG += do_not_build_as_thumb
+
CONFIG(release, debug|release): QMAKE_CXXFLAGS.ARMCC += -OTime -O3
}
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index b98617f439..3ec3e97d4c 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -1,5 +1,5 @@
-QT_WEBKIT_VERSION = 4.7.2
+QT_WEBKIT_VERSION = 4.7.4
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
-QT_WEBKIT_PATCH_VERSION = 2
+QT_WEBKIT_PATCH_VERSION = 4
QT_CONFIG += webkit
diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp
index 627d0c76de..c5bd802480 100644
--- a/src/corelib/concurrent/qfutureinterface.cpp
+++ b/src/corelib/concurrent/qfutureinterface.cpp
@@ -219,7 +219,7 @@ QString QFutureInterfaceBase::progressText() const
bool QFutureInterfaceBase::isProgressUpdateNeeded() const
{
QMutexLocker locker(&d->m_mutex);
- return (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
+ return !d->progressTime.isValid() || (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
}
void QFutureInterfaceBase::reportStarted()
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index 86800efc33..8ff423e9c9 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -19,13 +19,16 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = global/qt_pch.h
-linux*:!static:!linux-armcc:!linux-gcce {
+linux*:!static:!symbian-armcc:!symbian-gcce {
QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate
prog=$$quote(if (/program interpreter: (.*)]/) { print $1; })
DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\"
}
# Compensate for lack of platform defines in Symbian3 and Symbian4
-symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+symbian {
+ DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_)) \
+ S60_VERSION_$$upper($$replace(S60_VERSION,\\.,_))
+}
include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 62d83cc1fa..35719b1000 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -86,7 +86,6 @@
# include "private/qcore_symbian_p.h"
_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_symbianFilter, "Symbianv*.sis");
_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
#endif
@@ -1201,7 +1200,7 @@ bool qSharedBuild()
\value SV_SF_1 Symbian^1
\value SV_SF_2 Symbian^2
\value SV_SF_3 Symbian^3
- \value SV_SF_4 Symbian^4
+ \value SV_SF_4 \e{This enum value is deprecated.}
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -1219,7 +1218,8 @@ bool qSharedBuild()
\value SV_S60_3_2 S60 3rd Edition Feature Pack 2
\value SV_S60_5_0 S60 5th Edition
\value SV_S60_5_1 S60 5th Edition Feature Pack 1
- \value SV_S60_5_2 S60 5th Edition Feature Pack 2
+ \value SV_S60_5_2 Symbian^3
+ \value SV_S60_5_3 To be determined - FIXME
\value SV_S60_Unknown An unknown and currently unsupported platform
\omitvalue SV_S60_None
@@ -1815,12 +1815,10 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#ifdef Q_OS_SYMBIAN
static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
+static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+static void symbianInitVersions()
{
- if (cachedSymbianVersion != -1)
- return cachedSymbianVersion;
-
// Use pure Symbian code, because if done using QDir, there will be a call back
// to this method, resulting doing this expensive operation twice before the cache kicks in.
// Pure Symbian code also makes this method ~10x faster, speeding up the application launch.
@@ -1828,21 +1826,8 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TFindFile fileFinder(rfs);
CDir* contents;
- // Check for Symbian4
- TInt err = fileFinder.FindWildByDir(qt_symbianFilter, qt_symbianSystemInstallDir, contents);
- if (err == KErrNone) {
- QScopedPointer<CDir> contentsDeleter(contents);
- err = contents->Sort(EDescending|ESortByName);
- if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 9) {
- TInt major = (*contents)[0].iName[8] - '0';
- if (major == 4) {
- return cachedSymbianVersion = SV_SF_4;
- }
- }
- }
-
- // Check for S60 and Symbian3 platforms, which use older .sis naming scheme
- err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
+ // Check for platform version
+ TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
if (err == KErrNone) {
QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
@@ -1851,61 +1836,76 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TInt minor = (*contents)[0].iName[11] - '0';
if (major == 3) {
if (minor == 1) {
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
} else if (minor == 2) {
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
}
} else if (major == 5) {
if (minor == 0) {
- return cachedSymbianVersion = SV_9_4;
- }
- else if (minor == 1) {
- return cachedSymbianVersion = SV_SF_2;
- }
- else if (minor == 2) {
- return cachedSymbianVersion = SV_SF_3;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+ } else if (minor == 1) {
+ cachedS60Version = QSysInfo::SV_S60_5_1;
+ cachedSymbianVersion = QSysInfo::SV_SF_2;
+ } else if (minor == 2) {
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+ } else if (minor >= 3) {
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
}
}
}
}
# ifdef Q_CC_NOKIAX86
- // Some emulator environments may not contain the version specific .sis files, so
- // simply hardcode the version on those environments. Note that can't use
- // SYMBIAN_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
- // right anyway in case .sis files are not found.
+ if (cachedS60Version == -1) {
+ // Some emulator environments may not contain the version specific .sis files, so
+ // simply hardcode the version on those environments. Note that can't use
+ // S60_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
+ // right anyway in case .sis files are not found.
# if defined(__SERIES60_31__)
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
# elif defined(__S60_32__)
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
# elif defined(__S60_50__)
- return cachedSymbianVersion = SV_9_4;
-# elif defined(SYMBIAN_VERSION_SYMBIAN3)
- return cachedSymbianVersion = SV_SF_3;
-# elif defined(SYMBIAN_VERSION_SYMBIAN4)
- return cachedSymbianVersion = SV_SF_4;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+# elif defined(S60_VERSION_5_2)
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+# elif defined(S60_VERSION_5_3)
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
# endif
+ }
# endif
- //If reaching here, it was not possible to determine the version
- return cachedSymbianVersion = SV_Unknown;
+
+ if (cachedS60Version == -1) {
+ //If reaching here, it was not possible to determine the version
+ cachedS60Version = QSysInfo::SV_S60_Unknown;
+ cachedSymbianVersion = QSysInfo::SV_Unknown;
+ }
+}
+
+QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+{
+ if (cachedSymbianVersion == -1)
+ symbianInitVersions();
+
+ return cachedSymbianVersion;
}
QSysInfo::S60Version QSysInfo::s60Version()
{
- switch (symbianVersion()) {
- case SV_9_2:
- return SV_S60_3_1;
- case SV_9_3:
- return SV_S60_3_2;
- case SV_9_4:
- return SV_S60_5_0;
- case SV_SF_2:
- return SV_S60_5_1;
- case SV_SF_3:
- return SV_S60_5_2;
- default:
- return SV_S60_Unknown;
- }
+ if (cachedS60Version == -1)
+ symbianInitVersions();
+
+ return cachedS60Version;
}
#endif // ifdef Q_OS_SYMBIAN
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index c2fb16c870..7768b46b0a 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -44,11 +44,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "4.7.2"
+#define QT_VERSION_STR "4.7.4"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x040702
+#define QT_VERSION 0x040704
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
@@ -284,7 +284,7 @@ namespace QT_NAMESPACE {}
# endif
#endif
-#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE)
+#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) && !defined(QT_BOOTSTRAPPED)
#error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
#endif
@@ -1524,7 +1524,7 @@ public:
SV_SF_1 = SV_9_4,
SV_SF_2 = 40,
SV_SF_3 = 50,
- SV_SF_4 = 60
+ SV_SF_4 = 60 // Deprecated
};
static SymbianVersion symbianVersion();
enum S60Version {
@@ -1533,9 +1533,9 @@ public:
SV_S60_3_1 = SV_9_2,
SV_S60_3_2 = SV_9_3,
SV_S60_5_0 = SV_9_4,
- //versions beyond 5.0 are to be confirmed - it is better to use symbian version
SV_S60_5_1 = SV_SF_2,
- SV_S60_5_2 = SV_SF_3
+ SV_S60_5_2 = SV_SF_3,
+ SV_S60_5_3 = 70
};
static S60Version s60Version();
#endif
@@ -2446,9 +2446,21 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
# define QT_SYMBIAN_SUPPORTS_SGIMAGE
#endif
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef SYMBIAN_GRAPHICS_SET_SURFACE_TRANSPARENCY_AVAILABLE
# define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
#endif
+
+#ifdef SYMBIAN_GRAPHICS_TRANSITION_EFFECTS_SIGNALING_AVAILABLE
+# define Q_SYMBIAN_TRANSITION_EFFECTS
+#endif
+#endif
+
+#ifdef SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS
+#define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
+#endif
+
+#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
+#define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
#endif
//Symbian does not support data imports from a DLL
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 398f9bf659..15cc809128 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -526,6 +526,8 @@ public:
WA_X11DoNotAcceptFocus = 132,
+ WA_SymbianNoSystemRotation = 133,
+
// Add new attributes before this line
WA_AttributeCount
};
@@ -575,7 +577,8 @@ public:
PreferDither = 0x00000040,
AvoidDither = 0x00000080,
- NoOpaqueDetection = 0x00000100
+ NoOpaqueDetection = 0x00000100,
+ NoFormatConversion = 0x00000200
};
Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index d617f77744..f03fb25a1c 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -238,81 +238,25 @@
/*!
\enum Qt::GlobalColor
- \raw HTML
- <style type="text/css" id="colorstyles">
- #white { background-color: #ffffff; color: #000000 }
- #black { background-color: #000000; color: #ffffff }
- #red { background-color: #ff0000; color: #000000 }
- #darkRed { background-color: #800000; color: #ffffff }
- #green { background-color: #00ff00; color: #000000 }
- #darkGreen { background-color: #008000; color: #ffffff }
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
- #darkCyan { background-color: #008080; color: #ffffff }
- #magenta { background-color: #ff00ff; color: #000000 }
- #darkMagenta { background-color: #800080; color: #ffffff }
- #yellow { background-color: #ffff00; color: #000000 }
- #darkYellow { background-color: #808000; color: #ffffff }
- #gray { background-color: #a0a0a4; color: #000000 }
- #darkGray { background-color: #808080; color: #ffffff }
- #lightGray { background-color: #c0c0c0; color: #000000 }
- </style>
- \endraw
-
Qt's predefined QColor objects:
- \value white \raw HTML
- White <tt id="white">(#ffffff)</tt>
- \endraw
- \value black \raw HTML
- Black <tt id="black">(#000000)</tt>
- \endraw
- \value red \raw HTML
- Red <tt id="red">(#ff0000)</tt>
- \endraw
- \value darkRed \raw HTML
- Dark red <tt id="darkRed">(#800000)</tt>
- \endraw
- \value green \raw HTML
- Green <tt id="green">(#00ff00)</tt>
- \endraw
- \value darkGreen \raw HTML
- Dark green <tt id="darkGreen">(#008000)</tt>
- \endraw
- \value blue \raw HTML
- Blue <tt id="blue">(#0000ff)</tt>
- \endraw
- \value darkBlue \raw HTML
- Dark blue <tt id="darkBlue">(#000080)</tt>
- \endraw
- \value cyan \raw HTML
- Cyan <tt id="cyan">(#00ffff)</tt>
- \endraw
- \value darkCyan \raw HTML
- Dark cyan <tt id="darkCyan">(#008080)</tt>
- \endraw
- \value magenta \raw HTML
- Magenta <tt id="magenta">(#ff00ff)</tt>
- \endraw
- \value darkMagenta \raw HTML
- Dark magenta <tt id="darkMagenta">(#800080)</tt>
- \endraw
- \value yellow \raw HTML
- Yellow <tt id="yellow">(#ffff00)</tt>
- \endraw
- \value darkYellow \raw HTML
- Dark yellow <tt id="darkYellow">(#808000)</tt>
- \endraw
- \value gray \raw HTML
- Gray <tt id="gray">(#a0a0a4)</tt>
- \endraw
- \value darkGray \raw HTML
- Dark gray <tt id="darkGray">(#808080)</tt>
- \endraw
- \value lightGray \raw HTML
- Light gray <tt id="lightGray">(#c0c0c0)</tt>
- \endraw
+ \value white \span {id="color-white"} {White (#ffffff) }
+ \value black \span {id="color-black"} {Black (#000000) }
+ \value red \span {id="color-red"} {Red (#ff0000) }
+ \value darkRed \span {id="color-darkRed"} {Dark red (#800000) }
+ \value green \span {id="color-green"} {Green (#00ff00) }
+ \value darkGreen \span {id="color-darkGreen"} {Dark green (#008000) }
+ \value blue \span {id="color-blue"} {Blue (#0000ff) }
+ \value darkBlue \span {id="color-darkBlue"} {Dark blue (#000080) }
+ \value cyan \span {id="color-cyan"} {Cyan (#00ffff) }
+ \value darkCyan \span {id="color-darkCyan"} {Dark cyan (#008080) }
+ \value magenta \span {id="color-magenta"} {Magenta (#ff00ff) }
+ \value darkMagenta \span {id="color-darkMagenta"} {Dark magenta (#800080) }
+ \value yellow \span {id="color-yellow"} {Yellow (#ffff00) }
+ \value darkYellow \span {id="color-darkYellow"} {Dark yellow (#808000) }
+ \value gray \span {id="color-gray"} {Gray (#a0a0a4) }
+ \value darkGray \span {id="color-darkGray"} {Dark gray (#808080) }
+ \value lightGray \span {id="color-lightGray"} {Light gray (#c0c0c0) }
\value transparent a transparent black value (i.e., QColor(0, 0, 0, 0))
\value color0 0 pixel value (for bitmaps)
\value color1 1 pixel value (for bitmaps)
@@ -739,6 +683,10 @@
until a non-opaque pixel is found, or if you want the pixmap to
retain an alpha channel for some other reason. If the image has no
alpha channel this flag has no effect.
+
+ \omitvalue NoFormatConversion Don't do any format conversions on the image.
+ Can be useful when converting a QImage to a QPixmap for a one-time
+ rendering operation for example.
*/
/*! \enum Qt::GUIStyle
@@ -1296,6 +1244,7 @@
\omitvalue WA_SetWindowModality
\omitvalue WA_WState_WindowOpacitySet
\omitvalue WA_WState_AcceptedTouchBeginEvent
+ \omitvalue WA_SymbianNoSystemRotation
*/
/*! \typedef Qt::HANDLE
@@ -2868,7 +2817,7 @@
INT_MIN, inclusive. For example, you can define custom priorities
as being relative to each other:
- \snippet doc/src/snippets/code/doc_src_qnamespace.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qnamespace.cpp 1
\sa QCoreApplication::postEvent()
*/
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 3b4adc3c91..4d3f50b3e6 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -278,6 +278,7 @@ void QDirIteratorPrivate::checkAndPushDirectory(const QFileInfo &fileInfo)
current entry will be returned as part of the directory iteration);
otherwise, false is returned.
*/
+
bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInfo &fi) const
{
Q_ASSERT(!fileName.isEmpty());
@@ -312,6 +313,14 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
return false;
}
#endif
+ // skip symlinks
+ const bool skipSymlinks = (filters & QDir::NoSymLinks);
+ const bool includeSystem = (filters & QDir::System);
+ if(skipSymlinks && fi.isSymLink()) {
+ // The only reason to save this file is if it is a broken link and we are requesting system files.
+ if(!includeSystem || fi.exists())
+ return false;
+ }
// filter hidden
const bool includeHidden = (filters & QDir::Hidden);
@@ -319,27 +328,20 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
return false;
// filter system files
- const bool includeSystem = (filters & QDir::System);
- if (!includeSystem && ((!fi.isFile() && !fi.isDir() && !fi.isSymLink())
+ if (!includeSystem && (!(fi.isFile() || fi.isDir() || fi.isSymLink())
|| (!fi.exists() && fi.isSymLink())))
return false;
// skip directories
const bool skipDirs = !(filters & (QDir::Dirs | QDir::AllDirs));
- if (skipDirs && fi.isDir()) {
- if (!((includeHidden && !dotOrDotDot && fi.isHidden())
- || (includeSystem && !fi.exists() && fi.isSymLink())))
- return false;
- }
+ if (skipDirs && fi.isDir())
+ return false;
// skip files
const bool skipFiles = !(filters & QDir::Files);
- const bool skipSymlinks = (filters & QDir::NoSymLinks);
- if ((skipFiles && (fi.isFile() || !fi.exists())) || (skipSymlinks && fi.isSymLink())) {
- if (!((includeHidden && !dotOrDotDot && fi.isHidden())
- || (includeSystem && !fi.exists() && fi.isSymLink())))
- return false;
- }
+ if (skipFiles && fi.isFile())
+ // Basically we need a reason not to exclude this file otherwise we just eliminate it.
+ return false;
// filter permissions
const bool filterPermissions = ((filters & QDir::PermissionMask)
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 43e0f0de95..7134ae9840 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1628,10 +1628,11 @@ QString QIODevice::errorString() const
\fn qint64 QIODevice::readData(char *data, qint64 maxSize)
Reads up to \a maxSize bytes from the device into \a data, and
- returns the number of bytes read or -1 if an error occurred. If
- there are no bytes to be read, this function should return -1 if
- there can never be more bytes available (for example: socket
- closed, pipe closed, sub-process finished).
+ returns the number of bytes read or -1 if an error occurred.
+
+ If there are no bytes to be read and there can never be more bytes
+ available (examples include socket closed, pipe closed, sub-process
+ finished), this function returns -1.
This function is called by QIODevice. Reimplement this function
when creating a subclass of QIODevice.
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index d35d68e7f5..207cda3b14 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -373,7 +373,7 @@ QResourcePrivate::ensureChildren() const
Constructs a QResource pointing to \a file. \a locale is used to
load a specific localization of a resource data.
- \sa QFileInfo, searchPaths(), setFileName(), setLocale()
+ \sa QFileInfo, QDir::searchPaths(), setFileName(), setLocale()
*/
QResource::QResource(const QString &file, const QLocale &locale) : d_ptr(new QResourcePrivate(this))
@@ -418,7 +418,7 @@ QLocale QResource::locale() const
/*!
Sets a QResource to point to \a file. \a file can either be absolute,
in which case it is opened directly, if relative then the file will be
- tried to be found in searchPaths().
+ tried to be found in QDir::searchPaths().
\sa absoluteFilePath()
*/
@@ -446,7 +446,7 @@ QString QResource::fileName() const
/*!
Returns the real path that this QResource represents, if the resource
- was found via the searchPaths() it will be indicated in the path.
+ was found via the QDir::searchPaths() it will be indicated in the path.
\sa fileName()
*/
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index d72c1ab15d..73a32c4f10 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -354,10 +354,15 @@ QTranslator::~QTranslator()
}
/*!
- Loads \a filename + \a suffix (".qm" if the \a suffix is
- not specified), which may be an absolute file name or relative
- to \a directory. Returns true if the translation is successfully
- loaded; otherwise returns false.
+
+ Loads \a filename + \a suffix (".qm" if the \a suffix is not
+ specified), which may be an absolute file name or relative to \a
+ directory. Returns true if the translation is successfully loaded;
+ otherwise returns false.
+
+ If \a directory is not specified, the directory of the
+ application's executable is used (i.e., as
+ \l{QCoreApplication::}{applicationDirPath()}).
The previous contents of this translator object are discarded.
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index 54b2b387f2..7043fa0a27 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -51,7 +51,7 @@
If you want to use Q_DECLARE_INTERFACE with interface classes
declared in a namespace then you have to make sure the Q_DECLARE_INTERFACE
is not inside a namespace though. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 0
\sa Q_INTERFACES(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
*/
@@ -82,7 +82,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 1
See the \l{tools/plugandpaint}{Plug & Paint} example for details.
@@ -102,14 +102,14 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 2
Static plugins must also be included by the linker when your
application is built. For Qt's predefined plugins,
you can use the \c QTPLUGIN to add
the required plugins to your build. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qplugin.pro 3
\sa {Static Plugins}, {How to Create Qt Plugins}, {Using qmake}
*/
diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp
index 350c1a080a..7093c327ac 100644
--- a/src/corelib/statemachine/qhistorystate.cpp
+++ b/src/corelib/statemachine/qhistorystate.cpp
@@ -168,6 +168,9 @@ QAbstractState *QHistoryState::defaultState() const
/*!
Sets this history state's default state to be the given \a state.
\a state must be a sibling of this history state.
+
+ Note that this function does not set \a state as the initial state
+ of its parent.
*/
void QHistoryState::setDefaultState(QAbstractState *state)
{
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 51773393f3..c2bc895b9e 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -54,6 +54,11 @@
#include <private/qeventdispatcher_unix_p.h>
#endif
+#ifdef Q_OS_SYMBIAN
+#include <hal.h>
+#include <hal_data.h>
+#endif
+
#include "qthreadstorage.h"
#include "qthread_p.h"
@@ -63,6 +68,12 @@
#include <sched.h>
#include <errno.h>
+// You only find these enumerations on Symbian^3 onwards, so we need to provide our own
+// to remain compatible with older releases. They won't be called by pre-Sym^3 SDKs.
+
+// HALData::ENumCpus
+#define QT_HALData_ENumCpus 119
+
#ifdef Q_OS_BSD4
#include <sys/sysctl.h>
#endif
@@ -422,8 +433,20 @@ int QThread::idealThreadCount()
// as of aug 2008 Integrity only supports one single core CPU
cores = 1;
#elif defined(Q_OS_SYMBIAN)
- // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported
- cores = 1;
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_3) {
+ TInt inumcpus;
+ TInt err;
+ err = HAL::Get((HALData::TAttribute)QT_HALData_ENumCpus, inumcpus);
+ if (err != KErrNone) {
+ cores = 1;
+ } else if ( inumcpus <= 0 ) {
+ cores = 1;
+ } else {
+ cores = inumcpus;
+ }
+ } else {
+ cores = 1;
+ }
#elif defined(Q_OS_VXWORKS)
// VxWorks
# if defined(QT_VXWORKS_HAS_CPUSET)
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 34918a35ed..a9b7ddca7a 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -60,14 +60,14 @@
a particular value. If you need that functionality, you can use
qFill():
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 0
qFill() takes a begin iterator, an end iterator, and a value.
In the example above, we pass \c list.begin() and \c list.end()
as the begin and end iterators, but this doesn't have to be
the case:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 1
Different algorithms can have different requirements for the
iterators they accept. For example, qFill() accepts two
@@ -98,13 +98,13 @@
name_table array and return the corresponding Unicode value from
the \c value_table if the entity is recognized:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 2
This kind of code is for advanced users only; for most
applications, a QMap- or QHash-based approach would work just as
well:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 3
\section1 Types of Iterators
@@ -185,7 +185,7 @@
position \a begin2 + 1; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 4
\sa qCopyBackward(), {input iterators}, {output iterators}
*/
@@ -201,7 +201,7 @@
at position \a end2 - 2; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 5
\sa qCopy(), {bidirectional iterators}
*/
@@ -214,7 +214,7 @@
items compare equal; otherwise returns false.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 6
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -228,7 +228,7 @@
Fills the range [\a begin, \a end) with \a value.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 7
\sa qCopy(), {forward iterators}
*/
@@ -249,7 +249,7 @@
value isn't found.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 8
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -278,7 +278,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 9
This function requires the item type (in the example above,
\c int) to implement \c operator==().
@@ -302,7 +302,7 @@ of \a value in the variable passed as a reference in argument \a n.
Exchanges the values of variables \a var1 and \a var2.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 10
*/
/*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end)
@@ -312,7 +312,7 @@ of \a value in the variable passed as a reference in argument \a n.
using the quicksort algorithm.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 11
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -338,13 +338,13 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 12
To sort values in reverse order, pass
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 13
If neither of the two items is "less than" the other, the items are
taken to be equal. It is then undefined which one of the two
@@ -356,7 +356,7 @@ of \a value in the variable passed as a reference in argument \a n.
following code shows how to sort a list of strings case
insensitively using QMap:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 14
\sa QMap
*/
@@ -382,7 +382,7 @@ of \a value in the variable passed as a reference in argument \a n.
property is often useful when sorting user-visible data.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 15
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -405,7 +405,7 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 16
Note that earlier versions of Qt allowed using a lessThan function that took its
arguments by non-const reference. From 4.3 and on this is no longer possible,
@@ -415,7 +415,7 @@ of \a value in the variable passed as a reference in argument \a n.
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 17
If neither of the two items is "less than" the other, the items are
taken to be equal. The item that appeared before the other in the
@@ -444,7 +444,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 18
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -452,7 +452,7 @@ of \a value in the variable passed as a reference in argument \a n.
qLowerBound() can be used in conjunction with qUpperBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 19
\sa qUpperBound(), qBinaryFind()
*/
@@ -494,7 +494,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 20
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -502,7 +502,7 @@ of \a value in the variable passed as a reference in argument \a n.
qUpperBound() can be used in conjunction with qLowerBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 21
\sa qLowerBound(), qBinaryFind()
*/
@@ -545,7 +545,7 @@ of \a value in the variable passed as a reference in argument \a n.
finer control.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 22
This function requires the item type (in the example above,
QString) to implement \c operator<().
@@ -587,7 +587,7 @@ of \a value in the variable passed as a reference in argument \a n.
example, \c{QWidget *}).
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 23
Notice that qDeleteAll() doesn't remove the items from the
container; it merely calls \c delete on them. In the example
@@ -618,7 +618,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 24
\sa {qGreater()}{qGreater<T>()}
*/
@@ -631,7 +631,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 25
\sa {qLess()}{qLess<T>()}
*/
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 568293d494..641f8d5853 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1363,7 +1363,7 @@ QByteArray::QByteArray(int size, Qt::Initialization)
If \a size is less than the current size, bytes are removed from
the end.
- \sa size()
+ \sa size(), truncate()
*/
void QByteArray::resize(int size)
diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc
index 991238bb32..9e12c92c1c 100644
--- a/src/corelib/tools/qcache.qdoc
+++ b/src/corelib/tools/qcache.qdoc
@@ -39,11 +39,11 @@
definition of a cache that stores objects of type Employee
associated with an integer key:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 0
Here's how to insert an object in the cache:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 1
The advantage of using QCache over some other key-based data
structure (such as QMap or QHash) is that QCache automatically
@@ -59,7 +59,7 @@
By default, QCache's maxCost() is 100. You can specify a
different value in the QCache constructor:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 2
Each time you call insert(), you can specify a cost as third
argument (after the key and a pointer to the object to insert).
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index d651343d20..6830442d63 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -50,7 +50,7 @@
the list (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 0
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -65,7 +65,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 1
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -98,7 +98,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 2
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -113,7 +113,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 3
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -150,7 +150,7 @@
of the vector (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 4
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -165,7 +165,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 5
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -197,7 +197,7 @@
the first item). Here's how to iterate over all the elements
sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 6
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -212,7 +212,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 7
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -251,7 +251,7 @@
of the list (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 8
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -266,7 +266,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 9
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -277,7 +277,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 10
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -312,7 +312,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 11
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -327,7 +327,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 12
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -338,7 +338,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 13
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -378,7 +378,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 14
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -393,7 +393,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 15
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -404,7 +404,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 16
The example traverses a vector, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -440,7 +440,7 @@
of the set (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 17
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -455,7 +455,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 18
If you want to remove items as you iterate over the set, use
remove().
@@ -755,7 +755,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 19
\sa insert(), setValue()
*/
@@ -766,7 +766,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 20
\sa insert(), setValue()
*/
@@ -777,7 +777,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 21
\sa insert(), setValue()
*/
@@ -788,7 +788,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 22
\sa value()
*/
@@ -802,7 +802,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 23
\sa value(), remove(), insert()
*/
@@ -816,7 +816,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 24
\sa value(), remove(), insert()
*/
@@ -830,7 +830,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 25
\sa value(), remove(), insert()
*/
@@ -889,7 +889,7 @@
the map (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 26
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -906,12 +906,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 27
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 28
Multiple iterators can be used on the same map. If the map is
modified while a QMapIterator is active, the QMapIterator will
@@ -941,7 +941,7 @@
the hash (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 29
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -958,12 +958,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 30
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 31
Multiple iterators can be used on the same hash. If the hash is
modified while a QHashIterator is active, the QHashIterator will
@@ -994,7 +994,7 @@
of the map (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 32
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -1011,12 +1011,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 33
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 34
If you want to remove items as you iterate over the map, use
remove(). If you want to modify the value of an item, use
@@ -1024,7 +1024,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 35
The example removes all (key, value) pairs where the key and the
value are the same.
@@ -1059,7 +1059,7 @@
of the hash (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 36
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -1076,12 +1076,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 37
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 38
If you want to remove items as you iterate over the hash, use
remove(). If you want to modify the value of an item, use
@@ -1089,7 +1089,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 39
The example removes all (key, value) pairs where the key and the
value are the same.
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index fe533743a4..2c028afa6e 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -1073,7 +1073,7 @@ void QMapData::dump()
\overload
- The prefix -- operator (\c{--i}) makes the preceding item
+ The postfix -- operator (\c{i--}) makes the preceding item
current and returns an iterator pointing to the previously
current item.
*/
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index b900c4fb2a..925100d4e5 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -40,12 +40,12 @@
Here's an example of a QPair that stores one QString and one \c
double value:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 0
The components are accessible as public data members called \l
first and \l second. For example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 1
QPair's template data types (T1 and T2) must be \l{assignable
data types}. You cannot, for example, store a QWidget as a value;
@@ -186,7 +186,7 @@
Returns a QPair\<T1, T2\> that contains \a value1 and \a value2.
Example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 2
This is equivalent to QPair<T1, T2>(\a value1, \a value2), but
usually requires less typing.
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 011e9eec9c..5249182d6d 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -40,19 +40,19 @@
Here's an example QSet with QString values:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 0
To insert a value into the set, use insert():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 1
Another way to insert items into the set is to use operator<<():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 2
To test whether an item belongs to the set or not, use contains():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 3
If you want to navigate through all the values stored in a QSet,
you can use an iterator. QSet supports both \l{Java-style
@@ -60,18 +60,18 @@
iterators} (QSet::iterator and QSet::const_iterator). Here's how
to iterate over a QSet<QWidget *> using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 4
Here's the same code, but using an STL-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 5
QSet is unordered, so an iterator's sequence cannot be assumed to
be predictable. If ordering by key is required, use a QMap.
To navigate through a QSet, you can also use \l{foreach}:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 6
Items can be removed from the set using remove(). There is also a
clear() function that removes all items.
@@ -187,7 +187,7 @@
This function is useful for code that needs to build a huge set
and wants to avoid repeated reallocation. For example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 7
Ideally, \a size should be slightly more than the maximum number
of elements expected in the set. \a size doesn't have to be prime,
@@ -603,18 +603,18 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 8
Here's a loop that removes certain items (all those that start
with 'J') from a set while iterating:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 9
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 10
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -646,13 +646,13 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 11
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 12
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -886,7 +886,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 13
\sa fromList(), QList::fromSet(), qSort()
*/
@@ -911,7 +911,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 14
\sa toList(), QList::toSet()
*/
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index d68e8a1c6b..996ca7f8c1 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -35,12 +35,12 @@
The C++ language doesn't support variable-length arrays on the stack.
For example, the following code won't compile:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 0
The alternative is to allocate the array on the heap (with
\c{new}):
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 1
However, if myfunc() is called very frequently from the
application's inner loop, heap allocation can be a major source
@@ -53,7 +53,7 @@
it is much faster than heap allocation.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 2
In the example above, QVarLengthArray will preallocate 1024
elements on the stack and use them unless \c{n + 1} is greater
@@ -223,7 +223,7 @@
be used to access and modify the items in the array.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 3
The pointer remains valid as long as the array isn't reallocated.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index affb4561e6..82ed18c690 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -452,7 +452,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage flickable.gif
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 5fda758c3d..d23374b512 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -86,13 +86,13 @@ public:
The following example shows a Flipable item that flips whenever it is
clicked, rotating about the y-axis.
- This flipable item has a \c flipped boolean property that is toggled
- whenever the MouseArea within the flipable is clicked. When
- \c flipped is true, the item changes to the "back" state; in this
+ This flipable item has a \c flipped boolean property that is toggled
+ whenever the MouseArea within the flipable is clicked. When
+ \c flipped is true, the item changes to the "back" state; in this
state, the \c angle of the \l Rotation item is changed to 180
degrees to produce the flipping effect. When \c flipped is false, the
- item reverts to the default state, in which the \c angle value is 0.
-
+ item reverts to the default state, in which the \c angle value is 0.
+
\snippet doc/src/snippets/declarative/flipable/flipable.qml 0
\image flipable.gif
@@ -103,8 +103,8 @@ public:
its old and new values.
See \l {QML States} for details on state changes and the default
- state, and \l {QML Animation} for more information on how animations
- work within transitions.
+ state, and \l {QML Animation and Transitions} for more information on how
+ animations work within transitions.
\sa {declarative/ui-components/flipable}{Flipable example}
*/
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index af2b804118..05e64b9cb7 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1267,7 +1267,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-simple.png
\enddiv
@@ -1283,7 +1283,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\codeline
\snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-highlight.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 4af91ceba8..6602dda28b 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2747,7 +2747,7 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
}
\endqml
- \sa {qdeclarativeanimation.html#transitions}{QML Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
@@ -3455,7 +3455,7 @@ qreal QDeclarativeItem::implicitHeight() const
Setting the implicit size is useful for defining components that have a preferred size
based on their content, for example:
- \code
+ \qml
// Label.qml
import QtQuick 1.1
@@ -3472,7 +3472,7 @@ qreal QDeclarativeItem::implicitHeight() const
anchors.verticalCenter: parent.verticalCenter
}
}
- \endcode
+ \endqml
\bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
incurs a performance penalty as the text must be laid out twice.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index da11b007ad..f5145d0728 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -216,7 +216,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-mousearea-snippet.png
\enddiv
@@ -315,7 +315,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
The \e accepted property of the MouseEvent parameter is ignored in this handler.
- \sa onCanceled()
+ \sa onCanceled
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 8f5907360e..b3235ef2d1 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -134,7 +134,7 @@ void QDeclarativeGradientStop::updateGradient()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-gradient.png
\enddiv
@@ -220,7 +220,7 @@ void QDeclarativeGradient::doUpdate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage declarative-rect.png
\enddiv
@@ -272,7 +272,7 @@ void QDeclarativeRectangle::doUpdate()
rectangle (as documented for QRect rendering). This can cause unintended effects if
\c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-border-width.png
\enddiv
@@ -296,7 +296,7 @@ QDeclarativePen *QDeclarativeRectangle::border()
This property allows for the construction of simple vertical gradients.
Other gradients may by formed by adding rotation to the rectangle.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage declarative-rect_gradient.png
\enddiv
@@ -364,7 +364,7 @@ void QDeclarativeRectangle::setRadius(qreal radius)
The default color is white.
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-color.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index a8082f8273..97ce0592a4 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -839,7 +839,8 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
QML only operates on list data. \c rootIndex allows the children of
any node in a QAbstractItemModel to be provided by this model.
- This property only affects models of type QAbstractItemModel.
+ This property only affects models of type QAbstractItemModel that
+ are hierarchical (e.g, a tree model).
For example, here is a simple interactive file system browser.
When a directory name is clicked, the view's \c rootIndex is set to the
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index ac683a7b71..8238252db2 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -137,7 +137,7 @@ class QByteArray;
}
\endcode
- \sa {Using QML in C++ Applications}, {Integrating QML with existing Qt UI code}
+ \sa {Using QML Bindings in C++ Applications}, {Integrating QML Code with Existing Qt UI Code}
*/
/*!
@@ -643,11 +643,11 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
The \a properties argument is specified as a map of property-value items. For example, the code
below creates an object with initial \c x and \c y values of 100 and 200, respectively:
- \qml
+ \js
var component = Qt.createComponent("Button.qml");
if (component.status == Component.Ready)
component.createObject(parent, {"x": 100, "y": 100});
- \endqml
+ \endjs
Dynamically created instances can be deleted with the \c destroy() method.
See \l {Dynamic Object Management in QML} for more information.
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index dc6b0853ec..7637b72eb3 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -72,10 +72,10 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
Contexts allow data to be exposed to the QML components instantiated by the
QML engine.
- Each QDeclarativeContext contains a set of properties, distinct from its QObject
- properties, that allow data to be explicitly bound to a context by name. The
- context properties are defined and updated by calling
- QDeclarativeContext::setContextProperty(). The following example shows a Qt model
+ Each QDeclarativeContext contains a set of properties, distinct from its QObject
+ properties, that allow data to be explicitly bound to a context by name. The
+ context properties are defined and updated by calling
+ QDeclarativeContext::setContextProperty(). The following example shows a Qt model
being bound to a context and then accessed from a QML file.
\code
@@ -97,8 +97,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
To simplify binding and maintaining larger data sets, a context object can be set
on a QDeclarativeContext. All the properties of the context object are available
by name in the context, as though they were all individually added through calls
- to QDeclarativeContext::setContextProperty(). Changes to the property's values are
- detected through the property's notify signal. Setting a context object is both
+ to QDeclarativeContext::setContextProperty(). Changes to the property's values are
+ detected through the property's notify signal. Setting a context object is both
faster and easier than manually adding and maintaing context property values.
The following example has the same effect as the previous one, but it uses a context
@@ -121,7 +121,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
component.create(context);
\endcode
- All properties added explicitly by QDeclarativeContext::setContextProperty() take
+ All properties added explicitly by QDeclarativeContext::setContextProperty() take
precedence over the context object's properties.
\section2 The Context Hierarchy
@@ -147,8 +147,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
context2->setContextProperty("b", 15);
\endcode
- While QML objects instantiated in a context are not strictly owned by that
- context, their bindings are. If a context is destroyed, the property bindings of
+ While QML objects instantiated in a context are not strictly owned by that
+ context, their bindings are. If a context is destroyed, the property bindings of
outstanding QML objects will stop evaluating.
\warning Setting the context object or adding new context properties after an object
@@ -156,7 +156,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
to reevaluate). Thus whenever possible you should complete "setup" of the context
before using it to create any objects.
- \sa {Using QML in C++ Applications}
+ \sa {Using QML Bindings in C++ Applications}
*/
/*! \internal */
@@ -223,7 +223,7 @@ QDeclarativeContext::~QDeclarativeContext()
/*!
Returns whether the context is valid.
- To be valid, a context must have a engine, and it's contextObject(), if any,
+ To be valid, a context must have a engine, and it's contextObject(), if any,
must not have been deleted.
*/
bool QDeclarativeContext::isValid() const
@@ -384,7 +384,7 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const
if (data->contextObject) {
QObject *obj = data->contextObject;
QDeclarativePropertyCache::Data local;
- QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::Data *property =
QDeclarativePropertyCache::property(data->engine, obj, name, local);
if (property) value = obj->metaObject()->property(property->coreIndex).read(obj);
@@ -461,7 +461,7 @@ QUrl QDeclarativeContext::baseUrl() const
{
Q_D(const QDeclarativeContext);
const QDeclarativeContextData* data = d->data;
- while (data && data->url.isEmpty())
+ while (data && data->url.isEmpty())
data = data->parent;
if (data)
@@ -515,7 +515,7 @@ QDeclarativeContextData::QDeclarativeContextData(QDeclarativeContext *ctxt)
void QDeclarativeContextData::invalidate()
{
- while (childContexts)
+ while (childContexts)
childContexts->invalidate();
while (componentAttached) {
@@ -570,7 +570,7 @@ void QDeclarativeContextData::clearContext()
void QDeclarativeContextData::destroy()
{
- if (linkedContext)
+ if (linkedContext)
linkedContext->destroy();
if (engine) invalidate();
@@ -626,9 +626,9 @@ void QDeclarativeContextData::setParent(QDeclarativeContextData *p)
}
}
-/*
-Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
-context-tree dependent caches in the expressions, and should occur every time the context tree
+/*
+Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
+context-tree dependent caches in the expressions, and should occur every time the context tree
*structure* (not values) changes.
*/
void QDeclarativeContextData::refreshExpressions()
@@ -656,7 +656,7 @@ void QDeclarativeContextData::addObject(QObject *o)
data->outerContext = this;
data->nextContextObject = contextObjects;
- if (data->nextContextObject)
+ if (data->nextContextObject)
data->nextContextObject->prevContextObject = &data->nextContextObject;
data->prevContextObject = &contextObjects;
contextObjects = data;
@@ -664,7 +664,7 @@ void QDeclarativeContextData::addObject(QObject *o)
void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object::ScriptBlock &script)
{
- if (!engine)
+ if (!engine)
return;
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
@@ -684,7 +684,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
scriptContext->pushScope(enginePriv->contextClass->newUrlContext(url));
scriptContext->pushScope(enginePriv->globalClass->staticGlobalObject());
-
+
QScriptValue scope = QScriptDeclarativeClass::newStaticScopeObject(scriptEngine);
scriptContext->pushScope(scope);
@@ -752,7 +752,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
for (int i=0; i<idValueCount; i++) {
if (idValues[i] == obj)
return propertyNames->findId(i);
- }
+ }
if (linkedContext)
return linkedContext->findObjectId(obj);
@@ -761,7 +761,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
QDeclarativeContext *QDeclarativeContextData::asQDeclarativeContext()
{
- if (!publicContext)
+ if (!publicContext)
publicContext = new QDeclarativeContext(this);
return publicContext;
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 854d91053f..824aeabb1d 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2117,7 +2117,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
The newly added \a path will be first in the importPathList().
- \sa setImportPathList(), \l {QML Modules}
+ \sa setImportPathList(), {QML Modules}
*/
void QDeclarativeEngine::addImportPath(const QString& path)
{
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 36cdde979a..26f3996871 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -629,7 +629,18 @@ QDeclarativeTypeLoader::~QDeclarativeTypeLoader()
}
/*!
-Return a QDeclarativeTypeData for \a url. The QDeclarativeTypeData may be cached.
+\enum QDeclarativeTypeLoader::Option
+
+This enum defines the options that control the way type data is handled.
+
+\value None The default value, indicating that no other options
+ are enabled.
+\value PreserveParser The parser used to handle the type data is preserved
+ after the data has been parsed.
+*/
+
+/*!
+Returns a QDeclarativeTypeData for the specified \a url. The QDeclarativeTypeData may be cached.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
{
@@ -650,8 +661,10 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
}
/*!
-Return a QDeclarativeTypeData for \a data with the provided base \a url. The
+Returns a QDeclarativeTypeData for the given \a data with the provided base \a url. The
QDeclarativeTypeData will not be cached.
+
+The specified \a options control how the loader handles type data.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const QUrl &url, Options options)
{
diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h
index 693889251f..7f487a0e24 100644
--- a/src/declarative/qml/qdeclarativetypeloader_p.h
+++ b/src/declarative/qml/qdeclarativetypeloader_p.h
@@ -79,7 +79,7 @@ public:
Loading, // Prior to data being received and dataReceived() being called
WaitingForDependencies, // While there are outstanding addDependency()s
Complete, // Finished
- Error, // Error
+ Error // Error
};
enum Type {
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 67461b040b..6a6dfe1542 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Animation QDeclarativeAbstractAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\brief The Animation element is the base of all QML animations.
@@ -554,7 +554,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
/*!
\qmlclass PauseAnimation QDeclarativePauseAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits Animation
\brief The PauseAnimation element provides a pause for an animation.
@@ -571,7 +571,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
}
\endcode
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
@@ -630,27 +630,27 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\inherits PropertyAnimation
\brief The ColorAnimation element animates changes in color values.
- ColorAnimation is a specialized PropertyAnimation that defines an
+ ColorAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a color value changes.
- Here is a ColorAnimation applied to the \c color property of a \l Rectangle
- as a property value source. It animates the \c color property's value from
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source. It animates the \c color property's value from
its current value to a value of "red", over 1000 milliseconds:
\snippet doc/src/snippets/declarative/coloranimation.qml 0
Like any other animation element, a ColorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
-
- For convenience, when a ColorAnimation is used in a \l Transition, it will
- animate any \c color properties that have been modified during the state
- change. If a \l{PropertyAnimation::}{property} or
- \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
+
+ For convenience, when a ColorAnimation is used in a \l Transition, it will
+ animate any \c color properties that have been modified during the state
+ change. If a \l{PropertyAnimation::}{property} or
+ \l{PropertyAnimation::}{properties} are explicitly set for the animation,
then those are used instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -686,10 +686,10 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
If the ColorAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -712,7 +712,7 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::to() const
{
@@ -868,7 +868,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
- PropertyAction is used to specify an immediate property change during an
+ PropertyAction is used to specify an immediate property change during an
animation. The property change is not animated.
It is useful for setting non-animated property values during an animation.
@@ -879,9 +879,9 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\snippet doc/src/snippets/declarative/propertyaction.qml standalone
- PropertyAction is also useful for setting the exact point at which a property
- change should occur during a \l Transition. For example, if PropertyChanges
- was used in a \l State to rotate an item around a particular
+ PropertyAction is also useful for setting the exact point at which a property
+ change should occur during a \l Transition. For example, if PropertyChanges
+ was used in a \l State to rotate an item around a particular
\l {Item::}{transformOrigin}, it might be implemented like this:
\snippet doc/src/snippets/declarative/propertyaction.qml transition
@@ -893,13 +893,13 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
before the RotationAnimation begins:
\snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential
-
+
This immediately sets the \c transformOrigin property to the value defined
- in the end state of the \l Transition (i.e. the value defined in the
+ in the end state of the \l Transition (i.e. the value defined in the
PropertyAction object) so that the rotation animation begins with the
correct transform origin.
- \sa {QML Animation}, QtDeclarative
+ \sa {QML Animation and Transitions}, QtDeclarative
*/
QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
@@ -1129,25 +1129,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\inherits PropertyAnimation
\brief The NumberAnimation element animates changes in qreal-type values.
- NumberAnimation is a specialized PropertyAnimation that defines an
+ NumberAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a numerical value changes.
- Here is a NumberAnimation applied to the \c x property of a \l Rectangle
- as a property value source. It animates the \c x value from its current
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source. It animates the \c x value from its current
value to a value of 50, over 1000 milliseconds:
\snippet doc/src/snippets/declarative/numberanimation.qml 0
Like any other animation element, a NumberAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
Note that NumberAnimation may not animate smoothly if there are irregular
changes in the number value that it is tracking. If this is the case, use
SmoothedAnimation instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1193,10 +1193,10 @@ void QDeclarativeNumberAnimation::init()
If the NumberAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::from() const
@@ -1219,7 +1219,7 @@ void QDeclarativeNumberAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1241,15 +1241,15 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\inherits PropertyAnimation
\brief The Vector3dAnimation element animates changes in QVector3d values.
- Vector3dAnimation is a specialized PropertyAnimation that defines an
+ Vector3dAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a Vector3d value changes.
Like any other animation element, a Vector3dAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1270,10 +1270,10 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
If the Vector3dAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1295,7 +1295,7 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1318,7 +1318,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\brief The RotationAnimation element animates changes in rotation values.
RotationAnimation is a specialized PropertyAnimation that gives control
- over the direction of rotation during an animation.
+ over the direction of rotation during an animation.
By default, it rotates in the direction
of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
@@ -1334,7 +1334,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
- your own properties via \l {PropertyAnimation::properties}{properties} or
+ your own properties via \l {PropertyAnimation::properties}{properties} or
\l {PropertyAnimation::property}{property}.
Also, note the \l Rectangle will be rotated around its default
@@ -1344,11 +1344,11 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
PropertyAction documentation for more details.
Like any other animation element, a RotationAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
{
@@ -1421,10 +1421,10 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
If the RotationAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1446,7 +1446,7 @@ void QDeclarativeRotationAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1572,15 +1572,15 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
if this is the preferred behavior.
Like any other animation element, a SequentialAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
-
- \sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+
+ \sa ParallelAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) :
@@ -1642,15 +1642,15 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\snippet doc/src/snippets/declarative/parallelanimation.qml 0
Like any other animation element, a ParallelAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
- \sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SequentialAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
QDeclarativeAnimationGroup(parent)
@@ -1745,14 +1745,14 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\inherits Animation
\brief The PropertyAnimation element animates changes in property values.
- PropertyAnimation provides a way to animate changes to a property's value.
+ PropertyAnimation provides a way to animate changes to a property's value.
It can be used to define animations in a number of ways:
-
+
\list
\o In a \l Transition
- For example, to animate any objects that have changed their \c x or \c y properties
+ For example, to animate any objects that have changed their \c x or \c y properties
as a result of a state change, using an \c InOutQuad easing curve:
\snippet doc/src/snippets/declarative/propertyanimation.qml transition
@@ -1792,12 +1792,12 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
Depending on how the animation is used, the set of properties normally used will be
different. For more information see the individual property documentation, as well
- as the \l{QML Animation} introduction.
+ as the \l{QML Animation and Transitions} introduction.
Note that PropertyAnimation inherits the abstract \l Animation element.
This includes additional properties and methods for controlling the animation.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent)
@@ -1857,10 +1857,10 @@ void QDeclarativePropertyAnimation::setDuration(int duration)
If the PropertyAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::from() const
{
@@ -1887,7 +1887,7 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::to() const
{
@@ -2254,7 +2254,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop)
As seen in the above example, properties is specified as a comma-separated string of property names to animate.
- \sa exclude, {QML Animation}
+ \sa exclude, {QML Animation and Transitions}
*/
QDeclarativeListProperty<QObject> QDeclarativePropertyAnimation::targets()
{
@@ -2437,7 +2437,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
ParentAnimation is used to animate a parent change for an \l Item.
For example, the following ParentChange changes \c blueRect to become
- a child of \c redRect when it is clicked. The inclusion of the
+ a child of \c redRect when it is clicked. The inclusion of the
ParentAnimation, which defines a NumberAnimation to be applied during
the transition, ensures the item animates smoothly as it moves to
its new parent:
@@ -2452,17 +2452,17 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
to animate the parent change via another item that does not have clipping
enabled. Such an item can be set using the \l via property.
- For convenience, when a ParentAnimation is used in a \l Transition, it will
- animate any ParentChange that has occurred during the state change.
+ For convenience, when a ParentAnimation is used in a \l Transition, it will
+ animate any ParentChange that has occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, a ParentAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
: QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
@@ -2795,23 +2795,23 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
\inherits Animation
\brief The AnchorAnimation element animates changes in anchor values.
- AnchorAnimation is used to animate an anchor change.
+ AnchorAnimation is used to animate an anchor change.
In the following snippet we animate the addition of a right anchor to a \l Rectangle:
\snippet doc/src/snippets/declarative/anchoranimation.qml 0
- For convenience, when an AnchorAnimation is used in a \l Transition, it will
- animate any AnchorChanges that have occurred during the state change.
+ For convenience, when an AnchorAnimation is used in a \l Transition, it will
+ animate any AnchorChanges that have occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, an AnchorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, AnchorChanges
+ \sa {QML Animation and Transitions}, AnchorChanges
*/
QDeclarativeAnchorAnimation::QDeclarativeAnchorAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index 84f929c8ff..a1321e21cf 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -76,7 +76,7 @@ public:
\since 4.7
\brief The Behavior element allows you to specify a default animation for a property change.
- A Behavior defines the default animation to be applied whenever a
+ A Behavior defines the default animation to be applied whenever a
particular property value changes.
For example, the following Behavior defines a NumberAnimation to be run
@@ -94,7 +94,7 @@ public:
state change. For general advice on using Behaviors to animate state changes, see
\l{Using QML Behaviors with States}.
- \sa {QML Animation}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
+ \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
*/
@@ -206,7 +206,7 @@ void QDeclarativeBehavior::write(const QVariant &value)
d->animation->qtAnimation()->start();
d->blockRunningChanged = false;
if (!after.contains(d->property))
- QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property)
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 5a66aabcea..83a7d83161 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -117,6 +117,8 @@ public:
id: area
}
// ...
+ \endqml
+ \qml
Connections {
target: area
onClicked: foo(parameters)
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 1d03842d07..258bc81dc8 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -108,7 +108,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The following example shows a ListModel containing three elements, with the roles
"name" and "cost".
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel.png
\enddiv
@@ -133,7 +133,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The delegate displays all the fruit attributes:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel-nested.png
\enddiv
@@ -143,7 +143,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
\section1 Modifying List Models
The content of a ListModel may be created and modified using the clear(),
- append(), set() and setProperty() methods. For example:
+ append(), set(), insert() and setProperty() methods. For example:
\snippet doc/src/snippets/declarative/listmodel-modify.qml delegate
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 9bcb2638d1..b03630d854 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -118,12 +118,13 @@ QT_BEGIN_NAMESPACE
\section2 Immediate property changes in transitions
- When \l Transitions are used to animate state changes, they animate
- properties from their values in the current state to those defined in the
- new state (as defined by PropertyChanges objects). However,
- it is sometimes desirable to set a property value \e immediately during a
- \l Transition, without animation; in these cases, the PropertyAction
- element can be used to force an immediate property change.
+ When \l{QML Animation and Transitions}{Transitions} are used to animate
+ state changes, they animate properties from their values in the current
+ state to those defined in the new state (as defined by PropertyChanges
+ objects). However, it is sometimes desirable to set a property value
+ \e immediately during a \l Transition, without animation; in these cases,
+ the PropertyAction element can be used to force an immediate property
+ change.
See the PropertyAction documentation for more details.
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index e2f6e3c768..9def5b4ca8 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -257,8 +257,8 @@ void QSmoothedAnimation::init()
A SmoothedAnimation animates a property's value to a set target value
using an ease in/out quad easing curve. When the target value changes,
- the easing curves used to animate between the old and new target values
- are smoothly spliced together to create a smooth movement to the new
+ the easing curves used to animate between the old and new target values
+ are smoothly spliced together to create a smooth movement to the new
target value that maintains the current velocity.
The follow example shows one \l Rectangle tracking the position of another
@@ -288,11 +288,11 @@ void QSmoothedAnimation::init()
of 0.5 will take 2000 ms to complete.
Like any other animation element, a SmoothedAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SpringAnimation, NumberAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 1212a1c2d2..bb58b0a7c4 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -246,19 +246,19 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
You can also limit the maximum \l velocity of the animation.
- The following \l Rectangle moves to the position of the mouse using a
+ The following \l Rectangle moves to the position of the mouse using a
SpringAnimation when the mouse is clicked. The use of the \l Behavior
- on the \c x and \c y values indicates that whenever these values are
+ on the \c x and \c y values indicates that whenever these values are
changed, a SpringAnimation should be applied.
\snippet doc/src/snippets/declarative/springanimation.qml 0
Like any other animation element, a SpringAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
+ \sa SmoothedAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -299,7 +299,7 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity)
This property describes how strongly the target is pulled towards the
source. The default value is 0 (that is, the spring-like motion is disabled).
-
+
The useful value range is 0 - 5.0.
When this property is set and the \l velocity value is greater than 0,
@@ -394,9 +394,9 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus)
\qmlproperty real SpringAnimation::mass
This property holds the "mass" of the property being moved.
- The value is 1.0 by default.
-
- A greater mass causes slower movement and a greater spring-like
+ The value is 1.0 by default.
+
+ A greater mass causes slower movement and a greater spring-like
motion when an item comes to rest.
*/
qreal QDeclarativeSpringAnimation::mass() const
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 5a4e2b1f99..5718e29f90 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -152,14 +152,14 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
Notice the default state is referred to using an empty string ("").
- States are commonly used together with \l {Transitions} to provide
+ States are commonly used together with \l{QML Animation and Transitions}{Transitions} to provide
animations when state changes occur.
\note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States},
- {qdeclarativeanimation.html#transitions}{QML Transitions}, QtDeclarative
+ {QML Animation and Transitions}{Transitions}, QtDeclarative
*/
QDeclarativeState::QDeclarativeState(QObject *parent)
: QObject(*(new QDeclarativeStatePrivate), parent)
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index f1d09971e9..6459bf9ae3 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -88,7 +88,7 @@ public:
/*!
\qmlclass StateGroup QDeclarativeStateGroup
- \ingroup qml-state-elements
+ \ingroup qml-state-elements
\since 4.7
\brief The StateGroup element provides state support for non-Item elements.
@@ -113,7 +113,7 @@ public:
}
\endqml
- \sa {qmlstate}{States} {Transitions}, {QtDeclarative}
+ \sa {qmlstate}{States} {QML Animation and Transitions}{Transitions}, {QtDeclarative}
*/
QDeclarativeStateGroup::QDeclarativeStateGroup(QObject *parent)
@@ -213,7 +213,7 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty<QDecla
}
\endqml
- \sa {Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty()
{
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 063ec3e2c1..1a574b8960 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -60,24 +60,24 @@ QT_BEGIN_NAMESPACE
A Transition defines the animations to be applied when a \l State change occurs.
For example, the following \l Rectangle has two states: the default state, and
- an added "moved" state. In the "moved state, the rectangle's position changes
+ an added "moved" state. In the "moved state, the rectangle's position changes
to (50, 50). The added Transition specifies that when the rectangle
changes between the default and the "moved" state, any changes
to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
\snippet doc/src/snippets/declarative/transition.qml 0
- Notice the example does not require \l{PropertyAnimation::}{to} and
+ Notice the example does not require \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values for the NumberAnimation. As a convenience,
these properties are automatically set to the values of \c x and \c y before
and after the state change; the \c from values are provided by
the current values of \c x and \c y, and the \c to values are provided by
- the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
+ the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values anyway to override the default values.
- By default, a Transition's animations are applied for any state change in the
- parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
- values can be set to restrict the animations to only be applied when changing
+ By default, a Transition's animations are applied for any state change in the
+ parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
+ values can be set to restrict the animations to only be applied when changing
from one particular state to another.
To define multiple transitions, specify \l Item::transitions as a list:
@@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE
\l Behavior, the Transition animation overrides the \l Behavior for that
state change.
- \sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
+ \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
*/
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
@@ -111,8 +111,8 @@ class QDeclarativeTransitionPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QDeclarativeTransition)
public:
- QDeclarativeTransitionPrivate()
- : fromState(QLatin1String("*")), toState(QLatin1String("*")),
+ QDeclarativeTransitionPrivate()
+ : fromState(QLatin1String("*")), toState(QLatin1String("*")),
reversed(false), reversible(false), endState(0)
{
group.trans = this;
@@ -249,7 +249,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
is reversed, and it is not necessary to set this property to reverse
the transition.
- However, if a SequentialAnimation is used, or if the \l from or \l to
+ However, if a SequentialAnimation is used, or if the \l from or \l to
properties have been set, this property will need to be set to reverse
a transition when a state change is reverted. For example, the following
transition applies a sequential animation when the mouse is pressed,
@@ -257,7 +257,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
\snippet doc/src/snippets/declarative/transition-reversible.qml 0
- If the transition did not set the \c to and \c reversible values, then
+ If the transition did not set the \c to and \c reversible values, then
on the mouse release, the transition would play the PropertyAnimation
before the ColorAnimation instead of reversing the sequence.
*/
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 13880c23e3..dcc078dd49 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -194,9 +194,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
\since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
- QDeclarativeItem objects can be placed on a standard QGraphicsScene and
- displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
- provided as a convenience for displaying QML files, and connecting between
+ QDeclarativeItem objects can be placed on a standard QGraphicsScene and
+ displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
+ provided as a convenience for displaying QML files, and connecting between
QML and C++ Qt objects.
QDeclarativeView provides:
@@ -236,7 +236,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
If you're using your own QGraphicsScene-based scene with QDeclarativeView, remember to
enable scene's sticky focus mode and to set itemIndexMethod to QGraphicsScene::NoIndex.
- \sa {Integrating QML with existing Qt UI code}, {Using QML in C++ Applications}
+ \sa {Integrating QML Code with Existing Qt UI Code}, {Using QML Bindings in C++ Applications}
*/
@@ -250,7 +250,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\fn QDeclarativeView::QDeclarativeView(QWidget *parent)
-
+
Constructs a QDeclarativeView with the given \a parent.
*/
QDeclarativeView::QDeclarativeView(QWidget *parent)
@@ -704,7 +704,7 @@ void QDeclarativeView::paintEvent(QPaintEvent *event)
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Painting);
int time = 0;
- if (frameRateDebug())
+ if (frameRateDebug())
time = d->frameTimer.restart();
#ifdef Q_WS_MAC
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 33170189d7..ef46697c2c 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -381,19 +381,11 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
If the dialog is accepted by the user, the QPrinter object is
correctly configured for printing.
- \raw HTML
- <table align="center">
- <tr><td>
- \endraw
- \inlineimage plastique-printdialog.png
- \raw HTML
- </td><td>
- \endraw
- \inlineimage plastique-printdialog-properties.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \table
+ \row
+ \o \inlineimage plastique-printdialog.png
+ \o \inlineimage plastique-printdialog-properties.png
+ \endtable
The printer dialog (shown above in Plastique style) enables access to common
printing properties. On X11 platforms that use the CUPS printing system, the
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index dd06445ff6..8fd615aa68 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -1536,10 +1536,12 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
/*!
\since 4.2
- Opens an information message box with the specified \a title and
- \a text. The standard \a buttons are added to the message box. \a
- defaultButton specifies the button used when \key Enter is
- pressed. \a defaultButton must refer to a button that was given in \a buttons.
+ Opens an information message box with the given \a title and
+ \a text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box.
+ \a defaultButton specifies the button used when \key Enter is pressed.
+ \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
chooses a suitable default automatically.
@@ -1547,9 +1549,13 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- The message box is an \l{Qt::ApplicationModal} {application modal}
+ The message box is an \l{Qt::ApplicationModal}{application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QString &title,
@@ -1564,8 +1570,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
/*!
\since 4.2
- Opens a question message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a question message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1578,6 +1586,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa information(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString &title,
@@ -1590,8 +1602,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
/*!
\since 4.2
- Opens a warning message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a warning message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1604,6 +1618,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), information(), critical()
*/
QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString &title,
@@ -1616,8 +1634,10 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
/*!
\since 4.2
- Opens a critical message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a critical message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1630,9 +1650,9 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
- \warning Do not delete \a parent during the execution of the dialog.
- If you want to do this, you should create the dialog
- yourself using one of the QMessageBox constructors.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
\sa question(), warning(), information()
*/
diff --git a/src/gui/embedded/qvfbhdr.h b/src/gui/embedded/qvfbhdr.h
index 31704b3aff..84f82acd69 100644
--- a/src/gui/embedded/qvfbhdr.h
+++ b/src/gui/embedded/qvfbhdr.h
@@ -53,36 +53,37 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
#ifndef QT_QWS_TEMP_DIR
-#define QT_QWS_TEMP_DIR "/tmp"
+# define QT_QWS_TEMP_DIR QLatin1String("/tmp")
#endif
#ifdef QT_PRIVATE_QWS
-#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2-%3") \
- .arg(QT_QWS_TEMP_DIR).arg(getuid()).arg(DISPLAY)
-
+#define QT_VFB_DATADIR(DISPLAY) QString::fromLatin1("%1/qtembedded-%2-%3") \
+ .arg(QT_QWS_TEMP_DIR).arg(getuid()).arg(DISPLAY)
#define QT_VFB_MOUSE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/qtvfb_mouse")
+ .append(QLatin1String("/qtvfb_mouse"))
#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/qtvfb_keyboard")
+ .append(QLatin1String("/qtvfb_keyboard"))
#define QT_VFB_MAP(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/qtvfb_map")
+ .append(QLatin1String("/qtvfb_map"))
#define QT_VFB_SOUND_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/qt_soundserver")
+ .append(QLatin1String("/qt_soundserver"))
#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/QtEmbedded")
+ .append(QLatin1String("/QtEmbedded"))
#define QTE_PIPE_QVFB(DISPLAY) QTE_PIPE(DISPLAY)
#else
-#define QT_VFB_DATADIR(DISPLAY) QString("%1/qtembedded-%2") \
- .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
-#define QT_VFB_MOUSE_PIPE(DISPLAY) QString("/tmp/.qtvfb_mouse-%1").arg(DISPLAY)
-#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QString("/tmp/.qtvfb_keyboard-%1").arg(DISPLAY)
-#define QT_VFB_MAP(DISPLAY) QString("/tmp/.qtvfb_map-%1").arg(DISPLAY)
-#define QT_VFB_SOUND_PIPE(DISPLAY) QString("/tmp/.qt_soundserver-%1").arg(DISPLAY)
-#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
- .append("/QtEmbedded-%1") \
- .arg(DISPLAY)
-#define QTE_PIPE_QVFB(DISPLAY) QString("/tmp/qtembedded-%1/QtEmbedded-%1") \
- .arg(DISPLAY)
+#define QT_VFB_DATADIR(DISPLAY) QString::fromLatin1("%1/qtembedded-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QT_VFB_MOUSE_PIPE(DISPLAY) QString::fromLatin1("%1/.qtvfb_mouse-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QT_VFB_KEYBOARD_PIPE(DISPLAY) QString::fromLatin1("%1/.qtvfb_keyboard-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QT_VFB_MAP(DISPLAY) QString::fromLatin1("%1/.qtvfb_map-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QT_VFB_SOUND_PIPE(DISPLAY) QString::fromLatin1("%1/.qt_soundserver-%2") \
+ .arg(QT_QWS_TEMP_DIR).arg(DISPLAY)
+#define QTE_PIPE(DISPLAY) QT_VFB_DATADIR(DISPLAY) \
+ .append(QLatin1String("/QtEmbedded-%1")).arg(DISPLAY)
+#define QTE_PIPE_QVFB(DISPLAY) QTE_PIPE(DISPLAY)
#endif
struct QVFbHeader
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 014b61bfbc..9bb5424641 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -56,7 +56,7 @@
Items that are anchored are automatically added to the layout, and if items
are removed, all their anchors will be automatically removed.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets.
\enddiv
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index f463887504..d51fdfed1e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -417,6 +417,11 @@
click focus to items underneath when being clicked on. This flag
allows you create a non-focusable item that can be clicked on without
changing the focus. \endomit
+
+ \omitvalue ItemStopsFocusHandling \omit Same as
+ ItemStopsClickFocusPropagation, but also suppresses focus-out. This flag
+ allows you to completely take over focus handling.
+ This flag was introduced in Qt 4.7. \endomit
*/
/*!
@@ -574,19 +579,21 @@
QGraphicsItem pointer). The return value is unused; you cannot adjust
anything in this notification.
- \value ItemSceneChange The item is moved to a new scene. This notification
- is also sent when the item is added to its initial scene, and when it is
- removed. The value argument is the new scene (i.e., a QGraphicsScene
+ \value ItemSceneChange The item is moved to a new scene. This notification is
+ also sent when the item is added to its initial scene, and when it is removed.
+ The item's scene() is the old scene (or 0 if the item has not been added to a
+ scene yet). The value argument is the new scene (i.e., a QGraphicsScene
pointer), or a null pointer if the item is removed from a scene. Do not
- override this change by passing this item to QGraphicsScene::addItem() as
- this notification is delivered; instead, you can return the new scene from
+ override this change by passing this item to QGraphicsScene::addItem() as this
+ notification is delivered; instead, you can return the new scene from
itemChange(). Use this feature with caution; objecting to a scene change can
quickly lead to unwanted recursion.
- \value ItemSceneHasChanged The item's scene has changed. The value
- argument is the new scene (i.e., a pointer to a QGraphicsScene). Do not
- call setScene() in itemChange() as this notification is delivered. The
- return value is ignored.
+ \value ItemSceneHasChanged The item's scene has changed. The item's scene() is
+ the new scene. This notification is also sent when the item is added to its
+ initial scene, and when it is removed.The value argument is the new scene
+ (i.e., a pointer to a QGraphicsScene). Do not call setScene() in itemChange()
+ as this notification is delivered. The return value is ignored.
\value ItemCursorChange The item's cursor changes. The value argument is
the new cursor (i.e., a QCursor). Do not call setCursor() in itemChange()
@@ -5577,8 +5584,10 @@ void QGraphicsItemPrivate::setSubFocus(QGraphicsItem *rootItem, QGraphicsItem *s
parent->d_ptr->subFocusItemChange();
} while (!parent->isPanel() && (parent = parent->d_ptr->parent) && (visible || !parent->d_ptr->visible));
- if (scene && !scene->isActive())
+ if (scene && !scene->isActive()) {
+ scene->d_func()->passiveFocusItem = subFocusItem;
scene->d_func()->lastFocusItem = subFocusItem;
+ }
}
/*!
@@ -11549,6 +11558,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
case QGraphicsItem::ItemStopsClickFocusPropagation:
str = "ItemStopsClickFocusPropagation";
break;
+ case QGraphicsItem::ItemStopsFocusHandling:
+ str = "ItemStopsFocusHandling";
+ break;
}
debug << str;
return debug;
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index e59a7c994f..67c9cd3e2a 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -107,7 +107,8 @@ public:
ItemIsPanel = 0x4000,
ItemIsFocusScope = 0x8000, // internal
ItemSendsScenePositionChanges = 0x10000,
- ItemStopsClickFocusPropagation = 0x20000
+ ItemStopsClickFocusPropagation = 0x20000,
+ ItemStopsFocusHandling = 0x40000
// NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 5c82116305..90ff43f93c 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -559,7 +559,7 @@ public:
quint32 dirtyChildrenBoundingRect : 1;
// Packed 32 bits
- quint32 flags : 18;
+ quint32 flags : 19;
quint32 paintedViewBoundingRectsNeedRepaint : 1;
quint32 dirtySceneTransform : 1;
quint32 geometryChanged : 1;
@@ -573,9 +573,9 @@ public:
quint32 sceneTransformTranslateOnly : 1;
quint32 notifyBoundingRectChanged : 1;
quint32 notifyInvalidated : 1;
- quint32 mouseSetsFocus : 1;
// New 32 bits
+ quint32 mouseSetsFocus : 1;
quint32 explicitActivate : 1;
quint32 wantsActive : 1;
quint32 holesInSiblingIndex : 1;
@@ -586,7 +586,7 @@ public:
quint32 mayHaveChildWithGraphicsEffect : 1;
quint32 isDeclarativeItem : 1;
quint32 sendParentChangeNotification : 1;
- quint32 padding : 22;
+ quint32 padding : 21;
// Optional stacking order
int globalStackingOrder;
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index f997fc2b65..c0a4bf99f1 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -306,6 +306,7 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
rectAdjust(2),
focusItem(0),
lastFocusItem(0),
+ passiveFocusItem(0),
tabFocusFirst(0),
activePanel(0),
lastActivePanel(0),
@@ -630,6 +631,8 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
focusItem = 0;
if (item == lastFocusItem)
lastFocusItem = 0;
+ if (item == passiveFocusItem)
+ passiveFocusItem = 0;
if (item == activePanel) {
// ### deactivate...
activePanel = 0;
@@ -1317,8 +1320,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
// Set focus on the topmost enabled item that can take focus.
bool setFocus = false;
+
foreach (QGraphicsItem *item, cachedItemsUnderMouse) {
- if (item->isBlockedByModalPanel()) {
+ if (item->isBlockedByModalPanel()
+ || (item->d_ptr->flags & QGraphicsItem::ItemStopsFocusHandling)) {
// Make sure we don't clear focus.
setFocus = true;
break;
@@ -1331,10 +1336,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
break;
}
}
- if (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation)
- break;
if (item->isPanel())
break;
+ if (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation)
+ break;
}
// Check for scene modality.
@@ -2980,7 +2985,7 @@ void QGraphicsScene::removeItem(QGraphicsItem *item)
QGraphicsItem *QGraphicsScene::focusItem() const
{
Q_D(const QGraphicsScene);
- return isActive() ? d->focusItem : d->lastFocusItem;
+ return isActive() ? d->focusItem : d->passiveFocusItem;
}
/*!
@@ -3054,6 +3059,7 @@ void QGraphicsScene::clearFocus()
Q_D(QGraphicsScene);
if (d->hasFocus) {
d->hasFocus = false;
+ d->passiveFocusItem = d->focusItem;
setFocusItem(0, Qt::OtherFocusReason);
}
}
@@ -3756,9 +3762,9 @@ void QGraphicsScene::focusInEvent(QFocusEvent *focusEvent)
focusEvent->ignore();
break;
default:
- if (d->lastFocusItem) {
+ if (d->passiveFocusItem) {
// Set focus on the last focus item
- setFocusItem(d->lastFocusItem, focusEvent->reason());
+ setFocusItem(d->passiveFocusItem, focusEvent->reason());
}
break;
}
@@ -3777,6 +3783,7 @@ void QGraphicsScene::focusOutEvent(QFocusEvent *focusEvent)
{
Q_D(QGraphicsScene);
d->hasFocus = false;
+ d->passiveFocusItem = d->focusItem;
setFocusItem(0, focusEvent->reason());
// Remove all popups when the scene loses focus.
@@ -5925,6 +5932,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
// Set focus on the topmost enabled item that can take focus.
bool setFocus = false;
+
foreach (QGraphicsItem *item, cachedItemsUnderMouse) {
if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) {
if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) {
@@ -5938,6 +5946,11 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
break;
if (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation)
break;
+ if (item->d_ptr->flags & QGraphicsItem::ItemStopsFocusHandling) {
+ // Make sure we don't clear focus.
+ setFocus = true;
+ break;
+ }
}
// If nobody could take focus, clear it.
@@ -5970,8 +5983,6 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
}
if (item && item->isPanel())
break;
- if (item && (item->d_ptr->flags & QGraphicsItem::ItemStopsClickFocusPropagation))
- break;
}
touchEvent->setAccepted(eventAccepted);
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 815c70b614..2b47105698 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -150,6 +150,7 @@ public:
quint32 rectAdjust;
QGraphicsItem *focusItem;
QGraphicsItem *lastFocusItem;
+ QGraphicsItem *passiveFocusItem;
QGraphicsWidget *tabFocusFirst;
QGraphicsItem *activePanel;
QGraphicsItem *lastActivePanel;
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 4d51fa8ce3..cf492d6440 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -55,11 +55,9 @@ DEFINES += Q_INTERNAL_QAPP_SRC
symbian {
TARGET.UID3=0x2001B2DD
- symbian-abld|symbian-sbsv2 {
- # ro-section in gui can exceed default allocated space, so move rw-section a little further
- QMAKE_LFLAGS.ARMCC += --rw-base 0x800000
- QMAKE_LFLAGS.GCCE += -Tdata 0xC00000
- }
+ # ro-section in gui can exceed default allocated space, so move rw-section a little further
+ QMAKE_LFLAGS.ARMCC += --rw-base 0x800000
+ QMAKE_LFLAGS.GCCE += -Tdata 0x800000
}
neon:*-g++* {
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index f89706cc7c..00dccbe299 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -28,7 +28,10 @@ HEADERS += \
image/qpixmapdata_p.h \
image/qpixmapdatafactory_p.h \
image/qpixmapfilter_p.h \
- image/qimagepixmapcleanuphooks_p.h
+ image/qimagepixmapcleanuphooks_p.h \
+ image/qvolatileimage_p.h \
+ image/qvolatileimagedata_p.h \
+ image/qnativeimagehandleprovider_p.h
SOURCES += \
image/qbitmap.cpp \
@@ -51,7 +54,8 @@ SOURCES += \
image/qmovie.cpp \
image/qpixmap_raster.cpp \
image/qnativeimage.cpp \
- image/qimagepixmapcleanuphooks.cpp
+ image/qimagepixmapcleanuphooks.cpp \
+ image/qvolatileimage.cpp
win32 {
SOURCES += image/qpixmap_win.cpp
@@ -72,6 +76,13 @@ else:symbian {
SOURCES += image/qpixmap_s60.cpp
}
+!symbian|contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2) {
+ SOURCES += image/qvolatileimagedata.cpp
+}
+else {
+ SOURCES += image/qvolatileimagedata_symbian.cpp
+}
+
# Built-in image format support
HEADERS += \
image/qbmphandler_p.h \
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index d0cc937ce6..59c384a055 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -964,12 +964,15 @@ QString QIcon::themeName()
Returns the QIcon corresponding to \a name in the current
icon theme. If no such icon is found in the current theme
- \a fallback is return instead.
+ \a fallback is returned instead.
- The lastest version of the freedesktop icon specification and naming
- spesification can be obtained here:
- http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
- http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
+ The latest version of the freedesktop icon specification and naming
+ specification can be obtained here:
+
+ \list
+ \o \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}
+ \o \l{http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html}
+ \endlist
To fetch an icon from the current icon theme:
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 168c5181e2..441bdb1a4a 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -833,6 +833,8 @@ QImage::QImage()
Constructs an image with the given \a width, \a height and \a
format.
+ A \l{isNull()}{null} image will be returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
@@ -846,6 +848,8 @@ QImage::QImage(int width, int height, Format format)
/*!
Constructs an image with the given \a size and \a format.
+ A \l{isNull()}{null} image is returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 1fa1058cb6..e7b100020e 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1482,6 +1482,9 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
configure script or check the appropriate option in the graphical
installer.
+ Note that the QApplication instance must be created before this function is
+ called.
+
\sa setFormat(), QImageWriter::supportedImageFormats(), QImageIOPlugin
*/
QList<QByteArray> QImageReader::supportedImageFormats()
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 8a65ac0905..504260aa47 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -679,6 +679,9 @@ bool QImageWriter::supportsOption(QImageIOHandler::ImageOption option) const
Reading and writing SVG files is supported through Qt's
\l{QtSvg Module}{SVG Module}.
+ Note that the QApplication instance must be created before this function is
+ called.
+
\sa setFormat(), QImageReader::supportedImageFormats(), QImageIOPlugin
*/
QList<QByteArray> QImageWriter::supportedImageFormats()
diff --git a/src/gui/image/qnativeimagehandleprovider_p.h b/src/gui/image/qnativeimagehandleprovider_p.h
new file mode 100644
index 0000000000..4e6ed3852a
--- /dev/null
+++ b/src/gui/image/qnativeimagehandleprovider_p.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#ifndef QNATIVEIMAGEHANDLEPROVIDER_P_H
+#define QNATIVEIMAGEHANDLEPROVIDER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qstring.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNativeImageHandleProvider
+{
+public:
+ virtual void get(void **handle, QString *type) = 0;
+ virtual void release(void *handle, const QString &type) = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QNATIVEIMAGEHANDLEPROVIDER_P_H
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 0aefafb1cd..1a83318a2b 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1997,7 +1997,7 @@ void QPixmap::detach()
}
if (data->is_cached && data->ref == 1)
- QImagePixmapCleanupHooks::executePixmapDataModificationHooks(pd);
+ QImagePixmapCleanupHooks::executePixmapDataModificationHooks(data.data());
#if defined(Q_WS_MAC)
QMacPixmapData *macData = id == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(pd) : 0;
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 368600f4f5..5e0ffa89fc 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -380,6 +380,9 @@ int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
void QRasterPixmapData::createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace)
{
QImage::Format format;
+ if (flags & Qt::NoFormatConversion)
+ format = sourceImage.format();
+ else
#ifdef Q_WS_QWS
if (pixelType() == BitmapType) {
format = QImage::Format_Mono;
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index ca5f133367..32d8dd76f8 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -374,6 +374,8 @@ CFbsBitmap *QPixmap::toSymbianCFbsBitmap() const
To be sure that QPixmap does not modify your original instance, you should
make a copy of your \c CFbsBitmap before calling this function.
If the CFbsBitmap is not valid this function will return a null QPixmap.
+ For performance reasons it is recommended to use a \a bitmap with a display
+ mode of EColor16MAP or EColor16MU whenever possible.
\warning This function is only available on Symbian OS.
@@ -599,6 +601,9 @@ bool QS60PixmapData::scroll(int dx, int dy, const QRect &rect)
return res;
}
+Q_GUI_EXPORT int qt_defaultDpiX();
+Q_GUI_EXPORT int qt_defaultDpiY();
+
int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
if (!cfbsBitmap)
@@ -609,28 +614,18 @@ int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
return cfbsBitmap->SizeInPixels().iWidth;
case QPaintDevice::PdmHeight:
return cfbsBitmap->SizeInPixels().iHeight;
- case QPaintDevice::PdmWidthMM: {
- TInt twips = cfbsBitmap->SizeInTwips().iWidth;
- return (int)(twips * (25.4/KTwipsPerInch));
- }
- case QPaintDevice::PdmHeightMM: {
- TInt twips = cfbsBitmap->SizeInTwips().iHeight;
- return (int)(twips * (25.4/KTwipsPerInch));
- }
+ case QPaintDevice::PdmWidthMM:
+ return qRound(cfbsBitmap->SizeInPixels().iWidth * 25.4 / qt_defaultDpiX());
+ case QPaintDevice::PdmHeightMM:
+ return qRound(cfbsBitmap->SizeInPixels().iHeight * 25.4 / qt_defaultDpiY());
case QPaintDevice::PdmNumColors:
return TDisplayModeUtils::NumDisplayModeColors(cfbsBitmap->DisplayMode());
case QPaintDevice::PdmDpiX:
- case QPaintDevice::PdmPhysicalDpiX: {
- TReal inches = cfbsBitmap->SizeInTwips().iWidth / (TReal)KTwipsPerInch;
- TInt pixels = cfbsBitmap->SizeInPixels().iWidth;
- return pixels / inches;
- }
+ case QPaintDevice::PdmPhysicalDpiX:
+ return qt_defaultDpiX();
case QPaintDevice::PdmDpiY:
- case QPaintDevice::PdmPhysicalDpiY: {
- TReal inches = cfbsBitmap->SizeInTwips().iHeight / (TReal)KTwipsPerInch;
- TInt pixels = cfbsBitmap->SizeInPixels().iHeight;
- return pixels / inches;
- }
+ case QPaintDevice::PdmPhysicalDpiY:
+ return qt_defaultDpiY();
case QPaintDevice::PdmDepth:
return TDisplayModeUtils::NumDisplayModeBitsPerPixel(cfbsBitmap->DisplayMode());
default:
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index 7699344bd4..0d0d417878 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -71,7 +71,9 @@ public:
#if defined(Q_OS_SYMBIAN)
enum NativeType {
FbsBitmap,
- SgImage
+ SgImage,
+ VolatileImage,
+ NativeImageHandleProvider
};
#endif
enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass,
diff --git a/src/gui/image/qvolatileimage.cpp b/src/gui/image/qvolatileimage.cpp
new file mode 100644
index 0000000000..098e9a1264
--- /dev/null
+++ b/src/gui/image/qvolatileimage.cpp
@@ -0,0 +1,318 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#include "qvolatileimage_p.h"
+#include "qvolatileimagedata_p.h"
+#include <QtGui/private/qpaintengine_raster_p.h>
+#include <QtGui/private/qpixmapdata_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QVolatileImagePaintEnginePrivate : public QRasterPaintEnginePrivate
+{
+public:
+ QVolatileImagePaintEnginePrivate() { }
+ QVolatileImage *img;
+};
+
+class QVolatileImagePaintEngine : public QRasterPaintEngine
+{
+ Q_DECLARE_PRIVATE(QVolatileImagePaintEngine)
+
+public:
+ QVolatileImagePaintEngine(QPaintDevice *device, QVolatileImage *img);
+ bool begin(QPaintDevice *device);
+ bool end();
+ void drawPixmap(const QPointF &p, const QPixmap &pm);
+ void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
+};
+
+QVolatileImage::QVolatileImage()
+ : d(new QVolatileImageData)
+{
+}
+
+QVolatileImage::QVolatileImage(int w, int h, QImage::Format format)
+ : d(new QVolatileImageData(w, h, format))
+{
+}
+
+QVolatileImage::QVolatileImage(const QImage &sourceImage)
+ : d(new QVolatileImageData(sourceImage))
+{
+}
+
+QVolatileImage::QVolatileImage(void *nativeImage, void *nativeMask)
+ : d(new QVolatileImageData(nativeImage, nativeMask))
+{
+}
+
+// Need non-inline, non-autogenerated copy ctor, dtor, op= to keep the
+// fwd declared QSharedData working.
+
+QVolatileImage::QVolatileImage(const QVolatileImage &other)
+ : d(other.d)
+{
+}
+
+QVolatileImage::~QVolatileImage()
+{
+}
+
+QVolatileImage &QVolatileImage::operator=(const QVolatileImage &rhs)
+{
+ d = rhs.d;
+ return *this;
+}
+
+bool QVolatileImage::isNull() const
+{
+ return d->image.isNull();
+}
+
+QImage::Format QVolatileImage::format() const
+{
+ return d->image.format();
+}
+
+int QVolatileImage::width() const
+{
+ return d->image.width();
+}
+
+int QVolatileImage::height() const
+{
+ return d->image.height();
+}
+
+int QVolatileImage::bytesPerLine() const
+{
+ return d->image.bytesPerLine();
+}
+
+int QVolatileImage::byteCount() const
+{
+ return d->image.byteCount();
+}
+
+int QVolatileImage::depth() const
+{
+ return d->image.depth();
+}
+
+bool QVolatileImage::hasAlphaChannel() const
+{
+ return d->image.hasAlphaChannel();
+}
+
+void QVolatileImage::beginDataAccess() const
+{
+ d->beginDataAccess();
+}
+
+void QVolatileImage::endDataAccess(bool readOnly) const
+{
+ d->endDataAccess(readOnly);
+}
+
+/*!
+ Access to pixel data via bits() or constBits() should be guarded by
+ begin/endDataAccess().
+ */
+uchar *QVolatileImage::bits()
+{
+ return d->image.bits();
+}
+
+const uchar *QVolatileImage::constBits() const
+{
+ return d->image.constBits();
+}
+
+bool QVolatileImage::ensureFormat(QImage::Format format)
+{
+ return d->ensureFormat(format);
+}
+
+/*!
+ This will always perform a copy of the pixel data.
+ */
+QImage QVolatileImage::toImage() const
+{
+ d->beginDataAccess();
+ QImage newImage = d->image.copy(); // no sharing allowed
+ d->endDataAccess(true);
+ return newImage;
+}
+
+/*!
+ Returns a reference to the image that is potentially using some native
+ buffer internally. Access to the image's pixel data should be guarded by
+ begin/endDataAccess(). Use it when there is a need for QImage APIs not provided
+ by this class. The returned QImage must never be shared or assigned to.
+ */
+QImage &QVolatileImage::imageRef() // non-const, in order to cause a detach
+{
+ d->ensureImage();
+ return d->image;
+}
+
+void *QVolatileImage::duplicateNativeImage() const
+{
+ return d->duplicateNativeImage();
+}
+
+void QVolatileImage::setAlphaChannel(const QPixmap &alphaChannel)
+{
+ ensureFormat(QImage::Format_ARGB32_Premultiplied);
+ beginDataAccess();
+ imageRef().setAlphaChannel(alphaChannel.toImage());
+ endDataAccess();
+ d->ensureImage();
+}
+
+void QVolatileImage::fill(uint pixelValue)
+{
+ beginDataAccess();
+ imageRef().fill(pixelValue);
+ endDataAccess();
+ d->ensureImage();
+}
+
+void QVolatileImage::copyFrom(QVolatileImage *source, const QRect &rect)
+{
+ if (source->isNull()) {
+ return;
+ }
+ QRect r = rect;
+ if (rect.isNull()) {
+ r = QRect(0, 0, source->width(), source->height());
+ }
+ source->beginDataAccess();
+ QImage &srcImgRef(source->imageRef());
+ int srcbpl = srcImgRef.bytesPerLine();
+ int srcbpp = srcImgRef.depth() / 8;
+ const uchar *sptr = srcImgRef.constBits() + r.y() * srcbpl;
+ beginDataAccess();
+ QImage &dstImgRef(imageRef());
+ int dstbpl = dstImgRef.bytesPerLine();
+ uchar *dptr = dstImgRef.bits();
+ for (int y = 0; y < r.height(); ++y) {
+ qMemCopy(dptr, sptr + r.x() * srcbpp, r.width() * srcbpp);
+ sptr += srcbpl;
+ dptr += dstbpl;
+ }
+ endDataAccess();
+ source->endDataAccess(true);
+}
+
+/*!
+ To be called from the PixmapData's paintEngine().
+ */
+QPaintEngine *QVolatileImage::paintEngine()
+{
+ if (!d->pengine) {
+ d->pengine = new QVolatileImagePaintEngine(&imageRef(), this);
+ }
+ return d->pengine;
+}
+
+QVolatileImagePaintEngine::QVolatileImagePaintEngine(QPaintDevice *device,
+ QVolatileImage *img)
+ : QRasterPaintEngine(*(new QVolatileImagePaintEnginePrivate), device)
+{
+ Q_D(QVolatileImagePaintEngine);
+ d->img = img;
+}
+
+bool QVolatileImagePaintEngine::begin(QPaintDevice *device)
+{
+ Q_D(QVolatileImagePaintEngine);
+ d->img->beginDataAccess();
+ return QRasterPaintEngine::begin(device);
+}
+
+bool QVolatileImagePaintEngine::end()
+{
+ Q_D(QVolatileImagePaintEngine);
+ bool ret = QRasterPaintEngine::end();
+ d->img->endDataAccess();
+ return ret;
+}
+
+// For non-RasterClass pixmaps drawPixmap() would call toImage() which is slow in
+// our case. Therefore drawPixmap() is rerouted to drawImage().
+
+void QVolatileImagePaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
+{
+#ifdef Q_OS_SYMBIAN
+ void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+ if (nativeData) {
+ QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
+ img->beginDataAccess();
+ QRasterPaintEngine::drawImage(p, img->imageRef());
+ img->endDataAccess(true);
+ } else {
+ QRasterPaintEngine::drawPixmap(p, pm);
+ }
+#else
+ QRasterPaintEngine::drawPixmap(p, pm);
+#endif
+}
+
+void QVolatileImagePaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
+{
+#ifdef Q_OS_SYMBIAN
+ void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+ if (nativeData) {
+ QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
+ img->beginDataAccess();
+ QRasterPaintEngine::drawImage(r, img->imageRef(), sr);
+ img->endDataAccess(true);
+ } else {
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+ }
+#else
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+#endif
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/image/qvolatileimage_p.h b/src/gui/image/qvolatileimage_p.h
new file mode 100644
index 0000000000..fc5d6b115c
--- /dev/null
+++ b/src/gui/image/qvolatileimage_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#ifndef QVOLATILEIMAGE_P_H
+#define QVOLATILEIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qimage.h>
+#include <QtCore/qshareddata.h>
+
+QT_BEGIN_NAMESPACE
+
+class QVolatileImageData;
+
+class Q_GUI_EXPORT QVolatileImage
+{
+public:
+ QVolatileImage();
+ QVolatileImage(int w, int h, QImage::Format format);
+ explicit QVolatileImage(const QImage &sourceImage);
+ explicit QVolatileImage(void *nativeImage, void *nativeMask = 0);
+ QVolatileImage(const QVolatileImage &other);
+ ~QVolatileImage();
+ QVolatileImage &operator=(const QVolatileImage &rhs);
+
+ bool isNull() const;
+ QImage::Format format() const;
+ int width() const;
+ int height() const;
+ int bytesPerLine() const;
+ int byteCount() const;
+ int depth() const;
+ bool hasAlphaChannel() const;
+ void beginDataAccess() const;
+ void endDataAccess(bool readOnly = false) const;
+ uchar *bits();
+ const uchar *constBits() const;
+ bool ensureFormat(QImage::Format format);
+ QImage toImage() const;
+ QImage &imageRef();
+ QPaintEngine *paintEngine();
+ void setAlphaChannel(const QPixmap &alphaChannel);
+ void fill(uint pixelValue);
+ void *duplicateNativeImage() const;
+ void copyFrom(QVolatileImage *source, const QRect &rect);
+
+private:
+ QSharedDataPointer<QVolatileImageData> d;
+};
+
+QT_END_NAMESPACE
+
+#endif // QVOLATILEIMAGE_P_H
diff --git a/src/gui/image/qvolatileimagedata.cpp b/src/gui/image/qvolatileimagedata.cpp
new file mode 100644
index 0000000000..51b5995b86
--- /dev/null
+++ b/src/gui/image/qvolatileimagedata.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#include "qvolatileimagedata_p.h"
+#include <QtGui/qpaintengine.h>
+
+QT_BEGIN_NAMESPACE
+
+QVolatileImageData::QVolatileImageData()
+ : pengine(0)
+{
+}
+
+QVolatileImageData::QVolatileImageData(int w, int h, QImage::Format format)
+ : pengine(0)
+{
+ image = QImage(w, h, format);
+}
+
+QVolatileImageData::QVolatileImageData(const QImage &sourceImage)
+ : pengine(0)
+{
+ image = sourceImage;
+}
+
+QVolatileImageData::QVolatileImageData(void *, void *)
+ : pengine(0)
+{
+ // Not supported.
+}
+
+QVolatileImageData::QVolatileImageData(const QVolatileImageData &other)
+{
+ image = other.image;
+ // The detach is not mandatory here but we do it nonetheless in order to
+ // keep the behavior consistent with other platforms.
+ image.detach();
+ pengine = 0;
+}
+
+QVolatileImageData::~QVolatileImageData()
+{
+ delete pengine;
+}
+
+void QVolatileImageData::beginDataAccess() const
+{
+ // nothing to do here
+}
+
+void QVolatileImageData::endDataAccess(bool readOnly) const
+{
+ Q_UNUSED(readOnly);
+ // nothing to do here
+}
+
+bool QVolatileImageData::ensureFormat(QImage::Format format)
+{
+ if (image.format() != format) {
+ image = image.convertToFormat(format);
+ }
+ return true;
+}
+
+void *QVolatileImageData::duplicateNativeImage() const
+{
+ return 0;
+}
+
+void QVolatileImageData::ensureImage()
+{
+ // nothing to do here
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/image/qvolatileimagedata_p.h b/src/gui/image/qvolatileimagedata_p.h
new file mode 100644
index 0000000000..dab1685347
--- /dev/null
+++ b/src/gui/image/qvolatileimagedata_p.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#ifndef QVOLATILEIMAGEDATA_P_H
+#define QVOLATILEIMAGEDATA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qimage.h>
+#include <QtCore/qshareddata.h>
+
+#ifdef Q_OS_SYMBIAN
+class CFbsBitmap;
+#endif
+
+QT_BEGIN_NAMESPACE
+
+class QVolatileImageData : public QSharedData
+{
+public:
+ QVolatileImageData();
+ QVolatileImageData(int w, int h, QImage::Format format);
+ QVolatileImageData(const QImage &sourceImage);
+ QVolatileImageData(void *nativeImage, void *nativeMask);
+ QVolatileImageData(const QVolatileImageData &other);
+ ~QVolatileImageData();
+
+ void beginDataAccess() const;
+ void endDataAccess(bool readOnly = false) const;
+ bool ensureFormat(QImage::Format format);
+ void *duplicateNativeImage() const;
+ void ensureImage();
+
+#ifdef Q_OS_SYMBIAN
+ void updateImage();
+ void initWithBitmap(CFbsBitmap *source);
+ void applyMask(CFbsBitmap *mask);
+ void ensureBitmap();
+ void release();
+ QVolatileImageData *next;
+ QVolatileImageData *prev;
+ CFbsBitmap *bitmap;
+#endif
+ QImage image;
+ QPaintEngine *pengine;
+};
+
+QT_END_NAMESPACE
+
+#endif // QVOLATILEIMAGEDATA_P_H
diff --git a/src/gui/image/qvolatileimagedata_symbian.cpp b/src/gui/image/qvolatileimagedata_symbian.cpp
new file mode 100644
index 0000000000..6e2909bec3
--- /dev/null
+++ b/src/gui/image/qvolatileimagedata_symbian.cpp
@@ -0,0 +1,474 @@
+/****************************************************************************
+**
+** 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 QtGui module 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$
+**
+****************************************************************************/
+
+#include "qvolatileimagedata_p.h"
+#include <fbs.h>
+#include <QtGui/private/qt_s60_p.h>
+#include <QtGui/qpaintengine.h>
+#include <QtGui/private/qimage_p.h>
+
+QT_BEGIN_NAMESPACE
+
+static CFbsBitmap *rasterizeBitmap(CFbsBitmap *bitmap, TDisplayMode newMode)
+{
+ if (!bitmap) {
+ return 0;
+ }
+ QScopedPointer<CFbsBitmap> newBitmap(new CFbsBitmap);
+ if (newBitmap->Create(bitmap->SizeInPixels(), newMode) != KErrNone) {
+ qWarning("QVolatileImage: Failed to create new bitmap");
+ return 0;
+ }
+ CFbsBitmapDevice *bitmapDevice = 0;
+ CFbsBitGc *bitmapGc = 0;
+ QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(newBitmap.data()));
+ QScopedPointer<CFbsBitmapDevice> bitmapDevicePtr(bitmapDevice);
+ QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL());
+ bitmapGc->Activate(bitmapDevice);
+ bitmapGc->BitBlt(TPoint(), bitmap);
+ delete bitmapGc;
+ return newBitmap.take();
+}
+
+static inline TDisplayMode format2TDisplayMode(QImage::Format format)
+{
+ TDisplayMode mode;
+ switch (format) {
+ case QImage::Format_MonoLSB:
+ mode = EGray2;
+ break;
+ case QImage::Format_Indexed8:
+ mode = EColor256;
+ break;
+ case QImage::Format_RGB444:
+ mode = EColor4K;
+ break;
+ case QImage::Format_RGB16:
+ mode = EColor64K;
+ break;
+ case QImage::Format_RGB888:
+ mode = EColor16M;
+ break;
+ case QImage::Format_RGB32:
+ mode = EColor16MU;
+ break;
+ case QImage::Format_ARGB32:
+ mode = EColor16MA;
+ break;
+ case QImage::Format_ARGB32_Premultiplied:
+ mode = Q_SYMBIAN_ECOLOR16MAP;
+ break;
+ default:
+ mode = ENone;
+ break;
+ }
+ return mode;
+}
+
+static CFbsBitmap *imageToBitmap(const QImage &image)
+{
+ if (image.isNull()) {
+ return 0;
+ }
+ CFbsBitmap *bitmap = new CFbsBitmap;
+ if (bitmap->Create(TSize(image.width(), image.height()),
+ format2TDisplayMode(image.format())) == KErrNone) {
+ bitmap->BeginDataAccess();
+ uchar *dptr = reinterpret_cast<uchar *>(bitmap->DataAddress());
+ int bmpLineLen = bitmap->DataStride();
+ int imgLineLen = image.bytesPerLine();
+ if (bmpLineLen == imgLineLen) {
+ qMemCopy(dptr, image.constBits(), image.byteCount());
+ } else {
+ int len = qMin(bmpLineLen, imgLineLen);
+ const uchar *sptr = image.constBits();
+ for (int y = 0; y < image.height(); ++y) {
+ qMemCopy(dptr, sptr, len);
+ dptr += bmpLineLen;
+ sptr += imgLineLen;
+ }
+ }
+ bitmap->EndDataAccess();
+ } else {
+ qWarning("QVolatileImage: Failed to create source bitmap");
+ delete bitmap;
+ bitmap = 0;
+ }
+ return bitmap;
+}
+
+static CFbsBitmap *copyData(const QVolatileImageData &source)
+{
+ source.beginDataAccess();
+ CFbsBitmap *bmp = imageToBitmap(source.image);
+ source.endDataAccess();
+ return bmp;
+}
+
+static CFbsBitmap *convertData(const QVolatileImageData &source, QImage::Format newFormat)
+{
+ source.beginDataAccess();
+ QImage img = source.image.convertToFormat(newFormat);
+ CFbsBitmap *bmp = imageToBitmap(img);
+ source.endDataAccess();
+ return bmp;
+}
+
+static CFbsBitmap *duplicateBitmap(const CFbsBitmap &sourceBitmap)
+{
+ CFbsBitmap *bitmap = new CFbsBitmap;
+ if (bitmap->Duplicate(sourceBitmap.Handle()) != KErrNone) {
+ qWarning("QVolatileImage: Failed to duplicate source bitmap");
+ delete bitmap;
+ bitmap = 0;
+ }
+ return bitmap;
+}
+
+static CFbsBitmap *createBitmap(int w, int h, QImage::Format format)
+{
+ CFbsBitmap *bitmap = new CFbsBitmap;
+ if (bitmap->Create(TSize(w, h), format2TDisplayMode(format)) != KErrNone) {
+ qWarning("QVolatileImage: Failed to create source bitmap %d,%d (%d)", w, h, format);
+ delete bitmap;
+ bitmap = 0;
+ }
+ return bitmap;
+}
+
+static inline bool bitmapNeedsCopy(CFbsBitmap *bitmap)
+{
+ bool needsCopy = bitmap->IsCompressedInRAM();
+#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
+ needsCopy |= (bitmap->ExtendedBitmapType() != KNullUid);
+#endif
+ return needsCopy;
+}
+
+static bool cleanup_function_registered = false;
+static QVolatileImageData *firstImageData = 0;
+
+static void cleanup()
+{
+ if (RFbsSession::GetSession()) {
+ QVolatileImageData *imageData = firstImageData;
+ while (imageData) {
+ imageData->release();
+ imageData = imageData->next;
+ }
+ }
+}
+
+static void ensureCleanup()
+{
+ // Destroy all underlying bitmaps in a post routine to prevent panics.
+ // This is a must because CFbsBitmap destructor needs the fbs session,
+ // that was used to create the bitmap, to be open still.
+ if (!cleanup_function_registered) {
+ qAddPostRoutine(cleanup);
+ cleanup_function_registered = true;
+ }
+}
+
+static void registerImageData(QVolatileImageData *imageData)
+{
+ ensureCleanup();
+ imageData->next = firstImageData;
+ if (firstImageData) {
+ firstImageData->prev = imageData;
+ }
+ firstImageData = imageData;
+}
+
+static void unregisterImageData(QVolatileImageData *imageData)
+{
+ if (imageData->prev) {
+ imageData->prev->next = imageData->next;
+ } else {
+ firstImageData = imageData->next;
+ }
+ if (imageData->next) {
+ imageData->next->prev = imageData->prev;
+ }
+}
+
+QVolatileImageData::QVolatileImageData()
+ : next(0), prev(0), bitmap(0), pengine(0)
+{
+ registerImageData(this);
+}
+
+QVolatileImageData::QVolatileImageData(int w, int h, QImage::Format format)
+ : next(0), prev(0), bitmap(0), pengine(0)
+{
+ registerImageData(this);
+ bitmap = createBitmap(w, h, format);
+ updateImage();
+}
+
+QVolatileImageData::QVolatileImageData(const QImage &sourceImage)
+ : next(0), prev(0), bitmap(0), pengine(0)
+{
+ registerImageData(this);
+ image = sourceImage;
+ // The following is not mandatory, but we do it here to have a bitmap
+ // created always in order to reduce local heap usage.
+ ensureBitmap();
+}
+
+QVolatileImageData::QVolatileImageData(void *nativeImage, void *nativeMask)
+ : next(0), prev(0), bitmap(0), pengine(0)
+{
+ registerImageData(this);
+ if (nativeImage) {
+ CFbsBitmap *source = static_cast<CFbsBitmap *>(nativeImage);
+ CFbsBitmap *mask = static_cast<CFbsBitmap *>(nativeMask);
+ initWithBitmap(source);
+ if (mask) {
+ applyMask(mask);
+ }
+ }
+}
+
+QVolatileImageData::QVolatileImageData(const QVolatileImageData &other)
+{
+ bitmap = 0;
+ pengine = 0;
+ next = prev = 0;
+ registerImageData(this);
+ if (!other.image.isNull()) {
+ bitmap = copyData(other);
+ updateImage();
+ }
+}
+
+QVolatileImageData::~QVolatileImageData()
+{
+ release();
+ unregisterImageData(this);
+}
+
+void QVolatileImageData::release()
+{
+ delete bitmap;
+ bitmap = 0;
+ delete pengine;
+ pengine = 0;
+}
+
+void QVolatileImageData::beginDataAccess() const
+{
+ if (bitmap) {
+ bitmap->BeginDataAccess();
+ }
+}
+
+void QVolatileImageData::endDataAccess(bool readOnly) const
+{
+ if (bitmap) {
+ bitmap->EndDataAccess(readOnly);
+ }
+}
+
+bool QVolatileImageData::ensureFormat(QImage::Format format)
+{
+ if (image.isNull()) {
+ return false;
+ }
+ if (image.format() != format) {
+ CFbsBitmap *newBitmap = convertData(*this, format);
+ if (newBitmap && newBitmap != bitmap) {
+ delete bitmap;
+ bitmap = newBitmap;
+ updateImage();
+ } else {
+ return false;
+ }
+ }
+ return true;
+}
+
+void *QVolatileImageData::duplicateNativeImage() const
+{
+ const_cast<QVolatileImageData *>(this)->ensureBitmap();
+ if (bitmap) {
+ if (bitmap->DisplayMode() == EColor16M) {
+ // slow path: needs rgb swapping
+ beginDataAccess();
+ QImage tmp = image.rgbSwapped();
+ endDataAccess(true);
+ return imageToBitmap(tmp);
+ } else if (bitmap->DisplayMode() == EGray2) {
+ // slow path: needs inverting pixels
+ beginDataAccess();
+ QImage tmp = image.copy();
+ endDataAccess(true);
+ tmp.invertPixels();
+ return imageToBitmap(tmp);
+ } else {
+ // fast path: just duplicate the bitmap
+ return duplicateBitmap(*bitmap);
+ }
+ }
+ return 0;
+}
+
+void QVolatileImageData::updateImage()
+{
+ if (bitmap) {
+ TSize size = bitmap->SizeInPixels();
+ beginDataAccess();
+ // Use existing buffer, no copy. The data address never changes so it
+ // is enough to do this whenever we have a new CFbsBitmap. N.B. never
+ // use const uchar* here, that would create a read-only image data which
+ // would make a copy in detach() even when refcount is 1.
+ image = QImage(reinterpret_cast<uchar *>(bitmap->DataAddress()),
+ size.iWidth, size.iHeight, bitmap->DataStride(),
+ qt_TDisplayMode2Format(bitmap->DisplayMode()));
+ endDataAccess(true);
+ } else {
+ image = QImage();
+ }
+}
+
+void QVolatileImageData::initWithBitmap(CFbsBitmap *source)
+{
+ bool needsCopy = bitmapNeedsCopy(source);
+ if (source->DisplayMode() == EColor16M) {
+ // EColor16M is BGR
+ CFbsBitmap *unswappedBmp = source;
+ if (needsCopy) {
+ unswappedBmp = rasterizeBitmap(source, source->DisplayMode());
+ }
+ unswappedBmp->BeginDataAccess();
+ TSize sourceSize = unswappedBmp->SizeInPixels();
+ QImage img((uchar *) unswappedBmp->DataAddress(),
+ sourceSize.iWidth, sourceSize.iHeight, unswappedBmp->DataStride(),
+ qt_TDisplayMode2Format(unswappedBmp->DisplayMode()));
+ img = img.rgbSwapped();
+ unswappedBmp->EndDataAccess(true);
+ bitmap = imageToBitmap(img);
+ if (needsCopy) {
+ delete unswappedBmp;
+ }
+ } else if (needsCopy) {
+ // Rasterize extended and compressed bitmaps.
+ bitmap = rasterizeBitmap(source, EColor16MAP);
+ } else if (source->DisplayMode() == EGray2) {
+ // The pixels will be inverted, must make a copy.
+ bitmap = rasterizeBitmap(source, source->DisplayMode());
+ } else {
+ // Efficient path: no pixel data copying. Just duplicate. This of course
+ // means the original bitmap's data may get modified, but that's fine
+ // and is in accordance with the QPixmap::fromSymbianCFbsBitmap() docs.
+ bitmap = duplicateBitmap(*source);
+ }
+ updateImage();
+ if (bitmap && bitmap->DisplayMode() == EGray2) {
+ // Symbian thinks set pixels are white/transparent, Qt thinks they are
+ // foreground/solid. Invert mono bitmaps so that masks work correctly.
+ beginDataAccess();
+ image.invertPixels();
+ endDataAccess();
+ }
+}
+
+void QVolatileImageData::applyMask(CFbsBitmap *mask)
+{
+ ensureFormat(QImage::Format_ARGB32_Premultiplied);
+ bool destroyMask = false;
+ if (bitmapNeedsCopy(mask)) {
+ mask = rasterizeBitmap(mask, EColor16MU);
+ if (!mask) {
+ return;
+ }
+ destroyMask = true;
+ }
+ mask->BeginDataAccess();
+ TSize maskSize = mask->SizeInPixels();
+ QImage maskImg((const uchar *) mask->DataAddress(), maskSize.iWidth, maskSize.iHeight,
+ mask->DataStride(), qt_TDisplayMode2Format(mask->DisplayMode()));
+ if (mask->DisplayMode() == EGray2) {
+ maskImg = maskImg.copy();
+ maskImg.invertPixels();
+ }
+ beginDataAccess();
+ image.setAlphaChannel(maskImg);
+ endDataAccess();
+ mask->EndDataAccess(true);
+ ensureImage();
+ if (destroyMask) {
+ delete mask;
+ }
+}
+
+void QVolatileImageData::ensureImage()
+{
+ if (bitmap && !image.isNull()) {
+ QImageData *imaged = image.data_ptr();
+ if (imaged->ref != 1 || imaged->ro_data) {
+ // This is bad, the imagedata got shared somehow. Detach, in order to
+ // have the next check fail and thus have 'image' recreated.
+ beginDataAccess();
+ image.detach();
+ endDataAccess(true);
+ }
+ }
+ if (bitmap && image.constBits() != reinterpret_cast<const uchar *>(bitmap->DataAddress())) {
+ // Should not ever get here. If we do it means that either 'image' has
+ // been replaced with a copy (e.g. because some QImage API assigned a
+ // new, regular QImage to *this) or the bitmap's data address changed
+ // unexpectedly.
+ qWarning("QVolatileImageData: Ptr mismatch");
+ // Recover by recreating the image so that it uses the bitmap as its buffer.
+ updateImage();
+ }
+}
+
+void QVolatileImageData::ensureBitmap()
+{
+ if (!bitmap && !image.isNull()) {
+ bitmap = imageToBitmap(image);
+ updateImage();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index 8c8ffd497e..de3577f1a6 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -93,6 +93,9 @@ public:
TCoeInputCapabilities inputCapabilities();
+ void resetSplitViewWidget(bool keepInputWidget = false);
+ void ensureFocusWidgetVisible(QWidget *widget);
+
protected:
void timerEvent(QTimerEvent *timerEvent);
@@ -104,9 +107,11 @@ private:
void queueInputCapabilitiesChanged();
bool needsInputPanel();
void commitTemporaryPreeditString();
+ bool isWidgetVisible(QWidget *widget, int offset = 0);
private Q_SLOTS:
void ensureInputCapabilitiesChanged();
+ void translateInputWidget();
// From MCoeFepAwareTextEditor
public:
@@ -155,9 +160,15 @@ private:
QBasicTimer m_tempPreeditStringTimeout;
bool m_hasTempPreeditString;
+ int m_splitViewResizeBy;
+ Qt::WindowStates m_splitViewPreviousWindowStates;
+ QRectF m_transformation;
+
friend class tst_QInputContext;
};
+Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable);
+
QT_END_NAMESPACE
#endif // QT_NO_IM
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 1bef64de87..8574f2ce40 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -48,6 +48,8 @@
#include <qgraphicsscene.h>
#include <qgraphicswidget.h>
#include <qsymbianevent.h>
+#include <qlayout.h>
+#include <qdesktopwidget.h>
#include <private/qcore_symbian_p.h>
#include <fepitfr.h>
@@ -67,8 +69,16 @@
// that support text selection.
#define QT_EAknEditorFlagSelectionVisible 0x100000
+// EAknEditorFlagEnablePartialScreen is only valid from Sym^3 onwards.
+#define QT_EAknEditorFlagEnablePartialScreen 0x200000
+
QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable)
+{
+ S60->partial_keyboard = enable;
+}
+
QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
: QInputContext(parent),
m_fepState(q_check_ptr(new CAknEdwinState)), // CBase derived object needs check on new
@@ -80,13 +90,19 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_inlinePosition(0),
m_formatRetriever(0),
m_pointerHandler(0),
- m_hasTempPreeditString(false)
+ m_hasTempPreeditString(false),
+ m_splitViewResizeBy(0),
+ m_splitViewPreviousWindowStates(Qt::WindowNoState)
{
m_fepState->SetObjectProvider(this);
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
- m_fepState->SetFlags(EAknEditorFlagDefault | QT_EAknEditorFlagSelectionVisible);
- else
- m_fepState->SetFlags(EAknEditorFlagDefault);
+ int defaultFlags = EAknEditorFlagDefault;
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
+ if (S60->partial_keyboard) {
+ defaultFlags |= QT_EAknEditorFlagEnablePartialScreen;
+ }
+ defaultFlags |= QT_EAknEditorFlagSelectionVisible;
+ }
+ m_fepState->SetFlags(defaultFlags);
m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
m_fepState->SetDefaultCase( EAknEditorTextCase );
@@ -210,6 +226,21 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
return false;
switch (event->type()) {
+ case QEvent::MouseButtonPress:
+ // Alphanumeric keypad doesn't like it when we click and text is still getting displayed
+ // It ignores the mouse event, so we need to commit and send a selection event (which will get triggered
+ // after the commit)
+ if (!m_preeditString.isEmpty()) {
+ commitCurrentString(true);
+
+ int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
+
+ QList<QInputMethodEvent::Attribute> selectAttributes;
+ selectAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos, 0, QVariant());
+ QInputMethodEvent selectEvent(QLatin1String(""), selectAttributes);
+ sendEvent(selectEvent);
+ }
+ break;
case QEvent::KeyPress:
commitTemporaryPreeditString();
// fall through intended
@@ -299,6 +330,23 @@ bool QCoeFepInputContext::symbianFilterEvent(QWidget *keyWidget, const QSymbianE
// This should also happen for commands.
reset();
+ if (event->type() == QSymbianEvent::WindowServerEvent
+ && event->windowServerEvent()
+ && event->windowServerEvent()->Type() == EEventWindowVisibilityChanged
+ && S60->splitViewLastWidget) {
+
+ QGraphicsView *gv = qobject_cast<QGraphicsView*>(S60->splitViewLastWidget);
+ const bool alwaysResize = (gv && gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff);
+
+ if (alwaysResize) {
+ TUint visibleFlags = event->windowServerEvent()->VisibilityChanged()->iFlags;
+ if (visibleFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
+ ensureFocusWidgetVisible(S60->splitViewLastWidget);
+ if (visibleFlags & TWsVisibilityChangedEvent::ENotVisible)
+ resetSplitViewWidget(true);
+ }
+ }
+
return false;
}
@@ -343,6 +391,171 @@ TCoeInputCapabilities QCoeFepInputContext::inputCapabilities()
return TCoeInputCapabilities(m_textCapabilities, this, 0);
}
+void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget)
+{
+ QGraphicsView *gv = qobject_cast<QGraphicsView*>(S60->splitViewLastWidget);
+
+ if (!gv) {
+ return;
+ }
+
+ QSymbianControl *symControl = static_cast<QSymbianControl*>(gv->effectiveWinId());
+ symControl->CancelLongTapTimer();
+
+ const bool alwaysResize = (gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff);
+ QWidget *windowToMove = gv->window();
+
+ bool userResize = gv->testAttribute(Qt::WA_Resized);
+
+ windowToMove->setUpdatesEnabled(false);
+
+ if (!alwaysResize) {
+ if (gv->scene()) {
+ if (gv->scene()->focusItem()) {
+ // Check if the widget contains cursorPositionChanged signal and disconnect from it.
+ QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
+ int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
+ if (index != -1)
+ disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
+ }
+
+ QGraphicsItem *rootItem = 0;
+ foreach (QGraphicsItem *item, gv->scene()->items()) {
+ if (!item->parentItem()) {
+ rootItem = item;
+ break;
+ }
+ }
+ if (rootItem)
+ rootItem->resetTransform();
+ }
+ } else {
+ if (m_splitViewResizeBy)
+ gv->resize(gv->rect().width(), m_splitViewResizeBy);
+ }
+ // Resizing might have led to widget losing its original windowstate.
+ // Restore previous window state.
+
+ if (m_splitViewPreviousWindowStates != windowToMove->windowState())
+ windowToMove->setWindowState(m_splitViewPreviousWindowStates);
+
+ windowToMove->setUpdatesEnabled(true);
+
+ gv->setAttribute(Qt::WA_Resized, userResize); //not a user resize
+
+ m_splitViewResizeBy = 0;
+ if (!keepInputWidget) {
+ m_splitViewPreviousWindowStates = Qt::WindowNoState;
+ S60->splitViewLastWidget = 0;
+ }
+}
+
+// Checks if a given widget is visible in the splitview rect. The offset
+// parameter can be used to validate if moving widget upwards or downwards
+// by the offset would make a difference for the visibility.
+
+bool QCoeFepInputContext::isWidgetVisible(QWidget *widget, int offset)
+{
+ bool visible = false;
+ if (widget) {
+ QRect splitViewRect = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+ QWidget *window = QApplication::activeWindow();
+ QGraphicsView *gv = qobject_cast<QGraphicsView*>(widget);
+ if (gv && window) {
+ if (QGraphicsScene *scene = gv->scene()) {
+ if (QGraphicsItem *focusItem = scene->focusItem()) {
+ QPoint cursorPos = window->mapToGlobal(focusItem->cursor().pos());
+ cursorPos.setY(cursorPos.y() + offset);
+ if (splitViewRect.contains(cursorPos)) {
+ visible = true;
+ }
+ }
+ }
+ }
+ }
+ return visible;
+}
+
+// Ensure that the input widget is visible in the splitview rect.
+
+void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
+{
+ // Native side opening and closing its virtual keyboard when it changes the keyboard layout,
+ // has an adverse impact on long tap timer. Cancel the timer when splitview opens to avoid this.
+ QSymbianControl *symControl = static_cast<QSymbianControl*>(widget->effectiveWinId());
+ symControl->CancelLongTapTimer();
+
+ // Graphicsviews that have vertical scrollbars should always be resized to the splitview area.
+ // Graphicsviews without scrollbars should be translated.
+
+ QGraphicsView *gv = qobject_cast<QGraphicsView*>(widget);
+ if (!gv)
+ return;
+
+ const bool alwaysResize = (gv && gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff);
+ const bool moveWithinVisibleArea = (S60->splitViewLastWidget != 0);
+
+ QWidget *windowToMove = gv ? gv : symControl->widget();
+ if (!windowToMove->isWindow())
+ windowToMove = windowToMove->window();
+ if (!windowToMove) {
+ return;
+ }
+
+ // When opening the keyboard (not moving within the splitview area), save the original
+ // window state. In some cases, ensuring input widget visibility might lead to window
+ // states getting changed.
+
+ if (!moveWithinVisibleArea) {
+ // Check if the widget contains cursorPositionChanged signal and connect to it.
+ QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
+ if (gv->scene() && gv->scene()->focusItem()) {
+ int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
+ if (index != -1)
+ connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
+ }
+ S60->splitViewLastWidget = widget;
+ m_splitViewPreviousWindowStates = windowToMove->windowState();
+ }
+
+ int windowTop = widget->window()->pos().y();
+
+ const bool userResize = widget->testAttribute(Qt::WA_Resized);
+
+ QRect splitViewRect = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+
+
+ // When resizing a window widget, it will lose its maximized window state.
+ // Native applications hide statuspane in splitview state, so lets move to
+ // fullscreen mode. This makes available area slightly bigger, which helps usability
+ // and greatly reduces event passing in orientation switch cases,
+ // as the statuspane size is not changing.
+
+ if (!(windowToMove->windowState() & Qt::WindowFullScreen)) {
+ windowToMove->setWindowState(
+ (windowToMove->windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen)) | Qt::WindowFullScreen);
+ }
+
+ if (alwaysResize) {
+ windowToMove->setUpdatesEnabled(false);
+ if (!moveWithinVisibleArea)
+ m_splitViewResizeBy = widget->height();
+
+ windowTop = widget->geometry().top();
+ widget->resize(widget->width(), splitViewRect.height() - windowTop);
+
+ if (gv->scene()) {
+ const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+ gv->ensureVisible(microFocusRect);
+ }
+ windowToMove->setUpdatesEnabled(true);
+ } else {
+ translateInputWidget();
+ }
+
+ widget->setAttribute(Qt::WA_Resized, userResize); //not a user resize
+}
+
static QTextCharFormat qt_TCharFormat2QTextCharFormat(const TCharFormat &cFormat, bool validStyleColor)
{
QTextCharFormat qFormat;
@@ -474,10 +687,12 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
m_fepState->SetPermittedCases(flags);
ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateCaseModeUpdate);
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
- flags = QT_EAknEditorFlagSelectionVisible;
- else
- flags = 0;
+ flags = 0;
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
+ if (S60->partial_keyboard)
+ flags |= QT_EAknEditorFlagEnablePartialScreen;
+ flags |= QT_EAknEditorFlagSelectionVisible;
+ }
if (hints & ImhUppercaseOnly && !(hints & ImhLowercaseOnly)
|| hints & ImhLowercaseOnly && !(hints & ImhUppercaseOnly)) {
flags |= EAknEditorFlagFixedCase;
@@ -513,6 +728,8 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG);
} else if (needsCharMap) {
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
+ } else if ((hints & ImhFormattedNumbersOnly) || (hints & ImhDialableCharactersOnly)) {
+ m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
} else {
m_fepState->SetSpecialCharacterTableResourceId(0);
}
@@ -604,6 +821,47 @@ void QCoeFepInputContext::ensureInputCapabilitiesChanged()
m_pendingInputCapabilitiesChanged = false;
}
+void QCoeFepInputContext::translateInputWidget()
+{
+ QGraphicsView *gv = qobject_cast<QGraphicsView *>(S60->splitViewLastWidget);
+ QRect splitViewRect = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+
+ QRectF cursor = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+ QPolygon cursorP = gv->mapFromScene(cursor);
+ QRectF vkbRect = QRectF(splitViewRect.bottomLeft(), qApp->desktop()->rect().bottomRight());
+ if (cursor.isEmpty() || vkbRect.isEmpty())
+ return;
+
+ // Fetch root item (i.e. graphicsitem with no parent)
+ QGraphicsItem *rootItem = 0;
+ foreach (QGraphicsItem *item, gv->scene()->items()) {
+ if (!item->parentItem()) {
+ rootItem = item;
+ break;
+ }
+ }
+ if (!rootItem)
+ return;
+
+ m_transformation = (rootItem->transform().isTranslating()) ? QRectF(0,0, gv->width(), rootItem->transform().dy()) : QRectF();
+
+ // Do nothing if the cursor is visible in the splitview area.
+ if (splitViewRect.contains(cursorP.boundingRect()))
+ return;
+
+ // New Y position should be ideally at the center of the splitview area.
+ // If that would expose unpainted canvas, limit the tranformation to the visible scene bottom.
+
+ const qreal maxY = gv->sceneRect().bottom() - splitViewRect.bottom() + m_transformation.height();
+ qreal dy = -(qMin(maxY, (cursor.bottom() - vkbRect.top() / 2)));
+
+ // Do not allow transform above screen top.
+ if (m_transformation.height() + dy > 0)
+ return;
+
+ rootItem->setTransform(QTransform::fromTranslate(0, dy), true);
+}
+
void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
TInt aPositionOfInsertionPointInInlineText, TBool aCursorVisibility, const MFormCustomDraw* /*aCustomDraw*/,
MFepInlineTextFormatRetriever& aInlineTextFormatRetriever,
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 063aefd652..f083e51981 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -355,9 +355,10 @@ void QInputContext::widgetDestroyed(QWidget *widget)
in complex input method. In the case, call QInputContext::reset()
to ensure proper termination of inputting.
- You must not send any QInputMethodEvent except empty InputMethodEnd event using
- QInputContext::reset() at reimplemented reset(). It will break
- input state consistency.
+ In a reimplementation of reset(), you must not send any
+ QInputMethodEvent containing preedit text. You can only commit
+ string and attributes; otherwise, you risk breaking input state
+ consistency.
*/
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index c8576709b9..2ccf792fcb 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -643,8 +643,12 @@ int QHeaderView::sectionSize(int logicalIndex) const
}
/*!
- Returns the section position of the given \a logicalIndex, or -1 if the
- section is hidden.
+
+ Returns the section position of the given \a logicalIndex, or -1
+ if the section is hidden. The position is measured in pixels from
+ the first visible item's top-left corner to the top-left corner of
+ the item with \a logicalIndex. The measurement is along the x-axis
+ for horizontal headers and along the y-axis for vertical headers.
\sa sectionViewportPosition()
*/
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index 94e3b76b1e..61a935fdc9 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -1500,7 +1500,9 @@ void QListWidget::setCurrentRow(int row, QItemSelectionModel::SelectionFlags com
}
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the list widget's \l{QAbstractScrollArea::}{viewport()}.
+
*/
QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
{
@@ -1514,6 +1516,9 @@ QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
\overload
Returns a pointer to the item at the coordinates (\a x, \a y).
+ The coordinates are relative to the list widget's
+ \l{QAbstractScrollArea::}{viewport()}.
+
*/
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index e54cbd24d5..9f89bf5bf8 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -227,7 +227,7 @@ public:
void _q_sourceColumnsRemoved(const QModelIndex &source_parent,
int start, int end);
- void clear_mapping();
+ void _q_clearMapping();
void sort();
bool update_source_sort_column();
@@ -281,7 +281,7 @@ typedef QHash<QModelIndex, QSortFilterProxyModelPrivate::Mapping *> IndexMap;
void QSortFilterProxyModelPrivate::_q_sourceModelDestroyed()
{
QAbstractProxyModelPrivate::_q_sourceModelDestroyed();
- clear_mapping();
+ _q_clearMapping();
}
void QSortFilterProxyModelPrivate::remove_from_mapping(const QModelIndex &source_parent)
@@ -293,7 +293,7 @@ void QSortFilterProxyModelPrivate::remove_from_mapping(const QModelIndex &source
}
}
-void QSortFilterProxyModelPrivate::clear_mapping()
+void QSortFilterProxyModelPrivate::_q_clearMapping()
{
// store the persistent indexes
QModelIndexPairList source_indexes = store_persistent_indexes();
@@ -1223,7 +1223,7 @@ void QSortFilterProxyModelPrivate::_q_sourceReset()
{
Q_Q(QSortFilterProxyModel);
invalidatePersistentIndexes();
- clear_mapping();
+ _q_clearMapping();
// All internal structures are deleted in clear()
q->endResetModel();
update_source_sort_column();
@@ -1519,6 +1519,7 @@ QSortFilterProxyModel::QSortFilterProxyModel(QObject *parent)
d->filter_column = 0;
d->filter_role = Qt::DisplayRole;
d->dynamic_sortfilter = false;
+ connect(this, SIGNAL(modelReset()), this, SLOT(_q_clearMapping()));
}
/*!
@@ -1620,7 +1621,7 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
connect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset()));
connect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset()));
- d->clear_mapping();
+ d->_q_clearMapping();
endResetModel();
if (d->update_source_sort_column() && d->dynamic_sortfilter)
d->sort();
@@ -2311,7 +2312,7 @@ void QSortFilterProxyModel::clear()
{
Q_D(QSortFilterProxyModel);
emit layoutAboutToBeChanged();
- d->clear_mapping();
+ d->_q_clearMapping();
emit layoutChanged();
}
@@ -2326,7 +2327,7 @@ void QSortFilterProxyModel::invalidate()
{
Q_D(QSortFilterProxyModel);
emit layoutAboutToBeChanged();
- d->clear_mapping();
+ d->_q_clearMapping();
emit layoutChanged();
}
diff --git a/src/gui/itemviews/qsortfilterproxymodel.h b/src/gui/itemviews/qsortfilterproxymodel.h
index 09fd20f000..afeaa6936d 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.h
+++ b/src/gui/itemviews/qsortfilterproxymodel.h
@@ -189,6 +189,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsInserted(const QModelIndex &source_parent, int start, int end))
Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &source_parent, int start, int end))
Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsRemoved(const QModelIndex &source_parent, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_clearMapping())
};
QT_END_NAMESPACE
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index 0d1473da4d..eb54bacb9b 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -263,6 +263,11 @@ QStyledItemDelegate::~QStyledItemDelegate()
The default implementation uses the QLocale::toString to convert \a value into
a QString.
+
+ This function is not called for empty model indices, i.e., indices for which
+ the model returns an invalid QVariant.
+
+ \sa QAbstractItemModel::data()
*/
QString QStyledItemDelegate::displayText(const QVariant &value, const QLocale& locale) const
{
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index f1f32360bb..c0573bb0c7 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2753,6 +2753,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
int start = -1;
int end = -1;
+ int indexRow = index.row();
int count = d->header->count();
bool emptyHeader = (count == 0);
QModelIndex parent = index.parent();
@@ -2789,7 +2790,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
int logicalColumn = emptyHeader ? column : d->header->logicalIndex(column);
if (d->header->isSectionHidden(logicalColumn))
continue;
- QModelIndex idx = d->model->index(index.row(), logicalColumn, parent);
+ QModelIndex idx = d->model->index(indexRow, logicalColumn, parent);
if (idx.isValid()) {
QWidget *editor = d->editorForIndex(idx).editor;
if (editor && d->persistent.contains(editor)) {
@@ -3224,14 +3225,14 @@ int QTreeViewPrivate::itemHeight(int item) const
if (viewItems.isEmpty())
return 0;
const QModelIndex &index = viewItems.at(item).index;
+ if (!index.isValid())
+ return 0;
int height = viewItems.at(item).height;
- if (height <= 0 && index.isValid()) {
+ if (height <= 0) {
height = q_func()->indexRowSizeHint(index);
viewItems[item].height = height;
}
- if (!index.isValid() || height < 0)
- return 0;
- return height;
+ return qMax(height, 0);
}
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 4db29d6525..2ea9a4316b 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -2830,7 +2830,8 @@ void QTreeWidget::setCurrentItem(QTreeWidgetItem *item, int column,
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
\sa visualItemRect()
*/
@@ -2844,7 +2845,8 @@ QTreeWidgetItem *QTreeWidget::itemAt(const QPoint &p) const
\fn QTreeWidgetItem *QTreeWidget::itemAt(int x, int y) const
\overload
- Returns a pointer to the item at the coordinates (\a x, \a y).
+ Returns a pointer to the item at the coordinates (\a x, \a y). The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
*/
/*!
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 43634efabc..3d2c9d611e 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -599,6 +599,8 @@ public:
int pressureSupported;
int maxTouchPressure;
QList<QTouchEvent::TouchPoint> appAllTouchPoints;
+
+ bool useTranslucentEGLSurfaces;
#endif
private:
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 6bddb1974c..f73eb02249 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -87,7 +87,7 @@
#include <hal.h>
#include <hal_data.h>
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
#include <graphics/wstfxconst.h>
#endif
@@ -96,6 +96,9 @@ QT_BEGIN_NAMESPACE
// Goom Events through Window Server
static const int KGoomMemoryLowEvent = 0x10282DBF;
static const int KGoomMemoryGoodEvent = 0x20026790;
+// Split view open/close events from AVKON
+static const int KSplitViewOpenEvent = 0x2001E2C0;
+static const int KSplitViewCloseEvent = 0x2001E2C1;
#if defined(QT_DEBUG)
static bool appNoGrab = false; // Grabbing enabled
@@ -139,6 +142,60 @@ void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, boo
// Ensure that control rectangle is updated
static_cast<QSymbianControl *>(QApplication::activeWindow()->winId())->handleClientAreaChange();
}
+
+bool QS60Data::setRecursiveDecorationsVisibility(QWidget *window, Qt::WindowStates newState)
+{
+ // Show statusbar:
+ // Topmost parent: Show unless fullscreen/minimized.
+ // Child windows: Follow topmost parent, unless fullscreen, in which case do not show statusbar
+ // Show CBA:
+ // Topmost parent: Show unless fullscreen/minimized.
+ // Exception: Show if fullscreen with Qt::WindowSoftkeysVisibleHint.
+ // Child windows:
+ // Minimized: Unclear if there is an use case for having focused minimized window at all.
+ // Always follow topmost parent just to be safe.
+ // Maximized and normal: follow topmost parent.
+ // Exception: If topmost parent is not showing CBA, show CBA if any softkey actions are
+ // defined.
+ // Fullscreen: Show only if Qt::WindowSoftkeysVisibleHint set.
+
+ Qt::WindowStates comparisonState = newState;
+ QWidget *parentWindow = window->parentWidget();
+ if (parentWindow) {
+ while (parentWindow->parentWidget())
+ parentWindow = parentWindow->parentWidget();
+ comparisonState = parentWindow->windowState();
+ } else {
+ parentWindow = window;
+ }
+
+ bool decorationsVisible = !(comparisonState & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool parentIsFullscreen = comparisonState & Qt::WindowFullScreen;
+ const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ bool buttonGroupVisibility = (decorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
+
+ // Do extra checking for child windows
+ if (window->parentWidget()) {
+ if (newState & Qt::WindowFullScreen) {
+ decorationsVisible = false;
+ if (window->windowFlags() & Qt::WindowSoftkeysVisibleHint)
+ buttonGroupVisibility = true;
+ else
+ buttonGroupVisibility = false;
+ } else if (!(newState & Qt::WindowMinimized) && !buttonGroupVisibility) {
+ for (int i = 0; i < window->actions().size(); ++i) {
+ if (window->actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
+ buttonGroupVisibility = true;
+ break;
+ }
+ }
+ }
+ }
+
+ S60->setStatusPaneAndButtonGroupVisibility(decorationsVisible, buttonGroupVisibility);
+
+ return decorationsVisible;
+}
#endif
void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
@@ -158,6 +215,12 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
widget->repaint();
}
} else {
+ // In certain special scenarios we may get an ENotVisible event
+ // without a previous EPartiallyVisible. The backingstore must
+ // still be destroyed, hence the registerWidget() call below.
+ if (backingStore.data() && widget->internalWinId()
+ && qt_widget_private(widget)->maybeBackingStore() == backingStore.data())
+ backingStore.registerWidget(widget);
backingStore.unregisterWidget(widget);
// In order to ensure that any resources used by the window surface
// are immediately freed, we flush the WSERV command buffer.
@@ -401,6 +464,8 @@ QSymbianControl::QSymbianControl(QWidget *w)
, m_longTapDetector(0)
, m_ignoreFocusChanged(0)
, m_symbianPopupIsOpen(0)
+ , m_inExternalScreenOverride(false)
+ , m_lastStatusPaneVisibility(0)
{
}
@@ -408,9 +473,11 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
{
if (!desktop)
{
- if (isWindowOwning || !qwidget->parentWidget())
- CreateWindowL(S60->windowGroup());
- else
+ if (isWindowOwning || !qwidget->parentWidget()
+ || qwidget->parentWidget()->windowType() == Qt::Desktop) {
+ RWindowGroup &wg(S60->windowGroup(qwidget));
+ CreateWindowL(wg);
+ } else {
/**
* TODO: in order to avoid creating windows for all ancestors of
* this widget up to the root window, the parameter passed to
@@ -420,6 +487,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
* is created for a widget between this one and the root window.
*/
CreateWindowL(qwidget->parentWidget()->winId());
+ }
// Necessary in order to be able to track the activation status of
// the control's window
@@ -432,7 +500,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
DrawableWindow()->SetPointerGrab(ETrue);
}
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
if (OwnsWindow()) {
TTfxWindowPurpose windowPurpose(ETfxPurposeNone);
switch (qwidget->windowType()) {
@@ -452,7 +520,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
windowPurpose = ETfxPurposeSplashScreenWindow;
break;
default:
- windowPurpose = (isWindowOwning || !qwidget->parentWidget())
+ windowPurpose = (isWindowOwning || !qwidget->parentWidget() || qwidget->parentWidget()->windowType() == Qt::Desktop)
? ETfxPurposeWindow : ETfxPurposeChildWindow;
break;
}
@@ -484,11 +552,52 @@ void QSymbianControl::setWidget(QWidget *w)
{
qwidget = w;
}
+
+QPoint QSymbianControl::translatePointForFixedNativeOrientation(const TPoint &pointerEventPos) const
+{
+ QPoint pos(pointerEventPos.iX, pointerEventPos.iY);
+ if (qwidget->d_func()->fixNativeOrientationCalled) {
+ QSize wsize = qwidget->size();
+ TSize size = Size();
+ if (size.iWidth == wsize.height() && size.iHeight == wsize.width()) {
+ qreal x = pos.x();
+ qreal y = pos.y();
+ pos.setX(size.iHeight - y);
+ pos.setY(x);
+ }
+ }
+ return pos;
+}
+
+TRect QSymbianControl::translateRectForFixedNativeOrientation(const TRect &controlRect) const
+{
+ TRect rect = controlRect;
+ if (qwidget->d_func()->fixNativeOrientationCalled) {
+ QPoint a = translatePointForFixedNativeOrientation(rect.iTl);
+ QPoint b = translatePointForFixedNativeOrientation(rect.iBr);
+ if (a.x() < b.x()) {
+ rect.iTl.iX = a.x();
+ rect.iBr.iX = b.x();
+ } else {
+ rect.iTl.iX = b.x();
+ rect.iBr.iX = a.x();
+ }
+ if (a.y() < b.y()) {
+ rect.iTl.iY = a.y();
+ rect.iBr.iY = b.y();
+ } else {
+ rect.iTl.iY = b.y();
+ rect.iBr.iY = a.y();
+ }
+ }
+ return rect;
+}
+
void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation )
{
QWidget *alienWidget;
- QPoint widgetPos = QPoint(aPenEventLocation.iX, aPenEventLocation.iY);
- QPoint globalPos = QPoint(aPenEventScreenLocation.iX,aPenEventScreenLocation.iY);
+ QPoint widgetPos = translatePointForFixedNativeOrientation(aPenEventLocation);
+ QPoint globalPos = translatePointForFixedNativeOrientation(aPenEventScreenLocation);
alienWidget = qwidget->childAt(widgetPos);
if (!alienWidget)
alienWidget = qwidget;
@@ -503,7 +612,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons
void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent *event)
{
QApplicationPrivate *d = QApplicationPrivate::instance();
- QPointF screenPos = qwidget->mapToGlobal(QPoint(event->iPosition.iX, event->iPosition.iY));
+ QPointF screenPos = qwidget->mapToGlobal(translatePointForFixedNativeOrientation(event->iPosition));
qreal pressure;
if(d->pressureSupported
&& event->Pressure() > 0) //workaround for misconfigured HAL
@@ -604,7 +713,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent)
mapS60MouseEventTypeToQt(&type, &button, &pEvent);
Qt::KeyboardModifiers modifiers = mapToQtModifiers(pEvent.iModifiers);
- QPoint widgetPos = QPoint(pEvent.iPosition.iX, pEvent.iPosition.iY);
+ QPoint widgetPos = translatePointForFixedNativeOrientation(pEvent.iPosition);
TPoint controlScreenPos = PositionRelativeToScreen();
QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos;
S60->lastCursorPos = globalPos;
@@ -983,14 +1092,15 @@ TKeyResponse QSymbianControl::handleVirtualMouse(const TKeyEvent& keyEvent,TEven
}
}
//clip to screen size (window server allows a sprite hotspot to be outside the screen)
+ int screenNumber = S60->screenNumberForWidget(qwidget);
if (x < 0)
x = 0;
- else if (x >= S60->screenWidthInPixels)
- x = S60->screenWidthInPixels - 1;
+ else if (x >= S60->screenWidthInPixelsForScreen[screenNumber])
+ x = S60->screenWidthInPixelsForScreen[screenNumber] - 1;
if (y < 0)
y = 0;
- else if (y >= S60->screenHeightInPixels)
- y = S60->screenHeightInPixels - 1;
+ else if (y >= S60->screenHeightInPixelsForScreen[screenNumber])
+ y = S60->screenHeightInPixelsForScreen[screenNumber] - 1;
TPoint epos(x, y);
TPoint cpos = epos - PositionRelativeToScreen();
fakeEvent.iPosition = cpos;
@@ -1069,6 +1179,9 @@ void QSymbianControl::Draw(const TRect& controlRect) const
Q_ASSERT(window);
QTLWExtra *topExtra = window->d_func()->maybeTopData();
Q_ASSERT(topExtra);
+
+ TRect wcontrolRect = translateRectForFixedNativeOrientation(controlRect);
+
if (!topExtra->inExpose) {
topExtra->inExpose = true;
if (!qwidget->isWindow()) {
@@ -1079,7 +1192,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const
gc.SetBrushColor(TRgb(0, 0, 0, 0));
gc.Clear(controlRect);
}
- QRect exposeRect = qt_TRect2QRect(controlRect);
+ QRect exposeRect = qt_TRect2QRect(wcontrolRect);
qwidget->d_func()->syncBackingStore(exposeRect);
topExtra->inExpose = false;
}
@@ -1092,7 +1205,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const
const bool sendNativePaintEvents = qwidget->d_func()->extraData()->receiveNativePaintEvents;
if (sendNativePaintEvents) {
- const QRect r = qt_TRect2QRect(controlRect);
+ const QRect r = qt_TRect2QRect(wcontrolRect);
QMetaObject::invokeMethod(qwidget, "beginNativePaintEvent", Qt::DirectConnection, Q_ARG(QRect, r));
}
@@ -1124,7 +1237,8 @@ void QSymbianControl::Draw(const TRect& controlRect) const
// Do nothing
break;
case QWExtra::Blit:
- if (qwidget->d_func()->isOpaque)
+ case QWExtra::BlitWriteAlpha:
+ if (qwidget->d_func()->isOpaque || nativePaintMode == QWExtra::BlitWriteAlpha)
gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect);
break;
@@ -1146,7 +1260,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const
}
if (sendNativePaintEvents) {
- const QRect r = qt_TRect2QRect(controlRect);
+ const QRect r = qt_TRect2QRect(wcontrolRect);
// The draw ops aren't actually sent to WSERV until the graphics
// context is deactivated, which happens in the function calling
// this one. We therefore delay the delivery of endNativePaintEvent,
@@ -1159,36 +1273,63 @@ void QSymbianControl::Draw(const TRect& controlRect) const
}
}
+void QSymbianControl::qwidgetResize_helper(const QSize &newSize)
+{
+ QRect cr = qwidget->geometry();
+ QSize oldSize(cr.size());
+ cr.setSize(newSize);
+ qwidget->data->crect = cr;
+ if (qwidget->isVisible()) {
+ QTLWExtra *tlwExtra = qwidget->d_func()->maybeTopData();
+ bool slowResize = qgetenv("QT_SLOW_TOPLEVEL_RESIZE").toInt();
+ if (!slowResize && tlwExtra)
+ tlwExtra->inTopLevelResize = true;
+ QResizeEvent e(newSize, oldSize);
+ qt_sendSpontaneousEvent(qwidget, &e);
+ if (!qwidget->testAttribute(Qt::WA_StaticContents))
+ qwidget->d_func()->syncBackingStore();
+ if (!slowResize && tlwExtra)
+ tlwExtra->inTopLevelResize = false;
+ } else {
+ if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) {
+ QResizeEvent *e = new QResizeEvent(newSize, oldSize);
+ QApplication::postEvent(qwidget, e);
+ }
+ }
+}
+
void QSymbianControl::SizeChanged()
{
CCoeControl::SizeChanged();
+ // When FixNativeOrientation had been called, the RWindow/CCoeControl size
+ // and the surface/QWidget size have nothing to do with each other.
+ if (qwidget->d_func()->fixNativeOrientationCalled)
+ return;
+
QSize oldSize = qwidget->size();
QSize newSize(Size().iWidth, Size().iHeight);
if (oldSize != newSize) {
- QRect cr = qwidget->geometry();
- cr.setSize(newSize);
- qwidget->data->crect = cr;
- if (qwidget->isVisible()) {
- QTLWExtra *tlwExtra = qwidget->d_func()->maybeTopData();
- bool slowResize = qgetenv("QT_SLOW_TOPLEVEL_RESIZE").toInt();
- if (!slowResize && tlwExtra)
- tlwExtra->inTopLevelResize = true;
- QResizeEvent e(newSize, oldSize);
- qt_sendSpontaneousEvent(qwidget, &e);
- if (!qwidget->testAttribute(Qt::WA_StaticContents))
- qwidget->d_func()->syncBackingStore();
- if (!slowResize && tlwExtra)
- tlwExtra->inTopLevelResize = false;
- } else {
- if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) {
- QResizeEvent *e = new QResizeEvent(newSize, oldSize);
- QApplication::postEvent(qwidget, e);
+ // Enforce the proper size for fullscreen widgets on the secondary screen.
+ const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
+ const int screenNumber = S60->screenNumberForWidget(qwidget);
+ if (!m_inExternalScreenOverride && isFullscreen && screenNumber > 0) {
+ int screenWidth = S60->screenWidthInPixelsForScreen[screenNumber];
+ int screenHeight = S60->screenHeightInPixelsForScreen[screenNumber];
+ TSize screenSize(screenWidth, screenHeight);
+ if (screenWidth > 0 && screenHeight > 0 && screenSize != Size()) {
+ m_inExternalScreenOverride = true;
+ SetExtent(TPoint(0, 0), screenSize);
+ return;
}
}
+
+ qwidgetResize_helper(newSize);
}
+ m_inExternalScreenOverride = false;
+
// CCoeControl::SetExtent calls SizeChanged, but does not call
// PositionChanged, so we call it here to ensure that the widget's
// position is updated.
@@ -1224,6 +1365,11 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
if (m_ignoreFocusChanged || (qwidget->windowType() & Qt::WindowType_Mask) == Qt::Desktop)
return;
+#ifdef Q_WS_S60
+ if (S60->splitViewLastWidget)
+ return;
+#endif
+
// Popups never get focused, but still receive the FocusChanged when they are hidden.
if (QApplicationPrivate::popupWidgets != 0
|| (qwidget->windowType() & Qt::Popup) == Qt::Popup)
@@ -1243,16 +1389,8 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
- // If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- QWidget *const window = qwidget->window();
- if (!window->parentWidget()) { // Only top level native windows have control over cba/status pane
- const bool decorationsVisible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaVisibilityHint));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
- }
+ if (qwidget->isWindow())
+ S60->setRecursiveDecorationsVisibility(qwidget, qwidget->windowState());
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
bool focusedControlFound = false;
@@ -1302,11 +1440,64 @@ void QSymbianControl::handleClientAreaChange()
}
}
+bool QSymbianControl::isSplitViewWidget(QWidget *widget) {
+ bool returnValue = true;
+ //Ignore events sent to non-active windows, not visible widgets and not parents of input widget.
+ if (!qwidget->isActiveWindow()
+ || !qwidget->isVisible()
+ || !qwidget->isAncestorOf(widget)) {
+
+ returnValue = false;
+ }
+ return returnValue;
+}
+
void QSymbianControl::HandleResourceChange(int resourceType)
{
switch (resourceType) {
+ case KSplitViewCloseEvent: //intentional fall-through
+ case KSplitViewOpenEvent: {
+#if !defined(QT_NO_IM) && defined(Q_WS_S60)
+
+ //Fetch widget getting the text input
+ QWidget *widget = QWidget::keyboardGrabber();
+ if (!widget) {
+ if (QApplicationPrivate::popupWidgets) {
+ widget = QApplication::activePopupWidget()->focusWidget();
+ if (!widget) {
+ widget = QApplication::activePopupWidget();
+ }
+ } else {
+ widget = QApplicationPrivate::focus_widget;
+ if (!widget) {
+ widget = qwidget;
+ }
+ }
+ }
+ if (widget) {
+ QCoeFepInputContext *ic = qobject_cast<QCoeFepInputContext *>(widget->inputContext());
+ if (!ic) {
+ ic = qobject_cast<QCoeFepInputContext *>(qApp->inputContext());
+ }
+ if (ic && isSplitViewWidget(widget)) {
+ if (resourceType == KSplitViewCloseEvent) {
+ ic->resetSplitViewWidget();
+ } else {
+ ic->ensureFocusWidgetVisible(widget);
+ }
+ }
+ }
+#endif // !defined(QT_NO_IM) && defined(Q_WS_S60)
+ }
+ break;
case KInternalStatusPaneChange:
- handleClientAreaChange();
+ // When status pane is not visible, only handle client area change if status pane was
+ // previously visible, as size changes to hidden status pane should not affect
+ // client area.
+ if (S60->statusPane() && (S60->statusPane()->IsVisible() || m_lastStatusPaneVisibility)) {
+ m_lastStatusPaneVisibility = S60->statusPane()->IsVisible();
+ handleClientAreaChange();
+ }
if (IsFocused() && IsVisible()) {
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
@@ -1320,8 +1511,10 @@ void QSymbianControl::HandleResourceChange(int resourceType)
{
handleClientAreaChange();
// Send resize event to trigger desktopwidget workAreaResized signal
- QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size());
- QApplication::sendEvent(qt_desktopWidget, &e);
+ if (qt_desktopWidget) {
+ QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size());
+ QApplication::sendEvent(qt_desktopWidget, &e);
+ }
break;
}
#endif
@@ -1380,6 +1573,55 @@ bool QSymbianControl::isControlActive()
return IsActivated() ? true : false;
}
+void QSymbianControl::ensureFixNativeOrientation()
+{
+#if defined(Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION)
+ if (!qwidget->isWindow() || qwidget->windowType() == Qt::Desktop)
+ return;
+ if (S60->screenNumberForWidget(qwidget) > 0)
+ return;
+ const bool isFixed = qwidget->d_func()->fixNativeOrientationCalled;
+ const bool isFixEnabled = qwidget->testAttribute(Qt::WA_SymbianNoSystemRotation);
+ const bool isFullScreen = qwidget->windowState().testFlag(Qt::WindowFullScreen);
+ if (isFullScreen && isFixEnabled) {
+ const bool surfaceBasedGs =
+ QApplicationPrivate::graphics_system_name == QLatin1String("openvg")
+ || QApplicationPrivate::graphics_system_name == QLatin1String("opengl");
+ if (!surfaceBasedGs)
+ qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
+ if (!isFixed && surfaceBasedGs) {
+ if (Window().FixNativeOrientation() == KErrNone) {
+ qwidget->d_func()->fixNativeOrientationCalled = true;
+ // The EGL window surface is now fixed to the native orientation
+ // of the device, no matter what size we pass when creating it.
+ // Enforce the same size for the QWidget too. For the underlying
+ // CCoeControl and RWindow it is up to the system to resize them
+ // when the standard auto-rotation mechanism is in use, we must not
+ // change that behavior by forcing any size for those. In practice
+ // this means that the QWidget and the underlying native control
+ // dimensions will be out of sync when FixNativeOrientation was
+ // called and the device is turned to the non-native (typically
+ // landscape) orientation. The pointer event handling and certain
+ // functions like Draw() will need to compensate for this.
+ QSize newSize(S60->nativeScreenWidthInPixels, S60->nativeScreenHeightInPixels);
+ if (qwidget->size() != newSize)
+ qwidgetResize_helper(newSize);
+ } else {
+ qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
+ }
+ }
+ } else if (isFixed) {
+ qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
+ qwidget->d_func()->fixNativeOrientationCalled = false;
+ qwidget->hide();
+ qwidget->d_func()->create_sys(0, false, true);
+ qwidget->show();
+ }
+#else
+ qwidget->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
+#endif
+}
+
/*!
\typedef QApplication::QS60MainApplicationFactory
\since 4.6
@@ -1586,10 +1828,36 @@ void qt_init(QApplicationPrivate * /* priv */, int)
systemFont.setFamily(systemFont.defaultFamily());
QApplicationPrivate::setSystemFont(systemFont);
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
QObject::connect(qApp, SIGNAL(aboutToQuit()), qApp, SLOT(_q_aboutToQuit()));
#endif
+#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = true;
+
+ const TUid KIvePropertyCat = {0x2726beef};
+ enum TIvePropertyChipType {
+ EVCBCM2727B1 = 0x00000000,
+ EVCBCM2763A0 = 0x04000100,
+ EVCBCM2763B0 = 0x04000102,
+ EVCBCM2763C0 = 0x04000103,
+ EVCBCM2763C1 = 0x04000104,
+ EVCBCMUnknown = 0x7fffffff
+ };
+
+ TInt chipType = EVCBCMUnknown;
+ if (RProperty::Get(KIvePropertyCat, 0 /*chip type*/, chipType) == KErrNone) {
+ if (chipType == EVCBCM2727B1) {
+ // We have only 32MB GPU memory. Use raster surfaces
+ // for transparent TLWs.
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+ }
+ } else {
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+ }
+#else
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+#endif
/*
### Commented out for now as parameter handling not needed in SOS(yet). Code below will break testlib with -o flag
int argc = priv->argc;
@@ -1686,7 +1954,7 @@ bool QApplicationPrivate::modalState()
void QApplicationPrivate::enterModal_sys(QWidget *widget)
{
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
S60->wsSession().SendEffectCommand(ETfxCmdAppModalModeEnter);
#endif
if (widget) {
@@ -1704,7 +1972,7 @@ void QApplicationPrivate::enterModal_sys(QWidget *widget)
void QApplicationPrivate::leaveModal_sys(QWidget *widget)
{
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
S60->wsSession().SendEffectCommand(ETfxCmdAppModalModeExit);
#endif
if (widget) {
@@ -1979,7 +2247,10 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
return 1;
}
break;
- case EEventScreenDeviceChanged:
+ case EEventScreenDeviceChanged: // fallthrough
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ case EEventDisplayChanged:
+#endif
if (callSymbianEventFilters(symbianEvent))
return 1;
if (S60)
@@ -2019,7 +2290,8 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
}
#endif
#ifdef QT_SOFTKEYS_ENABLED
- QSoftKeyManager::updateSoftKeys();
+ if (!CEikonEnv::Static()->EikAppUi()->IsDisplayingMenuOrDialog())
+ QSoftKeyManager::updateSoftKeys();
#endif
break;
case EEventFocusLost:
@@ -2385,7 +2657,7 @@ void QApplication::restoreOverrideCursor()
void QApplicationPrivate::_q_aboutToQuit()
{
-#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+#ifdef Q_SYMBIAN_TRANSITION_EFFECTS
// Send the shutdown tfx command
S60->wsSession().SendEffectCommand(ETfxCmdAppShutDown);
#endif
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 6e89ceb173..913bc7ef0d 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -3779,16 +3779,32 @@ bool QETWidget::translateConfigEvent(const MSG &msg)
QApplication::sendSpontaneousEvent(this, &e);
hideChildren(true);
}
- } else if (msg.wParam != SIZE_MINIMIZED && isMinimized()) {
+ } else if (msg.wParam != SIZE_MINIMIZED) {
+ bool window_state_changed = false;
+ Qt::WindowStates oldstate = Qt::WindowStates(dataPtr()->window_state);
+ if (isMinimized()) {
#ifndef Q_WS_WINCE
- const QString title = windowTitle();
- if (!title.isEmpty())
- d_func()->setWindowTitle_helper(title);
+ const QString title = windowTitle();
+ if (!title.isEmpty())
+ d_func()->setWindowTitle_helper(title);
#endif
- data->window_state &= ~Qt::WindowMinimized;
- showChildren(true);
- QShowEvent e;
- QApplication::sendSpontaneousEvent(this, &e);
+ data->window_state &= ~Qt::WindowMinimized;
+ showChildren(true);
+ QShowEvent e;
+ QApplication::sendSpontaneousEvent(this, &e);
+ // Capture SIZE_MAXIMIZED and SIZE_RESTORED without preceding WM_SYSCOMMAND
+ // (Aero Snap on Win7)
+ } else if (msg.wParam == SIZE_MAXIMIZED && !isMaximized()) {
+ data->window_state |= Qt::WindowMaximized;
+ window_state_changed = true;
+ } else if (msg.wParam == SIZE_RESTORED && isMaximized()) {
+ data->window_state &= ~(Qt::WindowMaximized);
+ window_state_changed = true;
+ }
+ if (window_state_changed) {
+ QWindowStateChangeEvent e(oldstate);
+ QApplication::sendSpontaneousEvent(this, &e);
+ }
}
}
if (msg.wParam != SIZE_MINIMIZED && oldSize != newSize) {
@@ -3820,7 +3836,7 @@ bool QETWidget::translateConfigEvent(const MSG &msg)
QApplication::postEvent(this, e);
}
}
-} else if (msg.message == WM_MOVE) { // move event
+ } else if (msg.message == WM_MOVE) { // move event
int a = (int) (short) LOWORD(msg.lParam);
int b = (int) (short) HIWORD(msg.lParam);
QPoint oldPos = geometry().topLeft();
diff --git a/src/gui/kernel/qclipboard_win.cpp b/src/gui/kernel/qclipboard_win.cpp
index 52b96633e7..ea41165b9c 100644
--- a/src/gui/kernel/qclipboard_win.cpp
+++ b/src/gui/kernel/qclipboard_win.cpp
@@ -52,6 +52,7 @@
#include "qt_windows.h"
#include "qdnd_p.h"
#include <private/qwidget_p.h>
+#include <private/qsystemlibrary_p.h>
QT_BEGIN_NAMESPACE
@@ -70,6 +71,9 @@ void QtCeFlushClipboard();
#endif
+typedef BOOL (WINAPI *PtrIsHungAppWindow)(HWND);
+
+static PtrIsHungAppWindow ptrIsHungAppWindow = 0;
class QClipboardWatcher : public QInternalMimeData {
public:
@@ -327,9 +331,16 @@ bool QClipboard::event(QEvent *e)
d->releaseIData();
propagate = true;
}
-
if (propagate && d->nextClipboardViewer) {
- SendMessage(d->nextClipboardViewer, m->message, m->wParam, m->lParam);
+ if (ptrIsHungAppWindow == 0) {
+ QSystemLibrary library(QLatin1String("User32"));
+ ptrIsHungAppWindow = (PtrIsHungAppWindow)library.resolve("IsHungAppWindow");
+ }
+ if (ptrIsHungAppWindow && ptrIsHungAppWindow(d->nextClipboardViewer)) {
+ qWarning("%s: Cowardly refusing to send clipboard message to hung application...", Q_FUNC_INFO);
+ } else {
+ SendMessage(d->nextClipboardViewer, m->message, m->wParam, m->lParam);
+ }
}
return true;
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 9c110fdf83..406e6d4d28 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -89,6 +89,8 @@ QT_END_NAMESPACE
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
if (!widget)
return NO; // This should happen only for qt_root_win
+ if (QApplicationPrivate::isBlockedByModal(widget))
+ return NO;
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
@@ -100,6 +102,8 @@ QT_END_NAMESPACE
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
if (!widget)
return NO; // This should happen only for qt_root_win
+ if ([self isSheet])
+ return NO;
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
@@ -153,6 +157,20 @@ QT_END_NAMESPACE
[NSApp terminate:sender];
}
+- (void)setLevel:(NSInteger)windowLevel
+{
+ // Cocoa will upon activating/deactivating applications level modal
+ // windows up and down, regardsless of any explicit set window level.
+ // To ensure that modal stays-on-top dialogs actually stays on top after
+ // the application is activated (and therefore stacks in front of
+ // other stays-on-top windows), we need to add this little special-case override:
+ QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+ if (widget && widget->isModal() && (widget->windowFlags() & Qt::WindowStaysOnTopHint))
+ [super setLevel:NSPopUpMenuWindowLevel];
+ else
+ [super setLevel:windowLevel];
+}
+
- (void)sendEvent:(NSEvent *)event
{
if ([event type] == NSApplicationDefined) {
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 749472a55f..d9f428c818 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -1115,7 +1115,7 @@ static int qCocoaViewCount = 0;
- (BOOL)resignFirstResponder
{
if (!qwidget)
- return NO;
+ return YES;
// Seems like the following test only triggers if this
// view is inside a QMacNativeWidget:
if (qwidget == QApplication::focusWidget())
diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp
index 3653ae2947..62a4d40eba 100644
--- a/src/gui/kernel/qdesktopwidget_s60.cpp
+++ b/src/gui/kernel/qdesktopwidget_s60.cpp
@@ -44,36 +44,67 @@
#include "qwidget_p.h"
#include "qt_s60_p.h"
#include <w32std.h>
-
-#include "hal.h"
-#include "hal_data.h"
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+#include <graphics/displaycontrol.h>
+#endif
QT_BEGIN_NAMESPACE
-class QDesktopWidgetPrivate : public QWidgetPrivate
+extern int qt_symbian_create_desktop_on_screen;
+
+class QSingleDesktopWidget : public QWidget
+{
+public:
+ QSingleDesktopWidget();
+ ~QSingleDesktopWidget();
+};
+
+QSingleDesktopWidget::QSingleDesktopWidget()
+ : QWidget(0, Qt::Desktop)
+{
+}
+
+QSingleDesktopWidget::~QSingleDesktopWidget()
{
+ const QObjectList &childList = children();
+ for (int i = childList.size(); i > 0 ;) {
+ --i;
+ childList.at(i)->setParent(0);
+ }
+}
+class QDesktopWidgetPrivate : public QWidgetPrivate
+{
public:
QDesktopWidgetPrivate();
~QDesktopWidgetPrivate();
-
static void init(QDesktopWidget *that);
static void cleanup();
+ static void init_sys();
static int screenCount;
static int primaryScreen;
static QVector<QRect> *rects;
static QVector<QRect> *workrects;
+ static QVector<QWidget *> *screens;
static int refcount;
+
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ static MDisplayControl *displayControl;
+#endif
};
int QDesktopWidgetPrivate::screenCount = 1;
int QDesktopWidgetPrivate::primaryScreen = 0;
QVector<QRect> *QDesktopWidgetPrivate::rects = 0;
QVector<QRect> *QDesktopWidgetPrivate::workrects = 0;
+QVector<QWidget *> *QDesktopWidgetPrivate::screens = 0;
int QDesktopWidgetPrivate::refcount = 0;
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+MDisplayControl *QDesktopWidgetPrivate::displayControl = 0;
+#endif
QDesktopWidgetPrivate::QDesktopWidgetPrivate()
{
@@ -88,25 +119,55 @@ QDesktopWidgetPrivate::~QDesktopWidgetPrivate()
void QDesktopWidgetPrivate::init(QDesktopWidget *that)
{
- Q_UNUSED(that);
-// int screenCount=0;
-
- // ### TODO: Implement proper multi-display support
- QDesktopWidgetPrivate::screenCount = 1;
-// if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone)
-// QDesktopWidgetPrivate::screenCount = screenCount;
-// else
-// QDesktopWidgetPrivate::screenCount = 0;
+ // Note that on S^3 devices the screen count retrieved via RWsSession
+ // will always be 2 but the width and height for screen number 1 will
+ // be 0 as long as TV-out is not connected.
+ //
+ // On the other hand a valid size for screen 1 will be reported even
+ // after the cable is disconnected. In order to overcome this, we use
+ // MDisplayControl::NumberOfResolutions() to check if the display is
+ // valid or not.
+
+ screenCount = S60->screenCount();
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ if (displayControl) {
+ if (displayControl->NumberOfResolutions() < 1)
+ screenCount = 1;
+ }
+#endif
+ if (screenCount < 1) {
+ qWarning("No screen available");
+ screenCount = 1;
+ }
rects = new QVector<QRect>();
workrects = new QVector<QRect>();
-
- rects->resize(QDesktopWidgetPrivate::screenCount);
- workrects->resize(QDesktopWidgetPrivate::screenCount);
-
- (*rects)[0].setRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
- QRect wr = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
- (*workrects)[0].setRect(wr.x(), wr.y(), wr.width(), wr.height());
+ screens = new QVector<QWidget *>();
+
+ rects->resize(screenCount);
+ workrects->resize(screenCount);
+ screens->resize(screenCount);
+
+ for (int i = 0; i < screenCount; ++i) {
+ // All screens will have a position of (0, 0) as there is no true virtual desktop
+ // or pointer event support for multiple screens on Symbian.
+ QRect r(0, 0,
+ S60->screenWidthInPixelsForScreen[i], S60->screenHeightInPixelsForScreen[i]);
+ // Stop here if empty and ignore this screen.
+ if (r.isEmpty()) {
+ screenCount = i;
+ break;
+ }
+ (*rects)[i] = r;
+ QRect wr;
+ if (i == 0)
+ wr = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+ else
+ wr = rects->at(i);
+ (*workrects)[i].setRect(wr.x(), wr.y(), wr.width(), wr.height());
+ (*screens)[i] = 0;
+ }
+ (*screens)[0] = that;
}
void QDesktopWidgetPrivate::cleanup()
@@ -115,6 +176,29 @@ void QDesktopWidgetPrivate::cleanup()
rects = 0;
delete workrects;
workrects = 0;
+ if (screens) {
+ // First item is the QDesktopWidget so skip it.
+ for (int i = 1; i < screens->count(); ++i)
+ delete screens->at(i);
+ }
+ delete screens;
+ screens = 0;
+}
+
+void QDesktopWidgetPrivate::init_sys()
+{
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ if (S60->screenCount() > 1) {
+ CWsScreenDevice *dev = S60->screenDevice(1);
+ if (dev) {
+ displayControl = static_cast<MDisplayControl *>(
+ dev->GetInterface(MDisplayControl::ETypeId));
+ if (displayControl) {
+ displayControl->EnableDisplayChangeEvents(ETrue);
+ }
+ }
+ }
+#endif
}
@@ -122,6 +206,7 @@ QDesktopWidget::QDesktopWidget()
: QWidget(*new QDesktopWidgetPrivate, 0, Qt::Desktop)
{
setObjectName(QLatin1String("desktop"));
+ QDesktopWidgetPrivate::init_sys();
QDesktopWidgetPrivate::init(this);
}
@@ -131,7 +216,7 @@ QDesktopWidget::~QDesktopWidget()
bool QDesktopWidget::isVirtualDesktop() const
{
- return true;
+ return false;
}
int QDesktopWidget::primaryScreen() const
@@ -145,9 +230,23 @@ int QDesktopWidget::numScreens() const
return QDesktopWidgetPrivate::screenCount;
}
-QWidget *QDesktopWidget::screen(int /* screen */)
+static inline QWidget *newSingleDesktopWidget(int screen)
{
- return this;
+ qt_symbian_create_desktop_on_screen = screen;
+ QWidget *w = new QSingleDesktopWidget;
+ qt_symbian_create_desktop_on_screen = -1;
+ return w;
+}
+
+QWidget *QDesktopWidget::screen(int screen)
+{
+ Q_D(QDesktopWidget);
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
+ if (!d->screens->at(screen)
+ || d->screens->at(screen)->windowType() != Qt::Desktop)
+ (*d->screens)[screen] = newSingleDesktopWidget(screen);
+ return (*d->screens)[screen];
}
const QRect QDesktopWidget::availableGeometry(int screen) const
@@ -168,14 +267,19 @@ const QRect QDesktopWidget::screenGeometry(int screen) const
return d->rects->at(screen);
}
-int QDesktopWidget::screenNumber(const QWidget * /* widget */) const
+int QDesktopWidget::screenNumber(const QWidget *widget) const
{
- return QDesktopWidgetPrivate::primaryScreen;
+ Q_D(const QDesktopWidget);
+ return widget
+ ? S60->screenNumberForWidget(widget)
+ : d->primaryScreen;
}
-int QDesktopWidget::screenNumber(const QPoint & /* point */) const
+int QDesktopWidget::screenNumber(const QPoint &point) const
{
- return QDesktopWidgetPrivate::primaryScreen;
+ Q_UNUSED(point);
+ Q_D(const QDesktopWidget);
+ return d->primaryScreen;
}
void QDesktopWidget::resizeEvent(QResizeEvent *)
@@ -203,6 +307,10 @@ void QDesktopWidget::resizeEvent(QResizeEvent *)
if (oldrect != newrect)
emit workAreaResized(j);
}
+
+ if (oldscreencount != d->screenCount) {
+ emit screenCountChanged(d->screenCount);
+ }
}
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 1b2693385e..204efe9ee9 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -50,6 +50,10 @@
#include "private/qsoftkeymanager_s60_p.h"
#endif
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+#include "private/qt_s60_p.h"
+#endif
+
#ifndef QT_NO_SOFTKEYMANAGER
QT_BEGIN_NAMESPACE
@@ -101,6 +105,30 @@ QSoftKeyManager::QSoftKeyManager() :
QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget)
{
QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget);
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ int key = 0;
+ switch (standardKey) {
+ case OkSoftKey:
+ key = EAknSoftkeyOk;
+ break;
+ case SelectSoftKey:
+ key = EAknSoftkeySelect;
+ break;
+ case DoneSoftKey:
+ key = EAknSoftkeyDone;
+ break;
+ case MenuSoftKey:
+ key = EAknSoftkeyOptions;
+ break;
+ case CancelSoftKey:
+ key = EAknSoftkeyCancel;
+ break;
+ default:
+ break;
+ };
+ if (key != 0)
+ QSoftKeyManager::instance()->d_func()->softKeyCommandActions.insert(action, key);
+#endif
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
case MenuSoftKey: // FALL-THROUGH
@@ -143,6 +171,9 @@ void QSoftKeyManager::cleanupHash(QObject *obj)
Q_D(QSoftKeyManager);
QAction *action = qobject_cast<QAction*>(obj);
d->keyedActions.remove(action);
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ d->softKeyCommandActions.remove(action);
+#endif
}
void QSoftKeyManager::sendKeyEvent()
diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h
index 27d8ee974c..02ae697eef 100644
--- a/src/gui/kernel/qsoftkeymanager_common_p.h
+++ b/src/gui/kernel/qsoftkeymanager_common_p.h
@@ -72,6 +72,9 @@ protected:
QMultiHash<int, QAction*> requestedSoftKeyActions;
QWidget *initialSoftKeySource;
bool pendingUpdate;
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QHash<QAction*, int> softKeyCommandActions;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index 3496297403..79ed91af5b 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -113,12 +113,20 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG
void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba)
{
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QT_TRAP_THROWING(
+ //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3
+ cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC);
+ cba.SetCommandL(2, EAknSoftkeyEmpty, KNullDesC);
+ );
+#else
QT_TRAP_THROWING(
//Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
cba.SetCommandL(0, -1, KNullDesC);
// TODO: Should we clear also middle SK?
cba.SetCommandL(2, -1, KNullDesC);
);
+#endif
realSoftKeyActions.clear();
}
@@ -290,6 +298,10 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba,
QString text = softkeyText(*action);
TPtrC nativeText = qt_QString2TPtrC(text);
int command = S60_COMMAND_START + position;
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ if (softKeyCommandActions.contains(action))
+ command = softKeyCommandActions.value(action);
+#endif
setNativeSoftkey(cba, position, command, nativeText);
const bool dimmed = !action->isEnabled() && !QSoftKeyManager::isForceEnabledInSofkeys(action);
cba.DimCommand(command, dimmed);
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 3820bfc40b..20c1ddb935 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -1391,6 +1391,7 @@ void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayI
void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse)
{
+ QMacCocoaAutoReleasePool pool;
OSMenuRef menu = static_cast<OSMenuRef>(theMenu);
if (collapse) {
bool previousIsSeparator = true; // setting to true kills all the separators placed at the top.
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 40697bfac8..e24405cd28 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -64,6 +64,7 @@
#include "qapplication.h"
#include "qelapsedtimer.h"
#include "QtCore/qthreadstorage.h"
+#include "qwidget_p.h"
#include <w32std.h>
#include <coecntrl.h>
#include <eikenv.h>
@@ -84,6 +85,8 @@ QT_BEGIN_NAMESPACE
// system events seems to start with 0x10
const TInt KInternalStatusPaneChange = 0x50000000;
+static const int qt_symbian_max_screens = 4;
+
//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
@@ -142,7 +145,10 @@ public:
int avkonComponentsSupportTransparency : 1;
int menuBeingConstructed : 1;
int orientationSet : 1;
+ int partial_keyboard : 1;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
+ QPointer<QWidget> splitViewLastWidget;
+
static CEikButtonGroupContainer *cba;
enum ScanCodeState {
@@ -154,8 +160,14 @@ public:
static inline void updateScreenSize();
inline RWsSession& wsSession();
+ static inline int screenCount();
static inline RWindowGroup& windowGroup();
+ static inline RWindowGroup& windowGroup(const QWidget *widget);
+ static inline RWindowGroup& windowGroup(int screenNumber);
inline CWsScreenDevice* screenDevice();
+ inline CWsScreenDevice* screenDevice(const QWidget *widget);
+ inline CWsScreenDevice* screenDevice(int screenNumber);
+ static inline int screenNumberForWidget(const QWidget *widget);
static inline CCoeAppUi* appUi();
static inline CEikMenuBar* menuBar();
#ifdef Q_WS_S60
@@ -166,12 +178,21 @@ public:
static inline CEikButtonGroupContainer* buttonGroupContainer();
static inline void setButtonGroupContainer(CEikButtonGroupContainer* newCba);
static void setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible);
+ static bool setRecursiveDecorationsVisibility(QWidget *window, Qt::WindowStates newState);
#endif
static void controlVisibilityChanged(CCoeControl *control, bool visible);
#ifdef Q_OS_SYMBIAN
TTrapHandler *s60InstalledTrapHandler;
#endif
+
+ int screenWidthInPixelsForScreen[qt_symbian_max_screens];
+ int screenHeightInPixelsForScreen[qt_symbian_max_screens];
+ int screenWidthInTwipsForScreen[qt_symbian_max_screens];
+ int screenHeightInTwipsForScreen[qt_symbian_max_screens];
+
+ int nativeScreenWidthInPixels;
+ int nativeScreenHeightInPixels;
};
Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data();
@@ -216,6 +237,10 @@ public:
bool isControlActive();
+ void ensureFixNativeOrientation();
+ QPoint translatePointForFixedNativeOrientation(const TPoint &pointerEventPos) const;
+ TRect translateRectForFixedNativeOrientation(const TRect &controlRect) const;
+
#ifdef Q_WS_S60
void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); }
void HandleStatusPaneSizeChange();
@@ -234,6 +259,9 @@ protected:
void PositionChanged();
void FocusChanged(TDrawNow aDrawNow);
+protected:
+ void qwidgetResize_helper(const QSize &newSize);
+
private:
void HandlePointerEvent(const TPointerEvent& aPointerEvent);
TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType);
@@ -252,6 +280,7 @@ private:
#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event);
#endif
+ bool isSplitViewWidget(QWidget *widget);
public:
void handleClientAreaChange();
@@ -270,6 +299,9 @@ private:
// Fader object used to fade everything except this menu and the CBA.
TAknPopupFader popupFader;
#endif
+
+ bool m_inExternalScreenOverride : 1;
+ bool m_lastStatusPaneVisibility : 1;
};
inline QS60Data::QS60Data()
@@ -297,6 +329,7 @@ inline QS60Data::QS60Data()
avkonComponentsSupportTransparency(0),
menuBeingConstructed(0),
orientationSet(0),
+ partial_keyboard(0),
s60ApplicationFactory(0)
#ifdef Q_OS_SYMBIAN
,s60InstalledTrapHandler(0)
@@ -306,9 +339,11 @@ inline QS60Data::QS60Data()
inline void QS60Data::updateScreenSize()
{
+ CWsScreenDevice *dev = S60->screenDevice();
+ int screenModeCount = dev->NumScreenModes();
+ int mode = dev->CurrentScreenMode();
TPixelsTwipsAndRotation params;
- int mode = S60->screenDevice()->CurrentScreenMode();
- S60->screenDevice()->GetScreenModeSizeAndRotation(mode, params);
+ dev->GetScreenModeSizeAndRotation(mode, params);
S60->screenWidthInPixels = params.iPixelSize.iWidth;
S60->screenHeightInPixels = params.iPixelSize.iHeight;
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
@@ -320,6 +355,29 @@ inline void QS60Data::updateScreenSize()
S60->defaultDpiY = S60->screenHeightInPixels / inches;
inches = S60->screenWidthInTwips / (TReal)KTwipsPerInch;
S60->defaultDpiX = S60->screenWidthInPixels / inches;
+
+ int screens = S60->screenCount();
+ for (int i = 0; i < screens; ++i) {
+ CWsScreenDevice *dev = S60->screenDevice(i);
+ mode = dev->CurrentScreenMode();
+ dev->GetScreenModeSizeAndRotation(mode, params);
+ S60->screenWidthInPixelsForScreen[i] = params.iPixelSize.iWidth;
+ S60->screenHeightInPixelsForScreen[i] = params.iPixelSize.iHeight;
+ S60->screenWidthInTwipsForScreen[i] = params.iTwipsSize.iWidth;
+ S60->screenHeightInTwipsForScreen[i] = params.iTwipsSize.iHeight;
+ }
+
+ // Look for a screen mode with rotation 0
+ // in order to decide what the native orientation is.
+ for (mode = 0; mode < screenModeCount; ++mode) {
+ TPixelsAndRotation sizeAndRotation;
+ dev->GetScreenModeSizeAndRotation(mode, sizeAndRotation);
+ if (sizeAndRotation.iRotation == CFbsBitGc::EGraphicsOrientationNormal) {
+ S60->nativeScreenWidthInPixels = sizeAndRotation.iPixelSize.iWidth;
+ S60->nativeScreenHeightInPixels = sizeAndRotation.iPixelSize.iHeight;
+ break;
+ }
+ }
}
inline RWsSession& QS60Data::wsSession()
@@ -330,11 +388,38 @@ inline RWsSession& QS60Data::wsSession()
return tls.localData()->wsSession;
}
+inline int QS60Data::screenCount()
+{
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ CCoeEnv *env = CCoeEnv::Static();
+ if (env) {
+ return qMin(env->WsSession().NumberOfScreens(), qt_symbian_max_screens);
+ }
+#endif
+ return 1;
+}
+
inline RWindowGroup& QS60Data::windowGroup()
{
return CCoeEnv::Static()->RootWin();
}
+inline RWindowGroup& QS60Data::windowGroup(const QWidget *widget)
+{
+ return windowGroup(screenNumberForWidget(widget));
+}
+
+inline RWindowGroup& QS60Data::windowGroup(int screenNumber)
+{
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ RWindowGroup *wg = CCoeEnv::Static()->RootWin(screenNumber);
+ return wg ? *wg : windowGroup();
+#else
+ Q_UNUSED(screenNumber);
+ return windowGroup();
+#endif
+}
+
inline CWsScreenDevice* QS60Data::screenDevice()
{
if(!tls.hasLocalData()) {
@@ -343,6 +428,36 @@ inline CWsScreenDevice* QS60Data::screenDevice()
return tls.localData()->screenDevice;
}
+inline CWsScreenDevice* QS60Data::screenDevice(const QWidget *widget)
+{
+ return screenDevice(screenNumberForWidget(widget));
+}
+
+inline CWsScreenDevice* QS60Data::screenDevice(int screenNumber)
+{
+#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
+ CCoeEnv *env = CCoeEnv::Static();
+ if (env) {
+ CWsScreenDevice *dev = env->ScreenDevice(screenNumber);
+ return dev ? dev : screenDevice();
+ } else {
+ return screenDevice();
+ }
+#else
+ return screenDevice();
+#endif
+}
+
+inline int QS60Data::screenNumberForWidget(const QWidget *widget)
+{
+ if (!widget)
+ return 0;
+ const QWidget *w = widget;
+ while (w->parentWidget())
+ w = w->parentWidget();
+ return qt_widget_private(const_cast<QWidget *>(w))->symbianScreenNumber;
+}
+
inline CCoeAppUi* QS60Data::appUi()
{
return CCoeEnv::Static()-> AppUi();
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 7065e85d20..ac35d425d9 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -304,6 +304,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, hasAlienChildren(0)
, window_event(0)
, qd_hd(0)
+#elif defined(Q_OS_SYMBIAN)
+ , symbianScreenNumber(0)
+ , fixNativeOrientationCalled(false)
#endif
{
if (!qApp) {
@@ -595,8 +598,7 @@ void QWidget::setAutoFillBackground(bool enabled)
\brief The QWidget class is the base class of all user interface objects.
\ingroup basicwidgets
-
-
+
The widget is the atom of the user interface: it receives mouse, keyboard
and other events from the window system, and paints a representation of
itself on the screen. Every widget is rectangular, and they are sorted in a
@@ -1284,6 +1286,10 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
// programmer specified desktop widget
xinfo = desktopWidget->d_func()->xinfo;
}
+#elif defined(Q_OS_SYMBIAN)
+ if (desktopWidget) {
+ symbianScreenNumber = qt_widget_private(desktopWidget)->symbianScreenNumber;
+ }
#else
Q_UNUSED(desktopWidget);
#endif
@@ -1320,8 +1326,8 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
//give potential windows a bigger "pre-initial" size; create_sys() will give them a new size later
#ifdef Q_OS_SYMBIAN
if (isGLWidget) {
- // Don't waste GPU mem for unnecessary large egl surface
- data.crect = QRect(0,0,2,2);
+ // Don't waste GPU mem for unnecessary large egl surface until resized by application
+ data.crect = QRect(0,0,1,1);
} else {
data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,360,640);
}
@@ -10860,6 +10866,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
S60->orientationSet = true;
+ QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
+ if (window)
+ window->ensureFixNativeOrientation();
#endif
break;
}
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 7e5173ffb4..8784ffdf3c 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2794,6 +2794,11 @@ void QWidgetPrivate::transferChildren()
#ifdef QT_MAC_USE_COCOA
void QWidgetPrivate::setSubWindowStacking(bool set)
{
+ // After hitting too many unforeseen bugs trying to put Qt on top of the cocoa child
+ // window API, we have decided to revert this behaviour as much as we can. We
+ // therefore now only allow child windows to exist for children of modal dialogs.
+ static bool use_behaviour_qt473 = !qgetenv("QT_MAC_USE_CHILDWINDOWS").isEmpty();
+
// This will set/remove a visual relationship between parent and child on screen.
// The reason for doing this is to ensure that a child always stacks infront of
// its parent. Unfortunatly is turns out that [NSWindow addChildWindow] has
@@ -2822,7 +2827,10 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) {
if (set) {
Qt::WindowType ptype = parent->window()->windowType();
- if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow]) {
+ if ([pwin isVisible]
+ && (ptype == Qt::Window || ptype == Qt::Dialog)
+ && ![qwin parentWindow]
+ && (use_behaviour_qt473 || parent->windowModality() == Qt::ApplicationModal)) {
NSInteger level = [qwin level];
[pwin addChildWindow:qwin ordered:NSWindowAbove];
if ([qwin level] < level)
@@ -2834,6 +2842,10 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
}
}
+ // Only set-up child windows for q if q is modal:
+ if (set && !use_behaviour_qt473 && q->windowModality() != Qt::ApplicationModal)
+ return;
+
QObjectList widgets = q->children();
for (int i=0; i<widgets.size(); ++i) {
QWidget *child = qobject_cast<QWidget *>(widgets.at(i));
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 9f6ba6f89d..377e3a7d5c 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -315,6 +315,11 @@ struct QWExtra {
*/
ZeroFill,
+ /**
+ * Blit backing store, propagating alpha channel into the framebuffer.
+ */
+ BlitWriteAlpha,
+
Default = Blit
};
@@ -877,6 +882,8 @@ public:
#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
+ int symbianScreenNumber; // only valid for desktop widget and top-levels
+ bool fixNativeOrientationCalled;
void s60UpdateIsOpaque();
void reparentChildren();
void registerTouchWindow();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index af9ae47e5c..d55e1adfcc 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -84,6 +84,8 @@ QWidget *QWidgetPrivate::mouseGrabber = 0;
QWidget *QWidgetPrivate::keyboardGrabber = 0;
CEikButtonGroupContainer *QS60Data::cba = 0;
+int qt_symbian_create_desktop_on_screen = -1;
+
static bool isEqual(const QList<QAction*>& a, const QList<QAction*>& b)
{
if ( a.count() != b.count())
@@ -276,6 +278,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
q->internalWinId()->SetRect(TRect(TPoint(x, y), TSize(w, h)));
topData()->normalGeometry = data.crect;
}
+ QSymbianControl *window = static_cast<QSymbianControl *>(q->internalWinId());
+ window->ensureFixNativeOrientation();
} else {
data.crect.setRect(x, y, w, h);
@@ -349,12 +353,18 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
int sh = clientRect.Height();
if (desktop) {
- TSize screenSize = S60->screenDevice()->SizeInPixels();
+ symbianScreenNumber = qMax(qt_symbian_create_desktop_on_screen, 0);
+ TSize screenSize = S60->screenDevice(symbianScreenNumber)->SizeInPixels();
data.crect.setRect(0, 0, screenSize.iWidth, screenSize.iHeight);
q->setAttribute(Qt::WA_DontShowOnScreen);
} else if (topLevel && !q->testAttribute(Qt::WA_Resized)){
int width = sw;
int height = sh;
+ if (symbianScreenNumber > 0) {
+ TSize screenSize = S60->screenDevice(symbianScreenNumber)->SizeInPixels();
+ width = screenSize.iWidth;
+ height = screenSize.iHeight;
+ }
if (extra) {
width = qMax(qMin(width, extra->maxw), extra->minw);
height = qMax(qMin(height, extra->maxh), extra->minh);
@@ -640,7 +650,7 @@ void QWidgetPrivate::raise_sys()
// If toplevel widget, raise app to foreground
if (q->isWindow())
- S60->wsSession().SetWindowGroupOrdinalPosition(S60->windowGroup().Identifier(), 0);
+ S60->wsSession().SetWindowGroupOrdinalPosition(S60->windowGroup(q).Identifier(), 0);
}
}
@@ -652,7 +662,7 @@ void QWidgetPrivate::lower_sys()
if (q->internalWinId()) {
// If toplevel widget, lower app to background
if (q->isWindow())
- S60->wsSession().SetWindowGroupOrdinalPosition(S60->windowGroup().Identifier(), -1);
+ S60->wsSession().SetWindowGroupOrdinalPosition(S60->windowGroup(q).Identifier(), -1);
else
q->internalWinId()->DrawableWindow()->SetOrdinalPosition(-1);
}
@@ -722,6 +732,11 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
{
Q_Q(QWidget);
+ if (parent && parent->windowType() == Qt::Desktop) {
+ symbianScreenNumber = qt_widget_private(parent)->symbianScreenNumber;
+ parent = 0;
+ }
+
bool wasCreated = q->testAttribute(Qt::WA_WState_Created);
if (q->isVisible() && q->parentWidget() && parent != q->parentWidget())
@@ -792,36 +807,45 @@ void QWidgetPrivate::s60UpdateIsOpaque()
{
Q_Q(QWidget);
- if (!q->testAttribute(Qt::WA_WState_Created) || !q->testAttribute(Qt::WA_TranslucentBackground))
+ if (!q->testAttribute(Qt::WA_WState_Created))
+ return;
+
+ const bool writeAlpha = extraData()->nativePaintMode == QWExtra::BlitWriteAlpha;
+ if (!q->testAttribute(Qt::WA_TranslucentBackground) && !writeAlpha)
return;
+ const bool requireAlphaChannel = !isOpaque || writeAlpha;
createTLExtra();
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
- window->SetSurfaceTransparency(!isOpaque);
- extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
-#else
- if (!isOpaque) {
+ if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ window->SetSurfaceTransparency(!isOpaque);
+ extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
+ return;
+ }
+#endif
+ if (requireAlphaChannel) {
const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
if (window->SetTransparencyAlphaChannel() == KErrNone) {
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
extra->topextra->nativeWindowTransparencyEnabled = 1;
-
- if (extra->topextra->backingStore.data() &&
- QApplicationPrivate::graphics_system_name == QLatin1String("openvg")) {
+ if (extra->topextra->backingStore.data() && (
+ QApplicationPrivate::graphics_system_name == QLatin1String("openvg")
+ || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) {
// Semi-transparent EGL surfaces aren't supported. We need to
// recreate backing store to get translucent surface (raster surface).
extra->topextra->backingStore.create(q);
extra->topextra->backingStore.registerWidget(q);
+ // FixNativeOrientation() will not work without an EGL surface.
+ q->setAttribute(Qt::WA_SymbianNoSystemRotation, false);
}
}
} else if (extra->topextra->nativeWindowTransparencyEnabled) {
window->SetTransparentRegion(TRegionFix<1>());
extra->topextra->nativeWindowTransparencyEnabled = 0;
}
-#endif
}
void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
@@ -1037,7 +1061,7 @@ int QWidget::metric(PaintDeviceMetric m) const
} else if (m == PdmHeight) {
val = data->crect.height();
} else {
- CWsScreenDevice *scr = S60->screenDevice();
+ CWsScreenDevice *scr = S60->screenDevice(this);
switch(m) {
case PdmDpiX:
case PdmPhysicalDpiX:
@@ -1184,17 +1208,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
#ifdef Q_WS_S60
- bool decorationsVisible(false);
- if (!parentWidget()) { // Only top level native windows have control over cba/status pane
- // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
- // The window decoration visibility has to be changed before doing actual window state
- // change since in that order the availableGeometry will return directly the right size and
- // we will avoid unnecessary redraws
- decorationsVisible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaRequested));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
- }
+ // The window decoration visibility has to be changed before doing actual window state
+ // change since in that order the availableGeometry will return directly the right size and
+ // we will avoid unnecessary redraws
+ bool decorationsVisible = S60->setRecursiveDecorationsVisibility(this, newstate);
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1207,7 +1224,16 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint;
if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) {
setAttribute(Qt::WA_OutsideWSRange, false);
- window->SetExtentToWholeScreen();
+ if (d->symbianScreenNumber > 0) {
+ int w = S60->screenWidthInPixelsForScreen[d->symbianScreenNumber];
+ int h = S60->screenHeightInPixelsForScreen[d->symbianScreenNumber];
+ if (w <= 0 || h <= 0)
+ window->SetExtentToWholeScreen();
+ else
+ window->SetExtent(TPoint(0, 0), TSize(w, h));
+ } else {
+ window->SetExtentToWholeScreen();
+ }
} else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) {
setAttribute(Qt::WA_OutsideWSRange, false);
TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this));
@@ -1244,6 +1270,12 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
if (newstate & Qt::WindowActive)
activateWindow();
+ if (isWindow()) {
+ // Now that the new state is set, fix the display memory layout, if needed.
+ QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
+ window->ensureFixNativeOrientation();
+ }
+
QWindowStateChangeEvent e(oldstate);
QApplication::sendEvent(this, &e);
}
@@ -1390,7 +1422,8 @@ void QWidget::activateWindow()
if (tlw->isVisible()) {
window()->createWinId();
QSymbianControl *id = static_cast<QSymbianControl *>(tlw->internalWinId());
- id->setFocusSafely(true);
+ if (!id->IsFocused())
+ id->setFocusSafely(true);
}
}
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 83c58c405e..4fcff1dd5b 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1117,6 +1117,11 @@ void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedReg
return;
}
+ // If there's no partial update support we always need
+ // to do a full repaint before flushing
+ if (!windowSurface->hasPartialUpdateSupport())
+ fullUpdatePending = true;
+
// Nothing to repaint.
if (!isDirty()) {
qt_flush(exposedWidget, exposedRegion, windowSurface, tlw, tlwOffset);
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index dc61e3422b..8f965c2a9f 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -49,6 +49,7 @@
#include "qdebug.h"
#include <QtCore/qcoreapplication.h>
#include "private/qstylehelper_p.h"
+#include <QtCore/qnumeric.h>
QT_BEGIN_NAMESPACE
@@ -1360,13 +1361,14 @@ QGradient::QGradient()
void QGradient::setColorAt(qreal pos, const QColor &color)
{
- if (pos > 1 || pos < 0) {
+ if ((pos > 1 || pos < 0) && !qIsNaN(pos)) {
qWarning("QGradient::setColorAt: Color position must be specified in the range 0 to 1");
return;
}
int index = 0;
- while (index < m_stops.size() && m_stops.at(index).first < pos) ++index;
+ if (!qIsNaN(pos))
+ while (index < m_stops.size() && m_stops.at(index).first < pos) ++index;
if (index < m_stops.size() && m_stops.at(index).first == pos)
m_stops[index].second = color;
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index 00b103d28c..debca37486 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -327,10 +327,8 @@ void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl,
blend_8_pixels_argb32_on_rgb16_neon(dstBuffer, srcBuffer, const_alpha);
- for (int j = 0; j < tail; ++j) {
+ for (int j = 0; j < tail; ++j)
dst[i + j] = dstBuffer[j];
- src[i + j] = srcBuffer[j];
- }
}
dst = (quint16 *)(((uchar *) dst) + dbpl);
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp
index 770d947469..51120190c0 100644
--- a/src/gui/painting/qgraphicssystem.cpp
+++ b/src/gui/painting/qgraphicssystem.cpp
@@ -84,4 +84,9 @@ QPixmapData *QGraphicsSystem::createPixmapData(QPixmapData *origin)
return createPixmapData(origin->pixelType());
}
+void QGraphicsSystem::releaseCachedResources()
+{
+ // Do nothing here
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystem_p.h b/src/gui/painting/qgraphicssystem_p.h
index 76e9a8e3c3..80e8959595 100644
--- a/src/gui/painting/qgraphicssystem_p.h
+++ b/src/gui/painting/qgraphicssystem_p.h
@@ -72,6 +72,8 @@ public:
//### Remove this & change qpixmap.cpp & qbitmap.cpp once every platform is gaurenteed
// to have a graphics system.
static QPixmapData *createDefaultPixmapData(QPixmapData::PixelType type);
+
+ virtual void releaseCachedResources();
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp
index 0294c4be71..33652eea15 100644
--- a/src/gui/painting/qgraphicssystem_runtime.cpp
+++ b/src/gui/painting/qgraphicssystem_runtime.cpp
@@ -285,6 +285,7 @@ void QRuntimeWindowSurface::flush(QWidget *widget, const QRegion &region,
void QRuntimeWindowSurface::setGeometry(const QRect &rect)
{
+ QWindowSurface::setGeometry(rect);
m_windowSurface->setGeometry(rect);
}
@@ -393,7 +394,10 @@ void QRuntimeGraphicsSystem::setGraphicsSystem(const QString &name)
if(m_windowSurfaceDestroyPolicy == DestroyAfterFirstFlush)
proxy->m_pendingWindowSurface.reset(proxy->m_windowSurface.take());
- proxy->m_windowSurface.reset(m_graphicsSystem->createWindowSurface(widget));
+ QWindowSurface *newWindowSurface = m_graphicsSystem->createWindowSurface(widget);
+ newWindowSurface->setGeometry(proxy->geometry());
+
+ proxy->m_windowSurface.reset(newWindowSurface);
qt_widget_private(widget)->invalidateBuffer(widget->rect());
}
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index c3aac1b12e..b07053e72e 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -969,7 +969,7 @@ void QCoreGraphicsPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, co
return;
bool differentSize = (QRectF(0, 0, pm.width(), pm.height()) != sr), doRestore = false;
- CGRect rect = CGRectMake(qRound(r.x()), qRound(r.y()), qRound(r.width()), qRound(r.height()));
+ CGRect rect = CGRectMake(r.x(), r.y(), r.width(), r.height());
QCFType<CGImageRef> image;
bool isBitmap = (pm.depth() == 1);
if (isBitmap) {
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 682731ab04..ba618ea132 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3706,6 +3706,13 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line,
const bool squareCap = (pen.capStyle() == Qt::SquareCap);
const QVector<qreal> pattern = pen.dashPattern();
+ qreal patternLength = 0;
+ for (int i = 0; i < pattern.size(); ++i)
+ patternLength += pattern.at(i);
+
+ if (patternLength <= 0)
+ return;
+
qreal length = line.length();
Q_ASSERT(length > 0);
while (length > 0) {
diff --git a/src/gui/painting/qpaintengine_s60.cpp b/src/gui/painting/qpaintengine_s60.cpp
index 1bc77992bc..ca303be03d 100644
--- a/src/gui/painting/qpaintengine_s60.cpp
+++ b/src/gui/painting/qpaintengine_s60.cpp
@@ -41,6 +41,7 @@
#include <private/qpaintengine_s60_p.h>
#include <private/qpixmap_s60_p.h>
#include <private/qt_s60_p.h>
+#include <private/qvolatileimage_p.h>
QT_BEGIN_NAMESPACE
@@ -90,7 +91,15 @@ void QS60PaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
QRasterPaintEngine::drawPixmap(p, pm);
srcData->endDataAccess();
} else {
- QRasterPaintEngine::drawPixmap(p, pm);
+ void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+ if (nativeData) {
+ QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
+ img->beginDataAccess();
+ QRasterPaintEngine::drawImage(p, img->imageRef());
+ img->endDataAccess(true);
+ } else {
+ QRasterPaintEngine::drawPixmap(p, pm);
+ }
}
}
@@ -102,7 +111,15 @@ void QS60PaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRect
QRasterPaintEngine::drawPixmap(r, pm, sr);
srcData->endDataAccess();
} else {
- QRasterPaintEngine::drawPixmap(r, pm, sr);
+ void *nativeData = pm.pixmapData()->toNativeType(QPixmapData::VolatileImage);
+ if (nativeData) {
+ QVolatileImage *img = static_cast<QVolatileImage *>(nativeData);
+ img->beginDataAccess();
+ QRasterPaintEngine::drawImage(r, img->imageRef(), sr);
+ img->endDataAccess(true);
+ } else {
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+ }
}
}
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 9ef6955d5b..0bb2901b2b 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1690,7 +1690,7 @@ static void qt_painterpath_isect_line(const QPointF &p1,
}
static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt,
- int *winding)
+ int *winding, int depth = 0)
{
qreal y = pt.y();
qreal x = pt.x();
@@ -1705,7 +1705,7 @@ static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt,
// hit lower limit... This is a rough threshold, but its a
// tradeoff between speed and precision.
const qreal lower_bound = qreal(.001);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound) {
+ if (depth == 32 || (bounds.width() < lower_bound && bounds.height() < lower_bound)) {
// We make the assumption here that the curve starts to
// approximate a line after while (i.e. that it doesn't
// change direction drastically during its slope)
@@ -1718,8 +1718,8 @@ static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt,
// split curve and try again...
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- qt_painterpath_isect_curve(first_half, pt, winding);
- qt_painterpath_isect_curve(second_half, pt, winding);
+ qt_painterpath_isect_curve(first_half, pt, winding, depth + 1);
+ qt_painterpath_isect_curve(second_half, pt, winding, depth + 1);
}
}
@@ -1863,39 +1863,39 @@ static bool qt_painterpath_isect_line_rect(qreal x1, qreal y1, qreal x2, qreal y
return false;
}
-static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2)
+static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (y >= bounds.top() && y < bounds.bottom()
&& bounds.right() >= x1 && bounds.left() < x2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_horizontal(first_half, y, x1, x2)
- || qt_isect_curve_horizontal(second_half, y, x1, x2))
+ if (qt_isect_curve_horizontal(first_half, y, x1, x2, depth + 1)
+ || qt_isect_curve_horizontal(second_half, y, x1, x2, depth + 1))
return true;
}
return false;
}
-static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2)
+static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (x >= bounds.left() && x < bounds.right()
&& bounds.bottom() >= y1 && bounds.top() < y2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_vertical(first_half, x, y1, y2)
- || qt_isect_curve_vertical(second_half, x, y1, y2))
+ if (qt_isect_curve_vertical(first_half, x, y1, y2, depth + 1)
+ || qt_isect_curve_vertical(second_half, x, y1, y2, depth + 1))
return true;
}
return false;
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 9f371a8c42..cb53ea0864 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -63,7 +63,6 @@ struct QS60WindowSurfacePrivate
TDisplayMode displayMode(bool opaque)
{
-
TDisplayMode mode = S60->screenDevice()->DisplayMode();
if (opaque) {
mode = EColor16MU;
@@ -76,10 +75,18 @@ TDisplayMode displayMode(bool opaque)
return mode;
}
+bool blitWriteAlpha(QWidgetPrivate *widgetPrivate)
+{
+ QWExtra *extra = widgetPrivate->extraData();
+ return extra ? extra->nativePaintMode == QWExtra::BlitWriteAlpha : false;
+}
+
QS60WindowSurface::QS60WindowSurface(QWidget* widget)
: QWindowSurface(widget), d_ptr(new QS60WindowSurfacePrivate)
{
- TDisplayMode mode = displayMode(qt_widget_private(widget)->isOpaque);
+ QWidgetPrivate *widgetPrivate = qt_widget_private(widget);
+ const bool opaque = widgetPrivate->isOpaque && !blitWriteAlpha(widgetPrivate);
+ TDisplayMode mode = displayMode(opaque);
// We create empty CFbsBitmap here -> it will be resized in setGeometry
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new
qt_symbian_throwIfError( bitmap->Create( TSize(0, 0), mode ) );
@@ -123,7 +130,8 @@ void QS60WindowSurface::beginPaint(const QRegion &rgn)
S60->wsSession().Finish();
#endif
- if (!qt_widget_private(window())->isOpaque) {
+ QWidgetPrivate *windowPrivate = qt_widget_private(window());
+ if (!windowPrivate->isOpaque || blitWriteAlpha(windowPrivate)) {
QS60PixmapData *pixmapData = static_cast<QS60PixmapData *>(d_ptr->device.data_ptr().data());
TDisplayMode mode = displayMode(false);
@@ -132,12 +140,14 @@ void QS60WindowSurface::beginPaint(const QRegion &rgn)
pixmapData->beginDataAccess();
- QPainter p(&pixmapData->image);
- p.setCompositionMode(QPainter::CompositionMode_Source);
- const QVector<QRect> rects = rgn.rects();
- const QColor blank = Qt::transparent;
- for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
- p.fillRect(*it, blank);
+ if (!windowPrivate->isOpaque) {
+ QPainter p(&pixmapData->image);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ const QVector<QRect> rects = rgn.rects();
+ const QColor blank = Qt::transparent;
+ for (QVector<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) {
+ p.fillRect(*it, blank);
+ }
}
pixmapData->endDataAccess();
diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp
index b5b8b81b80..4842bc59d5 100644
--- a/src/gui/s60framework/qs60mainappui.cpp
+++ b/src/gui/s60framework/qs60mainappui.cpp
@@ -61,6 +61,7 @@
//Animated wallpapers in Qt applications are not supported.
const TInt KAknDisableAnimationBackground = 0x02000000;
+const TInt KAknSingleClickCompatible = 0x01000000;
QT_BEGIN_NAMESPACE
@@ -117,8 +118,12 @@ void QS60MainAppUi::ConstructL()
// After 5th Edition S60, native side supports animated wallpapers.
// However, there is no support for that feature on Qt side, so indicate to
// native UI framework that this application will not support background animations.
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
- flags |= KAknDisableAnimationBackground;
+
+ // Also, add support for single touch for post 5th edition platforms.
+ // This has only impact when launching native dialogs/menus from inside QApplication.
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
+ flags |= (KAknDisableAnimationBackground | KAknSingleClickCompatible);
+ }
#endif
BaseConstructL(flags);
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 38a4b7c317..f146075b8c 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -72,6 +72,7 @@
#include "qcheckbox.h"
#include "qdesktopwidget.h"
#include "qprogressbar.h"
+#include "qlabel.h"
#include "private/qtoolbarextension_p.h"
#include "private/qcombobox_p.h"
@@ -107,8 +108,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
{5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106},
-{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
-{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,11,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,13,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184}
// *** End of generated data ***
@@ -118,6 +119,7 @@ const short *QS60StylePrivate::m_pmPointer = QS60StylePrivate::data[0];
// theme background texture
QPixmap *QS60StylePrivate::m_background = 0;
+QPixmap *QS60StylePrivate::m_placeHolderTexture = 0;
// theme palette
QPalette *QS60StylePrivate::m_themePalette = 0;
@@ -155,6 +157,10 @@ const double KTabFontMul = 0.72;
QS60StylePrivate::~QS60StylePrivate()
{
clearCaches(); //deletes also background image
+ if (m_placeHolderTexture) {
+ delete m_placeHolderTexture;
+ m_placeHolderTexture = 0;
+ }
deleteThemePalette();
#ifdef Q_WS_S60
removeAnimations();
@@ -505,7 +511,10 @@ void QS60StylePrivate::setBackgroundTexture(QApplication *app) const
{
Q_UNUSED(app)
QPalette applicationPalette = QApplication::palette();
- applicationPalette.setBrush(QPalette::Window, backgroundTexture());
+ // The initial QPalette::Window is just a placeHolder QPixmap to save RAM
+ // if the actual texture is not needed. The real texture is created just before
+ // painting it in qt_s60_fill_background().
+ applicationPalette.setBrush(QPalette::Window, placeHolderTexture());
setThemePalette(&applicationPalette);
}
@@ -630,25 +639,6 @@ QPixmap QS60StylePrivate::cachedFrame(SkinFrameElements frame, const QSize &size
return result;
}
-void QS60StylePrivate::refreshUI()
-{
- QList<QWidget *> widgets = QApplication::allWidgets();
-
- for (int i = 0; i < widgets.size(); ++i) {
- QWidget *widget = widgets.at(i);
- if (widget == 0)
- continue;
-
- if (widget->style()) {
- widget->style()->polish(widget);
- QEvent event(QEvent::StyleChange);
- qApp->sendEvent(widget, &event);
- }
- widget->update();
- widget->updateGeometry();
- }
-}
-
void QS60StylePrivate::setFont(QWidget *widget) const
{
QS60StyleEnums::FontCategories fontCategory = QS60StyleEnums::FC_Undefined;
@@ -678,7 +668,7 @@ void QS60StylePrivate::setFont(QWidget *widget) const
}
}
-void QS60StylePrivate::setThemePalette(QWidget *widget) const
+void QS60StylePrivate::setThemePalette(QWidget *widget)
{
if(!widget)
return;
@@ -694,6 +684,13 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) const
if (header->viewport())
header->viewport()->setPalette(widgetPalette);
QApplication::setPalette(widgetPalette, "QHeaderView");
+ } else if (qobject_cast<QLabel *>(widget)) {
+ if (widget->window() && widget->window()->windowType() == Qt::Dialog) {
+ QPalette widgetPalette = widget->palette();
+ widgetPalette.setColor(QPalette::WindowText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 19, 0));
+ widget->setPalette(widgetPalette);
+ }
}
}
@@ -719,8 +716,10 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const
palette->setColor(QPalette::LinkVisited, palette->color(QPalette::Link).darker());
palette->setColor(QPalette::Highlight,
s60Color(QS60StyleEnums::CL_QsnHighlightColors, 2, 0));
- // set background image as a texture brush
- palette->setBrush(QPalette::Window, backgroundTexture());
+ // The initial QPalette::Window is just a placeHolder QPixmap to save RAM
+ // if the actual texture is not needed. The real texture is created just before
+ // painting it in qt_s60_fill_background().
+ palette->setBrush(QPalette::Window, placeHolderTexture());
// set as transparent so that styled full screen theme background is visible
palette->setBrush(QPalette::Base, Qt::transparent);
// set button color based on pixel colors
@@ -761,7 +760,7 @@ void QS60StylePrivate::storeThemePalette(QPalette *palette)
}
// set widget specific palettes
-void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const
+void QS60StylePrivate::setThemePaletteHash(QPalette *palette)
{
if (!palette)
return;
@@ -1551,8 +1550,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
skinElement==QS60StylePrivate::SE_TabBarTabWestActive) {
const int borderThickness =
QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
- const int tabOverlap =
- QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness;
+ int tabOverlap = pixelMetric(PM_TabBarTabOverlap);
+ if (tabOverlap > borderThickness)
+ tabOverlap -= borderThickness;
+
const bool usesScrollButtons =
(widget) ? (qobject_cast<const QTabBar*>(widget))->usesScrollButtons() : false;
const int roomForScrollButton =
@@ -1591,9 +1592,11 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QStyleOptionTabV3 optionTab = *tab;
QRect tr = optionTab.rect;
const bool directionMirrored = (optionTab.direction == Qt::RightToLeft);
- const int borderThickness = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
- const int tabOverlap =
- QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness;
+ const int borderThickness =
+ QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ int tabOverlap = pixelMetric(PM_TabBarTabOverlap);
+ if (tabOverlap > borderThickness)
+ tabOverlap -= borderThickness;
const bool usesScrollButtons =
(widget) ? (qobject_cast<const QTabBar*>(widget))->usesScrollButtons() : false;
const int roomForScrollButton =
@@ -1752,16 +1755,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QStyleOptionMenuItem optionMenuItem = *menuItem;
bool drawSubMenuIndicator = false;
+ bool drawSeparator = false;
switch(menuItem->menuItemType) {
- case QStyleOptionMenuItem::Scroller:
case QStyleOptionMenuItem::Separator:
- return; // no separators or scrollers in S60 menus
+ drawSeparator = true;
+ break;
+ case QStyleOptionMenuItem::Scroller:
+ return; // no scrollers in S60 menus
case QStyleOptionMenuItem::SubMenu:
drawSubMenuIndicator = true;
break;
default:
break;
}
+ if (drawSeparator) {
+ painter->save();
+ painter->setPen(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 10, 0));
+ painter->drawLine(optionMenuItem.rect.topLeft(), optionMenuItem.rect.bottomRight());
+ painter->restore();
+ return;
+ }
const bool enabled = optionMenuItem.state & State_Enabled;
const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable;
bool ignoreCheckMark = false;
@@ -1865,20 +1878,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
//In Sym^3, native menu items have "lines" between them
if (QS60StylePrivate::isSingleClickUi()) {
- const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
- const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth);
- //native platform sets each color byte to same value for "line 16" which just defines alpha for
- //menuitem lines; lets use first byte "red".
- QColor lineColor = optionMenuItem.palette.text().color();
- if (lineColorAlpha.isValid())
- lineColor.setAlpha(lineColorAlpha.red());
- painter->save();
- painter->setPen(lineColor);
-
- const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing;
- const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing;
- painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
- painter->restore();
+ int diff = widget->geometry().bottom() - optionMenuItem.rect.bottom();
+ if (const QComboBox *cb = qobject_cast<const QComboBox*>(widget))
+ diff = cb->view()->geometry().bottom() - optionMenuItem.rect.bottom();
+
+ // Skip drawing the horizontal line for the last menu item.
+ if (diff > optionMenuItem.rect.height()) {
+ const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
+ //native platform sets each color byte to same value for "line 16" which just defines alpha for
+ //menuitem lines; lets use first byte "red".
+ QColor lineColor = optionMenuItem.palette.text().color();
+ if (lineColorAlpha.isValid())
+ lineColor.setAlpha(lineColorAlpha.red());
+ painter->save();
+ painter->setPen(lineColor);
+ const int horizontalMargin = 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ const int lineStartX = optionMenuItem.rect.left() + horizontalMargin;
+ const int lineEndX = optionMenuItem.rect.right() - horizontalMargin;
+ painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
+ painter->restore();
+ }
}
if (!enabled)
painter->restore();
@@ -2273,13 +2292,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_MENU
) {
//Need extra check since dialogs have their own theme background
- if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) &&
- QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window))
- //todo: for combobox listviews, the background should include area for menu scrollers,
- //but this produces drawing issues as we need to turn clipping off.
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags);
- else
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget)
+ && QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) {
+ const bool comboMenu = qobject_cast<const QComboBoxListView *>(widget);
+ // Add margin area to the background, to avoid background being cut for first and last item.
+ const int verticalMenuAdjustment = comboMenu ? QS60StylePrivate::pixelMetric(PM_MenuVMargin) : 0;
+ const QRect adjustedMenuRect = option->rect.adjusted(0, -verticalMenuAdjustment, 0, verticalMenuAdjustment);
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags);
+ } else {
commonStyleDraws = true;
+ }
}
break;
case PE_FrameWindow:
@@ -2523,6 +2545,11 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const
//without having to define custom pixel metric
metricValue *= 2;
+#if defined(Q_WS_S60)
+ if (metric == PM_TabBarTabOverlap && (QSysInfo::s60Version() > QSysInfo::SV_S60_5_2))
+ metricValue = 0;
+#endif
+
return metricValue;
}
@@ -2547,17 +2574,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal;
if (parentCanGrowHorizontally) {
- int visibleButtons = 0;
+ int buttons = 0;
//Make the auto-stretch to happen only for horizontal orientation
if (tb && tb->orientation() == Qt::Horizontal) {
QList<QAction*> actionList = tb->actions();
for (int i = 0; i < actionList.count(); i++) {
- if (actionList.at(i)->isVisible())
- visibleButtons++;
+ buttons++;
}
}
- if (widget->parentWidget() && visibleButtons > 0) {
+ if (widget->parentWidget() && buttons > 0) {
QWidget *w = const_cast<QWidget *>(widget);
int toolBarMaxWidth = 0;
int totalMargin = 0;
@@ -2580,7 +2606,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
toolBarMaxWidth -= totalMargin;
//ensure that buttons are side-by-side and not on top of each other
- const int toolButtonWidth = (toolBarMaxWidth / visibleButtons)
+ const int toolButtonWidth = (toolBarMaxWidth / buttons)
- pixelMetric(QStyle::PM_ToolBarItemSpacing)
- pixelMetric(QStyle::PM_ToolBarItemMargin)
//toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action
@@ -2613,10 +2639,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz += QSize(2 * f->lineWidth, 4 * f->lineWidth);
break;
case CT_TabBarTab: {
- const QSize naviPaneSize = QS60StylePrivate::naviPaneSize();
sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
- if (naviPaneSize.height() > sz.height())
- sz.setHeight(naviPaneSize.height());
// Adjust beginning tabbar item size, if scrollbuttons are used. This is to ensure that the
// tabbar item content fits, since scrollbuttons are making beginning tabbar item smaller.
int scrollButtonSize = 0;
@@ -2636,17 +2659,18 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_ItemViewItem:
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- sz = QSize();
+ sz = QSize(menuItem->rect.width() - 2 * pixelMetric(PM_MenuHMargin) - 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth), 1);
break;
}
}
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
- //native items have small empty areas at the beginning and end of menu item
- sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin) + 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth));
- if (QS60StylePrivate::isTouchSupported())
+ if (QS60StylePrivate::isTouchSupported()) {
//Make itemview easier to use in touch devices
+ sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin));
//QCommonStyle does not adjust height with horizontal margin, it only adjusts width
- sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin) - 8); //QCommonstyle adds 8 to height that this style handles through PM values
+ if (ct == CT_MenuItem)
+ sz.setHeight(sz.height() - 8); //QCommonstyle adds 8 to height that this style handles through PM values
+ }
break;
#ifndef QT_NO_COMBOBOX
case CT_ComboBox: {
@@ -2998,10 +3022,11 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
ret = QCommonStyle::subElementRect(element, opt, widget);
if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(opt)) {
- const int tabOverlapNoBorder =
- QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap);
- const int tabOverlap =
- tabOverlapNoBorder - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ const int borderThickness =
+ QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ int tabOverlap = pixelMetric(PM_TabBarTabOverlap);
+ if (tabOverlap > borderThickness)
+ tabOverlap -= borderThickness;
const QTabWidget *tab = qobject_cast<const QTabWidget *>(widget);
int gain = (tab) ? tabOverlap * tab->count() : 0;
switch (twf->shape) {
@@ -3019,7 +3044,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
if ((ret.right() + gain) > widget->rect().right())
gain = widget->rect().right() - ret.right();
ret.adjust(0, 0, gain, 0);
- }
+ }
}
break;
}
@@ -3107,7 +3132,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
}
break;
case SE_ItemViewItemCheckIndicator:
- if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast<const QStyleOptionViewItemV2 *>(opt)) {
+ if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
const QAbstractItemView *listItem = qobject_cast<const QAbstractItemView *>(widget);
const bool singleSelection = listItem &&
@@ -3115,7 +3140,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
listItem->selectionMode() == QAbstractItemView::NoSelection);
const bool checkBoxOnly = (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator) &&
listItem &&
- singleSelection;
+ singleSelection && vopt->text.isEmpty() && vopt->icon.isNull();
// Selection check mark rect.
const int indicatorWidth = QS60StylePrivate::pixelMetric(PM_IndicatorWidth);
@@ -3359,9 +3384,9 @@ bool QS60Style::event(QEvent *e)
QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
const QStyleOption *option, const QWidget *widget) const
{
- const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize);
- const QRect iconSize = (!option) ? QRect(0, 0, iconDimension, iconDimension) : option->rect;
QS60StyleEnums::SkinParts part;
+ qreal iconHeightMultiplier = 1.0;
+ qreal iconWidthMultiplier = 1.0;
QS60StylePrivate::SkinElementFlags adjustedFlags;
if (option)
adjustedFlags = (option->state & State_Enabled || option->state == 0) ?
@@ -3370,15 +3395,20 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
switch(standardIcon) {
case SP_MessageBoxWarning:
+ // By default, S60 messagebox icons have 4:3 ratio. Value is from S60 LAF documentation.
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteWarning;
break;
case SP_MessageBoxInformation:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteInfo;
break;
case SP_MessageBoxCritical:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteError;
break;
case SP_MessageBoxQuestion:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteQuery;
break;
case SP_ArrowRight:
@@ -3433,11 +3463,13 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
adjustedFlags |= QS60StylePrivate::SF_PointEast;
part = QS60StyleEnums::SP_QgnIndiSubmenu;
break;
-
default:
return QCommonStyle::standardIconImplementation(standardIcon, option, widget);
}
const QS60StylePrivate::SkinElementFlags flags = adjustedFlags;
+ const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize);
+ const QRect iconSize = (!option) ?
+ QRect(0, 0, iconDimension * iconWidthMultiplier, iconDimension * iconHeightMultiplier) : option->rect;
const QPixmap cachedPixMap(QS60StylePrivate::cachedPart(part, iconSize.size(), 0, flags));
return cachedPixMap.isNull() ?
QCommonStyle::standardIconImplementation(standardIcon, option, widget) : QIcon(cachedPixMap);
@@ -3545,10 +3577,18 @@ extern QPoint qt_s60_fill_background_offset(const QWidget *targetWidget);
bool qt_s60_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush)
{
- const QPixmap backgroundTexture(QS60StylePrivate::backgroundTexture());
- if (backgroundTexture.cacheKey() != brush.texture().cacheKey())
+ // Check if the widget's palette matches placeholder or actual background texture.
+ // When accessing backgroundTexture, use parameter value 'true' to avoid creating
+ // the texture, if it is not already created.
+
+ const QPixmap placeHolder(QS60StylePrivate::placeHolderTexture());
+ const QPixmap bg(QS60StylePrivate::backgroundTexture(true));
+ if (placeHolder.cacheKey() != brush.texture().cacheKey()
+ && bg.cacheKey() != brush.texture().cacheKey())
return false;
+ const QPixmap backgroundTexture(QS60StylePrivate::backgroundTexture());
+
const QPaintDevice *target = painter->device();
if (target->devType() == QInternal::Widget) {
const QWidget *widget = static_cast<const QWidget *>(target);
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 242c451fcf..e146a4e3ac 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -554,15 +554,14 @@ public:
static QPixmap frame(SkinFrameElements frame, const QSize &size,
SkinElementFlags flags = KDefaultSkinElementFlags);
- static QPixmap backgroundTexture();
+ static QPixmap backgroundTexture(bool skipCreation = false);
+ static QPixmap placeHolderTexture();
#ifdef Q_WS_S60
void handleDynamicLayoutVariantSwitch();
void handleSkinChange();
#endif // Q_WS_S60
- static QSize naviPaneSize();
-
//Checks that the current brush is transparent or has BrushStyle NoBrush,
//so that theme graphic background can be drawn.
static bool canDrawThemeBackground(const QBrush &backgroundBrush, const QWidget *widget);
@@ -592,13 +591,11 @@ private:
static QPixmap cachedFrame(SkinFrameElements frame, const QSize &size,
SkinElementFlags flags = KDefaultSkinElementFlags);
- static void refreshUI();
-
// set S60 font for widget
void setFont(QWidget *widget) const;
- void setThemePalette(QWidget *widget) const;
+ static void setThemePalette(QWidget *widget);
void setThemePalette(QPalette *palette) const;
- void setThemePaletteHash(QPalette *palette) const;
+ static void setThemePaletteHash(QPalette *palette);
static void storeThemePalette(QPalette *palette);
static void deleteThemePalette();
static bool equalToThemePalette(QColor color, QPalette::ColorRole role);
@@ -616,6 +613,9 @@ private:
// Contains background texture.
static QPixmap *m_background;
+ // Placeholder pixmap for the real background texture.
+ static QPixmap *m_placeHolderTexture;
+
const static SkinElementFlags KDefaultSkinElementFlags;
// defined theme palette
static QPalette *m_themePalette;
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 605872ee46..dc64872a9b 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -47,6 +47,7 @@
#include "private/qt_s60_p.h"
#include "private/qpixmap_s60_p.h"
#include "private/qcore_symbian_p.h"
+#include "private/qvolatileimage_p.h"
#include "qapplication.h"
#include "qsettings.h"
@@ -65,7 +66,6 @@
#include <aknnavi.h>
#include <gulicon.h>
#include <AknBitmapAnimation.h>
-
#include <centralrepository.h>
#if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN)
@@ -89,17 +89,25 @@ enum TSupportRelease {
ES60_5_0 = 0x0004,
ES60_5_1 = 0x0008,
ES60_5_2 = 0x0010,
+ ES60_5_3 = 0x0020,
ES60_3_X = ES60_3_1 | ES60_3_2,
// Releases before Symbian Foundation
ES60_PreSF = ES60_3_1 | ES60_3_2 | ES60_5_0,
+ // Releases before the S60 5.2
+ ES60_Pre52 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1,
+ // Releases before S60 5.3
+ ES60_Pre53 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2,
// Add all new releases here
- ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2
+ ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 | ES60_5_3
};
typedef struct {
- const TAknsItemID &skinID;
- TDrawType drawType;
- int supportInfo;
+ const TAknsItemID &skinID; // Determines default theme graphics ID.
+ TDrawType drawType; // Determines which native drawing routine is used to draw this item.
+ int supportInfo; // Defines the S60 versions that use the default graphics.
+ // These two, define new graphics that are used in releases other than partMapEntry.supportInfo defined releases.
+ // In general, these are given in numeric form to allow style compilation in earlier
+ // native releases that do not contain the new graphics.
int newMajorSkinId;
int newMinorSkinId;
} partMapEntry;
@@ -158,7 +166,6 @@ public:
static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part);
static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame);
static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags);
- static QSize naviPaneSize();
static TAknsItemID partSpecificThemeId(int part);
static QVariant themeDefinition(QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part);
@@ -189,12 +196,14 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1},
/* SP_QgnGrafScrollArrowUp */ {KAknsIIDQgnGrafScrollArrowUp, EDrawGulIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_All, -1,-1},
- /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_All, -1,-1},
+
+ // In S60 5.3 there is a new tab graphic
+ /* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2219}, //KAknsIIDQtgFrTabActiveNormalL
+ /* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x221b}, //KAknsIIDQtgFrTabActiveNormalC
+ /* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x221a}, //KAknsIIDQtgFrTabActiveNormalR
+ /* SP_QgnGrafTabPassiveL */ {KAknsIIDQgnGrafTabPassiveL, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2221}, //KAknsIIDQtgFrTabPassiveNormalL
+ /* SP_QgnGrafTabPassiveM */ {KAknsIIDQgnGrafTabPassiveM, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2223}, //KAknsIIDQtgFrTabPassiveNormalC
+ /* SP_QgnGrafTabPassiveR */ {KAknsIIDQgnGrafTabPassiveR, EDrawIcon, ES60_Pre53, EAknsMajorSkin, 0x2222}, //KAknsIIDQtgFrTabPassiveNormalR
// In 3.1 there is no slider groove.
/* SP_QgnGrafNsliderEndLeft */ {KAknsIIDNone, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19cf /* KAknsIIDQgnGrafNsliderEndLeft */},
@@ -637,9 +646,23 @@ QPixmap QS60StyleModeSpecifics::fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask
if (error)
return QPixmap();
- QPixmap pixmap = QPixmap::fromSymbianCFbsBitmap(icon);
- if (mask)
- pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask));
+ QPixmap pixmap;
+ QScopedPointer<QPixmapData> pd(QPixmapData::create(0, 0, QPixmapData::PixmapType));
+ if (mask) {
+ // Try the efficient path with less copying and conversion.
+ QVolatileImage img(icon, mask);
+ pd->fromNativeType(&img, QPixmapData::VolatileImage);
+ if (!pd->isNull())
+ pixmap = QPixmap(pd.take());
+ }
+ if (pixmap.isNull()) {
+ // Potentially more expensive path.
+ pd->fromNativeType(icon, QPixmapData::FbsBitmap);
+ pixmap = QPixmap(pd.take());
+ if (mask) {
+ pixmap.setAlphaChannel(QPixmap::fromSymbianCFbsBitmap(mask));
+ }
+ }
if ((flags & QS60StylePrivate::SF_PointEast) ||
(flags & QS60StylePrivate::SF_PointSouth) ||
@@ -795,6 +818,8 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(
rotatedBy90or270 ? TSize(size.height(), size.width()) : qt_QSize2TSize(size);
MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
+ static const TDisplayMode displayMode = S60->supportsPremultipliedAlpha ? Q_SYMBIAN_ECOLOR16MAP : EColor16MA;
+ static const TInt drawParam = S60->supportsPremultipliedAlpha ? KAknsDrawParamDefault : KAknsDrawParamRGBOnly;
QPixmap result;
@@ -833,7 +858,7 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(
// QS60WindowSurface::unlockBitmapHeap();
CFbsBitmap *background = new (ELeave) CFbsBitmap(); //offscreen
CleanupStack::PushL(background);
- User::LeaveIfError(background->Create(targetSize, EColor16MA));
+ User::LeaveIfError(background->Create(targetSize, displayMode));
CFbsBitmapDevice *dev = CFbsBitmapDevice::NewL(background);
CleanupStack::PushL(dev);
@@ -854,7 +879,7 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX(
*gc,
TPoint(),
targetSize,
- KAknsDrawParamDefault | KAknsDrawParamRGBOnly);
+ drawParam);
if (drawn)
result = fromFbsBitmap(background, NULL, flags, targetSize);
@@ -1125,7 +1150,8 @@ bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease)
(currentRelease == QSysInfo::SV_S60_3_2 && supportedRelease & ES60_3_2) ||
(currentRelease == QSysInfo::SV_S60_5_0 && supportedRelease & ES60_5_0) ||
(currentRelease == QSysInfo::SV_S60_5_1 && supportedRelease & ES60_5_1) ||
- (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2));
+ (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2) ||
+ (currentRelease == QSysInfo::SV_S60_5_3 && supportedRelease & ES60_5_3) );
}
TAknsItemID QS60StyleModeSpecifics::partSpecificThemeId(int part)
@@ -1375,7 +1401,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, Skin
return result;
}
-QPixmap QS60StylePrivate::backgroundTexture()
+QPixmap QS60StylePrivate::backgroundTexture(bool skipCreation)
{
bool createNewBackground = false;
TRect applicationRect = (static_cast<CEikAppUi*>(S60->appUi())->ApplicationRect());
@@ -1386,18 +1412,45 @@ QPixmap QS60StylePrivate::backgroundTexture()
if (m_background->width() != applicationRect.Width() ||
m_background->height() != applicationRect.Height()) {
delete m_background;
+ m_background = 0;
createNewBackground = true;
}
}
- if (createNewBackground) {
+ if (createNewBackground && !skipCreation) {
QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen,
- QSize(applicationRect.Width(), applicationRect.Height()), 0, SkinElementFlags());
+ QSize(applicationRect.Width(), applicationRect.Height()), 0, SkinElementFlags());
m_background = new QPixmap(background);
+
+ // Notify all widgets that palette is updated with the actual background texture.
+ QPalette pal = QApplication::palette();
+ pal.setBrush(QPalette::Window, *m_background);
+ QApplication::setPalette(pal);
+ setThemePaletteHash(&pal);
+ storeThemePalette(&pal);
+ foreach (QWidget *widget, QApplication::allWidgets()){
+ QEvent e(QEvent::PaletteChange);
+ QApplication::sendEvent(widget, &e);
+ setThemePalette(widget);
+ widget->ensurePolished();
+ }
}
+ if (!m_background)
+ return QPixmap();
return *m_background;
}
+// Generates 1*1 white pixmap as a placeholder for real texture.
+// The actual theme texture is drawn in qt_s60_fill_background().
+QPixmap QS60StylePrivate::placeHolderTexture()
+{
+ if (!m_placeHolderTexture) {
+ m_placeHolderTexture = new QPixmap(1,1);
+ m_placeHolderTexture->fill(Qt::white);
+ }
+ return *m_placeHolderTexture;
+}
+
QSize QS60StylePrivate::screenSize()
{
return QSize(S60->screenWidthInPixels, S60->screenHeightInPixels);
@@ -1412,8 +1465,8 @@ QS60Style::QS60Style()
void QS60StylePrivate::handleDynamicLayoutVariantSwitch()
{
clearCaches(QS60StylePrivate::CC_LayoutChange);
+ setBackgroundTexture(qApp);
setActiveLayout();
- refreshUI();
foreach (QWidget *widget, QApplication::allWidgets())
widget->ensurePolished();
}
@@ -1435,23 +1488,6 @@ void QS60StylePrivate::handleSkinChange()
#endif
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QS60StyleModeSpecifics::naviPaneSize();
-}
-
-QSize QS60StyleModeSpecifics::naviPaneSize()
-{
- CAknNavigationControlContainer* naviContainer;
- if (S60->statusPane()) {
- TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*>
- (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))));
- if (err==KErrNone)
- return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight);
- }
- return QSize(0,0);
-}
-
int QS60StylePrivate::currentAnimationFrame(QS60StyleEnums::SkinParts part)
{
QS60StyleAnimation *animation = animationDefinition(part);
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 77e0d0ef6b..a5aeac3fb9 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -308,7 +308,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size,
return result;
}
-QPixmap QS60StylePrivate::backgroundTexture()
+QPixmap QS60StylePrivate::backgroundTexture(bool /*skipCreation*/)
{
if (!m_background) {
const QSize size = QApplication::desktop()->screen()->size();
@@ -318,11 +318,6 @@ QPixmap QS60StylePrivate::backgroundTexture()
return *m_background;
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QSize(0, 0);
-}
-
bool QS60StylePrivate::isTouchSupported()
{
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index a4e7c384c2..369a0f00ae 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3339,6 +3339,13 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
}
break;
+ case CE_FocusFrame:
+ if (!rule.hasNativeBorder()) {
+ rule.drawBorder(p, opt->rect);
+ return;
+ }
+ break;
+
case CE_PushButton:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
if (rule.hasDrawable() || rule.hasBox() || rule.hasPosition() || rule.hasPalette() ||
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 1c21f91bce..05e3d3c8a5 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -59,6 +59,8 @@
QT_BEGIN_NAMESPACE
+static float SYNTHETIC_ITALIC_SKEW = tanf(14 * acosf(0) / 90);
+
/*****************************************************************************
QFontEngine debug facilities
*****************************************************************************/
@@ -142,7 +144,7 @@ void qmacfontengine_gamma_correct(QImage *image)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, const ATSFontRef &atsFontRef, const QFontDef &fontDef, bool kerning)
+QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &atsFamilyRef, const ATSFontRef &atsFontRef, const QFontDef &fontDef, bool kerning)
: QFontEngineMulti(0)
{
this->fontDef = fontDef;
@@ -160,6 +162,8 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con
QCFString name;
ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);
+ if (QString(name).isEmpty())
+ ATSFontFamilyGetName(atsFamilyRef, kATSOptionFlagsDefault, &name);
transform = CGAffineTransformIdentity;
if (fontDef.stretch != 100) {
@@ -467,6 +471,9 @@ glyph_metrics_t QCoreTextFontEngine::boundingBox(glyph_t glyph)
glyph_metrics_t ret;
CGGlyph g = glyph;
CGRect rect = CTFontGetBoundingRectsForGlyphs(ctfont, kCTFontHorizontalOrientation, &g, 0, 1);
+ if (synthesisFlags & QFontEngine::SynthesizedItalic) {
+ rect.size.width += rect.size.height * SYNTHETIC_ITALIC_SKEW;
+ }
ret.width = QFixed::fromReal(rect.size.width);
ret.height = QFixed::fromReal(rect.size.height);
ret.x = QFixed::fromReal(rect.origin.x);
@@ -558,7 +565,7 @@ void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextIt
CGAffineTransformConcat(cgMatrix, oldTextMatrix);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -SYNTHETIC_ITALIC_SKEW, 1, 0, 0));
cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
@@ -646,7 +653,7 @@ void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *position
cgMatrix = CGAffineTransformScale(cgMatrix, 1, -1);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -SYNTHETIC_ITALIC_SKEW, 1, 0, 0));
for (int i = 0; i < nGlyphs; ++i) {
@@ -681,7 +688,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, int margin, bool aa)
CGAffineTransformConcat(cgMatrix, oldTextMatrix);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, SYNTHETIC_ITALIC_SKEW, 1, 0, 0));
cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
@@ -1625,7 +1632,7 @@ QImage QFontEngineMac::imageForGlyph(glyph_t glyph, int margin, bool colorful)
CGAffineTransformConcat(cgMatrix, oldTextMatrix);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, SYNTHETIC_ITALIC_SKEW, 1, 0, 0));
cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
@@ -1718,7 +1725,7 @@ void QFontEngineMac::draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt
CGAffineTransformConcat(cgMatrix, oldTextMatrix);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -SYNTHETIC_ITALIC_SKEW, 1, 0, 0));
cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
diff --git a/src/gui/text/qfragmentmap_p.h b/src/gui/text/qfragmentmap_p.h
index 501bfff286..4057142b34 100644
--- a/src/gui/text/qfragmentmap_p.h
+++ b/src/gui/text/qfragmentmap_p.h
@@ -195,6 +195,10 @@ public:
head->root = new_root;
}
+ inline bool isValid(uint n) const {
+ return n > 0 && n != head->freelist;
+ }
+
union {
Header *head;
Fragment *fragments;
@@ -854,6 +858,7 @@ public:
return data.fragment(index);
}
inline uint position(uint node, uint field = 0) const { return data.position(node, field); }
+ inline bool isValid(uint n) const { return data.isValid(n); }
inline uint next(uint n) const { return data.next(n); }
inline uint previous(uint n) const { return data.previous(n); }
inline uint size(uint node, uint field = 0) const { return data.size(node, field); }
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index a1dcb634cc..5e593415e7 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -3148,7 +3148,7 @@ QRectF QTextDocumentLayoutPrivate::frameBoundingRectInternal(QTextFrame *frame)
QRectF QTextDocumentLayout::blockBoundingRect(const QTextBlock &block) const
{
Q_D(const QTextDocumentLayout);
- if (d->docPrivate->pageSize.isNull())
+ if (d->docPrivate->pageSize.isNull() || !block.isValid())
return QRectF();
d->ensureLayoutedByPosition(block.position() + block.length());
QTextFrame *frame = d->document->frameAt(block.position());
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index b511b5a237..4378c62478 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1233,6 +1233,8 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
shaper_item.num_glyphs -= itemBoundaries[k + 1];
}
shaper_item.initialGlyphCount = shaper_item.num_glyphs;
+ if (shaper_item.num_glyphs < shaper_item.item.length)
+ shaper_item.num_glyphs = shaper_item.item.length;
QFontEngine *actualFontEngine = font;
uint engineIdx = 0;
@@ -1257,7 +1259,8 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
}
const QGlyphLayout g = availableGlyphs(&si).mid(glyph_pos);
- moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
+ if (shaper_item.num_glyphs > shaper_item.item.length)
+ moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
shaper_item.glyphs = g.glyphs;
shaper_item.attributes = g.attributes;
diff --git a/src/gui/text/qtextengine_mac.cpp b/src/gui/text/qtextengine_mac.cpp
index ce42241fc8..c34bdb30a8 100644
--- a/src/gui/text/qtextengine_mac.cpp
+++ b/src/gui/text/qtextengine_mac.cpp
@@ -604,8 +604,9 @@ void QTextEngine::shapeTextMac(int item) const
bool stringToCMapFailed = false;
if (!fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters, attributes())) {
ensureSpace(num_glyphs);
- stringToCMapFailed = fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters,
- attributes());
+ g = availableGlyphs(&si);
+ stringToCMapFailed = !fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters,
+ attributes());
}
if (!stringToCMapFailed) {
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index a996f59a86..905f81b881 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1682,6 +1682,7 @@ namespace {
int glyphCount;
int maxGlyphs;
int currentPosition;
+ glyph_t previousGlyph;
QFixed minw;
QFixed softHyphenWidth;
@@ -1709,6 +1710,15 @@ namespace {
return glyphs.glyphs[logClusters[currentPosition - 1]];
}
+ inline void saveCurrentGlyph()
+ {
+ previousGlyph = 0;
+ if (currentPosition > 0 &&
+ logClusters[currentPosition - 1] < glyphs.numGlyphs) {
+ previousGlyph = currentGlyph(); // needed to calculate right bearing later
+ }
+ }
+
inline void adjustRightBearing(glyph_t glyph)
{
qreal rb;
@@ -1723,6 +1733,12 @@ namespace {
adjustRightBearing(currentGlyph());
}
+ inline void adjustPreviousRightBearing()
+ {
+ if (previousGlyph > 0)
+ adjustRightBearing(previousGlyph);
+ }
+
inline void resetRightBearing()
{
rightBearing = QFixed(1); // Any positive number is defined as invalid since only
@@ -1798,22 +1814,7 @@ void QTextLine::layout_helper(int maxGlyphs)
lbh.manualWrap = (wrapMode == QTextOption::ManualWrap || wrapMode == QTextOption::NoWrap);
int item = -1;
- int newItem = -1;
- int left = 0;
- int right = eng->layoutData->items.size()-1;
- while(left <= right) {
- int middle = ((right-left)/2)+left;
- if (line.from > eng->layoutData->items[middle].position)
- left = middle+1;
- else if(line.from < eng->layoutData->items[middle].position)
- right = middle-1;
- else {
- newItem = middle;
- break;
- }
- }
- if (newItem == -1)
- newItem = right;
+ int newItem = eng->findItem(line.from);
LB_DEBUG("from: %d: item=%d, total %d, width available %f", line.from, newItem, eng->layoutData->items.size(), line.width.toReal());
@@ -1825,6 +1826,7 @@ void QTextLine::layout_helper(int maxGlyphs)
lbh.currentPosition = line.from;
int end = 0;
lbh.logClusters = eng->layoutData->logClustersPtr;
+ lbh.previousGlyph = 0;
while (newItem < eng->layoutData->items.size()) {
lbh.resetRightBearing();
@@ -1885,6 +1887,7 @@ void QTextLine::layout_helper(int maxGlyphs)
current, lbh.logClusters, lbh.glyphs);
} else {
lbh.tmpData.length++;
+ lbh.adjustPreviousRightBearing();
}
line += lbh.tmpData;
goto found;
@@ -1915,9 +1918,7 @@ void QTextLine::layout_helper(int maxGlyphs)
} else {
lbh.whiteSpaceOrObject = false;
bool sb_or_ws = false;
- glyph_t previousGlyph = 0;
- if (lbh.currentPosition > 0 && lbh.logClusters[lbh.currentPosition - 1] <lbh.glyphs.numGlyphs)
- previousGlyph = lbh.currentGlyph(); // needed to calculate right bearing later
+ lbh.saveCurrentGlyph();
do {
addNextCluster(lbh.currentPosition, end, lbh.tmpData, lbh.glyphCount,
current, lbh.logClusters, lbh.glyphs);
@@ -1942,7 +1943,7 @@ void QTextLine::layout_helper(int maxGlyphs)
// b) if we are so short of available width that the
// soft hyphen is the first breakable position, then
// we don't want to show it. However we initially
- // have to take the width for it into accoun so that
+ // have to take the width for it into account so that
// the text document layout sees the overflow and
// switch to break-anywhere mode, in which we
// want the soft-hyphen to slip into the next line
@@ -1970,8 +1971,9 @@ void QTextLine::layout_helper(int maxGlyphs)
// we are too wide, fix right bearing
if (rightBearing <= 0)
lbh.rightBearing = rightBearing; // take from cache
- else if (previousGlyph > 0)
- lbh.adjustRightBearing(previousGlyph);
+ else
+ lbh.adjustPreviousRightBearing();
+
if (!breakany) {
line.textWidth += lbh.softHyphenWidth;
}
@@ -1979,6 +1981,7 @@ void QTextLine::layout_helper(int maxGlyphs)
goto found;
}
}
+ lbh.saveCurrentGlyph();
}
if (lbh.currentPosition == end)
newItem = item + 1;
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index e323fd0f64..a403cc5f1c 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -891,6 +891,11 @@ QTextBlockUserData::~QTextBlockUserData()
Returns true if this text block is valid; otherwise returns false.
*/
+bool QTextBlock::isValid() const
+{
+ return p != 0 && p->blockMap().isValid(n);
+}
+
/*!
\fn QTextBlock &QTextBlock::operator=(const QTextBlock &other)
@@ -1504,7 +1509,7 @@ QTextBlock QTextBlock::next() const
*/
QTextBlock QTextBlock::previous() const
{
- if (!isValid())
+ if (!p)
return QTextBlock();
return QTextBlock(p, p->blockMap().previous(n));
diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h
index d5c1e8df79..73aed79ff0 100644
--- a/src/gui/text/qtextobject.h
+++ b/src/gui/text/qtextobject.h
@@ -204,7 +204,7 @@ public:
inline QTextBlock(const QTextBlock &o) : p(o.p), n(o.n) {}
inline QTextBlock &operator=(const QTextBlock &o) { p = o.p; n = o.n; return *this; }
- inline bool isValid() const { return p != 0 && n != 0; }
+ bool isValid() const;
inline bool operator==(const QTextBlock &o) const { return p == o.p && n == o.n; }
inline bool operator!=(const QTextBlock &o) const { return p != o.p || n != o.n; }
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 510411613e..2503b990f5 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -500,7 +500,7 @@ QAbstractScrollArea::QAbstractScrollArea(QAbstractScrollAreaPrivate &dd, QWidget
/*!
Constructs a viewport.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
*/
QAbstractScrollArea::QAbstractScrollArea(QWidget *parent)
:QFrame(*new QAbstractScrollAreaPrivate, parent)
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index cb36398cb2..2570496262 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -265,7 +265,7 @@ void QAbstractSliderPrivate::setSteps(int single, int page)
/*!
Constructs an abstract slider.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l minimum defaults to 0, the \l maximum to 99, with a \l
singleStep size of 1 and a \l pageStep size of 10, and an initial
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index dbbf49aa79..4b087e9744 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -398,7 +398,7 @@ void QComboBoxPrivateContainer::leaveEvent(QEvent *)
#ifdef Q_WS_MAC
QStyleOptionComboBox opt = comboStyleOption();
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
- view->setCurrentIndex(QModelIndex());
+ view->clearSelection();
#endif
}
@@ -671,8 +671,8 @@ bool QComboBoxPrivateContainer::eventFilter(QObject *o, QEvent *e)
if (vector.manhattanLength() > 9 && blockMouseReleaseTimer.isActive())
blockMouseReleaseTimer.stop();
QModelIndex indexUnderMouse = view->indexAt(m->pos());
- if (indexUnderMouse.isValid() && indexUnderMouse != view->currentIndex()
- && !QComboBoxDelegate::isSeparator(indexUnderMouse)) {
+ if (indexUnderMouse.isValid()
+ && !QComboBoxDelegate::isSeparator(indexUnderMouse)) {
view->setCurrentIndex(indexUnderMouse);
}
}
@@ -944,7 +944,10 @@ QComboBox::QComboBox(bool rw, QWidget *parent, const char *name)
to set and get item data (e.g., setItemData() and itemText()). You
can also set a new model and view (with setModel() and setView()).
For the text and icon in the combobox label, the data in the model
- that has the Qt::DisplayRole and Qt::DecorationRole is used.
+ that has the Qt::DisplayRole and Qt::DecorationRole is used. Note
+ that you cannot alter the \l{QAbstractItemView::}{SelectionMode}
+ of the view(), e.g., by using
+ \l{QAbstractItemView::}{setSelectionMode()}.
\image qstyle-comboboxes.png Comboboxes in the different built-in styles.
@@ -2453,12 +2456,7 @@ void QComboBox::showPopup()
// available screen geometry.This may override the vertical position, but it is more
// important to show as much as possible of the popup.
const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height());
-#ifdef Q_WS_S60
- //popup needs to be stretched with screen minimum dimension
- listRect.setHeight(qMin(screen.height(), screen.width()));
-#else
listRect.setHeight(height);
-#endif
if (boundToScreen) {
if (listRect.top() < screen.top())
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 9a6d24c9d9..2f4bb4b44b 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1247,37 +1247,15 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
response to button presses; these are just like context menus
except for how they are invoked.
- \raw HTML
- <table align="center" cellpadding="0">
- <tr>
- <td>
- \endraw
- \inlineimage plastique-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage windowsxp-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage macintosh-menu.png
- \raw HTML
- </td>
-
- </tr>
- <tr>
- <td colspan="3">
- \endraw
- A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
+ \table 100%
+ \row
+ \o \inlineimage plastique-menu.png
+ \o \inlineimage windowsxp-menu.png
+ \o \inlineimage macintosh-menu.png
+ \endtable
+ \caption Fig. A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
\l{Windows XP Style Widget Gallery}{Windows XP widget style},
and \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \raw HTML
- </td>
- </tr>
- </table>
- \endraw
\section1 Actions
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index c895b1b275..87738a0083 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -330,7 +330,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
/*!
Constructs a vertical scroll bar.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l {QAbstractSlider::minimum} {minimum} defaults to 0, the
\l {QAbstractSlider::maximum} {maximum} to 99, with a
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index 964a6e13fe..ca8fc3757a 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -1016,7 +1016,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
/*!
Constructs a horizontal splitter with the \a parent
- arguments is passed on to the QFrame constructor.
+ argument passed on to the QFrame constructor.
\sa setOrientation()
*/
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index c2a2e98941..aae6a010f1 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -136,7 +136,7 @@ public:
GestureArea is an invisible item: it is never painted.
- \sa MouseArea, {declarative/touchinteraction/gestures}{Gestures example}
+ \sa MouseArea
*/
/*!
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 3767b957d3..77ecf70f7c 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -202,7 +202,13 @@ QAudioInput::~QAudioInput()
/*!
Uses the \a device as the QIODevice to transfer data.
Passing a QIODevice allows the data to be transferred without any extra code.
- All that is required is to open the QIODevice.
+ All that is required is to open the QIODevice. QAudioInput does not take
+ ownership of \a device.
+
+ The QAudioInput will write to the device when new data is available. You can
+ subclass QIODevice and reimplement \l{QIODevice::}{writeData()} if you wish to
+ access the data. If you simply want to save data to a file, you can pass a
+ QFile to this function.
If able to successfully get audio data from the systems audio device the
state() is set to either QAudio::ActiveState or QAudio::IdleState,
@@ -222,9 +228,12 @@ void QAudioInput::start(QIODevice* device)
}
/*!
- Returns a pointer to the QIODevice being used to handle the data
- transfer. This QIODevice can be used to read() audio data
- directly.
+
+ Returns a pointer to a new QIODevice that will be used to handle the data transfer.
+ This QIODevice can be used to \l{QIODevice::}{read()} audio data directly.
+ You will typically connect to the \l{QIODevice::}{readyRead()} signal, and
+ read from the device in the slot you connect to. QAudioInput keeps ownership
+ of the device.
If able to access the systems audio device the state() is set to
QAudio::IdleState, error() is set to QAudio::NoError
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ccc20e65d4..69e59d1f0d 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -363,9 +363,9 @@ qint64 QFtpDTP::read(char *data, qint64 maxlen)
if (socket && socket->state() == QTcpSocket::ConnectedState) {
read = socket->read(data, maxlen);
} else {
- read = bytesFromSocket.size();
+ read = qMin(maxlen, qint64(bytesFromSocket.size()));
memcpy(data, bytesFromSocket.data(), read);
- bytesFromSocket.clear();
+ bytesFromSocket.remove(0, read);
}
bytesDone += read;
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 82b5ce3a89..700b4552d4 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -963,8 +963,20 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
} else {
errorCode = QNetworkReply::RemoteHostClosedError;
}
+ } else if (state == QHttpNetworkConnectionChannel::ReadingState) {
+ if (!reply->d_func()->expectContent()) {
+ // No content expected, this is a valid way to have the connection closed by the server
+ return;
+ }
+ if (reply->contentLength() == -1 && !reply->d_func()->isChunked()) {
+ // There was no content-length header and it's not chunked encoding,
+ // so this is a valid way to have the connection closed by the server
+ return;
+ }
+ // ok, we got a disconnect even though we did not expect it
+ errorCode = QNetworkReply::RemoteHostClosedError;
} else {
- return;
+ errorCode = QNetworkReply::RemoteHostClosedError;
}
break;
case QAbstractSocket::SocketTimeoutError:
@@ -992,6 +1004,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
if (reply) {
reply->d_func()->errorString = errorString;
emit reply->finishedWithError(errorCode, errorString);
+ reply = 0;
}
// send the next request
QMetaObject::invokeMethod(that, "_q_startNextRequest", Qt::QueuedConnection);
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 4189743b39..7c90f680ae 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -360,6 +360,11 @@ void QNetworkAccessHttpBackend::validateCache(QHttpNetworkRequest &httpRequest,
return;
}
+ // The disk cache API does not currently support partial content retrieval.
+ // That is why we don't use the disk cache for any such requests.
+ if (request().hasRawHeader("Range"))
+ return;
+
QAbstractNetworkCache *nc = networkCache();
if (!nc)
return; // no local cache
@@ -996,14 +1001,11 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (hop_by_hop)
continue;
- // for 4.6.0, we were planning to not store the date header in the
- // cached resource; through that we planned to reduce the number
- // of writes to disk when using a QNetworkDiskCache (i.e. don't
- // write to disk when only the date changes).
- // However, without the date we cannot calculate the age of the page
- // anymore.
- //if (header == "date")
- //continue;
+ // we are currently not using the date header to determine the expiration time of a page,
+ // but only the "Expires", "max-age" and "s-maxage" headers, see
+ // QNetworkAccessHttpBackend::validateCache() and below ("metaData.setExpirationDate()").
+ if (header == "date")
+ continue;
// Don't store Warning 1xx headers
if (header == "warning") {
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 70ea5c252e..c2a69257c3 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -359,7 +359,7 @@ void QNetworkCookie::setValue(const QByteArray &value)
}
// ### move this to qnetworkcookie_p.h and share with qnetworkaccesshttpbackend
-static QPair<QByteArray, QByteArray> nextField(const QByteArray &text, int &position)
+static QPair<QByteArray, QByteArray> nextField(const QByteArray &text, int &position, bool isNameValue)
{
// format is one of:
// (1) token
@@ -394,13 +394,22 @@ static QPair<QByteArray, QByteArray> nextField(const QByteArray &text, int &posi
// quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
// qdtext = <any TEXT except <">>
// quoted-pair = "\" CHAR
+
+ // If its NAME=VALUE, retain the value as is
+ // refer to ttp://bugreports.qt.nokia.com/browse/QTBUG-17746
+ if (isNameValue)
+ second += '"';
++i;
while (i < length) {
register char c = text.at(i);
if (c == '"') {
// end of quoted text
+ if (isNameValue)
+ second += '"';
break;
} else if (c == '\\') {
+ if (isNameValue)
+ second += '\\';
++i;
if (i >= length)
// broken line
@@ -476,10 +485,12 @@ QByteArray QNetworkCookie::toRawForm(RawForm form) const
result = d->name;
result += '=';
- if (d->value.contains(';') ||
+ if ((d->value.contains(';') ||
d->value.contains(',') ||
d->value.contains(' ') ||
- d->value.contains('"')) {
+ d->value.contains('"')) &&
+ (!d->value.startsWith('"') &&
+ !d->value.endsWith('"'))) {
result += '"';
QByteArray value = d->value;
@@ -947,7 +958,7 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt
QNetworkCookie cookie;
// The first part is always the "NAME=VALUE" part
- QPair<QByteArray,QByteArray> field = nextField(cookieString, position);
+ QPair<QByteArray,QByteArray> field = nextField(cookieString, position, true);
if (field.first.isEmpty() || field.second.isNull())
// parsing error
break;
@@ -965,7 +976,7 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt
case ';':
// new field in the cookie
- field = nextField(cookieString, position);
+ field = nextField(cookieString, position, false);
field.first = field.first.toLower(); // everything but the NAME=VALUE is case-insensitive
if (field.first == "expires") {
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 343f344a1a..894df79449 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -505,6 +505,13 @@ void QNetworkReplyImplPrivate::initCacheSaveDevice()
{
Q_Q(QNetworkReplyImpl);
+ // The disk cache does not support partial content, so don't even try to
+ // save any such content into the cache.
+ if (q->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 206) {
+ cacheEnabled = false;
+ return;
+ }
+
// save the meta data
QNetworkCacheMetaData metaData;
metaData.setUrl(url);
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 0e3c519c72..8634b6bf59 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -57,16 +57,17 @@ QT_BEGIN_NAMESPACE
{ \
delete this_##NAME.pointer; \
this_##NAME.pointer = 0; \
- this_##NAME.destroyed = true; \
} \
static TYPE *NAME() \
{ \
- if (!this_##NAME.pointer && !this_##NAME.destroyed) { \
+ if (!this_##NAME.pointer) { \
TYPE *x = new TYPE; \
if (!this_##NAME.pointer.testAndSetOrdered(0, x)) \
delete x; \
- else \
+ else { \
qAddPostRoutine(NAME##_cleanup); \
+ this_##NAME.pointer->updateConfigurations(); \
+ } \
} \
return this_##NAME.pointer; \
}
@@ -75,15 +76,7 @@ Q_GLOBAL_STATIC_QAPP_DESTRUCTION(QNetworkConfigurationManagerPrivate, connManage
QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
{
- static bool initialized = false;
-
- QNetworkConfigurationManagerPrivate *m = connManager();
- if (!initialized) {
- initialized = true;
- m->updateConfigurations();
- }
-
- return m;
+ return connManager();
}
/*!
@@ -203,6 +196,9 @@ QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
/*!
Constructs a QNetworkConfigurationManager with the given \a parent.
+
+ Note that to ensure a valid list of current configurations immediately available, updating
+ is done during construction which causes some delay.
*/
QNetworkConfigurationManager::QNetworkConfigurationManager( QObject* parent )
: QObject(parent)
diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h
index e107c62ddb..ee28e645f2 100644
--- a/src/network/bearer/qnetworksession.h
+++ b/src/network/bearer/qnetworksession.h
@@ -141,13 +141,12 @@ private:
#ifndef QT_MOBILITY_BEARER
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QNetworkSession::State)
+Q_DECLARE_METATYPE(QNetworkSession::SessionError)
#else
QTM_END_NAMESPACE
#endif
-Q_DECLARE_METATYPE(QNetworkSession::State)
-Q_DECLARE_METATYPE(QNetworkSession::SessionError)
-
QT_END_HEADER
#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/network/bearer/qsharednetworksession.cpp b/src/network/bearer/qsharednetworksession.cpp
index 51b3a3253f..fcb0128817 100644
--- a/src/network/bearer/qsharednetworksession.cpp
+++ b/src/network/bearer/qsharednetworksession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -59,6 +59,11 @@ inline QSharedNetworkSessionManager* sharedNetworkSessionManager()
return rv;
}
+static void doDeleteLater(QObject* obj)
+{
+ obj->deleteLater();
+}
+
QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetworkConfiguration config)
{
QSharedNetworkSessionManager *m(sharedNetworkSessionManager());
@@ -69,7 +74,7 @@ QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetwor
return p;
}
//otherwise make one
- QSharedPointer<QNetworkSession> session(new QNetworkSession(config));
+ QSharedPointer<QNetworkSession> session(new QNetworkSession(config), doDeleteLater);
m->sessions[config] = session;
return session;
}
diff --git a/src/network/kernel/qnetworkinterface_symbian.cpp b/src/network/kernel/qnetworkinterface_symbian.cpp
index 03133d0aa6..8e5db3c7eb 100644
--- a/src/network/kernel/qnetworkinterface_symbian.cpp
+++ b/src/network/kernel/qnetworkinterface_symbian.cpp
@@ -43,7 +43,7 @@
#include "qnetworkinterface.h"
#include "qnetworkinterface_p.h"
-#include "../corelib/kernel/qcore_symbian_p.h"
+#include <private/qcore_symbian_p.h>
#ifndef QT_NO_NETWORKINTERFACE
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 618ac79c03..a5cdf011aa 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
Returns true if this certificate is valid; otherwise returns
false.
- Note: Currently, this function only checks that the current
+ Note: Currently, this function checks that the current
data-time is within the date-time range during which the
- certificate is considered valid. No other checks are
- currently performed.
+ certificate is considered valid, and checks that the
+ certificate is not in a blacklist of fraudulent certificates.
\sa isNull()
*/
bool QSslCertificate::isValid() const
{
const QDateTime currentTime = QDateTime::currentDateTime();
- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter;
+ return currentTime >= d->notValidBefore &&
+ currentTime <= d->notValidAfter &&
+ ! QSslCertificatePrivate::isBlacklisted(*this);
}
/*!
@@ -798,6 +800,30 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromDer(const QByteAr
return certificates;
}
+// These certificates are known to be fraudulent and were created during the comodo
+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
+static const char *certificate_blacklist[] = {
+ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e",
+ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06",
+ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3",
+ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29",
+ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71",
+ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47",
+ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43",
+ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0",
+ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0",
+ 0
+};
+
+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate)
+{
+ for (int a = 0; certificate_blacklist[a] != 0; a++) {
+ if (certificate.serialNumber() == certificate_blacklist[a])
+ return true;
+ }
+ return false;
+}
+
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
{
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index cdceb0f85a..1ce33d3bfd 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -96,6 +96,7 @@ public:
static QSslCertificate QSslCertificate_from_X509(X509 *x509);
static QList<QSslCertificate> certificatesFromPem(const QByteArray &pem, int count = -1);
static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
+ static bool isBlacklisted(const QSslCertificate &certificate);
friend class QSslSocketBackendPrivate;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 84e14ffb0d..2427193eec 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -312,9 +312,18 @@ init_context:
q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
}
}
+
+ bool addExpiredCerts = true;
+#if defined(Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5)
+ //On Leopard SSL does not work if we add the expired certificates.
+ if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_5)
+ addExpiredCerts = false;
+#endif
// now add the expired certs
- foreach (const QSslCertificate &caCertificate, expiredCerts) {
- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
+ if (addExpiredCerts) {
+ foreach (const QSslCertificate &caCertificate, expiredCerts) {
+ q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
+ }
}
// Register a custom callback to get all verification errors.
@@ -1184,6 +1193,13 @@ bool QSslSocketBackendPrivate::startHandshake()
X509 *x509 = q_SSL_get_peer_certificate(ssl);
configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
q_X509_free(x509);
+ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) {
+ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted"));
+ q->setSocketError(QAbstractSocket::SslHandshakeFailedError);
+ emit q->error(QAbstractSocket::SslHandshakeFailedError);
+ plainSocket->disconnectFromHost();
+ return false;
+ }
// Start translating errors.
QList<QSslError> errors;
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index cda31e5bd9..5c8d2b6798 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -90,10 +90,6 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_SYMBIAN)
-#define QT_GL_NO_SCISSOR_TEST
-#endif
-
#if defined(Q_WS_WIN)
extern Q_GUI_EXPORT bool qt_cleartype_enabled;
#endif
@@ -1335,11 +1331,14 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c
ensureActive();
d->transferMode(ImageDrawingMode);
+ QGLContext::BindOptions bindOptions = QGLContext::InternalBindOption|QGLContext::CanFlipNativePixmapBindOption;
+#ifdef QGL_USE_TEXTURE_POOL
+ bindOptions |= QGLContext::TemporarilyCachedBindOption;
+#endif
+
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
QGLTexture *texture =
- ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA,
- QGLContext::InternalBindOption
- | QGLContext::CanFlipNativePixmapBindOption);
+ ctx->d_func()->bindTexture(pixmap, GL_TEXTURE_2D, GL_RGBA, bindOptions);
GLfloat top = texture->options & QGLContext::InvertedYBindOption ? (pixmap.height() - src.top()) : src.top();
GLfloat bottom = texture->options & QGLContext::InvertedYBindOption ? (pixmap.height() - src.bottom()) : src.bottom();
@@ -1351,6 +1350,12 @@ void QGL2PaintEngineEx::drawPixmap(const QRectF& dest, const QPixmap & pixmap, c
d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, texture->id);
d->drawTexture(dest, srcRect, pixmap.size(), isOpaque, isBitmap);
+
+ if (texture->options&QGLContext::TemporarilyCachedBindOption) {
+ // pixmap was temporarily cached as a QImage texture by pooling system
+ // and should be destroyed immediately
+ QGLTextureCache::instance()->remove(ctx, texture->id);
+ }
}
void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const QRectF& src,
@@ -1375,12 +1380,23 @@ void QGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, const
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
- QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption);
+ QGLContext::BindOptions bindOptions = QGLContext::InternalBindOption;
+#ifdef QGL_USE_TEXTURE_POOL
+ bindOptions |= QGLContext::TemporarilyCachedBindOption;
+#endif
+
+ QGLTexture *texture = ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, bindOptions);
GLuint id = texture->id;
d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE,
state()->renderHints & QPainter::SmoothPixmapTransform, id);
d->drawTexture(dest, src, image.size(), !image.hasAlphaChannel());
+
+ if (texture->options&QGLContext::TemporarilyCachedBindOption) {
+ // image was temporarily cached by texture pooling system
+ // and should be destroyed immediately
+ QGLTextureCache::instance()->remove(ctx, texture->id);
+ }
}
void QGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem)
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 0e82467a0a..6d79584028 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -148,11 +148,16 @@ embedded {
}
symbian {
+ DEFINES += QGL_USE_TEXTURE_POOL QGL_NO_PRESERVED_SWAP
+ SOURCES -= qpixmapdata_gl.cpp
SOURCES += qgl_symbian.cpp \
+ qpixmapdata_poolgl.cpp \
qglpixelbuffer_egl.cpp \
- qgl_egl.cpp
+ qgl_egl.cpp \
+ qgltexturepool.cpp
- HEADERS += qgl_egl_p.h
+ HEADERS += qgl_egl_p.h \
+ qgltexturepool_p.h
symbian:TARGET.UID3 = 0x2002131A
}
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 062218c8da..b755153791 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -69,6 +69,7 @@
#if !defined(QT_OPENGL_ES_1)
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
+#include <private/qwindowsurface_gl_p.h>
#endif
#ifndef QT_OPENGL_ES_2
@@ -86,13 +87,16 @@
#include <private/qpixmapdata_p.h>
#include <private/qpixmapdata_gl_p.h>
#include <private/qglpixelbuffer_p.h>
-#include <private/qwindowsurface_gl_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include "qcolormap.h"
#include "qfile.h"
#include "qlibrary.h"
#include <qmutex.h>
+#ifdef QGL_USE_TEXTURE_POOL
+#include <private/qgltexturepool_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
@@ -2022,6 +2026,10 @@ struct DDSFormat {
the pixmap/image that it stems from, e.g. installing destruction
hooks in them.
+ \omitvalue TemporarilyCachedBindOption Used by paint engines on some
+ platforms to indicate that the pixmap or image texture is possibly
+ cached only temporarily and must be destroyed immediately after the use.
+
\omitvalue InternalBindOption
*/
@@ -2529,8 +2537,18 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G
#endif
const QImage &constRef = img; // to avoid detach in bits()...
+#ifdef QGL_USE_TEXTURE_POOL
+ QGLTexturePool::instance()->createPermanentTexture(tx_id,
+ target,
+ 0, internalFormat,
+ img.width(), img.height(),
+ externalFormat,
+ pixel_type,
+ constRef.bits());
+#else
glTexImage2D(target, 0, internalFormat, img.width(), img.height(), 0, externalFormat,
pixel_type, constRef.bits());
+#endif
#if defined(QT_OPENGL_ES_2)
if (genMipmap)
glGenerateMipmap(target);
@@ -2569,7 +2587,6 @@ QGLTexture *QGLContextPrivate::textureCacheLookup(const qint64 key, GLenum targe
return 0;
}
-
/*! \internal */
QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, QGLContext::BindOptions options)
{
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 9443c74963..7d72c8af9b 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -329,6 +329,7 @@ public:
MemoryManagedBindOption = 0x0010, // internal flag
CanFlipNativePixmapBindOption = 0x0020, // internal flag
+ TemporarilyCachedBindOption = 0x0040, // internal flag
DefaultBindOption = LinearFilteringBindOption
| InvertedYBindOption
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 674d80d021..d6b2d3b5cb 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <QtCore/qdebug.h>
#include <QtOpenGL/qgl.h>
#include <QtOpenGL/qglpixelbuffer.h>
#include "qgl_p.h"
@@ -195,6 +196,7 @@ void QGLContext::makeCurrent()
// PowerVR MBX/SGX chips needs to clear all buffers when starting to render
// a new frame, otherwise there will be a performance penalty to pay for
// each frame.
+ qDebug() << "Found SGX/MBX driver, enabling FullClearOnEveryFrame";
d->workaround_needsFullClearOnEveryFrame = true;
// Older PowerVR SGX drivers (like the one in the N900) have a
@@ -202,10 +204,31 @@ void QGLContext::makeCurrent()
// or GL_ALPHA texture bound to an FBO. The only way to
// identify that driver is to check the EGL version number for it.
const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
- if (egl_version && strstr(egl_version, "1.3"))
+
+ if (egl_version && strstr(egl_version, "1.3")) {
+ qDebug() << "Found v1.3 driver, enabling brokenFBOReadBack";
d->workaround_brokenFBOReadBack = true;
- else if (egl_version && strstr(egl_version, "1.4"))
+ } else if (egl_version && strstr(egl_version, "1.4")) {
+ qDebug() << "Found v1.4 driver, enabling brokenTexSubImage";
d->workaround_brokenTexSubImage = true;
+
+ // this is a bit complicated; 1.4 version SGX drivers from
+ // Nokia have fixed the brokenFBOReadBack problem, but
+ // official drivers from TI haven't, meaning that things
+ // like the beagleboard are broken unless we hack around it
+ // - but at the same time, we want to not reduce performance
+ // by not enabling this elsewhere.
+ //
+ // so, let's check for a Nokia-specific addon, and only
+ // enable if it isn't present.
+ // (see MeeGo bug #5616)
+ if (!QEgl::hasExtension("EGL_NOK_image_shared")) {
+ // no Nokia extension, this is probably a standard SGX
+ // driver, so enable the workaround
+ qDebug() << "Found non-Nokia v1.4 driver, enabling brokenFBOReadBack";
+ d->workaround_brokenFBOReadBack = true;
+ }
+ }
}
}
}
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 82b66f53e9..1b41db47db 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -41,15 +41,17 @@
#include "qgl.h"
-#include <coemain.h>
-#include <coecntrl.h>
-#include <w32std.h>
+#include <fbs.h>
+#include <private/qt_s60_p.h>
#include <private/qpixmap_s60_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include <private/qwidget_p.h> // to access QWExtra
+#include <private/qnativeimagehandleprovider_p.h>
#include "qgl_egl_p.h"
+#include "qpixmapdata_gl_p.h"
+#include "qgltexturepool_p.h"
#include "qcolormap.h"
#include <QDebug>
@@ -69,6 +71,8 @@ QT_BEGIN_NAMESPACE
#endif
#endif
+extern int qt_gl_pixmap_serial;
+
/*
QGLTemporaryContext implementation
*/
@@ -225,13 +229,20 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->eglSurface = QEgl::createSurface(device(), d->eglContext->config());
-#if !defined(QGL_NO_PRESERVED_SWAP)
- eglGetError(); // Clear error state first.
- eglSurfaceAttrib(QEgl::display(), d->eglSurface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- if (eglGetError() != EGL_SUCCESS) {
- qWarning("QGLContext: could not enable preserved swap");
- }
+ eglGetError(); // Clear error state first.
+
+#ifdef QGL_NO_PRESERVED_SWAP
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable destroyed swap behaviour");
+#else
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable preserved swap behaviour");
#endif
setWindowCreated(true);
@@ -358,5 +369,104 @@ void QGLWidgetPrivate::recreateEglSurface()
eglSurfaceWindowId = currentId;
}
-QT_END_NAMESPACE
+static inline bool knownGoodFormat(QImage::Format format)
+{
+ switch (format) {
+ case QImage::Format_RGB16: // EColor64K
+ case QImage::Format_RGB32: // EColor16MU
+ case QImage::Format_ARGB32_Premultiplied: // EColor16MAP
+ return true;
+ default:
+ return false;
+ }
+}
+
+void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
+{
+ if (type == QPixmapData::FbsBitmap) {
+ CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap *>(pixmap);
+ QSize size(bitmap->SizeInPixels().iWidth, bitmap->SizeInPixels().iHeight);
+ if (size.width() == w && size.height() == h)
+ setSerialNumber(++qt_gl_pixmap_serial);
+ resize(size.width(), size.height());
+ m_source = QVolatileImage(bitmap);
+ if (pixelType() == BitmapType) {
+ m_source.ensureFormat(QImage::Format_MonoLSB);
+ } else if (!knownGoodFormat(m_source.format())) {
+ m_source.beginDataAccess();
+ QImage::Format format = idealFormat(m_source.imageRef(), Qt::AutoColor);
+ m_source.endDataAccess(true);
+ m_source.ensureFormat(format);
+ }
+ m_hasAlpha = m_source.hasAlphaChannel();
+ m_hasFillColor = false;
+ m_dirty = true;
+
+ } else if (type == QPixmapData::VolatileImage && pixmap) {
+ // Support QS60Style in more efficient skin graphics retrieval.
+ QVolatileImage *img = static_cast<QVolatileImage *>(pixmap);
+ if (img->width() == w && img->height() == h)
+ setSerialNumber(++qt_gl_pixmap_serial);
+ resize(img->width(), img->height());
+ m_source = *img;
+ m_hasAlpha = m_source.hasAlphaChannel();
+ m_hasFillColor = false;
+ m_dirty = true;
+ } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
+ destroyTexture();
+ nativeImageHandleProvider = static_cast<QNativeImageHandleProvider *>(pixmap);
+ // Cannot defer the retrieval, we need at least the size right away.
+ createFromNativeImageHandleProvider();
+ }
+}
+void* QGLPixmapData::toNativeType(NativeType type)
+{
+ if (type == QPixmapData::FbsBitmap) {
+ if (m_source.isNull())
+ m_source = QVolatileImage(w, h, QImage::Format_ARGB32_Premultiplied);
+ return m_source.duplicateNativeImage();
+ }
+
+ return 0;
+}
+
+bool QGLPixmapData::initFromNativeImageHandle(void *handle, const QString &type)
+{
+ if (type == QLatin1String("RSgImage")) {
+ fromNativeType(handle, QPixmapData::SgImage);
+ return true;
+ } else if (type == QLatin1String("CFbsBitmap")) {
+ fromNativeType(handle, QPixmapData::FbsBitmap);
+ return true;
+ }
+ return false;
+}
+
+void QGLPixmapData::createFromNativeImageHandleProvider()
+{
+ void *handle = 0;
+ QString type;
+ nativeImageHandleProvider->get(&handle, &type);
+ if (handle) {
+ if (initFromNativeImageHandle(handle, type)) {
+ nativeImageHandle = handle;
+ nativeImageType = type;
+ } else {
+ qWarning("QGLPixmapData: Unknown native image type '%s'", qPrintable(type));
+ }
+ } else {
+ qWarning("QGLPixmapData: Native handle is null");
+ }
+}
+
+void QGLPixmapData::releaseNativeImageHandle()
+{
+ if (nativeImageHandleProvider && nativeImageHandle) {
+ nativeImageHandleProvider->release(nativeImageHandle, nativeImageType);
+ nativeImageHandle = 0;
+ nativeImageType = QString();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index ae61ca111e..0e879df4a9 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -43,13 +43,13 @@
#include <private/qgl_p.h>
#include <private/qglpixelbuffer_p.h>
#include <private/qglframebufferobject_p.h>
-#include <private/qwindowsurface_gl_p.h>
#ifdef Q_WS_X11
#include <private/qpixmapdata_x11gl_p.h>
#endif
#if !defined(QT_OPENGL_ES_1)
#include <private/qpixmapdata_gl_p.h>
+#include <private/qwindowsurface_gl_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp
new file mode 100644
index 0000000000..a5472ece7f
--- /dev/null
+++ b/src/opengl/qgltexturepool.cpp
@@ -0,0 +1,244 @@
+/****************************************************************************
+**
+** 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 QtOpenVG module 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$
+**
+****************************************************************************/
+
+#include "qgltexturepool_p.h"
+#include "qpixmapdata_gl_p.h"
+
+QT_BEGIN_NAMESPACE
+
+Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget();
+
+static QGLTexturePool *qt_gl_texture_pool = 0;
+
+class QGLTexturePoolPrivate
+{
+public:
+ QGLTexturePoolPrivate() : lruFirst(0), lruLast(0) {}
+
+ QGLPixmapData *lruFirst;
+ QGLPixmapData *lruLast;
+};
+
+QGLTexturePool::QGLTexturePool()
+ : d_ptr(new QGLTexturePoolPrivate())
+{
+}
+
+QGLTexturePool::~QGLTexturePool()
+{
+}
+
+QGLTexturePool *QGLTexturePool::instance()
+{
+ if (!qt_gl_texture_pool)
+ qt_gl_texture_pool = new QGLTexturePool();
+ return qt_gl_texture_pool;
+}
+
+GLuint QGLTexturePool::createTextureForPixmap(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ QGLPixmapData *data)
+{
+ GLuint texture;
+ glGenTextures(1, &texture);
+ glBindTexture(target, texture);
+ do {
+ glTexImage2D(target, level, internalformat, width, height, 0, format, type, 0);
+ GLenum error = glGetError();
+ if (error == GL_NO_ERROR) {
+ if (data)
+ moveToHeadOfLRU(data);
+ return texture;
+ } else if (error != GL_OUT_OF_MEMORY) {
+ qWarning("QGLTexturePool: cannot create temporary texture because of invalid params");
+ return 0;
+ }
+ } while (reclaimSpace(internalformat, width, height, format, type, data));
+ qWarning("QGLTexturePool: cannot reclaim sufficient space for a %dx%d pixmap",
+ width, height);
+ return 0;
+}
+
+bool QGLTexturePool::createPermanentTexture(GLuint texture,
+ GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const GLvoid *data)
+{
+ glBindTexture(target, texture);
+ do {
+ glTexImage2D(target, level, internalformat, width, height, 0, format, type, data);
+
+ GLenum error = glGetError();
+ if (error == GL_NO_ERROR) {
+ return true;
+ } else if (error != GL_OUT_OF_MEMORY) {
+ qWarning("QGLTexturePool: cannot create permanent texture because of invalid params");
+ return false;
+ }
+ } while (reclaimSpace(internalformat, width, height, format, type, 0));
+ qWarning("QGLTexturePool: cannot reclaim sufficient space for a %dx%d pixmap",
+ width, height);
+ return 0;
+}
+
+void QGLTexturePool::releaseTexture(QGLPixmapData *data, GLuint texture)
+{
+ // Very simple strategy at the moment: just destroy the texture.
+ if (data)
+ removeFromLRU(data);
+
+ QGLWidget *shareWidget = qt_gl_share_widget();
+ if (shareWidget) {
+ QGLShareContextScope ctx(shareWidget->context());
+ glDeleteTextures(1, &texture);
+ }
+}
+
+void QGLTexturePool::useTexture(QGLPixmapData *data)
+{
+ moveToHeadOfLRU(data);
+}
+
+void QGLTexturePool::detachTexture(QGLPixmapData *data)
+{
+ removeFromLRU(data);
+}
+
+bool QGLTexturePool::reclaimSpace(GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ QGLPixmapData *data)
+{
+ Q_UNUSED(internalformat); // For future use in picking the best texture to eject.
+ Q_UNUSED(width);
+ Q_UNUSED(height);
+ Q_UNUSED(format);
+ Q_UNUSED(type);
+
+ bool succeeded = false;
+ bool wasInLRU = false;
+ if (data) {
+ wasInLRU = data->inLRU;
+ moveToHeadOfLRU(data);
+ }
+
+ QGLPixmapData *lrudata = pixmapLRU();
+ if (lrudata && lrudata != data) {
+ lrudata->reclaimTexture();
+ succeeded = true;
+ }
+
+ if (data && !wasInLRU)
+ removeFromLRU(data);
+
+ return succeeded;
+}
+
+void QGLTexturePool::hibernate()
+{
+ Q_D(QGLTexturePool);
+ QGLPixmapData *pd = d->lruLast;
+ while (pd) {
+ QGLPixmapData *prevLRU = pd->prevLRU;
+ pd->inTexturePool = false;
+ pd->inLRU = false;
+ pd->nextLRU = 0;
+ pd->prevLRU = 0;
+ pd->hibernate();
+ pd = prevLRU;
+ }
+ d->lruFirst = 0;
+ d->lruLast = 0;
+}
+
+void QGLTexturePool::moveToHeadOfLRU(QGLPixmapData *data)
+{
+ Q_D(QGLTexturePool);
+ if (data->inLRU) {
+ if (!data->prevLRU)
+ return; // Already at the head of the list.
+ removeFromLRU(data);
+ }
+ data->inLRU = true;
+ data->nextLRU = d->lruFirst;
+ data->prevLRU = 0;
+ if (d->lruFirst)
+ d->lruFirst->prevLRU = data;
+ else
+ d->lruLast = data;
+ d->lruFirst = data;
+}
+
+void QGLTexturePool::removeFromLRU(QGLPixmapData *data)
+{
+ Q_D(QGLTexturePool);
+ if (!data->inLRU)
+ return;
+ if (data->nextLRU)
+ data->nextLRU->prevLRU = data->prevLRU;
+ else
+ d->lruLast = data->prevLRU;
+ if (data->prevLRU)
+ data->prevLRU->nextLRU = data->nextLRU;
+ else
+ d->lruFirst = data->nextLRU;
+ data->inLRU = false;
+}
+
+QGLPixmapData *QGLTexturePool::pixmapLRU()
+{
+ Q_D(QGLTexturePool);
+ return d->lruLast;
+}
+
+QT_END_NAMESPACE
diff --git a/src/opengl/qgltexturepool_p.h b/src/opengl/qgltexturepool_p.h
new file mode 100644
index 0000000000..8b6f726316
--- /dev/null
+++ b/src/opengl/qgltexturepool_p.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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 QtOpenVG module 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$
+**
+****************************************************************************/
+
+#ifndef QGLTEXTUREPOOL_P_H
+#define QGLTEXTUREPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qgl.h"
+#include <QtCore/qscopedpointer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QGLPixmapData;
+class QGLTexturePoolPrivate;
+
+class QGLTexturePool
+{
+public:
+ QGLTexturePool();
+ virtual ~QGLTexturePool();
+
+ static QGLTexturePool *instance();
+
+ // Create a new texture with the specified parameters and associate
+ // it with "data". The QGLPixmapData will be notified when the
+ // texture needs to be reclaimed by the pool.
+ //
+ // This function will call reclaimSpace() when texture creation fails.
+ GLuint createTextureForPixmap(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ QGLPixmapData *data);
+
+ // Create a permanent texture with the specified parameters.
+ // If there is insufficient space for the texture,
+ // then this function will call reclaimSpace() and try again.
+ //
+ // The caller is responsible for calling glDeleteTextures()
+ // when it no longer needs the texture, as the texture is not
+ // recorded in the texture pool.
+ bool createPermanentTexture(GLuint texture,
+ GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const GLvoid *data);
+
+ // Release a texture that is no longer required.
+ void releaseTexture(QGLPixmapData *data, GLuint texture);
+
+ // Notify the pool that a QGLPixmapData object is using
+ // an texture again. This allows the pool to move the texture
+ // within a least-recently-used list of QGLPixmapData objects.
+ void useTexture(QGLPixmapData *data);
+
+ // Notify the pool that the texture associated with a
+ // QGLPixmapData is being detached from the pool. The caller
+ // will become responsible for calling glDeleteTextures().
+ void detachTexture(QGLPixmapData *data);
+
+ // Reclaim space for an image allocation with the specified parameters.
+ // Returns true if space was reclaimed, or false if there is no
+ // further space that can be reclaimed. The "data" parameter
+ // indicates the pixmap that is trying to obtain space which should
+ // not itself be reclaimed.
+ bool reclaimSpace(GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ QGLPixmapData *data);
+
+ // Hibernate the image pool because the context is about to be
+ // destroyed. All textures left in the pool should be released.
+ void hibernate();
+
+protected:
+ // Helper functions for managing the LRU list of QGLPixmapData objects.
+ void moveToHeadOfLRU(QGLPixmapData *data);
+ void removeFromLRU(QGLPixmapData *data);
+ QGLPixmapData *pixmapLRU();
+
+private:
+ QScopedPointer<QGLTexturePoolPrivate> d_ptr;
+
+ Q_DECLARE_PRIVATE(QGLTexturePool)
+ Q_DISABLE_COPY(QGLTexturePool)
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp
index 79911fb46b..0aa3c2e6c7 100644
--- a/src/opengl/qgraphicssystem_gl.cpp
+++ b/src/opengl/qgraphicssystem_gl.cpp
@@ -53,6 +53,14 @@
#include "private/qwindowsurface_x11gl_p.h"
#endif
+#if defined(Q_OS_SYMBIAN)
+#include <QtGui/private/qapplication_p.h>
+#endif
+
+#ifdef QGL_USE_TEXTURE_POOL
+#include "private/qgltexturepool_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
extern QGLWidget *qt_gl_getShareWidget();
@@ -86,8 +94,21 @@ QWindowSurface *QGLGraphicsSystem::createWindowSurface(QWidget *widget) const
}
#endif
+#if defined(Q_OS_SYMBIAN)
+ if (!QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ QWidgetPrivate *d = qt_widget_private(widget);
+ if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
+ return d->createDefaultWindowSurface_sys();
+ }
+#endif
+
return new QGLWindowSurface(widget);
}
-
+#ifdef QGL_USE_TEXTURE_POOL
+void QGLGraphicsSystem::releaseCachedResources()
+{
+ QGLTexturePool::instance()->hibernate();
+}
+#endif
QT_END_NAMESPACE
diff --git a/src/opengl/qgraphicssystem_gl_p.h b/src/opengl/qgraphicssystem_gl_p.h
index 4630da1c09..5829dccea9 100644
--- a/src/opengl/qgraphicssystem_gl_p.h
+++ b/src/opengl/qgraphicssystem_gl_p.h
@@ -66,6 +66,10 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
+
+#ifdef QGL_USE_TEXTURE_POOL
+ void releaseCachedResources();
+#endif
private:
bool m_useX11GL;
};
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 43e80c189d..70427d5a35 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -55,10 +55,11 @@
#include <qdesktopwidget.h>
#include <qfile.h>
#include <qimagereader.h>
+#include <qbuffer.h>
QT_BEGIN_NAMESPACE
-extern QGLWidget* qt_gl_share_widget();
+Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget();
/*!
\class QGLFramebufferObjectPool
@@ -369,40 +370,18 @@ void QGLPixmapData::ensureCreated() const
void QGLPixmapData::fromImage(const QImage &image,
Qt::ImageConversionFlags flags)
{
- if (image.size() == QSize(w, h))
- setSerialNumber(++qt_gl_pixmap_serial);
- resize(image.width(), image.height());
-
- if (pixelType() == BitmapType) {
- m_source = image.convertToFormat(QImage::Format_MonoLSB);
-
- } else {
- QImage::Format format = QImage::Format_RGB32;
- if (qApp->desktop()->depth() == 16)
- format = QImage::Format_RGB16;
-
- if (image.hasAlphaChannel()
- && ((flags & Qt::NoOpaqueDetection)
- || const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels()))
- format = QImage::Format_ARGB32_Premultiplied;;
-
- m_source = image.convertToFormat(format);
- }
-
- m_dirty = true;
- m_hasFillColor = false;
+ QImage img = image;
+ createPixmapForImage(img, flags, false);
+}
- m_hasAlpha = m_source.hasAlphaChannel();
- w = image.width();
- h = image.height();
- is_null = (w <= 0 || h <= 0);
- d = m_source.depth();
+void QGLPixmapData::fromImageReader(QImageReader *imageReader,
+ Qt::ImageConversionFlags flags)
+{
+ QImage image = imageReader->read();
+ if (image.isNull())
+ return;
- if (m_texture.id) {
- QGLShareContextScope ctx(qt_gl_share_widget()->context());
- glDeleteTextures(1, &m_texture.id);
- m_texture.id = 0;
- }
+ createPixmapForImage(image, flags, true);
}
bool QGLPixmapData::fromFile(const QString &filename, const char *format,
@@ -411,31 +390,37 @@ bool QGLPixmapData::fromFile(const QString &filename, const char *format,
if (pixelType() == QPixmapData::BitmapType)
return QPixmapData::fromFile(filename, format, flags);
QFile file(filename);
- if (!file.open(QIODevice::ReadOnly))
- return false;
- QByteArray data = file.peek(64);
- bool alpha;
- if (m_texture.canBindCompressedTexture
- (data.constData(), data.size(), format, &alpha)) {
- resize(0, 0);
- data = file.readAll();
- file.close();
- QGLShareContextScope ctx(qt_gl_share_widget()->context());
- QSize size = m_texture.bindCompressedTexture
- (data.constData(), data.size(), format);
- if (!size.isEmpty()) {
- w = size.width();
- h = size.height();
- is_null = false;
- d = 32;
- m_hasAlpha = alpha;
- m_source = QImage();
- m_dirty = isValid();
- return true;
+ if (file.open(QIODevice::ReadOnly)) {
+ QByteArray data = file.peek(64);
+ bool alpha;
+ if (m_texture.canBindCompressedTexture
+ (data.constData(), data.size(), format, &alpha)) {
+ resize(0, 0);
+ data = file.readAll();
+ file.close();
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QSize size = m_texture.bindCompressedTexture
+ (data.constData(), data.size(), format);
+ if (!size.isEmpty()) {
+ w = size.width();
+ h = size.height();
+ is_null = false;
+ d = 32;
+ m_hasAlpha = alpha;
+ m_source = QImage();
+ m_dirty = isValid();
+ return true;
+ }
+ return false;
}
- return false;
}
- fromImage(QImageReader(&file, format).read(), flags);
+
+ QImage image = QImageReader(filename, format).read();
+ if (image.isNull())
+ return false;
+
+ createPixmapForImage(image, flags, true);
+
return !isNull();
}
@@ -459,7 +444,67 @@ bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format,
return true;
}
}
- return QPixmapData::fromData(buffer, len, format, flags);
+
+ QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buffer), len);
+ QBuffer b(&a);
+ b.open(QIODevice::ReadOnly);
+ QImage image = QImageReader(&b, format).read();
+ if (image.isNull())
+ return false;
+
+ createPixmapForImage(image, flags, true);
+
+ return !isNull();
+}
+
+/*!
+ out-of-place conversion (inPlace == false) will always detach()
+ */
+void QGLPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
+{
+ if (image.size() == QSize(w, h))
+ setSerialNumber(++qt_gl_pixmap_serial);
+
+ resize(image.width(), image.height());
+
+ if (pixelType() == BitmapType) {
+ m_source = image.convertToFormat(QImage::Format_MonoLSB);
+
+ } else {
+ QImage::Format format = QImage::Format_RGB32;
+ if (qApp->desktop()->depth() == 16)
+ format = QImage::Format_RGB16;
+
+ if (image.hasAlphaChannel()
+ && ((flags & Qt::NoOpaqueDetection)
+ || const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels()))
+ format = QImage::Format_ARGB32_Premultiplied;;
+
+ if (inPlace && image.data_ptr()->convertInPlace(format, flags)) {
+ m_source = image;
+ } else {
+ m_source = image.convertToFormat(format);
+
+ // convertToFormat won't detach the image if format stays the same.
+ if (image.format() == format)
+ m_source.detach();
+ }
+ }
+
+ m_dirty = true;
+ m_hasFillColor = false;
+
+ m_hasAlpha = m_source.hasAlphaChannel();
+ w = image.width();
+ h = image.height();
+ is_null = (w <= 0 || h <= 0);
+ d = m_source.depth();
+
+ if (m_texture.id) {
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ glDeleteTextures(1, &m_texture.id);
+ m_texture.id = 0;
+ }
}
bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect)
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h
index 5545d3c5a7..8855c20362 100644
--- a/src/opengl/qpixmapdata_gl_p.h
+++ b/src/opengl/qpixmapdata_gl_p.h
@@ -59,6 +59,10 @@
#include "private/qpixmapdata_p.h"
#include "private/qglpaintdevice_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "private/qvolatileimage_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
class QPaintEngine;
@@ -66,6 +70,16 @@ class QGLFramebufferObject;
class QGLFramebufferObjectFormat;
class QGLPixmapData;
+#ifdef QGL_USE_TEXTURE_POOL
+void qt_gl_register_pixmap(QGLPixmapData *pd);
+void qt_gl_unregister_pixmap(QGLPixmapData *pd);
+void qt_gl_hibernate_pixmaps();
+#endif
+
+#ifdef Q_OS_SYMBIAN
+class QNativeImageHandleProvider;
+#endif
+
class QGLFramebufferObjectPool
{
public:
@@ -107,6 +121,8 @@ public:
// Re-implemented from QPixmapData:
void resize(int width, int height);
void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
+ void fromImageReader(QImageReader *imageReader,
+ Qt::ImageConversionFlags flags);
bool fromFile(const QString &filename, const char *format,
Qt::ImageConversionFlags flags);
bool fromData(const uchar *buffer, uint len, const char *format,
@@ -127,6 +143,32 @@ public:
GLuint bind(bool copyBack = true) const;
QGLTexture *texture() const;
+#ifdef QGL_USE_TEXTURE_POOL
+ void destroyTexture();
+ // Detach this image from the image pool.
+ void detachTextureFromPool();
+ // Release the GL resources associated with this pixmap and copy
+ // the pixmap's contents out of the GPU back into main memory.
+ // The GL resource will be automatically recreated the next time
+ // ensureCreated() is called. Does nothing if the pixmap cannot be
+ // hibernated for some reason (e.g. texture is shared with another
+ // process via a SgImage).
+ void hibernate();
+ // Called when the QGLTexturePool wants to reclaim this pixmap's
+ // texture objects to reuse storage.
+ void reclaimTexture();
+ void forceToImage();
+#endif
+
+#ifdef Q_OS_SYMBIAN
+ QImage::Format idealFormat(QImage &image, Qt::ImageConversionFlags flags);
+ void* toNativeType(NativeType type);
+ void fromNativeType(void* pixmap, NativeType type);
+ bool initFromNativeImageHandle(void *handle, const QString &type);
+ void createFromNativeImageHandleProvider();
+ void releaseNativeImageHandle();
+#endif
+
private:
bool isValid() const;
@@ -149,10 +191,19 @@ private:
QImage fillImage(const QColor &color) const;
+ void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace);
+
mutable QGLFramebufferObject *m_renderFbo;
mutable QPaintEngine *m_engine;
mutable QGLContext *m_ctx;
+#ifdef Q_OS_SYMBIAN
+ mutable QVolatileImage m_source;
+ mutable QNativeImageHandleProvider *nativeImageHandleProvider;
+ void *nativeImageHandle;
+ QString nativeImageType;
+#else
mutable QImage m_source;
+#endif
mutable QGLTexture m_texture;
// the texture is not in sync with the source image
@@ -167,6 +218,23 @@ private:
mutable QGLPixmapGLPaintDevice m_glDevice;
+#ifdef QGL_USE_TEXTURE_POOL
+ QGLPixmapData *nextLRU;
+ QGLPixmapData *prevLRU;
+ mutable bool inLRU;
+ mutable bool failedToAlloc;
+ mutable bool inTexturePool;
+
+ QGLPixmapData *next;
+ QGLPixmapData *prev;
+
+ friend class QGLTexturePool;
+
+ friend void qt_gl_register_pixmap(QGLPixmapData *pd);
+ friend void qt_gl_unregister_pixmap(QGLPixmapData *pd);
+ friend void qt_gl_hibernate_pixmaps();
+#endif
+
friend class QGLPixmapGLPaintDevice;
friend class QMeeGoPixmapData;
friend class QMeeGoLivePixmapData;
diff --git a/src/opengl/qpixmapdata_poolgl.cpp b/src/opengl/qpixmapdata_poolgl.cpp
new file mode 100644
index 0000000000..95152dd5f3
--- /dev/null
+++ b/src/opengl/qpixmapdata_poolgl.cpp
@@ -0,0 +1,936 @@
+/****************************************************************************
+**
+** 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 QtOpenGL module 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$
+**
+****************************************************************************/
+
+#include "qpixmap.h"
+#include "qglframebufferobject.h"
+
+#include <private/qpaintengine_raster_p.h>
+
+#include "qpixmapdata_gl_p.h"
+
+#include <private/qgl_p.h>
+#include <private/qdrawhelper_p.h>
+#include <private/qimage_p.h>
+#include <private/qnativeimagehandleprovider_p.h>
+
+#include <private/qpaintengineex_opengl2_p.h>
+
+#include <qdesktopwidget.h>
+#include <qfile.h>
+#include <qimagereader.h>
+#include <qbuffer.h>
+
+#include "qgltexturepool_p.h"
+
+QT_BEGIN_NAMESPACE
+
+Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget();
+
+static inline int areaDiff(const QSize &size, const QGLFramebufferObject *fbo)
+{
+ return qAbs(size.width() * size.height() - fbo->width() * fbo->height());
+}
+
+extern int qt_next_power_of_two(int v);
+
+static inline QSize maybeRoundToNextPowerOfTwo(const QSize &sz)
+{
+#ifdef QT_OPENGL_ES_2
+ QSize rounded(qt_next_power_of_two(sz.width()), qt_next_power_of_two(sz.height()));
+ if (rounded.width() * rounded.height() < 1.20 * sz.width() * sz.height())
+ return rounded;
+#endif
+ return sz;
+}
+
+
+QGLFramebufferObject *QGLFramebufferObjectPool::acquire(const QSize &requestSize, const QGLFramebufferObjectFormat &requestFormat, bool strictSize)
+{
+ QGLFramebufferObject *chosen = 0;
+ QGLFramebufferObject *candidate = 0;
+ for (int i = 0; !chosen && i < m_fbos.size(); ++i) {
+ QGLFramebufferObject *fbo = m_fbos.at(i);
+
+ if (strictSize) {
+ if (fbo->size() == requestSize && fbo->format() == requestFormat) {
+ chosen = fbo;
+ break;
+ } else {
+ continue;
+ }
+ }
+
+ if (fbo->format() == requestFormat) {
+ // choose the fbo with a matching format and the closest size
+ if (!candidate || areaDiff(requestSize, candidate) > areaDiff(requestSize, fbo))
+ candidate = fbo;
+ }
+
+ if (candidate) {
+ m_fbos.removeOne(candidate);
+
+ const QSize fboSize = candidate->size();
+ QSize sz = fboSize;
+
+ if (sz.width() < requestSize.width())
+ sz.setWidth(qMax(requestSize.width(), qRound(sz.width() * 1.5)));
+ if (sz.height() < requestSize.height())
+ sz.setHeight(qMax(requestSize.height(), qRound(sz.height() * 1.5)));
+
+ // wasting too much space?
+ if (sz.width() * sz.height() > requestSize.width() * requestSize.height() * 4)
+ sz = requestSize;
+
+ if (sz != fboSize) {
+ delete candidate;
+ candidate = new QGLFramebufferObject(maybeRoundToNextPowerOfTwo(sz), requestFormat);
+ }
+
+ chosen = candidate;
+ }
+ }
+
+ if (!chosen) {
+ if (strictSize)
+ chosen = new QGLFramebufferObject(requestSize, requestFormat);
+ else
+ chosen = new QGLFramebufferObject(maybeRoundToNextPowerOfTwo(requestSize), requestFormat);
+ }
+
+ if (!chosen->isValid()) {
+ delete chosen;
+ chosen = 0;
+ }
+
+ return chosen;
+}
+
+void QGLFramebufferObjectPool::release(QGLFramebufferObject *fbo)
+{
+ if (fbo)
+ m_fbos << fbo;
+}
+
+
+QPaintEngine* QGLPixmapGLPaintDevice::paintEngine() const
+{
+ return data->paintEngine();
+}
+
+void QGLPixmapGLPaintDevice::beginPaint()
+{
+ if (!data->isValid())
+ return;
+
+ // QGLPaintDevice::beginPaint will store the current binding and replace
+ // it with m_thisFBO:
+ m_thisFBO = data->m_renderFbo->handle();
+ QGLPaintDevice::beginPaint();
+
+ Q_ASSERT(data->paintEngine()->type() == QPaintEngine::OpenGL2);
+
+ // QPixmap::fill() is deferred until now, where we actually need to do the fill:
+ if (data->needsFill()) {
+ const QColor &c = data->fillColor();
+ float alpha = c.alphaF();
+ glDisable(GL_SCISSOR_TEST);
+ glClearColor(c.redF() * alpha, c.greenF() * alpha, c.blueF() * alpha, alpha);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+ else if (!data->isUninitialized()) {
+ // If the pixmap (GL Texture) has valid content (it has been
+ // uploaded from an image or rendered into before), we need to
+ // copy it from the texture to the render FBO.
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_BLEND);
+
+#if !defined(QT_OPENGL_ES_2)
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, data->width(), data->height(), 0, -999999, 999999);
+#endif
+
+ glViewport(0, 0, data->width(), data->height());
+
+ // Pass false to bind so it doesn't copy the FBO into the texture!
+ context()->drawTexture(QRect(0, 0, data->width(), data->height()), data->bind(false));
+ }
+}
+
+void QGLPixmapGLPaintDevice::endPaint()
+{
+ if (!data->isValid())
+ return;
+
+ data->copyBackFromRenderFbo(false);
+
+ // Base's endPaint will restore the previous FBO binding
+ QGLPaintDevice::endPaint();
+
+ qgl_fbo_pool()->release(data->m_renderFbo);
+ data->m_renderFbo = 0;
+}
+
+QGLContext* QGLPixmapGLPaintDevice::context() const
+{
+ data->ensureCreated();
+ return data->m_ctx;
+}
+
+QSize QGLPixmapGLPaintDevice::size() const
+{
+ return data->size();
+}
+
+bool QGLPixmapGLPaintDevice::alphaRequested() const
+{
+ return data->m_hasAlpha;
+}
+
+void QGLPixmapGLPaintDevice::setPixmapData(QGLPixmapData* d)
+{
+ data = d;
+}
+
+int qt_gl_pixmap_serial = 0;
+
+QGLPixmapData::QGLPixmapData(PixelType type)
+ : QPixmapData(type, OpenGLClass)
+ , m_renderFbo(0)
+ , m_engine(0)
+ , m_ctx(0)
+ , nativeImageHandleProvider(0)
+ , nativeImageHandle(0)
+ , m_dirty(false)
+ , m_hasFillColor(false)
+ , m_hasAlpha(false)
+ , inLRU(false)
+ , failedToAlloc(false)
+ , inTexturePool(false)
+{
+ setSerialNumber(++qt_gl_pixmap_serial);
+ m_glDevice.setPixmapData(this);
+
+ qt_gl_register_pixmap(this);
+}
+
+QGLPixmapData::~QGLPixmapData()
+{
+ delete m_engine;
+
+ destroyTexture();
+ qt_gl_unregister_pixmap(this);
+}
+
+void QGLPixmapData::destroyTexture()
+{
+ if (inTexturePool) {
+ QGLTexturePool *pool = QGLTexturePool::instance();
+ if (m_texture.id)
+ pool->releaseTexture(this, m_texture.id);
+ } else {
+ if (m_texture.id) {
+ QGLWidget *shareWidget = qt_gl_share_widget();
+ if (shareWidget) {
+ QGLShareContextScope ctx(shareWidget->context());
+ glDeleteTextures(1, &m_texture.id);
+ }
+ }
+ }
+ m_texture.id = 0;
+ inTexturePool = false;
+
+ releaseNativeImageHandle();
+}
+
+QPixmapData *QGLPixmapData::createCompatiblePixmapData() const
+{
+ return new QGLPixmapData(pixelType());
+}
+
+bool QGLPixmapData::isValid() const
+{
+ return w > 0 && h > 0;
+}
+
+bool QGLPixmapData::isValidContext(const QGLContext *ctx) const
+{
+ if (ctx == m_ctx)
+ return true;
+
+ const QGLContext *share_ctx = qt_gl_share_widget()->context();
+ return ctx == share_ctx || QGLContext::areSharing(ctx, share_ctx);
+}
+
+void QGLPixmapData::resize(int width, int height)
+{
+ if (width == w && height == h)
+ return;
+
+ if (width <= 0 || height <= 0) {
+ width = 0;
+ height = 0;
+ }
+
+ w = width;
+ h = height;
+ is_null = (w <= 0 || h <= 0);
+ d = pixelType() == QPixmapData::PixmapType ? 32 : 1;
+
+ destroyTexture();
+
+ m_source = QVolatileImage();
+ m_dirty = isValid();
+ setSerialNumber(++qt_gl_pixmap_serial);
+}
+
+void QGLPixmapData::ensureCreated() const
+{
+ if (!m_dirty)
+ return;
+
+ m_dirty = false;
+
+ if (nativeImageHandleProvider && !nativeImageHandle)
+ const_cast<QGLPixmapData *>(this)->createFromNativeImageHandleProvider();
+
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ m_ctx = ctx;
+
+ const GLenum internal_format = m_hasAlpha ? GL_RGBA : GL_RGB;
+#ifdef QT_OPENGL_ES_2
+ const GLenum external_format = internal_format;
+#else
+ const GLenum external_format = qt_gl_preferredTextureFormat();
+#endif
+ const GLenum target = GL_TEXTURE_2D;
+
+ GLenum type = GL_UNSIGNED_BYTE;
+ // Avoid conversion when pixmap is created from CFbsBitmap of EColor64K.
+ if (!m_source.isNull() && m_source.format() == QImage::Format_RGB16)
+ type = GL_UNSIGNED_SHORT_5_6_5;
+
+ m_texture.options &= ~QGLContext::MemoryManagedBindOption;
+
+ if (!m_texture.id) {
+ m_texture.id = QGLTexturePool::instance()->createTextureForPixmap(
+ target,
+ 0, internal_format,
+ w, h,
+ external_format,
+ type,
+ const_cast<QGLPixmapData*>(this));
+ if (!m_texture.id) {
+ failedToAlloc = true;
+ return;
+ }
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+ inTexturePool = true;
+ } else if (inTexturePool) {
+ glBindTexture(target, m_texture.id);
+ QGLTexturePool::instance()->useTexture(const_cast<QGLPixmapData*>(this));
+ }
+
+ if (!m_source.isNull() && m_texture.id) {
+ if (external_format == GL_RGB) {
+ m_source.beginDataAccess();
+ QImage tx;
+ if (type == GL_UNSIGNED_BYTE)
+ tx = m_source.imageRef().convertToFormat(QImage::Format_RGB888).mirrored(false, true);
+ else if (type == GL_UNSIGNED_SHORT_5_6_5)
+ tx = m_source.imageRef().mirrored(false, true);
+ m_source.endDataAccess(true);
+
+ glBindTexture(target, m_texture.id);
+ if (!tx.isNull())
+ glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
+ type, tx.constBits());
+ else
+ qWarning("QGLPixmapData: Failed to create GL_RGB image of size %dx%d", w, h);
+ } else {
+ // do byte swizzling ARGB -> RGBA
+ m_source.beginDataAccess();
+ const QImage tx = ctx->d_func()->convertToGLFormat(m_source.imageRef(), true, external_format);
+ m_source.endDataAccess(true);
+ glBindTexture(target, m_texture.id);
+ if (!tx.isNull())
+ glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
+ type, tx.constBits());
+ else
+ qWarning("QGLPixmapData: Failed to create GL_RGBA image of size %dx%d", w, h);
+ }
+
+ if (useFramebufferObjects())
+ m_source = QVolatileImage();
+ }
+}
+
+
+void QGLPixmapData::fromImage(const QImage &image,
+ Qt::ImageConversionFlags flags)
+{
+ QImage img = image;
+ createPixmapForImage(img, flags, false);
+}
+
+void QGLPixmapData::fromImageReader(QImageReader *imageReader,
+ Qt::ImageConversionFlags flags)
+{
+ QImage image = imageReader->read();
+ if (image.isNull())
+ return;
+
+ createPixmapForImage(image, flags, true);
+}
+
+bool QGLPixmapData::fromFile(const QString &filename, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ if (pixelType() == QPixmapData::BitmapType)
+ return QPixmapData::fromFile(filename, format, flags);
+ QFile file(filename);
+ if (file.open(QIODevice::ReadOnly)) {
+ QByteArray data = file.peek(64);
+ bool alpha;
+ if (m_texture.canBindCompressedTexture
+ (data.constData(), data.size(), format, &alpha)) {
+ resize(0, 0);
+ data = file.readAll();
+ file.close();
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QSize size = m_texture.bindCompressedTexture
+ (data.constData(), data.size(), format);
+ if (!size.isEmpty()) {
+ w = size.width();
+ h = size.height();
+ is_null = false;
+ d = 32;
+ m_hasAlpha = alpha;
+ m_source = QVolatileImage();
+ m_dirty = isValid();
+ return true;
+ }
+ return false;
+ }
+ }
+
+ QImage image = QImageReader(filename, format).read();
+ if (image.isNull())
+ return false;
+
+ createPixmapForImage(image, flags, true);
+
+ return !isNull();
+}
+
+bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ bool alpha;
+ const char *buf = reinterpret_cast<const char *>(buffer);
+ if (m_texture.canBindCompressedTexture(buf, int(len), format, &alpha)) {
+ resize(0, 0);
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QSize size = m_texture.bindCompressedTexture(buf, int(len), format);
+ if (!size.isEmpty()) {
+ w = size.width();
+ h = size.height();
+ is_null = false;
+ d = 32;
+ m_hasAlpha = alpha;
+ m_source = QVolatileImage();
+ m_dirty = isValid();
+ return true;
+ }
+ }
+
+ QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buffer), len);
+ QBuffer b(&a);
+ b.open(QIODevice::ReadOnly);
+ QImage image = QImageReader(&b, format).read();
+ if (image.isNull())
+ return false;
+
+ createPixmapForImage(image, flags, true);
+
+ return !isNull();
+}
+
+QImage::Format QGLPixmapData::idealFormat(QImage &image, Qt::ImageConversionFlags flags)
+{
+ QImage::Format format = QImage::Format_RGB32;
+ if (qApp->desktop()->depth() == 16)
+ format = QImage::Format_RGB16;
+
+ if (image.hasAlphaChannel()
+ && ((flags & Qt::NoOpaqueDetection)
+ || const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels()))
+ format = QImage::Format_ARGB32_Premultiplied;
+
+ return format;
+}
+
+void QGLPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
+{
+ if (image.size() == QSize(w, h))
+ setSerialNumber(++qt_gl_pixmap_serial);
+
+ resize(image.width(), image.height());
+
+ if (pixelType() == BitmapType) {
+ QImage convertedImage = image.convertToFormat(QImage::Format_MonoLSB);
+ if (image.format() == QImage::Format_MonoLSB)
+ convertedImage.detach();
+
+ m_source = QVolatileImage(convertedImage);
+
+ } else {
+ QImage::Format format = idealFormat(image, flags);
+
+ if (inPlace && image.data_ptr()->convertInPlace(format, flags)) {
+ m_source = QVolatileImage(image);
+ } else {
+ QImage convertedImage = image.convertToFormat(format);
+
+ // convertToFormat won't detach the image if format stays the same.
+ if (image.format() == format)
+ convertedImage.detach();
+
+ m_source = QVolatileImage(convertedImage);
+ }
+ }
+
+ m_dirty = true;
+ m_hasFillColor = false;
+
+ m_hasAlpha = m_source.hasAlphaChannel();
+ w = image.width();
+ h = image.height();
+ is_null = (w <= 0 || h <= 0);
+ d = m_source.depth();
+
+ destroyTexture();
+}
+
+bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect)
+{
+ Q_UNUSED(dx);
+ Q_UNUSED(dy);
+ Q_UNUSED(rect);
+ return false;
+}
+
+void QGLPixmapData::copy(const QPixmapData *data, const QRect &rect)
+{
+ if (data->classId() != QPixmapData::OpenGLClass || !static_cast<const QGLPixmapData *>(data)->useFramebufferObjects()) {
+ QPixmapData::copy(data, rect);
+ return;
+ }
+
+ const QGLPixmapData *other = static_cast<const QGLPixmapData *>(data);
+ if (other->m_renderFbo) {
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+
+ resize(rect.width(), rect.height());
+ m_hasAlpha = other->m_hasAlpha;
+ ensureCreated();
+
+ if (!ctx->d_ptr->fbo)
+ glGenFramebuffers(1, &ctx->d_ptr->fbo);
+
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, ctx->d_ptr->fbo);
+ glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_2D, m_texture.id, 0);
+
+ if (!other->m_renderFbo->isBound())
+ glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, other->m_renderFbo->handle());
+
+ glDisable(GL_SCISSOR_TEST);
+ if (ctx->d_ptr->active_engine && ctx->d_ptr->active_engine->type() == QPaintEngine::OpenGL2)
+ static_cast<QGL2PaintEngineEx *>(ctx->d_ptr->active_engine)->invalidateState();
+
+ glBlitFramebufferEXT(rect.x(), rect.y(), rect.x() + rect.width(), rect.y() + rect.height(),
+ 0, 0, w, h,
+ GL_COLOR_BUFFER_BIT,
+ GL_NEAREST);
+
+ glBindFramebuffer(GL_FRAMEBUFFER_EXT, ctx->d_ptr->current_fbo);
+ } else {
+ QPixmapData::copy(data, rect);
+ }
+}
+
+void QGLPixmapData::fill(const QColor &color)
+{
+ if (!isValid())
+ return;
+
+ bool hasAlpha = color.alpha() != 255;
+ if (hasAlpha && !m_hasAlpha) {
+ if (m_texture.id) {
+ destroyTexture();
+ m_dirty = true;
+ }
+ m_hasAlpha = color.alpha() != 255;
+ }
+
+ if (useFramebufferObjects()) {
+ m_source = QVolatileImage();
+ m_hasFillColor = true;
+ m_fillColor = color;
+ } else {
+ forceToImage();
+
+ if (m_source.depth() == 32) {
+ m_source.fill(PREMUL(color.rgba()));
+
+ } else if (m_source.depth() == 1) {
+ if (color == Qt::color1)
+ m_source.fill(1);
+ else
+ m_source.fill(0);
+ }
+ }
+}
+
+bool QGLPixmapData::hasAlphaChannel() const
+{
+ return m_hasAlpha;
+}
+
+QImage QGLPixmapData::fillImage(const QColor &color) const
+{
+ QImage img;
+ if (pixelType() == BitmapType) {
+ img = QImage(w, h, QImage::Format_MonoLSB);
+
+ img.setColorCount(2);
+ img.setColor(0, QColor(Qt::color0).rgba());
+ img.setColor(1, QColor(Qt::color1).rgba());
+
+ if (color == Qt::color1)
+ img.fill(1);
+ else
+ img.fill(0);
+ } else {
+ img = QImage(w, h,
+ m_hasAlpha
+ ? QImage::Format_ARGB32_Premultiplied
+ : QImage::Format_RGB32);
+ img.fill(PREMUL(color.rgba()));
+ }
+ return img;
+}
+
+extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha);
+
+QImage QGLPixmapData::toImage() const
+{
+ if (!isValid())
+ return QImage();
+
+ if (m_renderFbo) {
+ copyBackFromRenderFbo(true);
+ } else if (!m_source.isNull()) {
+ // QVolatileImage::toImage() will make a copy always so no check
+ // for active painting is needed.
+ QImage img = m_source.toImage();
+ if (img.format() == QImage::Format_MonoLSB) {
+ img.setColorCount(2);
+ img.setColor(0, QColor(Qt::color0).rgba());
+ img.setColor(1, QColor(Qt::color1).rgba());
+ }
+ return img;
+ } else if (m_dirty || m_hasFillColor) {
+ return fillImage(m_fillColor);
+ } else {
+ ensureCreated();
+ }
+
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ glBindTexture(GL_TEXTURE_2D, m_texture.id);
+ return qt_gl_read_texture(QSize(w, h), true, true);
+}
+
+struct TextureBuffer
+{
+ QGLFramebufferObject *fbo;
+ QGL2PaintEngineEx *engine;
+};
+
+Q_GLOBAL_STATIC(QGLFramebufferObjectPool, _qgl_fbo_pool)
+QGLFramebufferObjectPool* qgl_fbo_pool()
+{
+ return _qgl_fbo_pool();
+}
+
+void QGLPixmapData::copyBackFromRenderFbo(bool keepCurrentFboBound) const
+{
+ if (!isValid())
+ return;
+
+ m_hasFillColor = false;
+
+ const QGLContext *share_ctx = qt_gl_share_widget()->context();
+ QGLShareContextScope ctx(share_ctx);
+
+ ensureCreated();
+
+ if (!ctx->d_ptr->fbo)
+ glGenFramebuffers(1, &ctx->d_ptr->fbo);
+
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, ctx->d_ptr->fbo);
+ glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_2D, m_texture.id, 0);
+
+ const int x0 = 0;
+ const int x1 = w;
+ const int y0 = 0;
+ const int y1 = h;
+
+ if (!m_renderFbo->isBound())
+ glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_renderFbo->handle());
+
+ glDisable(GL_SCISSOR_TEST);
+
+ glBlitFramebufferEXT(x0, y0, x1, y1,
+ x0, y0, x1, y1,
+ GL_COLOR_BUFFER_BIT,
+ GL_NEAREST);
+
+ if (keepCurrentFboBound) {
+ glBindFramebuffer(GL_FRAMEBUFFER_EXT, ctx->d_ptr->current_fbo);
+ } else {
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_renderFbo->handle());
+ ctx->d_ptr->current_fbo = m_renderFbo->handle();
+ }
+}
+
+bool QGLPixmapData::useFramebufferObjects() const
+{
+#ifdef Q_OS_SYMBIAN
+ // We don't want to use FBOs on Symbian
+ return false;
+#else
+ return QGLFramebufferObject::hasOpenGLFramebufferObjects()
+ && QGLFramebufferObject::hasOpenGLFramebufferBlit()
+ && qt_gl_preferGL2Engine()
+ && (w * h > 32*32); // avoid overhead of FBOs for small pixmaps
+#endif
+}
+
+QPaintEngine* QGLPixmapData::paintEngine() const
+{
+ if (!isValid())
+ return 0;
+
+ if (m_renderFbo)
+ return m_engine;
+
+ if (useFramebufferObjects()) {
+ extern QGLWidget* qt_gl_share_widget();
+
+ if (!QGLContext::currentContext())
+ qt_gl_share_widget()->makeCurrent();
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+
+ QGLFramebufferObjectFormat format;
+ format.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
+ format.setSamples(4);
+ format.setInternalTextureFormat(GLenum(m_hasAlpha ? GL_RGBA : GL_RGB));
+
+ m_renderFbo = qgl_fbo_pool()->acquire(size(), format);
+
+ if (m_renderFbo) {
+ if (!m_engine)
+ m_engine = new QGL2PaintEngineEx;
+ return m_engine;
+ }
+
+ qWarning() << "Failed to create pixmap texture buffer of size " << size() << ", falling back to raster paint engine";
+ }
+
+ // If the application wants to paint into the QPixmap, we first
+ // force it to QImage format and then paint into that.
+ // This is simpler than juggling multiple GL contexts.
+ const_cast<QGLPixmapData *>(this)->forceToImage();
+
+ if (m_hasFillColor) {
+ m_source.fill(PREMUL(m_fillColor.rgba()));
+ m_hasFillColor = false;
+ }
+ return m_source.paintEngine();
+}
+
+extern QRgb qt_gl_convertToGLFormat(QRgb src_pixel, GLenum texture_format);
+
+// If copyBack is true, bind will copy the contents of the render
+// FBO to the texture (which is not bound to the texture, as it's
+// a multisample FBO).
+GLuint QGLPixmapData::bind(bool copyBack) const
+{
+ if (m_renderFbo && copyBack) {
+ copyBackFromRenderFbo(true);
+ } else {
+ ensureCreated();
+ }
+
+ GLuint id = m_texture.id;
+ glBindTexture(GL_TEXTURE_2D, id);
+
+ if (m_hasFillColor) {
+ if (!useFramebufferObjects()) {
+ m_source = QVolatileImage(w, h, QImage::Format_ARGB32_Premultiplied);
+ m_source.fill(PREMUL(m_fillColor.rgba()));
+ }
+
+ m_hasFillColor = false;
+
+ GLenum format = qt_gl_preferredTextureFormat();
+ QImage tx(w, h, QImage::Format_ARGB32_Premultiplied);
+ tx.fill(qt_gl_convertToGLFormat(m_fillColor.rgba(), format));
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, format, GL_UNSIGNED_BYTE, tx.constBits());
+ }
+
+ return id;
+}
+
+QGLTexture* QGLPixmapData::texture() const
+{
+ return &m_texture;
+}
+
+void QGLPixmapData::detachTextureFromPool()
+{
+ if (inTexturePool) {
+ QGLTexturePool::instance()->detachTexture(this);
+ inTexturePool = false;
+ }
+}
+
+void QGLPixmapData::hibernate()
+{
+ // If the image was imported (e.g, from an SgImage under Symbian), then
+ // skip the hibernation, there is no sense in copying it back to main
+ // memory because the data is most likely shared between several processes.
+ bool skipHibernate = (m_texture.id && m_source.isNull());
+#if defined(Q_OS_SYMBIAN)
+ // However we have to proceed normally if the image was retrieved via
+ // a handle provider.
+ skipHibernate &= !nativeImageHandleProvider;
+#endif
+ if (skipHibernate)
+ return;
+
+ forceToImage();
+ destroyTexture();
+}
+
+void QGLPixmapData::reclaimTexture()
+{
+ if (!inTexturePool)
+ return;
+ forceToImage();
+ destroyTexture();
+}
+
+Q_GUI_EXPORT int qt_defaultDpiX();
+Q_GUI_EXPORT int qt_defaultDpiY();
+
+int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
+{
+ if (w == 0)
+ return 0;
+
+ switch (metric) {
+ case QPaintDevice::PdmWidth:
+ return w;
+ case QPaintDevice::PdmHeight:
+ return h;
+ case QPaintDevice::PdmNumColors:
+ return 0;
+ case QPaintDevice::PdmDepth:
+ return d;
+ case QPaintDevice::PdmWidthMM:
+ return qRound(w * 25.4 / qt_defaultDpiX());
+ case QPaintDevice::PdmHeightMM:
+ return qRound(h * 25.4 / qt_defaultDpiY());
+ case QPaintDevice::PdmDpiX:
+ case QPaintDevice::PdmPhysicalDpiX:
+ return qt_defaultDpiX();
+ case QPaintDevice::PdmDpiY:
+ case QPaintDevice::PdmPhysicalDpiY:
+ return qt_defaultDpiY();
+ default:
+ qWarning("QGLPixmapData::metric(): Invalid metric");
+ return 0;
+ }
+}
+
+// Force the pixmap data to be backed by some valid data.
+void QGLPixmapData::forceToImage()
+{
+ if (!isValid())
+ return;
+
+ if (m_source.isNull()) {
+ QImage::Format format = QImage::Format_ARGB32_Premultiplied;
+ if (pixelType() == BitmapType)
+ format = QImage::Format_MonoLSB;
+ m_source = QVolatileImage(w, h, format);
+ }
+
+ m_dirty = true;
+}
+
+QGLPaintDevice *QGLPixmapData::glDevice() const
+{
+ return &m_glDevice;
+}
+
+QT_END_NAMESPACE
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index aad12d7ed2..ed541cebb9 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -181,16 +181,14 @@ QGLGraphicsSystem::QGLGraphicsSystem(bool useX11GL)
//
// QGLWindowSurface
//
-
class QGLGlobalShareWidget
{
public:
- QGLGlobalShareWidget() : widget(0), initializing(false) {}
+ QGLGlobalShareWidget() : firstPixmap(0), widgetRefCount(0), widget(0), initializing(false) {}
QGLWidget *shareWidget() {
if (!initializing && !widget && !cleanedUp) {
initializing = true;
-
widget = new QGLWidget(QGLFormat(QGL::SingleBuffer | QGL::NoDepthBuffer | QGL::NoStencilBuffer));
widget->resize(1, 1);
@@ -226,6 +224,9 @@ public:
static bool cleanedUp;
+ QGLPixmapData *firstPixmap;
+ int widgetRefCount;
+
private:
QGLWidget *widget;
bool initializing;
@@ -256,6 +257,43 @@ void qt_destroy_gl_share_widget()
_qt_gl_share_widget()->destroy();
}
+#ifdef QGL_USE_TEXTURE_POOL
+void qt_gl_register_pixmap(QGLPixmapData *pd)
+{
+ QGLGlobalShareWidget *shared = _qt_gl_share_widget();
+ pd->next = shared->firstPixmap;
+ pd->prev = 0;
+ if (shared->firstPixmap)
+ shared->firstPixmap->prev = pd;
+ shared->firstPixmap = pd;
+}
+
+void qt_gl_unregister_pixmap(QGLPixmapData *pd)
+{
+ if (pd->next)
+ pd->next->prev = pd->prev;
+ if (pd->prev) {
+ pd->prev->next = pd->next;
+ } else {
+ QGLGlobalShareWidget *shared = _qt_gl_share_widget();
+ if (shared)
+ shared->firstPixmap = pd->next;
+ }
+}
+
+void qt_gl_hibernate_pixmaps()
+{
+ QGLGlobalShareWidget *shared = _qt_gl_share_widget();
+
+ // Scan all QGLPixmapData objects in the system and hibernate them.
+ QGLPixmapData *pd = shared->firstPixmap;
+ while (pd != 0) {
+ pd->hibernate();
+ pd = pd->next;
+ }
+}
+#endif
+
struct QGLWindowSurfacePrivate
{
QGLFramebufferObject *fbo;
@@ -333,6 +371,10 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
d_ptr->q_ptr = this;
d_ptr->geometry_updated = false;
d_ptr->did_paint = false;
+
+#ifdef QGL_NO_PRESERVED_SWAP
+ setPartialUpdateSupport(false);
+#endif
}
QGLWindowSurface::~QGLWindowSurface()
@@ -347,6 +389,27 @@ QGLWindowSurface::~QGLWindowSurface()
delete d_ptr->pb;
delete d_ptr->fbo;
delete d_ptr;
+
+ if (QGLGlobalShareWidget::cleanedUp)
+ return;
+
+ --(_qt_gl_share_widget()->widgetRefCount);
+
+#ifdef QGL_USE_TEXTURE_POOL
+ if (_qt_gl_share_widget()->widgetRefCount <= 0) {
+ // All of the widget window surfaces have been destroyed
+ // but we still have GL pixmaps active. Ask them to hibernate
+ // to free up GPU resources until a widget is shown again.
+ // This may eventually cause the EGLContext to be destroyed
+ // because nothing in the system needs a context, which will
+ // free up even more GPU resources.
+ qt_gl_hibernate_pixmaps();
+
+ // Destroy the context if necessary.
+ if (!qt_gl_share_widget()->context()->isSharing())
+ qt_destroy_gl_share_widget();
+ }
+#endif
}
void QGLWindowSurface::deleted(QObject *object)
@@ -394,6 +457,9 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
ctx->create(qt_gl_share_widget()->context());
+ if (widget != qt_gl_share_widget())
+ ++(_qt_gl_share_widget()->widgetRefCount);
+
#ifndef QT_NO_EGL
static bool checkedForNOKSwapRegion = false;
static bool haveNOKSwapRegion = false;
@@ -406,8 +472,16 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
qDebug() << "Found EGL_NOK_swap_region2 extension. Using partial updates.";
}
- if (ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR) != EGL_BUFFER_PRESERVED &&
- ! haveNOKSwapRegion)
+ bool swapBehaviourPreserved = ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR);
+ if (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT) {
+ EGLint swapBehavior;
+ if (eglQuerySurface(ctx->d_func()->eglContext->display(), ctx->d_func()->eglSurface
+ , EGL_SWAP_BEHAVIOR, &swapBehavior)) {
+ swapBehaviourPreserved = (swapBehavior == EGL_BUFFER_PRESERVED);
+ }
+ }
+
+ if (!swapBehaviourPreserved && !haveNOKSwapRegion)
setPartialUpdateSupport(false); // Force full-screen updates
else
setPartialUpdateSupport(true);
@@ -421,7 +495,9 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
voidPtr = &widgetPrivate->extraData()->glContext;
d_ptr->contexts << ctxPtr;
+#ifndef Q_OS_SYMBIAN
qDebug() << "hijackWindow() context created for" << widget << d_ptr->contexts.size();
+#endif
}
QGLContext *QGLWindowSurface::context() const
@@ -450,6 +526,8 @@ static void drawTexture(const QRectF &rect, GLuint tex_id, const QSize &texSize,
void QGLWindowSurface::beginPaint(const QRegion &)
{
+ updateGeometry();
+
if (!context())
return;
@@ -776,32 +854,68 @@ void QGLWindowSurface::updateGeometry() {
return;
d_ptr->geometry_updated = false;
- QRect rect = geometry();
- hijackWindow(window());
- QGLContext *ctx = reinterpret_cast<QGLContext *>(window()->d_func()->extraData()->glContext);
+ bool hijack(true);
+ QWidgetPrivate *wd = window()->d_func();
+ if (wd->extraData() && wd->extraData()->glContext)
+ hijack = false; // we already have gl context for widget
+
+ if (hijack)
+ hijackWindow(window());
+
+ QGLContext *ctx = reinterpret_cast<QGLContext *>(wd->extraData()->glContext);
#ifdef Q_WS_MAC
ctx->updatePaintDevice();
#endif
- const GLenum target = GL_TEXTURE_2D;
+ QSize surfSize = geometry().size();
- if (rect.width() <= 0 || rect.height() <= 0)
+ if (surfSize.width() <= 0 || surfSize.height() <= 0)
return;
- if (d_ptr->size == rect.size())
+ if (d_ptr->size == surfSize)
return;
- d_ptr->size = rect.size();
+ d_ptr->size = surfSize;
+
+#ifdef Q_OS_SYMBIAN
+ if (!hijack) { // Symbian needs to recreate EGL surface when native window size changes
+ if (ctx->d_func()->eglSurface != EGL_NO_SURFACE) {
+ eglDestroySurface(ctx->d_func()->eglContext->display(),
+ ctx->d_func()->eglSurface);
+ }
+
+ ctx->d_func()->eglSurface = QEgl::createSurface(ctx->device(),
+ ctx->d_func()->eglContext->config());
+
+ eglGetError(); // Clear error state.
+ if (hasPartialUpdateSupport()) {
+ eglSurfaceAttrib(ctx->d_func()->eglContext->display(),
+ ctx->d_func()->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLWindowSurface: could not enable preserved swap behaviour");
+ } else {
+ eglSurfaceAttrib(ctx->d_func()->eglContext->display(),
+ ctx->d_func()->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLWindowSurface: could not enable destroyed swap behaviour");
+ }
+ }
+#endif
if (d_ptr->ctx) {
#ifndef QT_OPENGL_ES_2
if (d_ptr->destructive_swap_buffers)
- initializeOffscreenTexture(rect.size());
+ initializeOffscreenTexture(surfSize);
#endif
return;
}
+ const GLenum target = GL_TEXTURE_2D;
if (d_ptr->destructive_swap_buffers
&& (QGLExtensions::glExtensions() & QGLExtensions::FramebufferObject)
&& (d_ptr->fbo || !d_ptr->tried_fbo)
@@ -820,10 +934,10 @@ void QGLWindowSurface::updateGeometry() {
if (QGLExtensions::glExtensions() & QGLExtensions::FramebufferBlit)
format.setSamples(8);
- d_ptr->fbo = new QGLFramebufferObject(rect.size(), format);
+ d_ptr->fbo = new QGLFramebufferObject(surfSize, format);
if (d_ptr->fbo->isValid()) {
- qDebug() << "Created Window Surface FBO" << rect.size()
+ qDebug() << "Created Window Surface FBO" << surfSize
<< "with samples" << d_ptr->fbo->format().samples();
return;
} else {
@@ -844,7 +958,7 @@ void QGLWindowSurface::updateGeometry() {
delete d_ptr->pb;
- d_ptr->pb = new QGLPixelBuffer(rect.width(), rect.height(),
+ d_ptr->pb = new QGLPixelBuffer(surfSize.width(), surfSize.height(),
QGLFormat(QGL::SampleBuffers | QGL::StencilBuffer | QGL::DepthBuffer),
qt_gl_share_widget());
@@ -854,7 +968,7 @@ void QGLWindowSurface::updateGeometry() {
glGenTextures(1, &d_ptr->pb_tex_id);
glBindTexture(target, d_ptr->pb_tex_id);
- glTexImage2D(target, 0, GL_RGBA, rect.width(), rect.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ glTexImage2D(target, 0, GL_RGBA, surfSize.width(), surfSize.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -878,10 +992,11 @@ void QGLWindowSurface::updateGeometry() {
#ifndef QT_OPENGL_ES_2
if (d_ptr->destructive_swap_buffers)
- initializeOffscreenTexture(rect.size());
+ initializeOffscreenTexture(surfSize);
+#endif
+#ifndef Q_OS_SYMBIAN
+ qDebug() << "QGLWindowSurface: Using plain widget as window surface" << this;
#endif
-
- qDebug() << "QGLWindowSurface: Using plain widget as window surface" << this;;
d_ptr->ctx = ctx;
d_ptr->ctx->d_ptr->internal_context = true;
}
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 22cbbf5d19..ebdfa5fd48 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1024,9 +1024,11 @@ static VGImage toVGImage
switch (img.format()) {
case QImage::Format_Mono:
img = image.convertToFormat(QImage::Format_MonoLSB, flags);
+ img.invertPixels();
format = VG_BW_1;
break;
case QImage::Format_MonoLSB:
+ img.invertPixels();
format = VG_BW_1;
break;
case QImage::Format_RGB32:
@@ -2333,6 +2335,7 @@ bool QVGPaintEngine::isDefaultClipRect(const QRect& rect)
void QVGPaintEngine::clipEnabledChanged()
{
#if defined(QVG_SCISSOR_CLIP)
+ vgSeti(VG_MASKING, VG_FALSE); // disable mask fallback
updateScissor();
#else
Q_D(QVGPaintEngine);
@@ -3070,6 +3073,95 @@ static void drawVGImage(QVGPaintEnginePrivate *d,
vgDrawImage(vgImg);
}
+static void drawImageTiled(QVGPaintEnginePrivate *d,
+ const QRectF &r,
+ const QImage &image,
+ const QRectF &sr = QRectF())
+{
+ const int minTileSize = 16;
+ int tileWidth = 512;
+ int tileHeight = tileWidth;
+
+ VGImageFormat tileFormat = qt_vg_image_to_vg_format(image.format());
+ VGImage tile = VG_INVALID_HANDLE;
+ QVGImagePool *pool = QVGImagePool::instance();
+ while (tile == VG_INVALID_HANDLE && tileWidth >= minTileSize) {
+ tile = pool->createPermanentImage(tileFormat, tileWidth, tileHeight,
+ VG_IMAGE_QUALITY_FASTER);
+ if (tile == VG_INVALID_HANDLE) {
+ tileWidth /= 2;
+ tileHeight /= 2;
+ }
+ }
+ if (tile == VG_INVALID_HANDLE) {
+ qWarning("drawImageTiled: Failed to create %dx%d tile, giving up", tileWidth, tileHeight);
+ return;
+ }
+
+ VGfloat opacityMatrix[20] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, d->opacity,
+ 0.0f, 0.0f, 0.0f, 0.0f
+ };
+ VGImage tileWithOpacity = VG_INVALID_HANDLE;
+ if (d->opacity != 1) {
+ tileWithOpacity = pool->createPermanentImage(VG_sARGB_8888_PRE,
+ tileWidth, tileHeight, VG_IMAGE_QUALITY_FASTER);
+ if (tileWithOpacity == VG_INVALID_HANDLE)
+ qWarning("drawImageTiled: Failed to create extra tile, ignoring opacity");
+ }
+
+ QRect sourceRect = sr.toRect();
+ if (sourceRect.isNull())
+ sourceRect = QRect(0, 0, image.width(), image.height());
+
+ VGfloat scaleX = r.width() / sourceRect.width();
+ VGfloat scaleY = r.height() / sourceRect.height();
+
+ d->setImageOptions();
+
+ for (int y = sourceRect.y(); y < sourceRect.height(); y += tileHeight) {
+ int h = qMin(tileHeight, sourceRect.height() - y);
+ if (h < 1)
+ break;
+ for (int x = sourceRect.x(); x < sourceRect.width(); x += tileWidth) {
+ int w = qMin(tileWidth, sourceRect.width() - x);
+ if (w < 1)
+ break;
+
+ int bytesPerPixel = image.depth() / 8;
+ const uchar *sptr = image.constBits() + x * bytesPerPixel + y * image.bytesPerLine();
+ vgImageSubData(tile, sptr, image.bytesPerLine(), tileFormat, 0, 0, w, h);
+
+ QTransform transform(d->imageTransform);
+ transform.translate(r.x() + x, r.y() + y);
+ transform.scale(scaleX, scaleY);
+ d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
+
+ VGImage actualTile = tile;
+ if (tileWithOpacity != VG_INVALID_HANDLE) {
+ vgColorMatrix(tileWithOpacity, actualTile, opacityMatrix);
+ if (w < tileWidth || h < tileHeight)
+ actualTile = vgChildImage(tileWithOpacity, 0, 0, w, h);
+ else
+ actualTile = tileWithOpacity;
+ } else if (w < tileWidth || h < tileHeight) {
+ actualTile = vgChildImage(tile, 0, 0, w, h);
+ }
+ vgDrawImage(actualTile);
+
+ if (actualTile != tile && actualTile != tileWithOpacity)
+ vgDestroyImage(actualTile);
+ }
+ }
+
+ vgDestroyImage(tile);
+ if (tileWithOpacity != VG_INVALID_HANDLE)
+ vgDestroyImage(tileWithOpacity);
+}
+
// Used by qpixmapfilter_vg.cpp to draw filtered VGImage's.
void qt_vg_drawVGImage(QPainter *painter, const QPointF& pos, VGImage vgImg)
{
@@ -3099,6 +3191,19 @@ void qt_vg_drawVGImageStencil
bool QVGPaintEngine::canVgWritePixels(const QImage &image) const
{
Q_D(const QVGPaintEngine);
+
+ // qt_vg_image_to_vg_format returns VG_sARGB_8888 as
+ // fallback case if no matching VG format is found.
+ // If given image format is not Format_ARGB32 and returned
+ // format is VG_sARGB_8888, it means that no match was
+ // found. In that case vgWritePixels cannot be used.
+ // Also 1-bit formats cannot be used directly either.
+ if ((image.format() != QImage::Format_ARGB32
+ && qt_vg_image_to_vg_format(image.format()) == VG_sARGB_8888)
+ || image.depth() == 1) {
+ return false;
+ }
+
// vgWritePixels ignores masking, blending and xforms so we can only use it if
// ALL of the following conditions are true:
// - It is a simple translate, or a scale of -1 on the y-axis (inverted)
@@ -3134,9 +3239,13 @@ void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF
if (pm.size().width() <= screenSize.width()
&& pm.size().height() <= screenSize.height())
vgpd->failedToAlloc = false;
- }
- drawImage(r, *(pd->buffer()), sr, Qt::AutoColor);
+ vgpd->source.beginDataAccess();
+ drawImage(r, vgpd->source.imageRef(), sr, Qt::AutoColor);
+ vgpd->source.endDataAccess(true);
+ } else {
+ drawImage(r, *(pd->buffer()), sr, Qt::AutoColor);
+ }
}
void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
@@ -3162,9 +3271,13 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
if (pm.size().width() <= screenSize.width()
&& pm.size().height() <= screenSize.height())
vgpd->failedToAlloc = false;
- }
- drawImage(pos, *(pd->buffer()));
+ vgpd->source.beginDataAccess();
+ drawImage(pos, vgpd->source.imageRef());
+ vgpd->source.endDataAccess(true);
+ } else {
+ drawImage(pos, *(pd->buffer()));
+ }
}
void QVGPaintEngine::drawImage
@@ -3172,6 +3285,8 @@ void QVGPaintEngine::drawImage
Qt::ImageConversionFlags flags)
{
Q_D(QVGPaintEngine);
+ if (image.isNull())
+ return;
VGImage vgImg;
if (d->simpleTransform || d->opacity == 1.0f)
vgImg = toVGImageSubRect(image, sr.toRect(), flags);
@@ -3208,7 +3323,10 @@ void QVGPaintEngine::drawImage
} else {
// Monochrome images need to use the vgChildImage() path.
vgImg = toVGImage(image, flags);
- drawVGImage(d, r, vgImg, image.size(), sr);
+ if (vgImg == VG_INVALID_HANDLE)
+ drawImageTiled(d, r, image, sr);
+ else
+ drawVGImage(d, r, vgImg, image.size(), sr);
}
}
vgDestroyImage(vgImg);
@@ -3217,6 +3335,8 @@ void QVGPaintEngine::drawImage
void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image)
{
Q_D(QVGPaintEngine);
+ if (image.isNull())
+ return;
VGImage vgImg;
if (canVgWritePixels(image)) {
// Optimization for straight blits, no blending
@@ -3233,7 +3353,10 @@ void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image)
} else {
vgImg = toVGImageWithOpacity(image, d->opacity);
}
- drawVGImage(d, pos, vgImg);
+ if (vgImg == VG_INVALID_HANDLE)
+ drawImageTiled(d, QRectF(pos, image.size()), image);
+ else
+ drawVGImage(d, pos, vgImg);
vgDestroyImage(vgImg);
}
@@ -4010,6 +4133,8 @@ VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
switch (format) {
case QImage::Format_MonoLSB:
return VG_BW_1;
+ case QImage::Format_Indexed8:
+ return VG_sL_8;
case QImage::Format_ARGB32_Premultiplied:
return VG_sARGB_8888_PRE;
case QImage::Format_RGB32:
@@ -4020,7 +4145,8 @@ VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
return VG_sRGB_565;
case QImage::Format_ARGB4444_Premultiplied:
return VG_sARGB_4444;
- default: break;
+ default:
+ break;
}
return VG_sARGB_8888; // XXX
}
diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h
index 85583cc9b8..1e9103bc81 100644
--- a/src/openvg/qpaintengine_vg_p.h
+++ b/src/openvg/qpaintengine_vg_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class QFixedPoint;
+struct QFixedPoint;
class QVGPaintEnginePrivate;
class QPixmapData;
class QVGEGLWindowSurfacePrivate;
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 732b484f47..80f5b2fd91 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -50,6 +50,7 @@
#include <QBuffer>
#include <QImageReader>
#include <QtGui/private/qimage_p.h>
+#include <QtGui/private/qnativeimagehandleprovider_p.h>
QT_BEGIN_NAMESPACE
@@ -66,11 +67,15 @@ QVGPixmapData::QVGPixmapData(PixelType type)
inImagePool = false;
inLRU = false;
failedToAlloc = false;
+#if defined(Q_OS_SYMBIAN)
+ nativeImageHandleProvider = 0;
+ nativeImageHandle = 0;
+#endif
#if !defined(QT_NO_EGL)
context = 0;
qt_vg_register_pixmap(this);
#endif
- setSerialNumber(++qt_vg_pixmap_serial);
+ updateSerial();
}
QVGPixmapData::~QVGPixmapData()
@@ -98,6 +103,10 @@ void QVGPixmapData::destroyImages()
vgImage = VG_INVALID_HANDLE;
vgImageOpacity = VG_INVALID_HANDLE;
inImagePool = false;
+
+#if defined(Q_OS_SYMBIAN)
+ releaseNativeImageHandle();
+#endif
}
void QVGPixmapData::destroyImageAndContext()
@@ -105,6 +114,8 @@ void QVGPixmapData::destroyImageAndContext()
if (vgImage != VG_INVALID_HANDLE) {
// We need to have a context current to destroy the image.
#if !defined(QT_NO_EGL)
+ if (!context)
+ context = qt_vg_create_context(0, QInternal::Pixmap);
if (context->isCurrent()) {
destroyImages();
} else {
@@ -118,6 +129,10 @@ void QVGPixmapData::destroyImageAndContext()
#else
destroyImages();
#endif
+ } else {
+#if defined(Q_OS_SYMBIAN)
+ releaseNativeImageHandle();
+#endif
}
#if !defined(QT_NO_EGL)
if (context) {
@@ -138,25 +153,31 @@ bool QVGPixmapData::isValid() const
return (w > 0 && h > 0);
}
+void QVGPixmapData::updateSerial()
+{
+ setSerialNumber(++qt_vg_pixmap_serial);
+}
+
void QVGPixmapData::resize(int wid, int ht)
{
- if (w == wid && h == ht)
+ if (w == wid && h == ht) {
+ updateSerial();
return;
+ }
w = wid;
h = ht;
d = 32; // We always use ARGB_Premultiplied for VG pixmaps.
is_null = (w <= 0 || h <= 0);
- source = QImage();
+ source = QVolatileImage();
recreate = true;
- setSerialNumber(++qt_vg_pixmap_serial);
+ updateSerial();
}
-void QVGPixmapData::fromImage
- (const QImage &image, Qt::ImageConversionFlags flags)
+void QVGPixmapData::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
{
- if(image.isNull())
+ if (image.isNull())
return;
QImage img = image;
@@ -200,33 +221,34 @@ bool QVGPixmapData::fromData(const uchar *buffer, uint len, const char *format,
return !isNull();
}
-/*!
- out-of-place conversion (inPlace == false) will always detach()
- */
-void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
+QImage::Format QVGPixmapData::idealFormat(QImage *image, Qt::ImageConversionFlags flags) const
{
- if (image.size() == QSize(w, h))
- setSerialNumber(++qt_vg_pixmap_serial);
- else
- resize(image.width(), image.height());
-
QImage::Format format = sourceFormat();
- int d = image.depth();
- if (d == 1 || d == 16 || d == 24 || (d == 32 && !image.hasAlphaChannel()))
+ int d = image->depth();
+ if (d == 1 || d == 16 || d == 24 || (d == 32 && !image->hasAlphaChannel()))
format = QImage::Format_RGB32;
- else if (!(flags & Qt::NoOpaqueDetection) && const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels())
+ else if (!(flags & Qt::NoOpaqueDetection) && image->data_ptr()->checkForAlphaPixels())
format = sourceFormat();
else
- format = image.hasAlphaChannel() ? sourceFormat() : QImage::Format_RGB32;
+ format = image->hasAlphaChannel() ? sourceFormat() : QImage::Format_RGB32;
+ return format;
+}
+
+void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
+{
+ resize(image.width(), image.height());
+
+ QImage::Format format = idealFormat(&image, flags);
if (inPlace && image.data_ptr()->convertInPlace(format, flags)) {
- source = image;
+ source = QVolatileImage(image);
} else {
- source = image.convertToFormat(format);
-
- // convertToFormat won't detach the image if format stays the same.
- if (image.format() == format)
- source.detach();
+ QImage convertedImage = image.convertToFormat(format);
+ // convertToFormat won't detach the image if format stays the
+ // same. Detaching is needed to prevent issues with painting
+ // onto this QPixmap later on.
+ convertedImage.detach();
+ source = QVolatileImage(convertedImage);
}
recreate = true;
@@ -236,27 +258,23 @@ void QVGPixmapData::fill(const QColor &color)
{
if (!isValid())
return;
-
- if (source.isNull())
- source = QImage(w, h, sourceFormat());
-
+ forceToImage();
if (source.depth() == 1) {
// Pick the best approximate color in the image's colortable.
int gray = qGray(color.rgba());
- if (qAbs(qGray(source.color(0)) - gray) < qAbs(qGray(source.color(1)) - gray))
+ if (qAbs(qGray(source.imageRef().color(0)) - gray)
+ < qAbs(qGray(source.imageRef().color(1)) - gray))
source.fill(0);
else
source.fill(1);
} else {
source.fill(PREMUL(color.rgba()));
}
-
- // Re-upload the image to VG the next time toVGImage() is called.
- recreate = true;
}
bool QVGPixmapData::hasAlphaChannel() const
{
+ ensureReadback(true);
if (!source.isNull())
return source.hasAlphaChannel();
else
@@ -265,27 +283,52 @@ bool QVGPixmapData::hasAlphaChannel() const
void QVGPixmapData::setAlphaChannel(const QPixmap &alphaChannel)
{
+ if (!isValid())
+ return;
forceToImage();
- source.setAlphaChannel(alphaChannel.toImage());
+ source.setAlphaChannel(alphaChannel);
}
QImage QVGPixmapData::toImage() const
{
if (!isValid())
return QImage();
-
+ ensureReadback(true);
if (source.isNull()) {
- source = QImage(w, h, sourceFormat());
+ source = QVolatileImage(w, h, sourceFormat());
recreate = true;
}
+ return source.toImage();
+}
- return source;
+void QVGPixmapData::copy(const QPixmapData *data, const QRect &rect)
+{
+ // toImage() is potentially expensive with QVolatileImage so provide a
+ // more efficient implementation of copy() that does not rely on it.
+ if (!data) {
+ return;
+ }
+ if (data->classId() != OpenVGClass) {
+ fromImage(data->toImage(rect), Qt::NoOpaqueDetection);
+ return;
+ }
+ const QVGPixmapData *pd = static_cast<const QVGPixmapData *>(data);
+ QRect r = rect;
+ if (r.isNull() || r.contains(QRect(0, 0, pd->w, pd->h))) {
+ r = QRect(0, 0, pd->w, pd->h);
+ }
+ resize(r.width(), r.height());
+ recreate = true;
+ if (!pd->source.isNull()) {
+ source = QVolatileImage(r.width(), r.height(), pd->source.format());
+ source.copyFrom(&pd->source, r);
+ }
}
QImage *QVGPixmapData::buffer()
{
- forceToImage();
- return &source;
+ // Cannot be safely implemented and QVGPixmapData is not (must not be) RasterClass anyway.
+ return 0;
}
QPaintEngine* QVGPixmapData::paintEngine() const
@@ -313,6 +356,12 @@ VGImage QVGPixmapData::toVGImage()
else if (recreate)
cachedOpacity = -1.0f; // Force opacity image to be refreshed later.
+#if defined(Q_OS_SYMBIAN)
+ if (recreate && nativeImageHandleProvider && !nativeImageHandle) {
+ createFromNativeImageHandleProvider();
+ }
+#endif
+
if (vgImage == VG_INVALID_HANDLE) {
vgImage = QVGImagePool::instance()->createImageForPixmap
(qt_vg_image_to_vg_format(source.format()), w, h, VG_IMAGE_QUALITY_FASTER, this);
@@ -329,10 +378,12 @@ VGImage QVGPixmapData::toVGImage()
}
if (!source.isNull() && recreate) {
+ source.beginDataAccess();
vgImageSubData
(vgImage,
source.constBits(), source.bytesPerLine(),
qt_vg_image_to_vg_format(source.format()), 0, 0, w, h);
+ source.endDataAccess(true);
}
recreate = false;
@@ -395,12 +446,19 @@ void QVGPixmapData::detachImageFromPool()
void QVGPixmapData::hibernate()
{
- // If the image was imported (e.g, from an SgImage under Symbian),
- // then we cannot copy it back to main memory for storage.
- if (vgImage != VG_INVALID_HANDLE && source.isNull())
+ // If the image was imported (e.g, from an SgImage under Symbian), then
+ // skip the hibernation, there is no sense in copying it back to main
+ // memory because the data is most likely shared between several processes.
+ bool skipHibernate = (vgImage != VG_INVALID_HANDLE && source.isNull());
+#if defined(Q_OS_SYMBIAN)
+ // However we have to proceed normally if the image was retrieved via
+ // a handle provider.
+ skipHibernate &= !nativeImageHandleProvider;
+#endif
+ if (skipHibernate)
return;
- forceToImage();
+ forceToImage(false); // no readback allowed here
destroyImageAndContext();
}
@@ -442,18 +500,48 @@ int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
}
}
-// Force the pixmap data to be in QImage format.
-void QVGPixmapData::forceToImage()
+// Ensures that the pixmap is backed by some valid data and forces the data to
+// be re-uploaded to the VGImage when toVGImage() is called next time.
+void QVGPixmapData::forceToImage(bool allowReadback)
{
if (!isValid())
return;
+ if (allowReadback)
+ ensureReadback(false);
+
if (source.isNull())
- source = QImage(w, h, sourceFormat());
+ source = QVolatileImage(w, h, sourceFormat());
recreate = true;
}
+void QVGPixmapData::ensureReadback(bool readOnly) const
+{
+ if (vgImage != VG_INVALID_HANDLE && source.isNull()) {
+ source = QVolatileImage(w, h, sourceFormat());
+ source.beginDataAccess();
+ vgGetImageSubData(vgImage, source.bits(), source.bytesPerLine(),
+ qt_vg_image_to_vg_format(source.format()),
+ 0, 0, w, h);
+ source.endDataAccess();
+ if (readOnly) {
+ recreate = false;
+ } else {
+ // Once we did a readback, the original VGImage must be destroyed
+ // because it may be shared (e.g. created via SgImage) and a subsequent
+ // upload of the image data may produce unexpected results.
+ const_cast<QVGPixmapData *>(this)->destroyImages();
+#if defined(Q_OS_SYMBIAN)
+ // There is now an own copy of the data so drop the handle provider,
+ // otherwise toVGImage() would request the handle again, which is wrong.
+ nativeImageHandleProvider = 0;
+#endif
+ recreate = true;
+ }
+ }
+}
+
QImage::Format QVGPixmapData::sourceFormat() const
{
return QImage::Format_ARGB32_Premultiplied;
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index 58e69dba06..c28459674d 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -54,7 +54,8 @@
//
#include <QtGui/private/qpixmap_raster_p.h>
-#include <private/qvg_p.h>
+#include <QtGui/private/qvolatileimage_p.h>
+#include "qvg_p.h"
#if defined(Q_OS_SYMBIAN)
class RSGImage;
@@ -75,6 +76,8 @@ void qt_vg_unregister_pixmap(QVGPixmapData *pd);
void qt_vg_hibernate_pixmaps(QVGSharedContext *context);
#endif
+class QNativeImageHandleProvider;
+
class Q_OPENVG_EXPORT QVGPixmapData : public QPixmapData
{
public:
@@ -99,6 +102,7 @@ public:
bool hasAlphaChannel() const;
void setAlphaChannel(const QPixmap &alphaChannel);
QImage toImage() const;
+ void copy(const QPixmapData *data, const QRect &rect);
QImage *buffer();
QPaintEngine* paintEngine() const;
@@ -124,11 +128,21 @@ public:
// VGImage objects to reuse storage.
virtual void reclaimImages();
+ // If vgImage is valid but source is null, copies pixel data from GPU back
+ // into main memory and destroys vgImage. For a normal pixmap this function
+ // does nothing, however if the pixmap was created directly from a VGImage
+ // (e.g. via SgImage on Symbian) then by doing the readback this ensures
+ // that QImage-based functions can operate too.
+ virtual void ensureReadback(bool readOnly) const;
+
QSize size() const { return QSize(w, h); }
#if defined(Q_OS_SYMBIAN)
void* toNativeType(NativeType type);
void fromNativeType(void* pixmap, NativeType type);
+ bool initFromNativeImageHandle(void *handle, const QString &type);
+ void createFromNativeImageHandleProvider();
+ void releaseNativeImageHandle();
#endif
protected:
@@ -161,15 +175,23 @@ protected:
VGImage vgImage;
VGImage vgImageOpacity;
qreal cachedOpacity;
- mutable QImage source;
+ mutable QVolatileImage source;
mutable bool recreate;
bool inImagePool;
#if !defined(QT_NO_EGL)
mutable QEglContext *context;
#endif
- void forceToImage();
+#if defined(Q_OS_SYMBIAN)
+ mutable QNativeImageHandleProvider *nativeImageHandleProvider;
+ void *nativeImageHandle;
+ QString nativeImageType;
+#endif
+
+ void forceToImage(bool allowReadback = true);
QImage::Format sourceFormat() const;
+ QImage::Format idealFormat(QImage *image, Qt::ImageConversionFlags flags) const;
+ void updateSerial();
void destroyImageAndContext();
void destroyImages();
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index 2ea38c1a03..0d2ed9e6d2 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -41,10 +41,10 @@
#include "qpixmapdata_vg_p.h"
#include "qvgfontglyphcache_p.h"
+#include <QtGui/private/qnativeimagehandleprovider_p.h>
#include <private/qt_s60_p.h>
#include <fbs.h>
-#include <bitdev.h>
#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
# include <sgresource/sgimage.h>
@@ -75,33 +75,6 @@ VGImage QVG::vgCreateEGLImageTargetKHR(VGeglImageKHR eglImage)
extern int qt_vg_pixmap_serial;
-static CFbsBitmap* createBlitCopy(CFbsBitmap* bitmap)
-{
- CFbsBitmap *copy = q_check_ptr(new CFbsBitmap);
- if(!copy)
- return 0;
-
- if (copy->Create(bitmap->SizeInPixels(), bitmap->DisplayMode()) != KErrNone) {
- delete copy;
- copy = 0;
-
- return 0;
- }
-
- CFbsBitmapDevice* bitmapDevice = 0;
- CFbsBitGc *bitmapGc = 0;
- QT_TRAP_THROWING(bitmapDevice = CFbsBitmapDevice::NewL(copy));
- QT_TRAP_THROWING(bitmapGc = CFbsBitGc::NewL());
- bitmapGc->Activate(bitmapDevice);
-
- bitmapGc->BitBlt(TPoint(), bitmap);
-
- delete bitmapGc;
- delete bitmapDevice;
-
- return copy;
-}
-
#ifdef QT_SYMBIAN_SUPPORTS_SGIMAGE
static VGImage sgImageToVGImage(QEglContext *context, const RSgImage &sgImage)
{
@@ -136,7 +109,59 @@ void QVGPixmapData::cleanup()
{
is_null = w = h = 0;
recreate = false;
- source = QImage();
+ source = QVolatileImage();
+}
+
+bool QVGPixmapData::initFromNativeImageHandle(void *handle, const QString &type)
+{
+ if (type == QLatin1String("RSgImage")) {
+ fromNativeType(handle, QPixmapData::SgImage);
+ return true;
+ } else if (type == QLatin1String("CFbsBitmap")) {
+ fromNativeType(handle, QPixmapData::FbsBitmap);
+ return true;
+ }
+ return false;
+}
+
+void QVGPixmapData::createFromNativeImageHandleProvider()
+{
+ void *handle = 0;
+ QString type;
+ nativeImageHandleProvider->get(&handle, &type);
+ if (handle) {
+ if (initFromNativeImageHandle(handle, type)) {
+ nativeImageHandle = handle;
+ nativeImageType = type;
+ } else {
+ qWarning("QVGPixmapData: Unknown native image type '%s'", qPrintable(type));
+ }
+ } else {
+ qWarning("QVGPixmapData: Native handle is null");
+ }
+}
+
+void QVGPixmapData::releaseNativeImageHandle()
+{
+ if (nativeImageHandleProvider && nativeImageHandle) {
+ nativeImageHandleProvider->release(nativeImageHandle, nativeImageType);
+ nativeImageHandle = 0;
+ nativeImageType = QString();
+ }
+}
+
+static inline bool conversionLessFormat(QImage::Format format)
+{
+ switch (format) {
+ case QImage::Format_RGB16: // EColor64K
+ case QImage::Format_RGB32: // EColor16MU
+ case QImage::Format_ARGB32: // EColor16MA
+ case QImage::Format_ARGB32_Premultiplied: // EColor16MAP
+ case QImage::Format_Indexed8: // EGray256, EColor256
+ return true;
+ default:
+ return false;
+ }
}
void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
@@ -155,55 +180,37 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
}
is_null = (w <= 0 || h <= 0);
- source = QImage(); // vgGetImageSubData() some day?
+ source = QVolatileImage(); // readback will be done later, only when needed
recreate = false;
prevSize = QSize(w, h);
- //setSerialNumber(++qt_vg_pixmap_serial);
+ updateSerial();
#endif
- } else if (type == QPixmapData::FbsBitmap) {
- CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
-
- bool deleteSourceBitmap = false;
-#ifdef Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
-
- // Rasterize extended bitmaps
-
- TUid extendedBitmapType = bitmap->ExtendedBitmapType();
- if (extendedBitmapType != KNullUid) {
- bitmap = createBlitCopy(bitmap);
- deleteSourceBitmap = true;
+ } else if (type == QPixmapData::FbsBitmap && pixmap) {
+ CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap *>(pixmap);
+ QSize size(bitmap->SizeInPixels().iWidth, bitmap->SizeInPixels().iHeight);
+ resize(size.width(), size.height());
+ source = QVolatileImage(bitmap); // duplicates only, if possible
+ if (source.isNull())
+ return;
+ if (!conversionLessFormat(source.format())) {
+ // Here we may need to copy if the formats do not match.
+ // (e.g. for display modes other than EColor16MAP and EColor16MU)
+ source.beginDataAccess();
+ QImage::Format format = idealFormat(&source.imageRef(), Qt::AutoColor);
+ source.endDataAccess(true);
+ source.ensureFormat(format);
}
-#endif
-
- if (bitmap->IsCompressedInRAM()) {
- bitmap = createBlitCopy(bitmap);
- deleteSourceBitmap = true;
- }
-
- TDisplayMode displayMode = bitmap->DisplayMode();
- QImage::Format format = qt_TDisplayMode2Format(displayMode);
-
- TSize size = bitmap->SizeInPixels();
- int bytesPerLine = bitmap->ScanLineLength(size.iWidth, displayMode);
-
- bitmap->BeginDataAccess();
- uchar *bytes = (uchar*)bitmap->DataAddress();
- QImage img = QImage(bytes, size.iWidth, size.iHeight, bytesPerLine, format);
- img = img.copy();
- bitmap->EndDataAccess();
-
- if(displayMode == EGray2) {
- //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid
- //So invert mono bitmaps so that masks work correctly.
- img.invertPixels();
- } else if(displayMode == EColor16M) {
- img = img.rgbSwapped(); // EColor16M is BGR
- }
-
- fromImage(img, Qt::AutoColor);
-
- if(deleteSourceBitmap)
- delete bitmap;
+ recreate = true;
+ } else if (type == QPixmapData::VolatileImage && pixmap) {
+ QVolatileImage *img = static_cast<QVolatileImage *>(pixmap);
+ resize(img->width(), img->height());
+ source = *img;
+ recreate = true;
+ } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
+ destroyImages();
+ nativeImageHandleProvider = static_cast<QNativeImageHandleProvider *>(pixmap);
+ // Cannot defer the retrieval, we need at least the size right away.
+ createFromNativeImageHandleProvider();
}
}
@@ -270,26 +277,13 @@ void* QVGPixmapData::toNativeType(NativeType type)
driver.Close();
return reinterpret_cast<void*>(sgImage.take());
#endif
- } else if (type == QPixmapData::FbsBitmap) {
- CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);
-
- if (bitmap) {
- if (bitmap->Create(TSize(source.width(), source.height()),
- EColor16MAP) == KErrNone) {
- const uchar *sptr = const_cast<const QImage&>(source).bits();
- bitmap->BeginDataAccess();
-
- uchar *dptr = (uchar*)bitmap->DataAddress();
- Mem::Copy(dptr, sptr, source.byteCount());
-
- bitmap->EndDataAccess();
- } else {
- delete bitmap;
- bitmap = 0;
- }
+ } else if (type == QPixmapData::FbsBitmap && isValid()) {
+ ensureReadback(true);
+ if (source.isNull()) {
+ source = QVolatileImage(w, h, sourceFormat());
}
-
- return reinterpret_cast<void*>(bitmap);
+ // Just duplicate the bitmap handle, no data copying happens.
+ return source.duplicateNativeImage();
}
return 0;
}
diff --git a/src/openvg/qvgfontglyphcache_p.h b/src/openvg/qvgfontglyphcache_p.h
index 9a105ec220..ce12301645 100644
--- a/src/openvg/qvgfontglyphcache_p.h
+++ b/src/openvg/qvgfontglyphcache_p.h
@@ -56,7 +56,7 @@
#include <QtCore/qvarlengtharray.h>
#include <QtGui/private/qfontengine_p.h>
-#include <qvg_p.h>
+#include "qvg_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp
index a2b1c4ef0d..7a7ec78fe3 100644
--- a/src/openvg/qvgimagepool.cpp
+++ b/src/openvg/qvgimagepool.cpp
@@ -175,8 +175,19 @@ bool QVGImagePool::reclaimSpace(VGImageFormat format,
void QVGImagePool::hibernate()
{
- // Nothing to do here at the moment since the pool does not
- // retain VGImage's after they have been released.
+ Q_D(QVGImagePool);
+ QVGPixmapData *pd = d->lruLast;
+ while (pd) {
+ QVGPixmapData *prevLRU = pd->prevLRU;
+ pd->inImagePool = false;
+ pd->inLRU = false;
+ pd->nextLRU = 0;
+ pd->prevLRU = 0;
+ pd->hibernate();
+ pd = prevLRU;
+ }
+ d->lruFirst = 0;
+ d->lruLast = 0;
}
void QVGImagePool::moveToHeadOfLRU(QVGPixmapData *data)
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index ca80886fd2..866453ff60 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -768,6 +768,11 @@ bool QVGEGLWindowSurfaceDirect::scroll(QWidget *widget, const QRegion& area, int
context->lazyDoneCurrent();
return true;
}
+#else
+ Q_UNUSED(widget);
+ Q_UNUSED(area);
+ Q_UNUSED(dx);
+ Q_UNUSED(dy);
#endif
return false;
}
diff --git a/src/plugins/audio/audio.pro b/src/plugins/audio/audio.pro
deleted file mode 100644
index b7a775b335..0000000000
--- a/src/plugins/audio/audio.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS =
-
diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp
index 13cd8a9de5..a317cb4944 100644
--- a/src/plugins/bearer/icd/dbusdispatcher.cpp
+++ b/src/plugins/bearer/icd/dbusdispatcher.cpp
@@ -194,18 +194,21 @@ static bool appendVariantToDBusMessage(const QVariant& argument,
&int32_data);
break;
- case QVariant::String:
- str_data = argument.toString().toLatin1().data();
+ case QVariant::String: {
+ QByteArray data = argument.toString().toLatin1();
+ str_data = data.data();
dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING,
&str_data);
break;
+ }
case QVariant::StringList:
str_list = argument.toStringList();
dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
"s", &array_iter);
for (idx = 0; idx < str_list.size(); idx++) {
- str_data = str_list.at(idx).toLatin1().data();
+ QByteArray data = str_list.at(idx).toLatin1();
+ str_data = data.data();
dbus_message_iter_append_basic(&array_iter,
DBUS_TYPE_STRING,
&str_data);
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index af5d85ee50..94a6c811c9 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -621,21 +621,21 @@ static QString get_network_interface()
if (ret == 0) {
/* No results */
#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
+ qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
#endif
- return iface;
+ return iface;
}
if (addr_results.first().ip_info.isEmpty())
- return QString();
+ return QString();
- const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
+ QByteArray data = addr_results.first().ip_info.first().address.toAscii();
struct in_addr addr;
- if (inet_aton(address, &addr) == 0) {
+ if (inet_aton(data.constData(), &addr) == 0) {
#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "address" << address << "invalid";
+ qDebug() << "address" << data.constData() << "invalid";
#endif
- return iface;
+ return iface;
}
struct ifaddrs *ifaddr, *ifa;
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 30d6b507c5..6b37b38e8c 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -213,6 +213,11 @@ void QNetworkManagerEngine::connectToId(const QString &id)
dbusDevicePath = devicePath.path();
break;
}
+ else if (device.deviceType() == DEVICE_TYPE_GSM &&
+ connectionType == QLatin1String("gsm")) {
+ dbusDevicePath = devicePath.path();
+ break;
+ }
}
const QString service = connection->connectionInterface()->service();
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index fc480c2b13..f367c26050 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -150,16 +150,15 @@ SymbianEngine::~SymbianEngine()
iConnectionMonitor.CancelNotifications();
iConnectionMonitor.Close();
-
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- iCmManager.Close();
-#endif
-
- // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager
+
+ // CCommsDatabase destructor and RCmManager.Close() use cleanup stack. Since QNetworkConfigurationManager
// is a global static, but the time we are here, E32Main() has been exited already and
// the thread's default cleanup stack has been deleted. Without this line, a
// 'E32USER-CBase 69' -panic will occur.
CTrapCleanup* cleanup = CTrapCleanup::New();
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ iCmManager.Close();
+#endif
delete ipCommsDB;
delete cleanup;
}
@@ -829,6 +828,7 @@ void SymbianEngine::updateStatesToSnaps()
discovered = true;
}
}
+ snapConfigLocker.unlock();
if (active) {
changeConfigurationStateTo(ptr, QNetworkConfiguration::Active);
} else if (discovered) {
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index dc74c4eb2f..6d6fb02a68 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -1025,11 +1025,10 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
-#if (Q_DIRECTFB_VERSION >= 0x010209)
case QPainter::CompositionMode_Destination:
- surface->SetPorterDuff(surface, DSPD_DST);
+ surface->SetSrcBlendFunction(surface, DSBF_ZERO);
+ surface->SetDstBlendFunction(surface, DSBF_ONE);
break;
-#endif
#if (Q_DIRECTFB_VERSION >= 0x010000)
case QPainter::CompositionMode_SourceAtop:
surface->SetPorterDuff(surface, DSPD_SRC_ATOP);
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index a70d232f29..69a69227f7 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -59,10 +59,16 @@
#include "qmeegographicssystem.h"
#include "qmeegoextensions.h"
+#include <QTimer>
+
bool QMeeGoGraphicsSystem::surfaceWasCreated = false;
QHash <Qt::HANDLE, QPixmap*> QMeeGoGraphicsSystem::liveTexturePixmaps;
+QList<QMeeGoSwitchCallback> QMeeGoGraphicsSystem::switchCallbacks;
+
+QMeeGoGraphicsSystem::SwitchPolicy QMeeGoGraphicsSystem::switchPolicy = QMeeGoGraphicsSystem::AutomaticSwitch;
+
QMeeGoGraphicsSystem::QMeeGoGraphicsSystem()
{
qDebug("Using the meego graphics system");
@@ -74,6 +80,115 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem()
qt_destroy_gl_share_widget();
}
+class QMeeGoGraphicsSystemSwitchHandler : public QObject
+{
+ Q_OBJECT
+public:
+ QMeeGoGraphicsSystemSwitchHandler();
+
+ void addWidget(QWidget *widget);
+ bool eventFilter(QObject *, QEvent *);
+
+ void handleMapNotify();
+
+private slots:
+ void removeWidget(QObject *object);
+ void switchToRaster();
+ void switchToMeeGo();
+
+private:
+ int visibleWidgets() const;
+
+private:
+ QList<QWidget *> m_widgets;
+};
+
+typedef bool(*QX11FilterFunction)(XEvent *event);
+Q_GUI_EXPORT void qt_installX11EventFilter(QX11FilterFunction func);
+
+static bool x11EventFilter(XEvent *event);
+
+QMeeGoGraphicsSystemSwitchHandler::QMeeGoGraphicsSystemSwitchHandler()
+{
+ qt_installX11EventFilter(x11EventFilter);
+}
+
+void QMeeGoGraphicsSystemSwitchHandler::addWidget(QWidget *widget)
+{
+ if (widget != qt_gl_share_widget() && !m_widgets.contains(widget)) {
+ widget->installEventFilter(this);
+ connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(removeWidget(QObject *)));
+ m_widgets << widget;
+ }
+}
+
+void QMeeGoGraphicsSystemSwitchHandler::handleMapNotify()
+{
+ if (m_widgets.isEmpty() && QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch)
+ QTimer::singleShot(0, this, SLOT(switchToMeeGo()));
+}
+
+void QMeeGoGraphicsSystemSwitchHandler::removeWidget(QObject *object)
+{
+ m_widgets.removeOne(static_cast<QWidget *>(object));
+ if (m_widgets.isEmpty() && QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch)
+ QTimer::singleShot(0, this, SLOT(switchToRaster()));
+}
+
+void QMeeGoGraphicsSystemSwitchHandler::switchToRaster()
+{
+ QMeeGoGraphicsSystem::switchToRaster();
+}
+
+void QMeeGoGraphicsSystemSwitchHandler::switchToMeeGo()
+{
+ QMeeGoGraphicsSystem::switchToMeeGo();
+}
+
+int QMeeGoGraphicsSystemSwitchHandler::visibleWidgets() const
+{
+ int count = 0;
+ for (int i = 0; i < m_widgets.size(); ++i)
+ count += m_widgets.at(i)->isVisible() && !(m_widgets.at(i)->windowState() & Qt::WindowMinimized);
+ return count;
+}
+
+bool QMeeGoGraphicsSystemSwitchHandler::eventFilter(QObject *object, QEvent *event)
+{
+ if (event->type() == QEvent::WindowStateChange
+ && QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch)
+ {
+ QWindowStateChangeEvent *change = static_cast<QWindowStateChangeEvent *>(event);
+ QWidget *widget = static_cast<QWidget *>(object);
+
+ Qt::WindowStates current = widget->windowState();
+ Qt::WindowStates old = change->oldState();
+
+ // did minimized flag change?
+ if ((current ^ old) & Qt::WindowMinimized) {
+ if (current & Qt::WindowMinimized) {
+ if (visibleWidgets() == 0)
+ QMeeGoGraphicsSystem::switchToRaster();
+ } else {
+ if (visibleWidgets() > 0)
+ QMeeGoGraphicsSystem::switchToMeeGo();
+ }
+ }
+ }
+
+ // resume processing of event
+ return false;
+}
+
+Q_GLOBAL_STATIC(QMeeGoGraphicsSystemSwitchHandler, switch_handler)
+
+bool x11EventFilter(XEvent *event)
+{
+ if (event->type == MapNotify)
+ switch_handler()->handleMapNotify();
+ return false;
+}
+
QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
{
QGLWidget *shareWidget = qt_gl_share_widget();
@@ -83,6 +198,9 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
QGLShareContextScope ctx(shareWidget->context());
+ if (QApplicationPrivate::instance()->graphics_system_name == QLatin1String("runtime"))
+ switch_handler()->addWidget(widget);
+
QMeeGoGraphicsSystem::surfaceWasCreated = true;
QWindowSurface *surface = new QGLWindowSurface(widget);
return surface;
@@ -171,7 +289,7 @@ QPixmapData *QMeeGoGraphicsSystem::pixmapDataFromEGLSharedImage(Qt::HANDLE handl
return QMeeGoGraphicsSystem::wrapPixmapData(pmd);
} else {
QRasterPixmapData *pmd = new QRasterPixmapData(QPixmapData::PixmapType);
- pmd->fromImage(softImage, Qt::NoOpaqueDetection);
+ pmd->fromImage(softImage, Qt::NoFormatConversion);
// Make sure that the image was not converted in any way
if (pmd->buffer()->data_ptr()->data !=
@@ -203,18 +321,7 @@ QPixmapData *QMeeGoGraphicsSystem::pixmapDataWithGLTexture(int w, int h)
bool QMeeGoGraphicsSystem::meeGoRunning()
{
- if (! QApplicationPrivate::instance()) {
- qWarning("Application not running just yet... hard to know what system running!");
- return false;
- }
-
- QString name = QApplicationPrivate::instance()->graphics_system_name;
- if (name == "runtime") {
- QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system;
- name = rsystem->graphicsSystemName();
- }
-
- return (name == "meego");
+ return runningGraphicsSystemName() == "meego";
}
QPixmapData* QMeeGoGraphicsSystem::pixmapDataWithNewLiveTexture(int w, int h, QImage::Format format)
@@ -259,6 +366,69 @@ void QMeeGoGraphicsSystem::destroyFenceSync(void *fenceSync)
QMeeGoExtensions::eglDestroySyncKHR(QEgl::display(), fenceSync);
}
+QString QMeeGoGraphicsSystem::runningGraphicsSystemName()
+{
+ if (!QApplicationPrivate::instance()) {
+ qWarning("Querying graphics system but application not running yet!");
+ return QString();
+ }
+
+ QString name = QApplicationPrivate::instance()->graphics_system_name;
+ if (name == QLatin1String("runtime")) {
+ QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system;
+ name = rsystem->graphicsSystemName();
+ }
+
+ return name;
+}
+
+void QMeeGoGraphicsSystem::switchToMeeGo()
+{
+ if (switchPolicy == NoSwitch || meeGoRunning())
+ return;
+
+ if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
+ qWarning("Can't switch to meego - switching only supported with 'runtime' graphics system.");
+ else {
+ triggerSwitchCallbacks(0, "meego");
+
+ QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
+ app->setGraphicsSystem(QLatin1String("meego"));
+
+ triggerSwitchCallbacks(1, "meego");
+ }
+}
+
+void QMeeGoGraphicsSystem::switchToRaster()
+{
+ if (switchPolicy == NoSwitch || runningGraphicsSystemName() == QLatin1String("raster"))
+ return;
+
+ if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
+ qWarning("Can't switch to raster - switching only supported with 'runtime' graphics system.");
+ else {
+ triggerSwitchCallbacks(0, "raster");
+
+ QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
+ app->setGraphicsSystem(QLatin1String("raster"));
+
+ QMeeGoLivePixmapData::invalidateSurfaces();
+
+ triggerSwitchCallbacks(1, "raster");
+ }
+}
+
+void QMeeGoGraphicsSystem::registerSwitchCallback(QMeeGoSwitchCallback callback)
+{
+ switchCallbacks << callback;
+}
+
+void QMeeGoGraphicsSystem::triggerSwitchCallbacks(int type, const char *name)
+{
+ for (int i = 0; i < switchCallbacks.size(); ++i)
+ switchCallbacks.at(i)(type, name);
+}
+
/* C API */
int qt_meego_image_to_egl_shared_image(const QImage &image)
@@ -335,3 +505,30 @@ void qt_meego_destroy_fence_sync(void* fs)
{
return QMeeGoGraphicsSystem::destroyFenceSync(fs);
}
+
+void qt_meego_invalidate_live_surfaces(void)
+{
+ return QMeeGoLivePixmapData::invalidateSurfaces();
+}
+
+void qt_meego_switch_to_raster(void)
+{
+ QMeeGoGraphicsSystem::switchToRaster();
+}
+
+void qt_meego_switch_to_meego(void)
+{
+ QMeeGoGraphicsSystem::switchToMeeGo();
+}
+
+void qt_meego_register_switch_callback(QMeeGoSwitchCallback callback)
+{
+ QMeeGoGraphicsSystem::registerSwitchCallback(callback);
+}
+
+void qt_meego_set_switch_policy(int policy)
+{
+ QMeeGoGraphicsSystem::switchPolicy = QMeeGoGraphicsSystem::SwitchPolicy(policy);
+}
+
+#include "qmeegographicssystem.moc"
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.h b/src/plugins/graphicssystems/meego/qmeegographicssystem.h
index 323ce1fcb9..352842546f 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.h
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.h
@@ -47,9 +47,13 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+extern "C" typedef void (*QMeeGoSwitchCallback)(int type, const char *name);
+
class QMeeGoGraphicsSystem : public QGraphicsSystem
{
public:
+ enum SwitchPolicy { AutomaticSwitch, ManualSwitch, NoSwitch };
+
QMeeGoGraphicsSystem();
~QMeeGoGraphicsSystem();
@@ -76,13 +80,23 @@ public:
static void* createFenceSync();
static void destroyFenceSync(void* fenceSync);
+ static void switchToRaster();
+ static void switchToMeeGo();
+ static QString runningGraphicsSystemName();
+
+ static void registerSwitchCallback(QMeeGoSwitchCallback callback);
+
+ static SwitchPolicy switchPolicy;
+
private:
static bool meeGoRunning();
static EGLSurface getSurfaceForLiveTexturePixmap(QPixmap *pixmap);
static void destroySurfaceForLiveTexturePixmap(QPixmapData* pmd);
+ static void triggerSwitchCallbacks(int type, const char *name);
static bool surfaceWasCreated;
- static QHash <Qt::HANDLE, QPixmap*> liveTexturePixmaps;
+ static QHash<Qt::HANDLE, QPixmap*> liveTexturePixmaps;
+ static QList<QMeeGoSwitchCallback> switchCallbacks;
};
/* C api */
@@ -95,7 +109,7 @@ extern "C" {
Q_DECL_EXPORT bool qt_meego_destroy_egl_shared_image(Qt::HANDLE handle);
Q_DECL_EXPORT void qt_meego_set_surface_fixed_size(int width, int height);
Q_DECL_EXPORT void qt_meego_set_surface_scaling(int x, int y, int width, int height);
- Q_DECL_EXPORT void qt_meego_set_translucent(bool translucent);
+ Q_DECL_EXPORT void qt_meego_set_translucent(bool translucent);
Q_DECL_EXPORT QPixmapData* qt_meego_pixmapdata_with_new_live_texture(int w, int h, QImage::Format format);
Q_DECL_EXPORT QPixmapData* qt_meego_pixmapdata_from_live_texture_handle(Qt::HANDLE handle);
Q_DECL_EXPORT QImage* qt_meego_live_texture_lock(QPixmap *pixmap, void *fenceSync);
@@ -103,6 +117,11 @@ extern "C" {
Q_DECL_EXPORT Qt::HANDLE qt_meego_live_texture_get_handle(QPixmap *pixmap);
Q_DECL_EXPORT void* qt_meego_create_fence_sync(void);
Q_DECL_EXPORT void qt_meego_destroy_fence_sync(void* fs);
+ Q_DECL_EXPORT void qt_meego_invalidate_live_surfaces(void);
+ Q_DECL_EXPORT void qt_meego_switch_to_raster(void);
+ Q_DECL_EXPORT void qt_meego_switch_to_meego(void);
+ Q_DECL_EXPORT void qt_meego_register_switch_callback(QMeeGoSwitchCallback callback);
+ Q_DECL_EXPORT void qt_meego_set_switch_policy(int policy);
}
#endif
diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
index e4f1900566..b6ba7ec29f 100644
--- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
@@ -49,6 +49,8 @@
#include <private/qpixmap_x11_p.h>
#include <stdio.h>
+static QMeeGoLivePixmapDataList all_live_pixmaps;
+
static EGLint lock_attribs[] = {
EGL_MAP_PRESERVE_PIXELS_KHR, EGL_TRUE,
EGL_LOCK_USAGE_HINT_KHR, EGL_READ_SURFACE_BIT_KHR | EGL_WRITE_SURFACE_BIT_KHR,
@@ -118,21 +120,29 @@ QMeeGoLivePixmapData::QMeeGoLivePixmapData(int w, int h, QImage::Format format)
backingX11Pixmap = new QPixmap(pmd);
initializeThroughEGLImage();
+
+ pos = all_live_pixmaps.insert(all_live_pixmaps.begin(), this);
}
QMeeGoLivePixmapData::QMeeGoLivePixmapData(Qt::HANDLE h) : QGLPixmapData(QPixmapData::PixmapType)
{
backingX11Pixmap = new QPixmap(QPixmap::fromX11Pixmap(h));
initializeThroughEGLImage();
+
+ pos = all_live_pixmaps.insert(all_live_pixmaps.begin(), this);
}
QMeeGoLivePixmapData::~QMeeGoLivePixmapData()
{
delete backingX11Pixmap;
+ all_live_pixmaps.erase(pos);
}
void QMeeGoLivePixmapData::initializeThroughEGLImage()
{
+ if (texture()->id != 0)
+ return;
+
QGLShareContextScope ctx(qt_gl_share_widget()->context());
QMeeGoExtensions::ensureInitialized();
@@ -184,6 +194,8 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
void *data = 0;
int pitch = 0;
+ int surfaceWidth = 0;
+ int surfaceHeight = 0;
EGLSurface surface = 0;
QImage::Format format;
lockedImage = QImage();
@@ -196,9 +208,11 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_POINTER_KHR, (EGLint*) &data);
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_PITCH_KHR, (EGLint*) &pitch);
+ eglQuerySurface(QEgl::display(), surface, EGL_WIDTH, (EGLint*) &surfaceWidth);
+ eglQuerySurface(QEgl::display(), surface, EGL_HEIGHT, (EGLint*) &surfaceHeight);
// Ok, here we know we just support those two formats. Real solution would be:
- // uqery also the format.
+ // query also the format.
if (backingX11Pixmap->depth() > 16)
format = QImage::Format_ARGB32_Premultiplied;
else
@@ -209,7 +223,13 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
return &lockedImage;
}
- lockedImage = QImage((uchar *) data, width(), height(), format);
+ if (width() != surfaceWidth || height() != surfaceHeight) {
+ qWarning("Live texture dimensions don't match!");
+ QMeeGoExtensions::eglUnlockSurfaceKHR(QEgl::display(), surface);
+ return &lockedImage;
+ }
+
+ lockedImage = QImage((uchar *) data, width(), height(), pitch, format);
return &lockedImage;
}
@@ -245,6 +265,8 @@ bool QMeeGoLivePixmapData::scroll(int dx, int dy, const QRect &rect)
EGLSurface QMeeGoLivePixmapData::getSurfaceForBackingPixmap()
{
+ initializeThroughEGLImage();
+
// This code is a crative remix of the stuff that can be found in the
// Qt's TFP implementation in /src/opengl/qgl_x11egl.cpp ::bindiTextureFromNativePixmap
QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(backingX11Pixmap->data_ptr().data());
@@ -290,3 +312,12 @@ void QMeeGoLivePixmapData::destroySurfaceForPixmapData(QPixmapData* pmd)
pixmapData->gl_surface = 0;
}
}
+
+void QMeeGoLivePixmapData::invalidateSurfaces()
+{
+ foreach (QMeeGoLivePixmapData *data, all_live_pixmaps) {
+ QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(data->backingX11Pixmap->data_ptr().data());
+ *data->texture() = QGLTexture();
+ pixmapData->gl_surface = 0;
+ }
+}
diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h
index 484028e61d..616b33cc95 100644
--- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h
+++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.h
@@ -42,9 +42,13 @@
#ifndef MLIVEPIXMAPDATA_H
#define MLIVEPIXMAPDATA_H
+#include <QLinkedList>
#include <private/qpixmapdata_gl_p.h>
#include "qmeegoextensions.h"
+class QMeeGoLivePixmapData;
+typedef QLinkedList<QMeeGoLivePixmapData *> QMeeGoLivePixmapDataList;
+
class QMeeGoLivePixmapData : public QGLPixmapData
{
public:
@@ -66,6 +70,9 @@ public:
QPixmap *backingX11Pixmap;
QImage lockedImage;
+ QMeeGoLivePixmapDataList::Iterator pos;
+
+ static void invalidateSurfaces();
};
#endif
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
index 0c107b54ab..4b4f677026 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
@@ -42,7 +42,8 @@
#include "qgraphicssystem_vg_p.h"
#include <QtOpenVG/private/qpixmapdata_vg_p.h>
#include <QtOpenVG/private/qwindowsurface_vg_p.h>
-#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
+#include <QtOpenVG/private/qvgimagepool_p.h>
+#if defined(Q_OS_SYMBIAN)
#include <QtGui/private/qwidget_p.h>
#endif
#include <QtGui/private/qapplication_p.h>
@@ -69,12 +70,19 @@ QPixmapData *QVGGraphicsSystem::createPixmapData(QPixmapData::PixelType type) co
QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const
{
-#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
- QWidgetPrivate *d = qt_widget_private(widget);
- if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
- return d->createDefaultWindowSurface_sys();
+#if defined(Q_OS_SYMBIAN)
+ if (!QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ QWidgetPrivate *d = qt_widget_private(widget);
+ if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
+ return d->createDefaultWindowSurface_sys();
+ }
#endif
return new QVGWindowSurface(widget);
}
+void QVGGraphicsSystem::releaseCachedResources()
+{
+ QVGImagePool::instance()->hibernate();
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
index d1bce28dd4..9c9b3e2b2e 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
@@ -64,6 +64,8 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
+
+ void releaseCachedResources();
};
QT_END_NAMESPACE
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index afa090100d..e778ab74d7 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -13,5 +13,4 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS += accessible
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
-contains(QT_CONFIG, multimedia): SUBDIRS *= audio
contains(QT_CONFIG, declarative): SUBDIRS *= qmltooling
diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri
index 7cbffe05b0..6c33e92359 100644
--- a/src/plugins/qpluginbase.pri
+++ b/src/plugins/qpluginbase.pri
@@ -1,6 +1,6 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.7.2
+ VERSION=4.7.4
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
index 494c64c55f..b7a87f38d8 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
@@ -1,6 +1,12 @@
# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
!symbian-abld:!symbian-sbsv2 {
!symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ contains(QMAKE_HOST.os,Windows) {
+ # Trick on Windows to do a touch on the file, since copy keeps the timestamp.
+ copyWithTouch = copy /y /b NUL+
+ } else {
+ copyWithTouch = "$$QMAKE_COPY "
+ }
symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
# The QMAKE_COPY section is to update timestamp on the file.
@@ -10,7 +16,7 @@
symbian_sqlite3_header.CONFIG = combine no_link
symbian_sqlite3_header.dependency_type = TYPE_C
symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
- && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
+ && $${copyWithTouch}${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
&& $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
&& $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
silent:symbian_sqlite3_header.commands = @echo unzipping $@ && $$symbian_sqlite3_header.commands
@@ -22,12 +28,18 @@
!isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
- && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
+ && $${copyWithTouch}${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
&& $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
&& $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
silent:symbian_sqlite3_dso.commands = @echo unzipping $@ && $$symbian_sqlite3_dso.commands
QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
+ # Workaround for the fact that make doesn't understand that sqlite3.dso
+ # is the same as $OBJECTS_DIR/sqlite3.dso
+ symbian_sqlite3_dso_standalone.target = sqlite3.dso
+ symbian_sqlite3_dso_standalone.depends = $$symbian_sqlite3_dso.output
+ QMAKE_EXTRA_TARGETS += symbian_sqlite3_dso_standalone
+
symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
!isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
diff --git a/src/qbase.pri b/src/qbase.pri
index 75da3dc8f3..5d78336a10 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat
isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.7.2
+ VERSION=4.7.4
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/src/qt3support/tools/q3asciidict.qdoc b/src/qt3support/tools/q3asciidict.qdoc
index e744633290..c276682ef8 100644
--- a/src/qt3support/tools/q3asciidict.qdoc
+++ b/src/qt3support/tools/q3asciidict.qdoc
@@ -43,7 +43,7 @@
performace as a Q3AsciiDict.
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 0
In this example we use a dictionary to keep track of the line
edits we're using. We insert each line edit into the dictionary
with a unique name and then access the line edits via the
@@ -164,7 +164,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -295,7 +295,7 @@
iterator that operates on Q3AsciiDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 2
In the example we insert some line edits into a dictionary, then
iterate over the dictionary printing the strings associated with
those line edits.
diff --git a/src/qt3support/tools/q3dict.qdoc b/src/qt3support/tools/q3dict.qdoc
index 6b221f13e0..8fcbba4616 100644
--- a/src/qt3support/tools/q3dict.qdoc
+++ b/src/qt3support/tools/q3dict.qdoc
@@ -192,7 +192,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 0
If there are two or more items with equal keys, then the last item
that was inserted will be replaced.
@@ -326,7 +326,7 @@
point to the next item in the (arbitrary) traversal order.
Example:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 1
In the example we insert some pointers to line edits into a
dictionary, then iterate over the dictionary printing the strings
associated with the line edits.
diff --git a/src/qt3support/tools/q3intdict.qdoc b/src/qt3support/tools/q3intdict.qdoc
index 684fc63529..f108f304c3 100644
--- a/src/qt3support/tools/q3intdict.qdoc
+++ b/src/qt3support/tools/q3intdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 0
See Q3Dict for full details, including the choice of dictionary
size, and how deletions are handled.
@@ -145,7 +145,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -270,7 +270,7 @@
iterator that operates on Q3IntDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 2
Note that the traversal order is arbitrary; you are not guaranteed the
order shown above.
diff --git a/src/qt3support/tools/q3memarray.qdoc b/src/qt3support/tools/q3memarray.qdoc
index f05f4339ad..5d6f9b2928 100644
--- a/src/qt3support/tools/q3memarray.qdoc
+++ b/src/qt3support/tools/q3memarray.qdoc
@@ -51,7 +51,7 @@
and less copying of data.
Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 0
Program output:
\snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 1
@@ -63,7 +63,7 @@
the remaining bytes will typically be uninitialized, this can
cause find() etc. to fail to find the element. Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 2
To work around this, make sure that you use a struct where
sizeof() returns the same as the sum of the sizes of the members
@@ -352,10 +352,10 @@
allocating memory or copying data.
Example I (intended use):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 3
Example II (you don't want to do this):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 4
\warning If you do not call resetRawData(), Q3MemArray will attempt
to deallocate or reallocate the raw data, which might not be too
diff --git a/src/qt3support/tools/q3ptrdict.qdoc b/src/qt3support/tools/q3ptrdict.qdoc
index 8831a55af0..21dcdfda7a 100644
--- a/src/qt3support/tools/q3ptrdict.qdoc
+++ b/src/qt3support/tools/q3ptrdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 0
In this example we use a dictionary to add an extra property (a
char*) to the line edits we're using.
@@ -147,7 +147,7 @@
\a item may not be 0.
Equivalent to
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -272,7 +272,7 @@
iterator that operates on Q3PtrDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 2
In the example we insert some line edits into a dictionary,
associating a string with each. We then iterate over the
dictionary printing the associated strings.
diff --git a/src/qt3support/tools/q3ptrlist.qdoc b/src/qt3support/tools/q3ptrlist.qdoc
index 13e478e846..e19d6bf5ba 100644
--- a/src/qt3support/tools/q3ptrlist.qdoc
+++ b/src/qt3support/tools/q3ptrlist.qdoc
@@ -54,10 +54,10 @@
\target example
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 0
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 1
Q3PtrList has several member functions for traversing the list, but
using a Q3PtrListIterator can be more practical. Multiple list
@@ -353,7 +353,7 @@
auto-deletion\endlink is enabled.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 2
The item after the removed item becomes the new current list item
if the removed item is not the last item in the list. If the last
@@ -785,10 +785,10 @@
but it uses Q3PtrListIterator. The class Employee is
defined there.
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 3
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 4
Using a list iterator is a more robust way of traversing the list
than using the Q3PtrList member functions \link Q3PtrList::first()
diff --git a/src/qt3support/tools/q3valuelist.qdoc b/src/qt3support/tools/q3valuelist.qdoc
index 99f1634f2c..a5ebf6082a 100644
--- a/src/qt3support/tools/q3valuelist.qdoc
+++ b/src/qt3support/tools/q3valuelist.qdoc
@@ -71,7 +71,7 @@
prefer to use the STL-compatible functions.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 0
Notice that the latest changes to Mary's salary did not affect the
@@ -99,7 +99,7 @@
(your application will crash or do unpredictable things). Use
last() and first() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 1
Because Q3ValueList is value-based there is no need to be careful
about deleting items in the list. The list holds its own copies
@@ -352,7 +352,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 2
*/
@@ -364,7 +364,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 3
*/
@@ -443,7 +443,7 @@
iterator.
Example (see Q3ValueList for the complete code):
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 4
Q3ValueList is highly optimized for performance and memory usage.
This means that you must be careful: Q3ValueList does not know
diff --git a/src/qt3support/tools/q3valuestack.qdoc b/src/qt3support/tools/q3valuestack.qdoc
index 4ad0d7d503..6c2c57bee9 100644
--- a/src/qt3support/tools/q3valuestack.qdoc
+++ b/src/qt3support/tools/q3valuestack.qdoc
@@ -44,7 +44,7 @@
without removing it.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuestack.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuestack.cpp 0
Q3ValueStack is a specialized Q3ValueList provided for convenience.
All of Q3ValueList's functionality also applies to Q3PtrStack, for
diff --git a/src/qt3support/tools/q3valuevector.qdoc b/src/qt3support/tools/q3valuevector.qdoc
index 58bd8e35be..960bbacc27 100644
--- a/src/qt3support/tools/q3valuevector.qdoc
+++ b/src/qt3support/tools/q3valuevector.qdoc
@@ -70,10 +70,10 @@
objects it contains.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 0
Program output:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 1
As you can see, the most recent change to Joe's salary did not
affect the value in the vector because the vector created a copy
@@ -102,13 +102,13 @@
an element that does not exist (your application will probably
crash). For example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 2
Whenever inserting, removing or referencing elements in a vector,
always make sure you are referring to valid positions. For
example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 3
The iterators provided by vector are random access iterators,
therefore you can use them with many generic algorithms, for
@@ -127,7 +127,7 @@
application will crash or do unpredictable things). Use back() and
front() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 4
Because Q3ValueVector manages memory dynamically, it is recommended
that you contruct a vector with an initial size. Inserting and
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index a41f784a5f..26a07612ab 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -12952,4 +12952,33 @@ EXPORTS
?isWordSelectionEnabled@QTextControl@@QBE_NXZ @ 12951 NONAME ; bool QTextControl::isWordSelectionEnabled(void) const
?assignedInputContext@QWidgetPrivate@@QBEPAVQInputContext@@XZ @ 12952 NONAME ; class QInputContext * QWidgetPrivate::assignedInputContext(void) const
?updateMicroFocus@QLineControl@@IAEXXZ @ 12953 NONAME ; void QLineControl::updateMicroFocus(void)
+ ?beginDataAccess@QVolatileImage@@QBEXXZ @ 12954 NONAME ; void QVolatileImage::beginDataAccess(void) const
+ ??1QVolatileImage@@QAE@XZ @ 12955 NONAME ; QVolatileImage::~QVolatileImage(void)
+ ??0QVolatileImage@@QAE@HHW4Format@QImage@@@Z @ 12956 NONAME ; QVolatileImage::QVolatileImage(int, int, enum QImage::Format)
+ ?ensureFormat@QVolatileImage@@QAE_NW4Format@QImage@@@Z @ 12957 NONAME ; bool QVolatileImage::ensureFormat(enum QImage::Format)
+ ?fill@QVolatileImage@@QAEXI@Z @ 12958 NONAME ; void QVolatileImage::fill(unsigned int)
+ ?isNull@QVolatileImage@@QBE_NXZ @ 12959 NONAME ; bool QVolatileImage::isNull(void) const
+ ?toImage@QVolatileImage@@QBE?AVQImage@@XZ @ 12960 NONAME ; class QImage QVolatileImage::toImage(void) const
+ ??0QVolatileImage@@QAE@ABVQImage@@@Z @ 12961 NONAME ; QVolatileImage::QVolatileImage(class QImage const &)
+ ?format@QVolatileImage@@QBE?AW4Format@QImage@@XZ @ 12962 NONAME ; enum QImage::Format QVolatileImage::format(void) const
+ ?endDataAccess@QVolatileImage@@QBEX_N@Z @ 12963 NONAME ; void QVolatileImage::endDataAccess(bool) const
+ ?constBits@QVolatileImage@@QBEPBEXZ @ 12964 NONAME ; unsigned char const * QVolatileImage::constBits(void) const
+ ?height@QVolatileImage@@QBEHXZ @ 12965 NONAME ; int QVolatileImage::height(void) const
+ ?duplicateNativeImage@QVolatileImage@@QBEPAXXZ @ 12966 NONAME ; void * QVolatileImage::duplicateNativeImage(void) const
+ ?bits@QVolatileImage@@QAEPAEXZ @ 12967 NONAME ; unsigned char * QVolatileImage::bits(void)
+ ?paintEngine@QVolatileImage@@QAEPAVQPaintEngine@@XZ @ 12968 NONAME ; class QPaintEngine * QVolatileImage::paintEngine(void)
+ ?bytesPerLine@QVolatileImage@@QBEHXZ @ 12969 NONAME ; int QVolatileImage::bytesPerLine(void) const
+ ?width@QVolatileImage@@QBEHXZ @ 12970 NONAME ; int QVolatileImage::width(void) const
+ ?copyFrom@QVolatileImage@@QAEXPAV1@ABVQRect@@@Z @ 12971 NONAME ; void QVolatileImage::copyFrom(class QVolatileImage *, class QRect const &)
+ ?imageRef@QVolatileImage@@QAEAAVQImage@@XZ @ 12972 NONAME ; class QImage & QVolatileImage::imageRef(void)
+ ??0QVolatileImage@@QAE@PAX0@Z @ 12973 NONAME ; QVolatileImage::QVolatileImage(void *, void *)
+ ??4QVolatileImage@@QAEAAV0@ABV0@@Z @ 12974 NONAME ; class QVolatileImage & QVolatileImage::operator=(class QVolatileImage const &)
+ ??0QVolatileImage@@QAE@XZ @ 12975 NONAME ; QVolatileImage::QVolatileImage(void)
+ ?hasAlphaChannel@QVolatileImage@@QBE_NXZ @ 12976 NONAME ; bool QVolatileImage::hasAlphaChannel(void) const
+ ?setAlphaChannel@QVolatileImage@@QAEXABVQPixmap@@@Z @ 12977 NONAME ; void QVolatileImage::setAlphaChannel(class QPixmap const &)
+ ?byteCount@QVolatileImage@@QBEHXZ @ 12978 NONAME ; int QVolatileImage::byteCount(void) const
+ ??0QVolatileImage@@QAE@ABV0@@Z @ 12979 NONAME ; QVolatileImage::QVolatileImage(class QVolatileImage const &)
+ ?depth@QVolatileImage@@QBEHXZ @ 12980 NONAME ; int QVolatileImage::depth(void) const
+ ?releaseCachedResources@QGraphicsSystem@@UAEXXZ @ 12981 NONAME ; void QGraphicsSystem::releaseCachedResources(void)
+ ?qt_s60_setPartialScreenInputMode@@YAX_N@Z @ 12982 NONAME ; void qt_s60_setPartialScreenInputMode(bool)
diff --git a/src/s60installs/bwins/QtOpenGLu.def b/src/s60installs/bwins/QtOpenGLu.def
index 620fcb9b72..d7c83947f2 100644
--- a/src/s60installs/bwins/QtOpenGLu.def
+++ b/src/s60installs/bwins/QtOpenGLu.def
@@ -703,4 +703,23 @@ EXPORTS
?maxTextureWidth@QGLTextureGlyphCache@@UBEHXZ @ 702 NONAME ; int QGLTextureGlyphCache::maxTextureWidth(void) const
?filterMode@QGLTextureGlyphCache@@QBE?AW4FilterMode@1@XZ @ 703 NONAME ; enum QGLTextureGlyphCache::FilterMode QGLTextureGlyphCache::filterMode(void) const
?setFilterMode@QGLTextureGlyphCache@@QAEXW4FilterMode@1@@Z @ 704 NONAME ; void QGLTextureGlyphCache::setFilterMode(enum QGLTextureGlyphCache::FilterMode)
+ ?toNativeType@QGLPixmapData@@UAEPAXW4NativeType@QPixmapData@@@Z @ 705 NONAME ; void * QGLPixmapData::toNativeType(enum QPixmapData::NativeType)
+ ?fromNativeType@QGLPixmapData@@UAEXPAXW4NativeType@QPixmapData@@@Z @ 706 NONAME ; void QGLPixmapData::fromNativeType(void *, enum QPixmapData::NativeType)
+ ?clear@QGLTextureGlyphCache@@QAEXXZ @ 707 NONAME ; void QGLTextureGlyphCache::clear(void)
+ ?context@QGLTextureGlyphCache@@QBEPAVQGLContext@@XZ @ 708 NONAME ; class QGLContext * QGLTextureGlyphCache::context(void) const
+ ?swapBehavior@QGLWindowSurface@@2W4SwapMode@1@A @ 709 NONAME ; enum QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior
+ ?createPixmapForImage@QGLPixmapData@@AAEXAAVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@_N@Z @ 710 NONAME ; void QGLPixmapData::createPixmapForImage(class QImage &, class QFlags<enum Qt::ImageConversionFlag>, bool)
+ ?fromImageReader@QGLPixmapData@@UAEXPAVQImageReader@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 711 NONAME ; void QGLPixmapData::fromImageReader(class QImageReader *, class QFlags<enum Qt::ImageConversionFlag>)
+ ?setContext@QGLTextureGlyphCache@@QAEXPAVQGLContext@@@Z @ 712 NONAME ; void QGLTextureGlyphCache::setContext(class QGLContext *)
+ ?hibernate@QGLPixmapData@@QAEXXZ @ 713 NONAME ; void QGLPixmapData::hibernate(void)
+ ?detachTextureFromPool@QGLPixmapData@@QAEXXZ @ 714 NONAME ; void QGLPixmapData::detachTextureFromPool(void)
+ ?reclaimTexture@QGLPixmapData@@QAEXXZ @ 715 NONAME ; void QGLPixmapData::reclaimTexture(void)
+ ?destroyTexture@QGLPixmapData@@QAEXXZ @ 716 NONAME ; void QGLPixmapData::destroyTexture(void)
+ ?releaseCachedResources@QGLGraphicsSystem@@UAEXXZ @ 717 NONAME ; void QGLGraphicsSystem::releaseCachedResources(void)
+ ?serialNumber@QGLTextureGlyphCache@@QBEHXZ @ 718 NONAME ; int QGLTextureGlyphCache::serialNumber(void) const
+ ?forceToImage@QGLPixmapData@@QAEXXZ @ 719 NONAME ; void QGLPixmapData::forceToImage(void)
+ ?idealFormat@QGLPixmapData@@QAE?AW4Format@QImage@@AAV3@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 720 NONAME ; enum QImage::Format QGLPixmapData::idealFormat(class QImage &, class QFlags<enum Qt::ImageConversionFlag>)
+ ?releaseNativeImageHandle@QGLPixmapData@@QAEXXZ @ 721 NONAME ; void QGLPixmapData::releaseNativeImageHandle(void)
+ ?createFromNativeImageHandleProvider@QGLPixmapData@@QAEXXZ @ 722 NONAME ; void QGLPixmapData::createFromNativeImageHandleProvider(void)
+ ?initFromNativeImageHandle@QGLPixmapData@@QAE_NPAXABVQString@@@Z @ 723 NONAME ; bool QGLPixmapData::initFromNativeImageHandle(void *, class QString const &)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 87b9c7f03c..f2433d6612 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -134,7 +134,7 @@ EXPORTS
?drawTextItem@QVGPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 133 NONAME ; void QVGPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &)
?clearScissor@QVGCompositionHelper@@QAEXXZ @ 134 NONAME ; void QVGCompositionHelper::clearScissor(void)
?fill@QVGPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 135 NONAME ; void QVGPaintEngine::fill(class QVectorPath const &, class QBrush const &)
- ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ; void QVGPixmapData::forceToImage(void)
+ ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ABSENT ; void QVGPixmapData::forceToImage(void)
?drawPoints@QVGPaintEngine@@UAEXPBVQPoint@@H@Z @ 137 NONAME ; void QVGPaintEngine::drawPoints(class QPoint const *, int)
??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int)
?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation)
@@ -176,4 +176,12 @@ EXPORTS
?fromData@QVGPixmapData@@UAE_NPBEIPBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 175 NONAME ; bool QVGPixmapData::fromData(unsigned char const *, unsigned int, char const *, class QFlags<enum Qt::ImageConversionFlag>)
?fromImageReader@QVGPixmapData@@UAEXPAVQImageReader@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 176 NONAME ; void QVGPixmapData::fromImageReader(class QImageReader *, class QFlags<enum Qt::ImageConversionFlag>)
?canVgWritePixels@QVGPaintEngine@@ABE_NABVQImage@@@Z @ 177 NONAME ; bool QVGPaintEngine::canVgWritePixels(class QImage const &) const
+ ?updateSerial@QVGPixmapData@@IAEXXZ @ 178 NONAME ; void QVGPixmapData::updateSerial(void)
+ ?copy@QVGPixmapData@@UAEXPBVQPixmapData@@ABVQRect@@@Z @ 179 NONAME ; void QVGPixmapData::copy(class QPixmapData const *, class QRect const &)
+ ?idealFormat@QVGPixmapData@@IBE?AW4Format@QImage@@PAV3@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 180 NONAME ; enum QImage::Format QVGPixmapData::idealFormat(class QImage *, class QFlags<enum Qt::ImageConversionFlag>) const
+ ?ensureReadback@QVGPixmapData@@UBEX_N@Z @ 181 NONAME ; void QVGPixmapData::ensureReadback(bool) const
+ ?initFromNativeImageHandle@QVGPixmapData@@QAE_NPAXABVQString@@@Z @ 182 NONAME ; bool QVGPixmapData::initFromNativeImageHandle(void *, class QString const &)
+ ?createFromNativeImageHandleProvider@QVGPixmapData@@QAEXXZ @ 183 NONAME ; void QVGPixmapData::createFromNativeImageHandleProvider(void)
+ ?releaseNativeImageHandle@QVGPixmapData@@QAEXXZ @ 184 NONAME ; void QVGPixmapData::releaseNativeImageHandle(void)
+ ?forceToImage@QVGPixmapData@@IAEX_N@Z @ 185 NONAME ; void QVGPixmapData::forceToImage(bool)
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 2de88f2040..b6a24abcf9 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -12147,4 +12147,39 @@ EXPORTS
_ZNK12QTextControl22isWordSelectionEnabledEv @ 12146 NONAME
_ZN12QLineControl16updateMicroFocusEv @ 12147 NONAME
_ZNK14QWidgetPrivate20assignedInputContextEv @ 12148 NONAME
+ _ZN14QVolatileImage11paintEngineEv @ 12149 NONAME
+ _ZN14QVolatileImage12ensureFormatEN6QImage6FormatE @ 12150 NONAME
+ _ZN14QVolatileImage15setAlphaChannelERK7QPixmap @ 12151 NONAME
+ _ZN14QVolatileImage4bitsEv @ 12152 NONAME
+ _ZN14QVolatileImage4fillEj @ 12153 NONAME
+ _ZN14QVolatileImage8copyFromEPS_RK5QRect @ 12154 NONAME
+ _ZN14QVolatileImage8imageRefEv @ 12155 NONAME
+ _ZN14QVolatileImageC1EPvS0_ @ 12156 NONAME
+ _ZN14QVolatileImageC1ERK6QImage @ 12157 NONAME
+ _ZN14QVolatileImageC1ERKS_ @ 12158 NONAME
+ _ZN14QVolatileImageC1EiiN6QImage6FormatE @ 12159 NONAME
+ _ZN14QVolatileImageC1Ev @ 12160 NONAME
+ _ZN14QVolatileImageC2EPvS0_ @ 12161 NONAME
+ _ZN14QVolatileImageC2ERK6QImage @ 12162 NONAME
+ _ZN14QVolatileImageC2ERKS_ @ 12163 NONAME
+ _ZN14QVolatileImageC2EiiN6QImage6FormatE @ 12164 NONAME
+ _ZN14QVolatileImageC2Ev @ 12165 NONAME
+ _ZN14QVolatileImageD1Ev @ 12166 NONAME
+ _ZN14QVolatileImageD2Ev @ 12167 NONAME
+ _ZN14QVolatileImageaSERKS_ @ 12168 NONAME
+ _ZNK14QVolatileImage12bytesPerLineEv @ 12169 NONAME
+ _ZNK14QVolatileImage13endDataAccessEb @ 12170 NONAME
+ _ZNK14QVolatileImage15beginDataAccessEv @ 12171 NONAME
+ _ZNK14QVolatileImage15hasAlphaChannelEv @ 12172 NONAME
+ _ZNK14QVolatileImage20duplicateNativeImageEv @ 12173 NONAME
+ _ZNK14QVolatileImage5depthEv @ 12174 NONAME
+ _ZNK14QVolatileImage5widthEv @ 12175 NONAME
+ _ZNK14QVolatileImage6formatEv @ 12176 NONAME
+ _ZNK14QVolatileImage6heightEv @ 12177 NONAME
+ _ZNK14QVolatileImage6isNullEv @ 12178 NONAME
+ _ZNK14QVolatileImage7toImageEv @ 12179 NONAME
+ _ZNK14QVolatileImage9byteCountEv @ 12180 NONAME
+ _ZNK14QVolatileImage9constBitsEv @ 12181 NONAME
+ _ZN15QGraphicsSystem22releaseCachedResourcesEv @ 12182 NONAME
+ _Z32qt_s60_setPartialScreenInputModeb @ 12183 NONAME
diff --git a/src/s60installs/eabi/QtOpenGLu.def b/src/s60installs/eabi/QtOpenGLu.def
index c92d99ecc6..488c6cd1ab 100644
--- a/src/s60installs/eabi/QtOpenGLu.def
+++ b/src/s60installs/eabi/QtOpenGLu.def
@@ -707,4 +707,21 @@ EXPORTS
_ZNK20QGLTextureGlyphCache16maxTextureHeightEv @ 706 NONAME
_ZThn8_NK20QGLTextureGlyphCache15maxTextureWidthEv @ 707 NONAME
_ZThn8_NK20QGLTextureGlyphCache16maxTextureHeightEv @ 708 NONAME
+ _ZN13QGLPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 709 NONAME
+ _ZN13QGLPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 710 NONAME
+ _ZN13QGLPixmapData15fromImageReaderEP12QImageReader6QFlagsIN2Qt19ImageConversionFlagEE @ 711 NONAME
+ _ZN13QGLPixmapData20createPixmapForImageER6QImage6QFlagsIN2Qt19ImageConversionFlagEEb @ 712 NONAME
+ _ZN16QGLWindowSurface12swapBehaviorE @ 713 NONAME DATA 4
+ _ZN20QGLTextureGlyphCache10setContextEP10QGLContext @ 714 NONAME
+ _ZN20QGLTextureGlyphCache5clearEv @ 715 NONAME
+ _ZN13QGLPixmapData12forceToImageEv @ 716 NONAME
+ _ZN13QGLPixmapData14destroyTextureEv @ 717 NONAME
+ _ZN13QGLPixmapData14reclaimTextureEv @ 718 NONAME
+ _ZN13QGLPixmapData21detachTextureFromPoolEv @ 719 NONAME
+ _ZN13QGLPixmapData9hibernateEv @ 720 NONAME
+ _ZN17QGLGraphicsSystem22releaseCachedResourcesEv @ 721 NONAME
+ _ZN13QGLPixmapData11idealFormatER6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 722 NONAME
+ _ZN13QGLPixmapData24releaseNativeImageHandleEv @ 723 NONAME
+ _ZN13QGLPixmapData25initFromNativeImageHandleEPvRK7QString @ 724 NONAME
+ _ZN13QGLPixmapData35createFromNativeImageHandleProviderEv @ 725 NONAME
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index e1828c1e43..08afd61abd 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -8,7 +8,7 @@ EXPORTS
_Z25qt_vg_create_paint_enginev @ 7 NONAME
_Z26qt_vg_destroy_paint_engineP14QVGPaintEngine @ 8 NONAME
_Z28qt_vg_config_to_image_formatP11QEglContext @ 9 NONAME
- _ZN13QVGPixmapData12forceToImageEv @ 10 NONAME
+ _ZN13QVGPixmapData12forceToImageEv @ 10 NONAME ABSENT
_ZN13QVGPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 11 NONAME
_ZN13QVGPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 12 NONAME
_ZN13QVGPixmapData15setAlphaChannelERK7QPixmap @ 13 NONAME
@@ -206,4 +206,12 @@ EXPORTS
_ZN13QVGPixmapData8fromDataEPKhjPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 205 NONAME
_ZN13QVGPixmapData8fromFileERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 206 NONAME
_ZNK14QVGPaintEngine16canVgWritePixelsERK6QImage @ 207 NONAME
+ _ZN13QVGPixmapData12updateSerialEv @ 208 NONAME
+ _ZN13QVGPixmapData4copyEPK11QPixmapDataRK5QRect @ 209 NONAME
+ _ZNK13QVGPixmapData11idealFormatEP6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 210 NONAME
+ _ZNK13QVGPixmapData14ensureReadbackEb @ 211 NONAME
+ _ZN13QVGPixmapData24releaseNativeImageHandleEv @ 212 NONAME
+ _ZN13QVGPixmapData25initFromNativeImageHandleEPvRK7QString @ 213 NONAME
+ _ZN13QVGPixmapData35createFromNativeImageHandleProviderEv @ 214 NONAME
+ _ZN13QVGPixmapData12forceToImageEb @ 215 NONAME
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index 4afbf05c5d..d6b36e0fe3 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -15,7 +15,6 @@ file=ABI_DIR\BUILD_DIR\QtXml.dll SHARED_LIB_DIR\QtXml.dll
file=ABI_DIR\BUILD_DIR\QtNetwork.dll SHARED_LIB_DIR\QtNetwork.dll
file=ABI_DIR\BUILD_DIR\QtScript.dll SHARED_LIB_DIR\QtScript.dll
file=ABI_DIR\BUILD_DIR\QtTest.dll SHARED_LIB_DIR\QtTest.dll
-file=ABI_DIR\BUILD_DIR\QtWebKit.dll SHARED_LIB_DIR\QtWebKit.dll
file=ABI_DIR\BUILD_DIR\phonon.dll SHARED_LIB_DIR\phonon.dll
file=ABI_DIR\BUILD_DIR\QtMultimedia.dll SHARED_LIB_DIR\QtMultimedia.dll
file=ABI_DIR\BUILD_DIR\QtXmlPatterns.dll SHARED_LIB_DIR\QtXmlPatterns.dll
@@ -40,14 +39,8 @@ file=ABI_DIR\BUILD_DIR\qtwcodecs.dll SHARED_LIB_DIR\qtwcodecs.dll
file=ABI_DIR\BUILD_DIR\qsvgicon.dll SHARED_LIB_DIR\qsvgicon.dll
// Phonon MMF backend
-// This is commented out by default, as normally Helix backend will be used.
-// If the Helix backend is present, it will override MMF backend, so make sure to remove it from
-// image creation in addition to uncommenting the following lines if you want to use MMF backend.
-//file=ABI_DIR\BUILD_DIR\phonon_mmf.dll SHARED_LIB_DIR\phonon_mmf.dll
-//data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin
-
-// QtMultimedia audio backend
-file=ABI_DIR\BUILD_DIR\qaudio.dll SHARED_LIB_DIR\qaudio.dll
+file=ABI_DIR\BUILD_DIR\phonon_mmf.dll SHARED_LIB_DIR\phonon_mmf.dll
+data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin
// graphicssystems
file=ABI_DIR\BUILD_DIR\qvggraphicssystem.dll SHARED_LIB_DIR\qvggraphicssystem.dll
@@ -60,8 +53,6 @@ file=ABI_DIR\BUILD_DIR\qsymbianbearer.dll SHARED_LIB_DIR\qsymbianbearer.dll
// so don't bother including those plugins
file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll
-S60_APP_RESOURCE(s60main)
-
// imageformats stubs
data=\epoc32\data\z\resource\qt\plugins\imageformats\qgif.qtplugin resource\qt\plugins\imageformats\qgif.qtplugin
data=\epoc32\data\z\resource\qt\plugins\imageformats\qico.qtplugin resource\qt\plugins\imageformats\qico.qtplugin
@@ -80,24 +71,18 @@ data=\epoc32\data\z\resource\qt\plugins\codecs\qtwcodecs.qtplugin resou
data=\epoc32\data\z\resource\qt\plugins\iconengines\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin
// qml import plugins
-file=ABI_DIR\BUILD_DIR\qmlwebkitplugin.dll SHARED_LIB_DIR\qmlwebkitplugin.dll
file=ABI_DIR\BUILD_DIR\qmlfolderlistmodelplugin.dll SHARED_LIB_DIR\qmlfolderlistmodelplugin.dll
file=ABI_DIR\BUILD_DIR\qmlgesturesplugin.dll SHARED_LIB_DIR\qmlgesturesplugin.dll
file=ABI_DIR\BUILD_DIR\qmlparticlesplugin.dll SHARED_LIB_DIR\qmlparticlesplugin.dll
-data=\epoc32\data\z\resource\qt\imports\QtWebKit\qmlwebkitplugin.qtplugin resource\qt\imports\QtWebKit\qmlwebkitplugin.qtplugin
data=\epoc32\data\z\resource\qt\imports\Qt\labs\folderlistmodel\qmlfolderlistmodelplugin.qtplugin resource\qt\imports\Qt\labs\folderlistmodel\qmlfolderlistmodelplugin.qtplugin
data=\epoc32\data\z\resource\qt\imports\Qt\labs\gestures\qmlgesturesplugin.qtplugin resource\qt\imports\Qt\labs\gestures\qmlgesturesplugin.qtplugin
data=\epoc32\data\z\resource\qt\imports\Qt\labs\particles\qmlparticlesplugin.qtplugin resource\qt\imports\Qt\labs\particles\qmlparticlesplugin.qtplugin
-data=\epoc32\data\z\resource\qt\imports\QtWebKit\qmldir resource\qt\imports\QtWebKit\qmldir
data=\epoc32\data\z\resource\qt\imports\Qt\labs\folderlistmodel\qmldir resource\qt\imports\Qt\labs\folderlistmodel\qmldir
data=\epoc32\data\z\resource\qt\imports\Qt\labs\gestures\qmldir resource\qt\imports\Qt\labs\gestures\qmldir
data=\epoc32\data\z\resource\qt\imports\Qt\labs\particles\qmldir resource\qt\imports\Qt\labs\particles\qmldir
-// QtMultimedia audio backend
-data=\epoc32\data\qt\qtlibspluginstubs\qaudio.qtplugin resource\qt\plugins\audio\qaudio.qtplugin
-
// graphicssystems
data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qglgraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qglgraphicssystem.qtplugin
@@ -107,7 +92,6 @@ data=\epoc32\data\z\resource\qt\plugins\bearer\qsymbianbearer.qtplugin resource\
// Stub sis file
data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis
-data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis
#endif // __QT_IBY__
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 1e5ce0ff4f..d1bb48b814 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -42,7 +42,7 @@ symbian: {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
qts60plugindeployment = \
- "IF package(0x20022E6D)" \
+ "IF package(0x2003A678) OR package(0x20022E6D)" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x1028315F)" \
@@ -58,7 +58,7 @@ symbian: {
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ENDIF" \
- " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\"
+ " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\""
} else {
# No need to deploy plugins for older platform versions when building on Symbian3 or later
qts60plugindeployment = \
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index 8ab3bd381d..1e3e06ac69 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -30,7 +30,7 @@ symbian {
# Having MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA will cause s60main.lib be unlinkable
# against GCCE apps, so remove it
MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
- linux-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl
+ symbian-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl
# Flag if exports are not frozen to avoid lookup of qtcore allocator creation function by ordinal
contains(CONFIG, def_files_disabled): DEFINES += QT_EXPORTS_NOT_FROZEN
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 2468a46cae..5454df5835 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -268,8 +268,14 @@ QScriptValue QScriptContext::argument(int index) const
QScriptValue QScriptContext::callee() const
{
const JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
- QScript::APIShim shim(QScript::scriptEngineFromExec(frame));
- return QScript::scriptEngineFromExec(frame)->scriptValueFromJSCValue(frame->callee());
+ QScriptEnginePrivate *eng = QScript::scriptEngineFromExec(frame);
+ QScript::APIShim shim(eng);
+ if (frame->callee() == eng->originalGlobalObject()) {
+ // This is a pushContext()-created context; the callee is a lie.
+ Q_ASSERT(QScriptEnginePrivate::contextFlags(const_cast<JSC::CallFrame*>(frame)) & QScriptEnginePrivate::NativeContext);
+ return QScriptValue();
+ }
+ return eng->scriptValueFromJSCValue(frame->callee());
}
/*!
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index d3e5f2f5ef..160058e2e7 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -955,8 +955,11 @@ static QScriptValue __setupPackage__(QScriptContext *ctx, QScriptEngine *eng)
} // namespace QScript
QScriptEnginePrivate::QScriptEnginePrivate()
- : registeredScriptValues(0), freeScriptValues(0), freeScriptValuesCount(0),
- registeredScriptStrings(0), inEval(false)
+ : originalGlobalObjectProxy(0), currentFrame(0),
+ qobjectPrototype(0), qmetaobjectPrototype(0), variantPrototype(0),
+ activeAgent(0), agentLineNumber(-1),
+ registeredScriptValues(0), freeScriptValues(0), freeScriptValuesCount(0),
+ registeredScriptStrings(0), processEventsInterval(-1), inEval(false)
{
qMetaTypeId<QScriptValue>();
qMetaTypeId<QList<int> >();
@@ -1002,10 +1005,6 @@ QScriptEnginePrivate::QScriptEnginePrivate()
currentFrame = exec;
- originalGlobalObjectProxy = 0;
- activeAgent = 0;
- agentLineNumber = -1;
- processEventsInterval = -1;
cachedTranslationUrl = JSC::UString();
cachedTranslationContext = JSC::UString();
JSC::setCurrentIdentifierTable(oldTable);
@@ -1253,10 +1252,12 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack)
{
Q_Q(QScriptEngine);
- markStack.append(originalGlobalObject());
- markStack.append(globalObject());
- if (originalGlobalObjectProxy)
- markStack.append(originalGlobalObjectProxy);
+ if (originalGlobalObject()) {
+ markStack.append(originalGlobalObject());
+ markStack.append(globalObject());
+ if (originalGlobalObjectProxy)
+ markStack.append(originalGlobalObjectProxy);
+ }
if (qobjectPrototype)
markStack.append(qobjectPrototype);
@@ -1281,7 +1282,7 @@ void QScriptEnginePrivate::mark(JSC::MarkStack& markStack)
}
}
- {
+ if (q) {
QScriptContext *context = q->currentContext();
while (context) {
@@ -2727,6 +2728,14 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
bool clearScopeChain)
{
JSC::JSValue thisObject = _thisObject;
+ if (!callee) {
+ // callee can't be zero, as this can cause JSC to crash during GC
+ // marking phase if the context's Arguments object has been created.
+ // Fake it by using the global object. Note that this is also handled
+ // in QScriptContext::callee(), as that function should still return
+ // an invalid value.
+ callee = originalGlobalObject();
+ }
if (calledAsConstructor) {
//JSC doesn't create default created object for native functions. so we do it
JSC::JSValue prototype = callee->get(exec, exec->propertyNames().prototype);
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index ac57918a54..e289636114 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -254,6 +254,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, int val)
: d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine)))
{
if (engine) {
+ QScript::APIShim shim(d_ptr->engine);
JSC::ExecState *exec = d_ptr->engine->currentFrame;
d_ptr->initFrom(JSC::jsNumber(exec, val));
} else
@@ -271,6 +272,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, uint val)
: d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine)))
{
if (engine) {
+ QScript::APIShim shim(d_ptr->engine);
JSC::ExecState *exec = d_ptr->engine->currentFrame;
d_ptr->initFrom(JSC::jsNumber(exec, val));
} else
@@ -288,6 +290,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, qsreal val)
: d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine)))
{
if (engine) {
+ QScript::APIShim shim(d_ptr->engine);
JSC::ExecState *exec = d_ptr->engine->currentFrame;
d_ptr->initFrom(JSC::jsNumber(exec, val));
} else
@@ -305,6 +308,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const QString &val)
: d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine)))
{
if (engine) {
+ QScript::APIShim shim(d_ptr->engine);
JSC::ExecState *exec = d_ptr->engine->currentFrame;
d_ptr->initFrom(JSC::jsString(exec, val));
} else {
@@ -325,6 +329,7 @@ QScriptValue::QScriptValue(QScriptEngine *engine, const char *val)
: d_ptr(new (QScriptEnginePrivate::get(engine))QScriptValuePrivate(QScriptEnginePrivate::get(engine)))
{
if (engine) {
+ QScript::APIShim shim(d_ptr->engine);
JSC::ExecState *exec = d_ptr->engine->currentFrame;
d_ptr->initFrom(JSC::jsString(exec, val));
} else {
diff --git a/src/src.pro b/src/src.pro
index 060f48bbe6..868e22f2c3 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -108,7 +108,7 @@ src_webkit_declarative.target = sub-webkitdeclarative
src_phonon.depends = src_gui
src_multimedia.depends = src_gui
contains(QT_CONFIG, opengl):src_multimedia.depends += src_opengl
- src_tools_activeqt.depends = src_tools_idc src_gui
+ src_activeqt.depends = src_tools_idc src_gui
src_declarative.depends = src_gui src_script src_network
src_plugins.depends = src_gui src_sql src_svg
contains(QT_CONFIG, multimedia):src_plugins.depends += src_multimedia
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 298b2b7ba5..0c22868852 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -38,7 +38,7 @@
The following example records all signal emissions for the \c clicked() signal
of a QCheckBox:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 0
\c{spy.takeFirst()} returns the arguments for the first emitted signal, as a
list of QVariant objects. The \c clicked() signal has a single bool argument,
@@ -46,17 +46,17 @@
The example below catches a signal from a custom object:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 1
\bold {Note:} Non-standard data types need to be registered, using
the qRegisterMetaType() function, before you can create a
QSignalSpy. For example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 2
To retrieve the \c QModelIndex, you can use qvariant_cast:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 3
*/
/*! \fn QSignalSpy::QSignalSpy(QObject *object, const char *signal)
@@ -65,7 +65,7 @@
from the QObject \a object. Neither \a signal nor \a object can be null.
Example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 4
*/
/*! \fn QSignalSpy::isValid() const
diff --git a/src/testlib/qtestevent.qdoc b/src/testlib/qtestevent.qdoc
index 84e874bd32..4c695c2885 100644
--- a/src/testlib/qtestevent.qdoc
+++ b/src/testlib/qtestevent.qdoc
@@ -39,7 +39,7 @@
QWidget.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestevent.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtestevent.cpp 0
The example above simulates the user entering the character \c a
followed by a backspace, waiting for 200 milliseconds and
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 5a2591f042..2ce493bd2a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -174,7 +174,7 @@ private:
QVERIFY(component.errors().isEmpty()); \
} else { \
QFile file(QLatin1String(SRCDIR) + QLatin1String("/data/") + QLatin1String(errorfile)); \
- QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); \
QByteArray data = file.readAll(); \
file.close(); \
QList<QByteArray> expected = data.split('\n'); \
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index dc104e23e8..9d1c609616 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -85,7 +85,7 @@ private slots:
QVERIFY(component.errors().isEmpty()); \
} else { \
QFile file(QLatin1String("data/") + QLatin1String(errorfile)); \
- QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); \
QByteArray data = file.readAll(); \
file.close(); \
QList<QByteArray> expected = data.split('\n'); \
diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro
index 4b809fb3d6..b2e9e6f931 100644
--- a/tests/auto/gui.pro
+++ b/tests/auto/gui.pro
@@ -110,6 +110,7 @@ SUBDIRS=\
qmimedata \
qmouseevent_modal \
qmovie \
+ qvolatileimage \
qnetworkaccessmanager_and_qprogressdialog \
qnetworkcachemetadata \
qnetworkdiskcache \
diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp
index ac7298c781..731fe0a2e4 100644
--- a/tests/auto/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp
@@ -68,7 +68,7 @@ private slots:
void testMouseEnter();
void testChildDialogInFrontOfModalParent();
#ifdef QT_MAC_USE_COCOA
- void testChildWindowInFrontOfParentWindow();
+// void testChildWindowInFrontOfParentWindow();
// void testChildToolWindowInFrontOfChildNormalWindow();
void testChildWindowInFrontOfStaysOnTopParentWindow();
#endif
@@ -314,6 +314,11 @@ void tst_MacNativeEvents::testChildDialogInFrontOfModalParent()
}
#ifdef QT_MAC_USE_COCOA
+#if 0
+// This test is disabled as of Qt-4.7.4 because we cannot do it
+// unless we use the Cocoa sub window API. But using that opens up
+// a world of side effects that we cannot live with. So we rather
+// not support child-on-top-of-parent instead.
void tst_MacNativeEvents::testChildWindowInFrontOfParentWindow()
{
// Test that a child window always stacks in front of its parent window.
@@ -338,6 +343,7 @@ void tst_MacNativeEvents::testChildWindowInFrontOfParentWindow()
QTest::qWait(100);
QVERIFY(!child.isVisible());
}
+#endif
/* This test can be enabled once setStackingOrder has been fixed in qwidget_mac.mm
void tst_MacNativeEvents::testChildToolWindowInFrontOfChildNormalWindow()
diff --git a/tests/auto/mediaobject/dummy/dummy.pro b/tests/auto/mediaobject/dummy/dummy.pro
index 88b864bc4d..9797500163 100644
--- a/tests/auto/mediaobject/dummy/dummy.pro
+++ b/tests/auto/mediaobject/dummy/dummy.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.4
+ VERSION=4.7.4
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/tests/auto/nativeimagehandleprovider/nativeimagehandleprovider.pro b/tests/auto/nativeimagehandleprovider/nativeimagehandleprovider.pro
new file mode 100644
index 0000000000..fb8ecb0042
--- /dev/null
+++ b/tests/auto/nativeimagehandleprovider/nativeimagehandleprovider.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+SOURCES += tst_nativeimagehandleprovider.cpp
+symbian {
+ LIBS += -lfbscli -lbitgdi
+ contains(QT_CONFIG, openvg): QT *= openvg
+}
diff --git a/tests/auto/nativeimagehandleprovider/tst_nativeimagehandleprovider.cpp b/tests/auto/nativeimagehandleprovider/tst_nativeimagehandleprovider.cpp
new file mode 100644
index 0000000000..3a315f29fc
--- /dev/null
+++ b/tests/auto/nativeimagehandleprovider/tst_nativeimagehandleprovider.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** 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 test suite 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$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/private/qnativeimagehandleprovider_p.h>
+#include <QScopedPointer>
+#include <QPixmap>
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+#include <fbs.h>
+#include <bitdev.h>
+#include <QtOpenVG/private/qpixmapdata_vg_p.h>
+#endif
+
+QPixmap pixmapFromNativeImageHandleProvider(QNativeImageHandleProvider *source)
+{
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+ if (!source)
+ return QPixmap();
+ QScopedPointer<QPixmapData> pd(QPixmapData::create(0, 0, QPixmapData::PixmapType));
+ pd->fromNativeType(source, QPixmapData::NativeImageHandleProvider);
+ return QPixmap(pd.take());
+#else
+ Q_UNUSED(source);
+ return QPixmap();
+#endif
+}
+
+class DummyProvider : public QNativeImageHandleProvider
+{
+public:
+ void get(void **handle, QString *type);
+ void release(void *handle, const QString &type);
+};
+
+void DummyProvider::get(void **handle, QString *type)
+{
+ *handle = (void *) 0x12345678;
+ *type = "some dummy type";
+}
+
+void DummyProvider::release(void *handle, const QString &type)
+{
+ Q_UNUSED(handle);
+ Q_UNUSED(type);
+}
+
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+class BitmapProvider : public QNativeImageHandleProvider
+{
+public:
+ BitmapProvider() : bmp(0), refCount(0), w(50), h(60) { }
+ void get(void **handle, QString *type);
+ void release(void *handle, const QString &type);
+
+ CFbsBitmap *bmp;
+ int refCount, w, h;
+ void *returnedHandle;
+ QString returnedType;
+};
+
+void BitmapProvider::get(void **handle, QString *type)
+{
+ // There may not be a release() if the get() fails so don't bother with
+ // refcounting in such cases.
+ if (bmp)
+ ++refCount;
+ returnedType = QLatin1String("CFbsBitmap");
+ returnedHandle = bmp;
+ *handle = returnedHandle;
+ *type = returnedType;
+}
+
+void BitmapProvider::release(void *handle, const QString &type)
+{
+ if (handle == returnedHandle && type == returnedType && returnedHandle) {
+ --refCount;
+ }
+}
+#endif // symbian & openvg
+
+class tst_NativeImageHandleProvider : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_NativeImageHandleProvider() { }
+
+private slots:
+ void create();
+ void bitmap();
+ void hibernate();
+};
+
+void tst_NativeImageHandleProvider::create()
+{
+ QPixmap pm = pixmapFromNativeImageHandleProvider(0);
+ QVERIFY(pm.isNull());
+ QPixmap tmp(10, 20);
+ if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+ // Verify that null pixmap is properly returned when get() provides bogus results.
+ DummyProvider prov;
+ pm = pixmapFromNativeImageHandleProvider(&prov);
+ QVERIFY(pm.isNull());
+ pm = QPixmap();
+ } else {
+ QSKIP("Not openvg, skipping non-trivial tests", SkipSingle);
+ }
+}
+
+void tst_NativeImageHandleProvider::bitmap()
+{
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+ QPixmap tmp(10, 20);
+ if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+ BitmapProvider prov;
+
+ // This should fail because of null ptr.
+ QPixmap pm = pixmapFromNativeImageHandleProvider(&prov);
+ QVERIFY(pm.isNull());
+ pm = QPixmap();
+ QCOMPARE(prov.refCount, 0);
+
+ prov.bmp = new CFbsBitmap;
+ QCOMPARE(prov.bmp->Create(TSize(prov.w, prov.h), EColor16MAP), KErrNone);
+ CFbsBitmapDevice *bitmapDevice = CFbsBitmapDevice::NewL(prov.bmp);
+ CBitmapContext *bitmapContext = 0;
+ QCOMPARE(bitmapDevice->CreateBitmapContext(bitmapContext), KErrNone);
+ TRgb symbianColor = TRgb(255, 200, 100);
+ bitmapContext->SetBrushColor(symbianColor);
+ bitmapContext->Clear();
+ delete bitmapContext;
+ delete bitmapDevice;
+
+ pm = pixmapFromNativeImageHandleProvider(&prov);
+ QVERIFY(!pm.isNull());
+ QCOMPARE(pm.width(), prov.w);
+ QCOMPARE(pm.height(), prov.h);
+ QVERIFY(prov.refCount == 1);
+ QImage img = pm.toImage();
+ QVERIFY(prov.refCount == 1);
+ QRgb pix = img.pixel(QPoint(1, 2));
+ QCOMPARE(qRed(pix), symbianColor.Red());
+ QCOMPARE(qGreen(pix), symbianColor.Green());
+ QCOMPARE(qBlue(pix), symbianColor.Blue());
+
+ pm = QPixmap(); // should result in calling release
+ QCOMPARE(prov.refCount, 0);
+ delete prov.bmp;
+ } else {
+ QSKIP("Not openvg", SkipSingle);
+ }
+#else
+ QSKIP("Not applicable", SkipSingle);
+#endif
+}
+
+void tst_NativeImageHandleProvider::hibernate()
+{
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+ QPixmap tmp(10, 20);
+ if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+ BitmapProvider prov;
+ prov.bmp = new CFbsBitmap;
+ QCOMPARE(prov.bmp->Create(TSize(prov.w, prov.h), EColor16MAP), KErrNone);
+
+ QPixmap pm = pixmapFromNativeImageHandleProvider(&prov);
+ QCOMPARE(prov.refCount, 1);
+
+ QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pm.pixmapData());
+ vgpd->hibernate();
+ QCOMPARE(prov.refCount, 0);
+
+ // Calling toVGImage() may cause some warnings as we don't have a gui initialized,
+ // but the only thing we care about here is get() being called.
+ vgpd->toVGImage();
+ QCOMPARE(prov.refCount, 1);
+
+ pm = QPixmap();
+ QCOMPARE(prov.refCount, 0);
+ delete prov.bmp;
+ } else {
+ QSKIP("Not openvg", SkipSingle);
+ }
+#else
+ QSKIP("Not applicable", SkipSingle);
+#endif
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication::setGraphicsSystem("openvg");
+ QApplication app(argc, argv);
+ tst_NativeImageHandleProvider tc;
+ return QTest::qExec(&tc, argc, argv);
+}
+
+#include "tst_nativeimagehandleprovider.moc"
diff --git a/tests/auto/other.pro b/tests/auto/other.pro
index 3c8f856a6b..40fa4a9870 100644
--- a/tests/auto/other.pro
+++ b/tests/auto/other.pro
@@ -32,7 +32,8 @@ SUBDIRS=\
qvariant \
qwidget \
qworkspace \
- windowsmobile
+ windowsmobile \
+ nativeimagehandleprovider
contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
mac: {
diff --git a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
index 0256b824f5..f66b849eca 100644
--- a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -127,7 +127,7 @@ void tst_QDesktopWidget::screenNumberForQWidget()
QWidget widget;
widget.show();
- QApplication::processEvents();
+ QTest::qWaitForWindowShown(&widget);
QVERIFY(widget.isVisible());
int widgetScreen = desktop.screenNumber(&widget);
@@ -142,7 +142,9 @@ void tst_QDesktopWidget::screenNumberForQPoint()
QRect allScreens;
for (int i = 0; i < desktopWidget->numScreens(); ++i) {
QRect screenGeometry = desktopWidget->screenGeometry(i);
+#if !defined(Q_OS_SYMBIAN)
QCOMPARE(desktopWidget->screenNumber(screenGeometry.center()), i);
+#endif
allScreens |= screenGeometry;
}
@@ -180,7 +182,6 @@ void tst_QDesktopWidget::screenGeometry()
total = desktopWidget->screenGeometry(i);
available = desktopWidget->availableGeometry(i);
}
- QVERIFY(total.contains(r));
}
QTEST_MAIN(tst_QDesktopWidget)
diff --git a/tests/auto/qdir/qdir.pro b/tests/auto/qdir/qdir.pro
index cf612f130c..d81e428111 100644
--- a/tests/auto/qdir/qdir.pro
+++ b/tests/auto/qdir/qdir.pro
@@ -4,7 +4,7 @@ RESOURCES += qdir.qrc
QT = core
wince*|symbian {
- DirFiles.sources = testdir testdata searchdir resources entrylist types tst_qdir.cpp
+ DirFiles.sources = testdir testData searchdir resources entrylist types tst_qdir.cpp
DirFiles.path = .
DEPLOYMENT += DirFiles
}
diff --git a/tests/auto/qdiriterator/tst_qdiriterator.cpp b/tests/auto/qdiriterator/tst_qdiriterator.cpp
index f7666dccfe..3269379ef2 100644
--- a/tests/auto/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/qdiriterator/tst_qdiriterator.cpp
@@ -118,6 +118,7 @@ private slots:
void longPath();
void task185502_dirorder();
void relativePaths();
+ void qtbug15421_hiddenDirs_hiddenFiles();
};
tst_QDirIterator::tst_QDirIterator()
@@ -163,6 +164,20 @@ tst_QDirIterator::tst_QDirIterator()
createLink("nothing", "entrylist/brokenlink.lnk");
# endif
#endif
+
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/normalFile");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/.hiddenFile");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/normalDirectory");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/.hiddenDirectory");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/normalDirectory/normalFile");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/normalDirectory/.hiddenFile");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/.hiddenDirectory/normalFile");
+ createFile("qtbug15421_hiddenDirs_hiddenFiles/.hiddenDirectory/.hiddenFile");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/normalDirectory/normalDirectory");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/normalDirectory/.hiddenDirectory");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/.hiddenDirectory/normalDirectory");
+ createDirectory("qtbug15421_hiddenDirs_hiddenFiles/.hiddenDirectory/.hiddenDirectory");
}
tst_QDirIterator::~tst_QDirIterator()
@@ -532,6 +547,46 @@ void tst_QDirIterator::relativePaths()
}
}
+void tst_QDirIterator::qtbug15421_hiddenDirs_hiddenFiles()
+{
+ // In Unix it is easy to create hidden files, but in Windows it requires
+ // a special call since hidden files need to be "marked" while in Unix
+ // anything starting by a '.' is a hidden file.
+ // For that reason this test is not run in Windows.
+#if defined Q_OS_WIN || Q_OS_WINCE
+ QSKIP("To create hidden files a special call is required in Windows.", SkipAll);
+#else
+ // Only files
+ {
+ int matches = 0;
+ int failures = 0;
+ QDirIterator di("qtbug15421_hiddenDirs_hiddenFiles", QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
+ while (di.hasNext()) {
+ ++matches;
+ QString filename = di.next();
+ if (QFileInfo(filename).isDir())
+ ++failures; // search was only supposed to find files
+ }
+ QCOMPARE(matches, 6);
+ QCOMPARE(failures, 0);
+ }
+ // Only directories
+ {
+ int matches = 0;
+ int failures = 0;
+ QDirIterator di("qtbug15421_hiddenDirs_hiddenFiles", QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
+ while (di.hasNext()) {
+ ++matches;
+ QString filename = di.next();
+ if (!QFileInfo(filename).isDir())
+ ++failures; // search was only supposed to find files
+ }
+ QCOMPARE(matches, 6);
+ QCOMPARE(failures, 0);
+ }
+#endif // Q_OS_WIN || Q_OS_WINCE
+}
+
QTEST_MAIN(tst_QDirIterator)
#include "tst_qdiriterator.moc"
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index dacb61e122..73e5656b15 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -66,6 +66,7 @@
#include <QPushButton>
#include <QLineEdit>
#include <QGraphicsLinearLayout>
+#include <float.h>
#include "../../shared/util.h"
@@ -447,7 +448,10 @@ private slots:
void updateMicroFocus();
void textItem_shortcuts();
void scroll();
- void stopClickFocusPropagation();
+ void focusHandling_data();
+ void focusHandling();
+ void touchEventPropagation_data();
+ void touchEventPropagation();
void deviceCoordinateCache_simpleRotations();
// task specific tests below me
@@ -10537,8 +10541,39 @@ void tst_QGraphicsItem::scroll()
QCOMPARE(item2->lastExposedRect, expectedItem2Expose);
}
-void tst_QGraphicsItem::stopClickFocusPropagation()
+Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemFlag);
+
+void tst_QGraphicsItem::focusHandling_data()
{
+ QTest::addColumn<QGraphicsItem::GraphicsItemFlag>("focusFlag");
+ QTest::addColumn<bool>("useStickyFocus");
+ QTest::addColumn<int>("expectedFocusItem"); // 0: none, 1: focusableUnder, 2: itemWithFocus
+
+ QTest::newRow("Focus goes through.")
+ << static_cast<QGraphicsItem::GraphicsItemFlag>(0x0) << false << 1;
+
+ QTest::newRow("Focus goes through, even with sticky scene.")
+ << static_cast<QGraphicsItem::GraphicsItemFlag>(0x0) << true << 1;
+
+ QTest::newRow("With ItemStopsClickFocusPropagation, we cannot focus the item beneath the flagged one (but can still focus-out).")
+ << QGraphicsItem::ItemStopsClickFocusPropagation << false << 0;
+
+ QTest::newRow("With ItemStopsClickFocusPropagation, we cannot focus the item beneath the flagged one (and cannot focus-out if scene is sticky).")
+ << QGraphicsItem::ItemStopsClickFocusPropagation << true << 2;
+
+ QTest::newRow("With ItemStopsFocusHandling, focus cannot be changed by presses.")
+ << QGraphicsItem::ItemStopsFocusHandling << false << 2;
+
+ QTest::newRow("With ItemStopsFocusHandling, focus cannot be changed by presses (even if scene is sticky).")
+ << QGraphicsItem::ItemStopsFocusHandling << true << 2;
+}
+
+void tst_QGraphicsItem::focusHandling()
+{
+ QFETCH(QGraphicsItem::GraphicsItemFlag, focusFlag);
+ QFETCH(bool, useStickyFocus);
+ QFETCH(int, expectedFocusItem);
+
class MyItem : public QGraphicsRectItem
{
public:
@@ -10549,12 +10584,9 @@ void tst_QGraphicsItem::stopClickFocusPropagation()
}
};
- QGraphicsScene scene(-50, -50, 400, 400);
- scene.setStickyFocus(true);
-
QGraphicsRectItem *noFocusOnTop = new MyItem;
+ noFocusOnTop->setFlag(QGraphicsItem::ItemIsFocusable, false);
noFocusOnTop->setBrush(Qt::yellow);
- noFocusOnTop->setFlag(QGraphicsItem::ItemStopsClickFocusPropagation);
QGraphicsRectItem *focusableUnder = new MyItem;
focusableUnder->setBrush(Qt::blue);
@@ -10566,9 +10598,13 @@ void tst_QGraphicsItem::stopClickFocusPropagation()
itemWithFocus->setFlag(QGraphicsItem::ItemIsFocusable);
itemWithFocus->setPos(250, 10);
+ QGraphicsScene scene(-50, -50, 400, 400);
scene.addItem(noFocusOnTop);
scene.addItem(focusableUnder);
scene.addItem(itemWithFocus);
+ scene.setStickyFocus(useStickyFocus);
+
+ noFocusOnTop->setFlag(focusFlag);
focusableUnder->stackBefore(noFocusOnTop);
itemWithFocus->setFocus();
@@ -10580,14 +10616,102 @@ void tst_QGraphicsItem::stopClickFocusPropagation()
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
QVERIFY(itemWithFocus->hasFocus());
- QPointF mousePressPoint = noFocusOnTop->mapToScene(QPointF());
- mousePressPoint.rx() += 60;
- mousePressPoint.ry() += 60;
+ const QPointF mousePressPoint = noFocusOnTop->mapToScene(noFocusOnTop->boundingRect().center());
const QList<QGraphicsItem *> itemsAtMousePressPosition = scene.items(mousePressPoint);
- QVERIFY(itemsAtMousePressPosition.contains(focusableUnder));
+ QVERIFY(itemsAtMousePressPosition.contains(noFocusOnTop));
sendMousePress(&scene, mousePressPoint);
- QVERIFY(itemWithFocus->hasFocus());
+
+ switch (expectedFocusItem) {
+ case 0:
+ QCOMPARE(scene.focusItem(), static_cast<QGraphicsRectItem *>(0));
+ break;
+ case 1:
+ QCOMPARE(scene.focusItem(), focusableUnder);
+ break;
+ case 2:
+ QCOMPARE(scene.focusItem(), itemWithFocus);
+ break;
+ }
+
+ // Sanity check - manually setting the focus must work regardless of our
+ // focus handling flags:
+ focusableUnder->setFocus();
+ QCOMPARE(scene.focusItem(), focusableUnder);
+}
+
+void tst_QGraphicsItem::touchEventPropagation_data()
+{
+ QTest::addColumn<QGraphicsItem::GraphicsItemFlag>("flag");
+ QTest::addColumn<int>("expectedCount");
+
+ QTest::newRow("ItemIsPanel")
+ << QGraphicsItem::ItemIsPanel << 0;
+ QTest::newRow("ItemStopsClickFocusPropagation")
+ << QGraphicsItem::ItemStopsClickFocusPropagation << 1;
+ QTest::newRow("ItemStopsFocusHandling")
+ << QGraphicsItem::ItemStopsFocusHandling << 1;
+}
+
+void tst_QGraphicsItem::touchEventPropagation()
+{
+ QFETCH(QGraphicsItem::GraphicsItemFlag, flag);
+ QFETCH(int, expectedCount);
+
+ class Testee : public QGraphicsRectItem
+ {
+ public:
+ int touchBeginEventCount;
+
+ Testee()
+ : QGraphicsRectItem(0, 0, 100, 100)
+ , touchBeginEventCount(0)
+ {
+ setAcceptTouchEvents(true);
+ setFlag(QGraphicsItem::ItemIsFocusable, false);
+ }
+
+ bool sceneEvent(QEvent *ev)
+ {
+ if (ev->type() == QEvent::TouchBegin)
+ ++touchBeginEventCount;
+
+ return QGraphicsRectItem::sceneEvent(ev);
+ }
+ };
+
+ Testee *touchEventReceiver = new Testee;
+ QGraphicsItem *topMost = new QGraphicsRectItem(touchEventReceiver->boundingRect());
+
+ QGraphicsScene scene;
+ scene.addItem(topMost);
+ scene.addItem(touchEventReceiver);
+
+ topMost->setAcceptTouchEvents(true);
+ topMost->setZValue(FLT_MAX);
+ topMost->setFlag(QGraphicsItem::ItemIsFocusable, false);
+ topMost->setFlag(flag, true);
+
+ QGraphicsView view(&scene);
+ view.setSceneRect(touchEventReceiver->boundingRect());
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QCOMPARE(touchEventReceiver->touchBeginEventCount, 0);
+
+ QTouchEvent::TouchPoint tp(0);
+ tp.setState(Qt::TouchPointPressed);
+ tp.setScenePos(view.sceneRect().center());
+ tp.setLastScenePos(view.sceneRect().center());
+
+ QList<QTouchEvent::TouchPoint> touchPoints;
+ touchPoints << tp;
+
+ sendMousePress(&scene, tp.scenePos());
+ QTouchEvent touchBegin(QEvent::TouchBegin, QTouchEvent::TouchScreen, Qt::NoModifier, Qt::TouchPointPressed, touchPoints);
+
+ qApp->sendEvent(&scene, &touchBegin);
+ QCOMPARE(touchEventReceiver->touchBeginEventCount, expectedCount);
}
void tst_QGraphicsItem::deviceCoordinateCache_simpleRotations()
@@ -11129,6 +11253,6 @@ void tst_QGraphicsItem::QTBUG_16374_crashInDestructor()
view.show();
QTest::qWaitForWindowShown(&view);
}
-
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index d446ca72db..9ff086c425 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -289,6 +289,7 @@ private slots:
void taskQTBUG_7863_paintIntoCacheWithTransparentParts();
void taskQT_3674_doNotCrash();
void taskQTBUG_15977_renderWithDeviceCoordinateCache();
+ void taskQTBUG_16401_focusItem();
};
void tst_QGraphicsScene::initTestCase()
@@ -4680,5 +4681,35 @@ void tst_QGraphicsScene::taskQTBUG_15977_renderWithDeviceCoordinateCache()
QCOMPARE(image, expected);
}
+void tst_QGraphicsScene::taskQTBUG_16401_focusItem()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsRectItem *rect = scene.addRect(0, 0, 100, 100);
+ rect->setFlag(QGraphicsItem::ItemIsFocusable);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QApplication::setActiveWindow(&view);
+
+ QVERIFY(!scene.focusItem());
+
+ rect->setFocus();
+ QCOMPARE(scene.focusItem(), rect);
+ QFocusEvent focusOut(QEvent::FocusOut);
+ QApplication::sendEvent(&view, &focusOut);
+ QVERIFY(!scene.focusItem());
+ QFocusEvent focusIn(QEvent::FocusIn);
+ QApplication::sendEvent(&view, &focusIn);
+ QCOMPARE(scene.focusItem(), rect);
+
+ rect->clearFocus();
+ QVERIFY(!scene.focusItem());
+ QApplication::sendEvent(&view, &focusOut);
+ QVERIFY(!scene.focusItem());
+ QApplication::sendEvent(&view, &focusIn);
+ QVERIFY(!scene.focusItem());
+}
+
QTEST_MAIN(tst_QGraphicsScene)
#include "tst_qgraphicsscene.moc"
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index d2b6022722..903d7e796c 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -163,10 +163,11 @@ static inline bool fuzzyCompare(qreal p1, qreal p2)
{
// increase delta on small machines using float instead of double
if (sizeof(qreal) == sizeof(float))
- return (qAbs(p1 - p2) <= 0.00002f * qMin(qAbs(p1), qAbs(p2)));
+ return (qAbs(p1 - p2) <= 0.00003f * qMin(qAbs(p1), qAbs(p2)));
else
return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2)));
}
+
static bool fuzzyCompare(const QTransform& t1, const QTransform& t2)
{
return fuzzyCompare(t1.m11(), t2.m11()) &&
@@ -180,6 +181,15 @@ static bool fuzzyCompare(const QTransform& t1, const QTransform& t2)
fuzzyCompare(t1.m33(), t2.m33());
}
+static inline bool fuzzyCompare(const QMatrix4x4& m1, const QMatrix4x4& m2)
+{
+ bool ok = true;
+ for (int y = 0; y < 4; ++y)
+ for (int x = 0; x < 4; ++x)
+ ok &= fuzzyCompare(m1(y, x), m2(y, x));
+ return ok;
+}
+
void tst_QGraphicsTransform::rotation()
{
QGraphicsRotation rotation;
@@ -271,7 +281,7 @@ void tst_QGraphicsTransform::rotation3d()
// because the deg2rad value in QTransform is not accurate
// enough to match what QMatrix4x4 is doing.
} else {
- QVERIFY(qFuzzyCompare(t, r));
+ QVERIFY(fuzzyCompare(t, r));
}
//now let's check that a null vector will not change the transform
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index b6e69a0296..ee03386844 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -1893,7 +1893,8 @@ void tst_QListView::taskQTBUG_435_deselectOnViewportClick()
QCOMPARE(view.selectionModel()->selectedIndexes().count(), model.rowCount());
- QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, 20);
+ const QRect itemRect = view.visualRect(model.index(model.rowCount() - 1));
+ QPoint p = view.visualRect(model.index(model.rowCount() - 1)).center() + QPoint(0, itemRect.height());
//first the left button
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p);
QVERIFY(!view.selectionModel()->hasSelection());
diff --git a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
index 0c890139e3..91dfe4774f 100644
--- a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -171,16 +171,16 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("with-value7") << "a = b" << cookie;
QTest::newRow("with-value8") << "a = b " << cookie;
- cookie.setValue(",");
+ cookie.setValue("\",\"");
QTest::newRow("with-value-with-special1") << "a = \",\" " << cookie;
- cookie.setValue(";");
+ cookie.setValue("\";\"");
QTest::newRow("with-value-with-special2") << "a = \";\" " << cookie;
- cookie.setValue(" ");
+ cookie.setValue("\" \"");
QTest::newRow("with-value-with-special3") << "a = \" \" " << cookie;
- cookie.setValue("\"");
- QTest::newRow("with-value-with-special3") << "a = \"\\\"\" " << cookie;
- cookie.setValue("\"a, b; c\"");
- QTest::newRow("with-value-with-special4") << "a = \"\\\"a, b; c\\\"\"" << cookie;
+ cookie.setValue("\"\\\"\"");
+ QTest::newRow("with-value-with-special4") << "a = \"\\\"\" " << cookie;
+ cookie.setValue("\"\\\"a, b; c\\\"\"");
+ QTest::newRow("with-value-with-special5") << "a = \"\\\"a, b; c\\\"\"" << cookie;
cookie.setValue("b");
cookie.setSecure(true);
@@ -568,10 +568,18 @@ void tst_QNetworkCookie::parseSingleCookie_data()
cookie.setDomain("mail.yahoo.com");
QTest::newRow("network3") << "YM.LC=v=2&m=9993_262838_159_1558_1063_0_5649_4012_3776161073,9426_260205_549_1295_1336_0_5141_4738_3922731647,6733_258196_952_1364_643_0_3560_-1_0,3677_237633_1294_1294_19267_0_3244_29483_4102206176,1315_235149_1693_1541_941_0_3224_1691_1861378060,1858_214311_2100_1298_19538_0_2873_30900_716411652,6258_212007_2506_1285_1017_0_2868_3606_4288540264,3743_207884_2895_1362_2759_0_2545_7114_3388520216,2654_205253_3257_1297_1332_0_2504_4682_3048534803,1891_184881_3660_1291_19079_0_978_29178_2592538685&f=1&n=20&s=date&o=down&e=1196548712&b=Inbox&u=removed; path=/; domain=mail.yahoo.com" << cookie;
- cookie = QNetworkCookie("__ac", "c2hhdXNtYW46U2FTYW80Wm8%3D");
+ cookie = QNetworkCookie("__ac", "\"c2hhdXNtYW46U2FTYW80Wm8%3D\"");
cookie.setPath("/");
cookie.setExpirationDate(QDateTime(QDate(2008, 8, 30), QTime(20, 21, 49), Qt::UTC));
QTest::newRow("network4") << "__ac=\"c2hhdXNtYW46U2FTYW80Wm8%3D\"; Path=/; Expires=Sat, 30 Aug 2008 20:21:49 +0000" << cookie;
+
+ // linkedin.com sends cookies in quotes and expects the cookie in quotes
+ cookie = QNetworkCookie("leo_auth_token", "\"GST:UroVXaxYA3sVSkoVjMNH9bj4dZxVzK2yekgrAUxMfUsyLTNyPjoP60:1298974875:b675566ae32ab36d7a708c0efbf446a5c22b9fca\"");
+ cookie.setPath("/");
+ cookie.setExpirationDate(QDateTime(QDate(2011, 3, 1), QTime(10, 51, 14), Qt::UTC));
+ QTest::newRow("network5") << "leo_auth_token=\"GST:UroVXaxYA3sVSkoVjMNH9bj4dZxVzK2yekgrAUxMfUsyLTNyPjoP60:1298974875:b675566ae32ab36d7a708c0efbf446a5c22b9fca\"; Version=1; Max-Age=1799; Expires=Tue, 01-Mar-2011 10:51:14 GMT; Path=/" << cookie;
+
+
}
void tst_QNetworkCookie::parseSingleCookie()
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 8274140331..81278b6010 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -333,6 +333,8 @@ private Q_SLOTS:
void synchronousRequest();
void synchronousRequestSslFailure();
+ void dontInsertPartialContentIntoTheCache();
+
// NOTE: This test must be last!
void parentingRepliesToTheApp();
};
@@ -573,6 +575,63 @@ public:
Q_DECLARE_METATYPE(MyMemoryCache::CachedContent)
Q_DECLARE_METATYPE(MyMemoryCache::CacheData)
+class MySpyMemoryCache: public QAbstractNetworkCache
+{
+public:
+ MySpyMemoryCache(QObject *parent) : QAbstractNetworkCache(parent) {}
+ ~MySpyMemoryCache()
+ {
+ qDeleteAll(m_buffers);
+ m_buffers.clear();
+ }
+
+ QHash<QUrl, QIODevice*> m_buffers;
+ QList<QUrl> m_insertedUrls;
+
+ QNetworkCacheMetaData metaData(const QUrl &)
+ {
+ return QNetworkCacheMetaData();
+ }
+
+ void updateMetaData(const QNetworkCacheMetaData &)
+ {
+ }
+
+ QIODevice *data(const QUrl &)
+ {
+ return 0;
+ }
+
+ bool remove(const QUrl &url)
+ {
+ delete m_buffers.take(url);
+ return m_insertedUrls.removeAll(url) > 0;
+ }
+
+ qint64 cacheSize() const
+ {
+ return 0;
+ }
+
+ QIODevice *prepare(const QNetworkCacheMetaData &metaData)
+ {
+ QBuffer* buffer = new QBuffer;
+ buffer->open(QIODevice::ReadWrite);
+ buffer->setProperty("url", metaData.url());
+ m_buffers.insert(metaData.url(), buffer);
+ return buffer;
+ }
+
+ void insert(QIODevice *buffer)
+ {
+ QUrl url = buffer->property("url").toUrl();
+ m_insertedUrls << url;
+ delete m_buffers.take(url);
+ }
+
+ void clear() { m_insertedUrls.clear(); }
+};
+
class DataReader: public QObject
{
Q_OBJECT
@@ -951,6 +1010,7 @@ tst_QNetworkReply::tst_QNetworkReply()
qRegisterMetaType<QAuthenticator *>();
qRegisterMetaType<QNetworkProxy>();
qRegisterMetaType<QList<QSslError> >();
+ qRegisterMetaType<QNetworkReply::NetworkError>();
Q_SET_DEFAULT_IAP
@@ -2572,6 +2632,9 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer_data()
QTest::newRow("justHalfStatus+disconnect") << QByteArray("HTTP/1.1") << true;
QTest::newRow("justStatus+disconnect") << QByteArray("HTTP/1.1 200 OK\r\n") << true;
QTest::newRow("justStatusAndHalfHeaders+disconnect") << QByteArray("HTTP/1.1 200 OK\r\nContent-L") << true;
+
+ QTest::newRow("halfContent+disconnect") << QByteArray("HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\nAB") << true;
+
}
void tst_QNetworkReply::ioGetFromHttpBrokenServer()
@@ -2583,29 +2646,35 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer()
QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
QNetworkReplyPtr reply = manager.get(request);
+ QSignalSpy spy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
+
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(reply->url(), request.url());
+ QCOMPARE(spy.count(), 1);
QVERIFY(reply->error() != QNetworkReply::NoError);
}
void tst_QNetworkReply::ioGetFromHttpStatus100_data()
{
QTest::addColumn<QByteArray>("dataToSend");
- QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
- QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
- QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n");
- QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n");
- QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
- QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
+ QTest::addColumn<int>("statusCode");
+ QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << 200;
+ QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << 200;
+ QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n") << 200;
+ QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n") << 200;
+ QTest::newRow("minimal+404") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 204 No Content\r\n\r\n") << 204;
+ QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << 200;
+ QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << 200;
}
void tst_QNetworkReply::ioGetFromHttpStatus100()
{
QFETCH(QByteArray, dataToSend);
+ QFETCH(int, statusCode);
MiniHttpServer server(dataToSend);
server.doClose = true;
@@ -2618,7 +2687,7 @@ void tst_QNetworkReply::ioGetFromHttpStatus100()
QCOMPARE(reply->url(), request.url());
QCOMPARE(reply->error(), QNetworkReply::NoError);
- QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
+ QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), statusCode);
QVERIFY(reply->rawHeader("bla").isNull());
}
@@ -2653,6 +2722,7 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data()
QTest::addColumn<QString>("body");
QTest::addColumn<MyMemoryCache::CachedContent>("cachedReply");
QTest::addColumn<int>("cacheMode");
+ QTest::addColumn<QStringList>("extraHttpHeaders");
QTest::addColumn<bool>("loadedFromCache");
QTest::addColumn<bool>("networkUsed");
@@ -2670,11 +2740,11 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data()
"\r\n";
QTest::newRow("not-cached,always-network")
- << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::AlwaysNetwork) << false << true;
+ << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::AlwaysNetwork) << QStringList() << false << true;
QTest::newRow("not-cached,prefer-network")
- << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::PreferNetwork) << false << true;
+ << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::PreferNetwork) << QStringList() << false << true;
QTest::newRow("not-cached,prefer-cache")
- << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::PreferCache) << false << true;
+ << reply200 << "Reloaded" << MyMemoryCache::CachedContent() << int(QNetworkRequest::PreferCache) << QStringList() << false << true;
QDateTime present = QDateTime::currentDateTime().toUTC();
QDateTime past = present.addSecs(-3600);
@@ -2696,14 +2766,14 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data()
content.first.setLastModified(past);
QTest::newRow("expired,200,prefer-network")
- << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferNetwork) << false << true;
+ << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << false << true;
QTest::newRow("expired,200,prefer-cache")
- << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferCache) << false << true;
+ << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << false << true;
QTest::newRow("expired,304,prefer-network")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << true << true;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << true << true;
QTest::newRow("expired,304,prefer-cache")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << true << true;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << true;
//
// Set to not-expired
@@ -2715,20 +2785,20 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data()
content.first.setExpirationDate(future);
QTest::newRow("not-expired,200,always-network")
- << reply200 << "Reloaded" << content << int(QNetworkRequest::AlwaysNetwork) << false << true;
+ << reply200 << "Reloaded" << content << int(QNetworkRequest::AlwaysNetwork) << QStringList() << false << true;
QTest::newRow("not-expired,200,prefer-network")
- << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << true << false;
+ << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << true << false;
QTest::newRow("not-expired,200,prefer-cache")
- << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << true << false;
+ << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << false;
QTest::newRow("not-expired,200,always-cache")
- << reply200 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << true << false;
+ << reply200 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << QStringList() << true << false;
QTest::newRow("not-expired,304,prefer-network")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << true << false;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << true << false;
QTest::newRow("not-expired,304,prefer-cache")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << true << false;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << false;
QTest::newRow("not-expired,304,always-cache")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << true << false;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << QStringList() << true << false;
//
// Set must-revalidate now
@@ -2739,20 +2809,42 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data()
content.first.setRawHeaders(rawHeaders);
QTest::newRow("must-revalidate,200,always-network")
- << reply200 << "Reloaded" << content << int(QNetworkRequest::AlwaysNetwork) << false << true;
+ << reply200 << "Reloaded" << content << int(QNetworkRequest::AlwaysNetwork) << QStringList() << false << true;
QTest::newRow("must-revalidate,200,prefer-network")
- << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferNetwork) << false << true;
+ << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << false << true;
QTest::newRow("must-revalidate,200,prefer-cache")
- << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << true << false;
+ << reply200 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << false;
QTest::newRow("must-revalidate,200,always-cache")
- << reply200 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << true << false;
+ << reply200 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << QStringList() << true << false;
QTest::newRow("must-revalidate,304,prefer-network")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << true << true;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << true << true;
QTest::newRow("must-revalidate,304,prefer-cache")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << true << false;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << false;
QTest::newRow("must-revalidate,304,always-cache")
- << reply304 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << true << false;
+ << reply304 << "Not-reloaded" << content << int(QNetworkRequest::AlwaysCache) << QStringList() << true << false;
+
+ //
+ // Partial content
+ //
+ rawHeaders.clear();
+ rawHeaders << QNetworkCacheMetaData::RawHeader("Date", QLocale::c().toString(past, dateFormat).toLatin1())
+ << QNetworkCacheMetaData::RawHeader("Cache-control", "max-age=7200"); // isn't used in cache loading
+ content.first.setRawHeaders(rawHeaders);
+ content.first.setExpirationDate(future);
+
+ QByteArray reply206 =
+ "HTTP/1.0 206\r\n"
+ "Connection: keep-alive\r\n"
+ "Content-Type: text/plain\r\n"
+ "Cache-control: no-cache\r\n"
+ "Content-Range: bytes 2-6/8\r\n"
+ "Content-length: 4\r\n"
+ "\r\n"
+ "load";
+
+ QTest::newRow("partial,dontuse-cache")
+ << reply206 << "load" << content << int(QNetworkRequest::PreferCache) << (QStringList() << "Range" << "bytes=2-6") << false << true;
}
void tst_QNetworkReply::ioGetFromHttpWithCache()
@@ -2774,6 +2866,15 @@ void tst_QNetworkReply::ioGetFromHttpWithCache()
QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, cacheMode);
request.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
+
+ QFETCH(QStringList, extraHttpHeaders);
+ QStringListIterator it(extraHttpHeaders);
+ while (it.hasNext()) {
+ QString header = it.next();
+ QString value = it.next();
+ request.setRawHeader(header.toLatin1(), value.toLatin1()); // To latin1? Deal with it!
+ }
+
QNetworkReplyPtr reply = manager.get(request);
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
@@ -5233,6 +5334,39 @@ void tst_QNetworkReply::synchronousRequestSslFailure()
QCOMPARE(sslErrorsSpy.count(), 0);
}
+void tst_QNetworkReply::dontInsertPartialContentIntoTheCache()
+{
+ QByteArray reply206 =
+ "HTTP/1.0 206\r\n"
+ "Connection: keep-alive\r\n"
+ "Content-Type: text/plain\r\n"
+ "Cache-control: no-cache\r\n"
+ "Content-Range: bytes 2-6/8\r\n"
+ "Content-length: 4\r\n"
+ "\r\n"
+ "load";
+
+ MiniHttpServer server(reply206);
+ server.doClose = false;
+
+ MySpyMemoryCache *memoryCache = new MySpyMemoryCache(&manager);
+ manager.setCache(memoryCache);
+
+ QUrl url = "http://localhost:" + QString::number(server.serverPort());
+ QNetworkRequest request(url);
+ request.setRawHeader("Range", "bytes=2-6");
+
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QVERIFY(server.totalConnections > 0);
+ QCOMPARE(reply->readAll().constData(), "load");
+ QCOMPARE(memoryCache->m_insertedUrls.count(), 0);
+}
+
// NOTE: This test must be last testcase in tst_qnetworkreply!
void tst_QNetworkReply::parentingRepliesToTheApp()
{
@@ -5242,4 +5376,5 @@ void tst_QNetworkReply::parentingRepliesToTheApp()
}
QTEST_MAIN(tst_QNetworkReply)
+
#include "tst_qnetworkreply.moc"
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 4cf64f1e38..c9eca89023 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -258,6 +258,8 @@ private slots:
void QTBUG14614_gradientCacheRaceCondition();
void drawTextOpacity();
+ void QTBUG17053_zeroDashPattern();
+
private:
void fillData();
void setPenColor(QPainter& p);
@@ -4601,6 +4603,26 @@ void tst_QPainter::drawTextOpacity()
QCOMPARE(image, copy);
}
+void tst_QPainter::QTBUG17053_zeroDashPattern()
+{
+ QImage image(32, 32, QImage::Format_RGB32);
+ image.fill(0xffffffff);
+
+ QImage original = image;
+
+ QVector<qreal> pattern;
+ pattern << qreal(0) << qreal(0);
+
+ QPainter p(&image);
+ QPen pen(Qt::black, 2.0);
+ pen.setDashPattern(pattern);
+
+ p.setPen(pen);
+ p.drawLine(0, 0, image.width(), image.height());
+
+ QCOMPARE(image, original);
+}
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 00f9b91d5d..bc3b5d915f 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -290,6 +290,11 @@ void tst_QPainterPath::contains_QPointF_data()
QTest::newRow("horizontal cubic, out left") << path << QPointF(0, 100) << false;
QTest::newRow("horizontal cubic, out right") << path << QPointF(300, 100) <<false;
QTest::newRow("horizontal cubic, in mid") << path << QPointF(150, 100) << true;
+
+ path = QPainterPath();
+ path.addEllipse(QRectF(-5000.0, -5000.0, 1500000.0, 1500000.0));
+ QTest::newRow("huge ellipse, qreal=float crash") << path << QPointF(1100000.35, 1098000.2) << true;
+
}
void tst_QPainterPath::contains_QPointF()
@@ -406,6 +411,10 @@ void tst_QPainterPath::intersects_QRectF_data()
QTest::newRow("horizontal line") << linePath(0, 0, 10, 0) << QRectF(1, -1, 2, 2) << true;
QTest::newRow("vertical line") << linePath(0, 0, 0, 10) << QRectF(-1, 1, 2, 2) << true;
+
+ path = QPainterPath();
+ path.addEllipse(QRectF(-5000.0, -5000.0, 1500000.0, 1500000.0));
+ QTest::newRow("huge ellipse, qreal=float crash") << path << QRectF(1100000.35, 1098000.2, 1500000.0, 1500000.0) << true;
}
void tst_QPainterPath::intersects_QRectF()
diff --git a/tests/auto/qpixmap/qpixmap.pro b/tests/auto/qpixmap/qpixmap.pro
index ff8258f983..e6a825778e 100644
--- a/tests/auto/qpixmap/qpixmap.pro
+++ b/tests/auto/qpixmap/qpixmap.pro
@@ -25,6 +25,7 @@ wince*: {
LIBS += -lfbscli.dll -lbitgdi.dll -lgdi.dll
contains(QT_CONFIG, openvg) {
LIBS += $$QMAKE_LIBS_OPENVG
+ QT *= openvg
}
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 62a6eb4abb..0b5c30be79 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -52,6 +52,7 @@
#include <qsplashscreen.h>
#include <private/qpixmapdata_p.h>
+#include <private/qdrawhelper_p.h>
#include <QSet>
@@ -68,6 +69,10 @@
#include <fbs.h>
#include <gdi.h>
#include <bitdev.h>
+#if !defined(QT_NO_OPENVG)
+#include <QtOpenVG/qvg.h>
+#include <QtOpenVG/private/qpixmapdata_vg_p.h>
+#endif
#endif
#ifdef Q_WS_X11
@@ -185,6 +190,10 @@ private slots:
void toImageDeepCopy();
void loadAsBitmapOrPixmap();
+
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+ void vgImageReadBack();
+#endif
};
static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
@@ -632,9 +641,12 @@ void tst_QPixmap::mask()
QVERIFY(!pm.isNull());
QVERIFY(!bm.isNull());
- // hw: todo: this will fail if the default pixmap format is
- // argb32_premultiplied. The mask will be all 1's
- QVERIFY(pm.mask().isNull());
+ if (!pm.hasAlphaChannel()) {
+ // This would fail if the default pixmap format is
+ // argb32_premultiplied. The mask will be all 1's.
+ // Therefore this is skipped when the alpha channel is present.
+ QVERIFY(pm.mask().isNull());
+ }
QImage img = bm.toImage();
QVERIFY(img.format() == QImage::Format_MonoLSB
@@ -1256,7 +1268,10 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
QCOMPARE(actualColor, color);
QImage shouldBe(pixmap.width(), pixmap.height(), image.format());
- shouldBe.fill(color.rgba());
+ if (image.format() == QImage::Format_RGB16)
+ shouldBe.fill(qrgb565(color.rgba()).rawValue());
+ else
+ shouldBe.fill(color.rgba());
QCOMPARE(image, shouldBe);
}
__UHEAP_MARKEND;
@@ -1767,6 +1782,104 @@ void tst_QPixmap::toImageDeepCopy()
QVERIFY(first != second);
}
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_OPENVG)
+Q_OPENVG_EXPORT VGImage qPixmapToVGImage(const QPixmap& pixmap);
+class FriendlyVGPixmapData : public QVGPixmapData
+{
+public:
+ FriendlyVGPixmapData(PixelType type) : QVGPixmapData(type) { }
+ bool sourceIsNull() { return source.isNull(); }
+ friend QPixmap pixmapFromVGImage(VGImage image);
+};
+QPixmap pixmapFromVGImage(VGImage image)
+{
+ if (image != VG_INVALID_HANDLE) {
+ int w = vgGetParameteri(image, VG_IMAGE_WIDTH);
+ int h = vgGetParameteri(image, VG_IMAGE_HEIGHT);
+ FriendlyVGPixmapData *pd = new FriendlyVGPixmapData(QPixmapData::PixmapType);
+ pd->resize(w, h);
+ pd->vgImage = image;
+ pd->recreate = false;
+ pd->prevSize = QSize(pd->w, pd->h);
+ return QPixmap(pd);
+ }
+ return QPixmap();
+}
+class Content : public QWidget
+{
+public:
+ void paintEvent(QPaintEvent *) {
+ QPainter painter(this);
+ QColor testPixel(qRgb(200, 150, 100));
+ if (pm.isNull()) { // first phase: create a VGImage
+ painter.beginNativePainting();
+ vgimage = vgCreateImage(VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER);
+ QImage img(20, 10, QImage::Format_ARGB32_Premultiplied);
+ img.fill(qRgb(0, 0, 0));
+ QPainter p(&img);
+ p.fillRect(0, 0, img.width(), img.height(), testPixel);
+ p.end();
+ vgImageSubData(vgimage, img.bits(), img.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, img.width(), img.height());
+ // Now the area 0,0 20x10 (in OpenVG coords) is filled with some color.
+ painter.endNativePainting();
+ } else { // second phase: check if readback works
+ painter.drawPixmap(0, 0, pm);
+ // Drawing should not cause readback, this is important for performance;
+ noreadback_ok = static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull();
+ // However toImage() requires readback.
+ QImage img = pm.toImage();
+ readback_ok = img.width() == pm.width();
+ readback_ok &= img.height() == pm.height();
+ readback_ok &= !static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull();
+ uint pix = img.pixel(1, 1);
+ content_ok = qRed(pix) == testPixel.red();
+ content_ok &= qGreen(pix) == testPixel.green();
+ content_ok &= qBlue(pix) == testPixel.blue();
+ pix = img.pixel(img.width() - 1, img.height() - 1);
+ content_ok &= qRed(pix) == 0;
+ content_ok &= qGreen(pix) == 0;
+ content_ok &= qBlue(pix) == 0;
+ }
+ }
+ int w;
+ int h;
+ VGImage vgimage;
+ QPixmap pm;
+ bool noreadback_ok;
+ bool readback_ok;
+ bool content_ok;
+};
+void tst_QPixmap::vgImageReadBack()
+{
+ QPixmap tmp(10, 20);
+ if (tmp.pixmapData()->classId() == QPixmapData::OpenVGClass) {
+ Content c;
+ c.w = 50;
+ c.h = 60;
+ c.vgimage = VG_INVALID_HANDLE;
+ c.noreadback_ok = c.readback_ok = c.content_ok = false;
+ c.showFullScreen();
+ QTest::qWaitForWindowShown(&c);
+ QVERIFY(c.vgimage != VG_INVALID_HANDLE);
+ QPixmap pm = pixmapFromVGImage(c.vgimage);
+ QVERIFY(!pm.isNull());
+ QCOMPARE(pm.width(), c.w);
+ QCOMPARE(pm.height(), c.h);
+ QVERIFY(qPixmapToVGImage(pm) == c.vgimage);
+ QVERIFY(static_cast<FriendlyVGPixmapData *>(pm.pixmapData())->sourceIsNull());
+ c.pm = pm;
+ // Make sure the second phase in paintEvent is executed too.
+ c.hide();
+ c.showFullScreen();
+ QTest::qWaitForWindowShown(&c);
+ QVERIFY(c.noreadback_ok);
+ QVERIFY(c.readback_ok);
+ QVERIFY(c.content_ok);
+ } else {
+ QSKIP("Not using openvg graphicssystem", SkipSingle);
+ }
+}
+#endif // Symbian & OpenVG
QTEST_MAIN(tst_QPixmap)
#include "tst_qpixmap.moc"
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 8de6fbc3af..6c89bcb3bd 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -169,6 +169,7 @@ private slots:
void nativeFunctionScopes();
void evaluateProgram();
void collectGarbageAfterConnect();
+ void collectGarbageAfterNativeArguments();
void promoteThisObjectToQObjectInConstructor();
void qRegExpInport_data();
@@ -5040,6 +5041,16 @@ void tst_QScriptEngine::collectGarbageAfterConnect()
QVERIFY(widget == 0);
}
+void tst_QScriptEngine::collectGarbageAfterNativeArguments()
+{
+ // QTBUG-17788
+ QScriptEngine eng;
+ QScriptContext *ctx = eng.pushContext();
+ QScriptValue arguments = ctx->argumentsObject();
+ // Shouldn't crash when marking the arguments object.
+ collectGarbage_helper(eng);
+}
+
static QScriptValue constructQObjectFromThisObject(QScriptContext *ctx, QScriptEngine *eng)
{
Q_ASSERT(ctx->isCalledAsConstructor());
diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
index 910d437374..bd19afb8ec 100644
--- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
+++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
@@ -179,8 +179,8 @@ void tst_QSoftKeyManager::handleCommand()
// QTest::keyPress(&w, Qt::Key_Context1);
// QTest::keyPress(&w, Qt::Key_Context2);
- simulateSymbianCommand(6000);
- simulateSymbianCommand(6001);
+ simulateSymbianCommand(s60CommandStart); //0 = LSK position
+ simulateSymbianCommand(s60CommandStart + 2); //2 = RSK position
QApplication::processEvents();
@@ -205,28 +205,32 @@ void tst_QSoftKeyManager::checkSoftkeyEnableStates()
w.show();
QApplication::processEvents();
- QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //restore defaults action
- QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //disabled help action
+ //According to StandardButton enum in QDialogButtonBox the Help action
+ //is inserted before RestoreDefaults and thus help action is in index 0
+ QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //disabled help action
+ QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //restore defaults action
//Verify that enabled button gets all the action trigger signals and
//disabled button gets none.
for (int i = 0; i < 10; i++) {
- //simulate "Restore Defaults" softkey press
- simulateSymbianCommand(s60CommandStart);
//simulate "help" softkey press
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart);
+ //simulate "Restore Defaults" softkey press
+ simulateSymbianCommand(s60CommandStart + 2);
}
QApplication::processEvents();
- QCOMPARE(spy0.count(), 10);
- QCOMPARE(spy1.count(), 0);
+ //Restore defaults button is enabled and its signals are recorded to spy1
+ QCOMPARE(spy0.count(), 0);
+ QCOMPARE(spy1.count(), 10);
+
spy0.clear();
spy1.clear();
for (int i = 0; i < 10; i++) {
- //simulate "Restore Defaults" softkey press
- simulateSymbianCommand(s60CommandStart);
//simulate "help" softkey press
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart);
+ //simulate "Restore Defaults" softkey press
+ simulateSymbianCommand(s60CommandStart + 2);
//switch enabled button to disabled and vice versa
pBHelp->setEnabled(!pBHelp->isEnabled());
pBDefaults->setEnabled(!pBDefaults->isEnabled());
@@ -261,7 +265,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
//Verify that both base softkeys emit triggered signals
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 1);
QCOMPARE(baseRightSpy.count(), 1);
@@ -275,7 +279,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
QApplication::processEvents();
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 0);
QCOMPARE(baseRightSpy.count(), 0);
@@ -291,7 +295,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
QApplication::processEvents();
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 0);
QCOMPARE(baseRightSpy.count(), 0);
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index bce7281b7e..dfe47cb989 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -144,6 +144,8 @@ private slots:
void taskQTBUG_7537_appearsAndSort();
void taskQTBUG_7716_unnecessaryDynamicSorting();
void taskQTBUG_10287_unnecessaryMapCreation();
+ void taskQTBUG_17812_resetInvalidate_data();
+ void taskQTBUG_17812_resetInvalidate();
void testMultipleProxiesWithSelection();
void mapSelectionFromSource();
@@ -3213,5 +3215,60 @@ void tst_QSortFilterProxyModel::filteredColumns()
}
+void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate_data()
+{
+ QTest::addColumn<int>("test");
+ QTest::addColumn<bool>("works");
+
+ QTest::newRow("nothing") << 0 << false;
+ QTest::newRow("reset") << 1 << true;
+ QTest::newRow("invalidate") << 2 << true;
+ QTest::newRow("invalidate_filter") << 3 << true;
+}
+
+void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate()
+{
+ QFETCH(int, test);
+ QFETCH(bool, works);
+
+ struct Proxy : QSortFilterProxyModel {
+ QString pattern;
+ virtual bool filterAcceptsRow(int source_row, const QModelIndex&) const {
+ return sourceModel()->data(sourceModel()->index(source_row, 0)).toString().contains(pattern);
+ }
+ void notifyChange(int test) {
+ switch (test) {
+ case 0: break;
+ case 1: reset(); break;
+ case 2: invalidate(); break;
+ case 3: invalidateFilter(); break;
+ }
+ }
+ };
+
+ QStringListModel sourceModel(QStringList() << "Poisson" << "Vache" << "Brebis"
+ << "Elephant" << "Cochon" << "Serpent"
+ << "Mouton" << "Ecureuil" << "Mouche");
+ Proxy proxy;
+ proxy.pattern = QString::fromLatin1("n");
+ proxy.setSourceModel(&sourceModel);
+
+ QCOMPARE(proxy.rowCount(), 5);
+ for (int i = 0; i < proxy.rowCount(); i++) {
+ QVERIFY(proxy.data(proxy.index(i,0)).toString().contains('n'));
+ }
+
+ proxy.pattern = QString::fromLatin1("o");
+ proxy.notifyChange(test);
+
+ QCOMPARE(proxy.rowCount(), works ? 4 : 5);
+ bool ok = true;
+ for (int i = 0; i < proxy.rowCount(); i++) {
+ if (!proxy.data(proxy.index(i,0)).toString().contains('o'))
+ ok = false;
+ }
+ QCOMPARE(ok, works);
+}
+
QTEST_MAIN(tst_QSortFilterProxyModel)
#include "tst_qsortfilterproxymodel.moc"
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem
new file mode 100644
index 0000000000..3945aea91e
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQBH7L6fylX3vQnq424QyuHjANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb20w
+HhcNMTEwMzI0MTMwNjI1WhcNMTEwNDIzMTMwNjI1WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBAOeAGV2FbGnT4rLjTvCNEEDjj0/iIUATa6RT8WKF2PVaOzbE
+oceiODx6hTStvBnCgs+h/d3eVKgp+uAyBde5sW/HlOwHrNgKF3ZDvxegzIOEHaVI
+ndNtBpFS3UyOEkO0NxfioBatNRYpeTRU/DVmazu3yvzgrV1V2mDsrNngVWxJAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFHcF1eqRpm7B78aY8ZjseN6zSYbvMIGYBgNVHSME
+gZAwgY2AFHcF1eqRpm7B78aY8ZjseN6zSYbvoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb22CEAR+y+n8pV970J6uNuEM
+rh4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBEb1iF+EbhAJli5Sj2
++iEdJ5xMP8R6FtgqAYknqXD8+tyEyXxJXdN186qdAWuTD9N22AUqi61BPWxUkufW
+xH8FYMEHdFCkitvYE0321+GT5pJz6ON/d5Co+wusumt7T5oSjzj8Ax9V+nmo3Nkb
+dSANM4/Lnc6moijcpJZq+GC1ng==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem
new file mode 100644
index 0000000000..4b8d0599d2
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRAPXIavNhYvE6ZPVPbclYfAYwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOd3d3Lmdvb2dsZS5jb20w
+HhcNMTEwMzI0MTMwNzExWhcNMTEwNDIzMTMwNzExWjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEAy1fNDFl65Njfcd1EUJeaxvyiKln+JKlqUmk1x4mrE1BQoa0C
+QZaiXAF21rDhivWejZWBiEQ4IWbg3b12ANY74G1KqAfLC4BNKS9UP94hy18vezRA
+pFc+m/HAClwc8AdACpl8eZpQW8cMgdvnMBMZTrQkgV0JYykX+uDD9Tb+QNUCAwEA
+AaOByzCByDAdBgNVHQ4EFgQUSelG6IVRj2ZQbp049zkQ0X/Po9wwgZgGA1UdIwSB
+kDCBjYAUSelG6IVRj2ZQbp049zkQ0X/Po9yhYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDnd3dy5nb29nbGUuY29tghEA9chq82Fi8Tpk9U9tyVh8
+BjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBALQyDC/AMQMNj2fa6E8L
+umILCklWJwG1K1p/1bUAgm0CB8zm94n1xrh/ZK4+HS+k2a9OQmvLRbFyJn8Wua8p
+3UU0267UNkCanA1FKHuO3Mo18wLvjMLWjjCQ4g1C9IvJx6P+8EFDQFG+MJBV/w2k
+gJXXVl3q1T1dvahIgfav9QBL
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem
new file mode 100644
index 0000000000..e47ece60dd
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDETCCAnqgAwIBAgIRANdVj9r18RBbshMoK3B3KaMwDQYJKoZIhvcNAQEFBQAw
+XzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29t
+MB4XDTExMDMyNDEzMDg0MloXDTExMDQyMzEzMDg0MlowXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29tMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCosFLKRvGtxjvdAjWdEAHYycFTa4VtdpXmCNhNHf2xbeLn
+xzde10KjEe44pQxNI+UUD1rJkyuH6wUfloyefn0D2Mu+MvusmvOEzFosa4EDbK9s
+BAAlsSiyJgrp/GgbEPq/XOl4XJRBIVP1WC6LllduNbskFCipDqS+HQwifXmmwQID
+AQABo4HMMIHJMB0GA1UdDgQWBBSEgWnsoYtd5GEx/MGJvKxuIuROJzCBmQYDVR0j
+BIGRMIGOgBSEgWnsoYtd5GEx/MGJvKxuIuROJ6FjpGEwXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29tghEA11WP2vXxEFuyEygr
+cHcpozAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKNpIrzTOxIykKZt
+EE6HU2nW1lrWUkIMjwjL8ntw7QI4JLMDN1ADVIxWaGTeQ+U/eXFou6dDNAYVAijK
+ONDXgOItxW2YvSw0wOZsZj6INX2x88/0yRH+19TqaL/r+Y1D1h/0zefkHgfXufnY
+Ex7BHju/rGBTp6R1mr+Tlh1tewva
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem
new file mode 100644
index 0000000000..64c7d41516
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQOSpDTw4H3x+KowXeNODCKTANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20w
+HhcNMTEwMzI0MTMwOTE1WhcNMTEwNDIzMTMwOTE1WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBANO2gz9x2H92xz5OvZSEul9gHxqqd+kdjeoS2exyvjC9wzqb
+gYXqNmAsbtNp4WmieEQFd0riCAEkIAn8JpHTCsMHN4rHhS+W+4D5a/drI2jfnZEF
+orNYJG1PHSQV/rvh6d7wkVdT+0SYOjrFTAA2biGWaK3W9ztf2yX577w+uQtBAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFJjDp8Prs7oReRmskIeFixp0vDkGMIGYBgNVHSME
+gZAwgY2AFJjDp8Prs7oReRmskIeFixp0vDkGoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb22CEDkqQ08OB98fiqMF3jTg
+wikwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQAZyo0Q3leeM1+lxeCd
+Wp0ZYHMSW11ANc6nuMWOmJC+nIQGlyGiP3IqeUvIfekwboV638bahVPwcl2HYWsS
+/l01Bgyd25Zn6VTQBfMK01dILyxscjVwdHuojzYBN05sl+qkVoqQr5EroQQbgDc9
+6I88p6Kjajv3IusCwfK6wlqISw==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem
new file mode 100644
index 0000000000..c7ddbf2839
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQPnXO1GtpMCEhiDCuhqgqcTANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20w
+HhcNMTEwMzI0MTMwOTQ4WhcNMTEwNDIzMTMwOTQ4WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALkiHG9TgTw/00CMW8D23NBDAa3331AL5kTkAaXbAWg2R/1o
+yKQfXq3hgHbyWGPccUT+tU6FmaBf3bIndLK7iGx81RGzGgXeoQ5mpgnJ50iCeW73
+G99VlVwutPia7d9qqui84YdcG9t+P2Fuxv+xRqAB6lKOaa4qTPIbH50PgwOvAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFBWJrs8bnZ5fikfaLbTxK0ssj69MMIGYBgNVHSME
+gZAwgY2AFBWJrs8bnZ5fikfaLbTxK0ssj69MoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb22CED51ztRraTAhIYgwroao
+KnEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCIfqqs1a7RzdmV8U00
+v/xAsxscKvQvmu6BK+HwvY5iL2pSwXTYgRLJLoj5QGOd3mmgOFsyW3BPSCP1+fVE
+M1ROhU2u8wHub+hGGds18Fx6F4yZjdh8pNUoOUR9A0Ym+VDJr2p50oUNTTy0RbH8
+9ns/gbemx84cjF9DD2G5stQhYg==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem
new file mode 100644
index 0000000000..bc2be2adcf
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDETCCAnqgAwIBAgIRAOkCi5V45BXcGnEKK4gVREcwDQYJKoZIhvcNAQEFBQAw
+XzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29t
+MB4XDTExMDMyNDEzMTAxNloXDTExMDQyMzEzMTAxNlowXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29tMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDFq06qqRl86pP7GRX3m7FMMSaSU6zlNGAo+WPoRfYAzB6x
+5KpvlfxMCo3T/nWtInX3Bw9TBWCZSweQ2GEjggO0irjw5UX3MiToLxK+rwzWztm9
+H3LBxTWR0cOOa78kRFvNQ1onvNHbs8fJzXjG7b2IJDOIwG1HAT1LK80oPXZc1wID
+AQABo4HMMIHJMB0GA1UdDgQWBBTiGNxw0ImW/wfW0mD3eA65PY5CAzCBmQYDVR0j
+BIGRMIGOgBTiGNxw0ImW/wfW0mD3eA65PY5CA6FjpGEwXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29tghEA6QKLlXjkFdwacQor
+iBVERzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAHdb1QY/oxuro/4x
+GX9jbm930ysoeXkWZSKVtVxoxrPIferu8jVpb1SLRjGcMnmjJoNWNFpvnbZgoYei
+f3wdSWun7ndyQBh61k8eM7UABDOUXUHOsHuHj7s1koMKtet4gykmMfd6VxBkwBvN
+ZXOll4X+TKe8nrxbnGUByIwQaRM+
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem
new file mode 100644
index 0000000000..19d4353fab
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDGjCCAoOgAwIBAgIRAJI51TSPQNFpWnRUcOHyP0MwDQYJKoZIhvcNAQEFBQAw
+YjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEu
+b3JnMB4XDTExMDMyNDEzMTA0NFoXDTExMDQyMzEzMTA0NFowYjELMAkGA1UEBhMC
+QVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdp
+dHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEub3JnMIGfMA0GCSqG
+SIb3DQEBAQUAA4GNADCBiQKBgQC1lsoAcZTwF8Pf0E9do5avLdobB/O7EhhrCMs2
+/EMO07aIlrLwl3UP/Fmu/cAkKuX8Mx+Eif9x+XT3ZqGKGYKiqPTJcNfeZvgwbn0j
+wXDtEo4DuURrwtBU9okS+v4dF6F4RtHQKAGcsXoOjhR7ah71kve+PG2GG0sJ167V
+klK1xwIDAQABo4HPMIHMMB0GA1UdDgQWBBRgGDJ4Qp0WFyLIzm4Nz5wgqDSSxjCB
+nAYDVR0jBIGUMIGRgBRgGDJ4Qp0WFyLIzm4Nz5wgqDSSxqFmpGQwYjELMAkGA1UE
+BhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdp
+ZGdpdHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEub3JnghEAkjnV
+NI9A0WladFRw4fI/QzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACeE
+DHMQ+LWEuoa/6z2EgrgM1k9rvBbUtCR+rjTuyzVW4OLXdpiVwZPOAiKphpq7q8Sb
+TQ3zwsCoPLLJk5VolwcPfcD8Y2/tYK3NCYl+HzGxxnzPDFVaZM5Jh8RI861Hc00D
+hVoQaptPK/V/lr0KEevqjhusAdFZbwlWA923zASa
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem
new file mode 100644
index 0000000000..aedf3f7010
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMObG9naW4ubGl2ZS5jb20w
+HhcNMTEwMzI0MTMxMTA2WhcNMTEwNDIzMTMxMTA2WjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5sb2dpbi5saXZlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEA3OVNj9ijzMewvDeZYzgCWoKtyjclyIHxrQfHZpcexaKbxUap
+1MtF6L0ayjtRWpiBYuPteUSy/Ja4Oh6zZz8K6z5rVgXhmy3xPIYuOoWaTKEOhb0Z
+oHTBtGh8aWWai1XWw37HIm2FP8cmfgdH4lZwVvpTZIUxYidsyqyjB9IrhiMCAwEA
+AaOByzCByDAdBgNVHQ4EFgQU4CcQcIvEhJC0tqHlNFMkv6MlDN4wgZgGA1UdIwSB
+kDCBjYAU4CcQcIvEhJC0tqHlNFMkv6MlDN6hYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmxvZ2luLmxpdmUuY29tghEAsLcTPtCW+bVvrpHIdL06
+wDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAMNzIStXDNSNQ8ayxrcj
+4RrUMsHWUG/6XPrgfYqCP5TfPGAa5qBfNb9LfUbiS4b0flJVN1RlHVwwRo0yf9v4
+LGg0dSuPQAOWlLeUR1GminO1jHZw7E4dYfR7QEmiiOgaQU+CbxLsf5vCaKInN9Gu
+jv/5xytVCbMoLoZ4EBVb0tka
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem
new file mode 100644
index 0000000000..d179b29288
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRANjzX063hystqwaS4xU4L7AwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOZ2xvYmFsIHRydXN0ZWUw
+HhcNMTEwMzI0MTMxMTM3WhcNMTEwNDIzMTMxMTM3WjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5nbG9iYWwgdHJ1c3RlZTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEArHCVym7AEZDBhDkrUSG3Q94a+caNcCk5fE6ltZHiZHv096xr
+cixHYvSGvms780bkI+oot2xI/e9awwkV+7VjWNvr0HrajzBWeimwk+myjP+3ddMY
+Kmr0eI6bmvmPHtOFJE5Ar8/62FwD0wlLogRIx56JtXcCpkiUQktJVPz2gtMCAwEA
+AaOByzCByDAdBgNVHQ4EFgQUUJwC/qSGBmcB+DVrd43ovRLdLmQwgZgGA1UdIwSB
+kDCBjYAUUJwC/qSGBmcB+DVrd43ovRLdLmShYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmdsb2JhbCB0cnVzdGVlghEA2PNfTreHKy2rBpLjFTgv
+sDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACAYxI+r3+JNelL6SBB0
+Pda3LkbCm+schP64NBYDdGl2Kus2b2QZ83T7xENBFEhyNoXvc6pRI4/Oh6JDxmG1
+7WmqOVStS/4JeAu6ygiyI1ImRKq2/MvJx/kaKh6IiXanB5nW1U+fhDV6kMOEfpwV
+i6FBibpHboPQoqzPPRe7qHSL
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 1e3a8ddb4b..57f2fa8c04 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -111,6 +111,8 @@ private slots:
void nulInSan();
void largeSerialNumber();
void largeExpirationDate();
+ void blacklistedCertificates();
+
// ### add tests for certificate bundles (multiple certificates concatenated into a single
// structure); both PEM and DER formatted
#endif
@@ -817,6 +819,15 @@ void tst_QSslCertificate::largeExpirationDate() // QTBUG-12489
QCOMPARE(cert.expiryDate().toUTC(), QDateTime(QDate(2051, 8, 29), QTime(9, 53, 41), Qt::UTC));
}
+void tst_QSslCertificate::blacklistedCertificates()
+{
+ QList<QSslCertificate> blacklistedCerts = QSslCertificate::fromPath("more-certificates/blacklisted*.pem", QSsl::Pem, QRegExp::Wildcard);
+ QVERIFY2(blacklistedCerts.count() > 0, "Please run this test from the source directory");
+ for (int a = 0; a < blacklistedCerts.count(); a++) {
+ QVERIFY(! blacklistedCerts.at(a).isValid());
+ }
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslCertificate)
diff --git a/tests/auto/qsslsocket/certs/fake-login.live.com.key b/tests/auto/qsslsocket/certs/fake-login.live.com.key
new file mode 100644
index 0000000000..692a7bd85d
--- /dev/null
+++ b/tests/auto/qsslsocket/certs/fake-login.live.com.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDOtxdvMa0VHUQYG5q7Tsi1Jj4qKEJppyZEkmuRXOi0fDbd1SwE
+bwHrLGMvDO6OMrYBbq3WDNrtnIfF9CvzUOEch+gjr4hEVQqecU5fb45Wor7yNel3
+/C/gxfbzuXHrsj/gUjNghL2i10+c2NW+hUo/sWO6OusaBT6d6s7ee+YBcQIDAQAB
+AoGAb8cVhu0HuLkgjyCuJMbPRRUu3ED02Iin6sB6JhplQuNAD+grayJTmUVhRJnr
+jTziqhedLHe7Em1oBaSo92MutfMpXvWiccSlbNygI61VgmrJpVB+qIN5H9cQc9ql
+Zymc+nIPa1+i5rsrOzlpUytTh7AsbZ27QG4tQXR/kQejEiECQQD6BgTxBeT8D7x9
+DuukoBaSCkLwx7U7P1NXx15EI3lA1nO51t6UHfvk/jGPp8Sl4wv4alJ7AQxr5uQ/
+vC3kzA/1AkEA06gNu10se8pe3n8qL2RRt+FmVjHkQdD9Mm2Dx9oWCs2A4wOSOrlo
+6/nKYF1CaQNYn9HgsNbHVEUpnICVO18qDQJBALEw/uOJ1+TDikPfBSWgxx4s45Ad
+GNWqZXh6NNZ5hX9r/IwiOZAjR9fcRmeW8IjYRi2BvH6sGY+HDRAWXzgdXtkCQCma
+dOiJTf8fLjqp4E7kdzOfuI/kyqstOze4Uxjrgz2oW1dEEnA8laUcumzqp+0gXUE8
+7d+UuCWWWrGKjMrYz9kCQQDh5E5+b6Djn082Jo6gvyuXWC5eXju6IdmihlJ2SMzD
+s2y3IDjOUtTeQQRDymLneteMz0ha79KeUp6VnAvZCOVe
+-----END RSA PRIVATE KEY-----
diff --git a/tests/auto/qsslsocket/certs/fake-login.live.com.pem b/tests/auto/qsslsocket/certs/fake-login.live.com.pem
new file mode 100644
index 0000000000..429f95187c
--- /dev/null
+++ b/tests/auto/qsslsocket/certs/fake-login.live.com.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMObG9naW4ubGl2ZS5jb20w
+HhcNMTEwMzI1MTMyODUwWhcNMTEwNDI0MTMyODUwWjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5sb2dpbi5saXZlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEAzrcXbzGtFR1EGBuau07ItSY+KihCaacmRJJrkVzotHw23dUs
+BG8B6yxjLwzujjK2AW6t1gza7ZyHxfQr81DhHIfoI6+IRFUKnnFOX2+OVqK+8jXp
+d/wv4MX287lx67I/4FIzYIS9otdPnNjVvoVKP7FjujrrGgU+nerO3nvmAXECAwEA
+AaOByzCByDAdBgNVHQ4EFgQUpSOEcmtkQITvBdM2IDfcXnJ0FCAwgZgGA1UdIwSB
+kDCBjYAUpSOEcmtkQITvBdM2IDfcXnJ0FCChYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmxvZ2luLmxpdmUuY29tghEAsLcTPtCW+bVvrpHIdL06
+wDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAD+2HT4GSHHKCdbl9VkX
+zsl+D+drMm2b0ksxz9SgPihP7aW50EEIJDEEihNMTa27mhpeOXHc/sLqDi4ECUao
+/0Ns/5uoVuAIrAKCydmtPsonVFh9XWjyrfUzPOHAc9p2bmJ1i9a3kTsLB6jlrVDO
+VufGzsowHlHZ0TtKf5omojU5
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 8177d29d2e..bf7dae5f2c 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -183,6 +183,7 @@ private slots:
void ignoreSslErrorsListWithSlot();
void readFromClosedSocket();
void writeBigChunk();
+ void blacklist();
void setEmptyDefaultConfiguration();
static void exitLoop()
@@ -868,8 +869,13 @@ class SslServer : public QTcpServer
{
Q_OBJECT
public:
- SslServer() : socket(0) { }
+ SslServer(const QString &keyFile = SRCDIR "certs/fluke.key", const QString &certFile = SRCDIR "certs/fluke.cert")
+ : socket(0),
+ m_keyFile(keyFile),
+ m_certFile(certFile) { }
QSslSocket *socket;
+ QString m_keyFile;
+ QString m_certFile;
protected:
void incomingConnection(int socketDescriptor)
@@ -877,13 +883,13 @@ protected:
socket = new QSslSocket(this);
connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- QFile file(SRCDIR "certs/fluke.key");
+ QFile file(m_keyFile);
QVERIFY(file.open(QIODevice::ReadOnly));
QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
QVERIFY(!key.isNull());
socket->setPrivateKey(key);
- QList<QSslCertificate> localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert");
+ QList<QSslCertificate> localCert = QSslCertificate::fromPath(m_certFile);
QVERIFY(!localCert.isEmpty());
QVERIFY(localCert.first().handle());
socket->setLocalCertificate(localCert.first());
@@ -1837,6 +1843,37 @@ void tst_QSslSocket::writeBigChunk()
socket->close();
}
+void tst_QSslSocket::blacklist()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+ SslServer server(SRCDIR "certs/fake-login.live.com.key", SRCDIR "certs/fake-login.live.com.pem");
+ QSslSocket *receiver = new QSslSocket(this);
+ connect(receiver, SIGNAL(readyRead()), SLOT(exitLoop()));
+
+ // connect two sockets to each other:
+ QVERIFY(server.listen(QHostAddress::LocalHost));
+ receiver->connectToHost("127.0.0.1", server.serverPort());
+ QVERIFY(receiver->waitForConnected(5000));
+ QVERIFY(server.waitForNewConnection(0));
+
+ QSslSocket *sender = server.socket;
+ QVERIFY(sender);
+ QVERIFY(sender->state() == QAbstractSocket::ConnectedState);
+ receiver->setObjectName("receiver");
+ sender->setObjectName("sender");
+ receiver->ignoreSslErrors();
+ receiver->startClientEncryption();
+
+ connect(receiver, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(exitLoop()));
+ connect(receiver, SIGNAL(encrypted()), SLOT(exitLoop()));
+ enterLoop(1);
+ QCOMPARE(receiver->error(), QAbstractSocket::SslHandshakeFailedError);
+ QCOMPARE(receiver->errorString(), QString("The peer certificate is blacklisted"));
+}
+
void tst_QSslSocket::setEmptyDefaultConfiguration()
{
// used to produce a crash in QSslConfigurationPrivate::deepCopyDefaultConfiguration, QTBUG-13265
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp
index ad5d7ff0ff..5c319f0a9e 100644
--- a/tests/auto/qstyle/tst_qstyle.cpp
+++ b/tests/auto/qstyle/tst_qstyle.cpp
@@ -272,6 +272,18 @@ void tst_QStyle::drawItemPixmap()
QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG");
QPixmap actualPix = QPixmap::grabWidget(testWidget);
+
+#ifdef Q_OS_SYMBIAN
+ // QPixmap cannot be assumed to be exactly same, unless it is created from exactly same content.
+ // In Symbian, pixmap format might get "optimized" depending on how QPixmap is created.
+ // Therefore, force the content to specific format and compare QImages.
+ // Then re-create the QPixmaps and compare those.
+ QImage i1 = p.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ p = QPixmap::fromImage(i1);
+ QImage i2 = actualPix.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ actualPix = QPixmap::fromImage(i2);
+ QVERIFY(i1 == i2);
+#endif
QVERIFY(pixmapsAreEqual(&actualPix,&p));
testWidget->hide();
}
diff --git a/tests/auto/qtextblock/tst_qtextblock.cpp b/tests/auto/qtextblock/tst_qtextblock.cpp
index 7b418745d4..748d9210e0 100644
--- a/tests/auto/qtextblock/tst_qtextblock.cpp
+++ b/tests/auto/qtextblock/tst_qtextblock.cpp
@@ -75,6 +75,8 @@ private slots:
void fragmentOverBlockBoundaries();
void excludeParagraphSeparatorFragment();
void backwardsBlockIterator();
+ void previousBlock_qtbug18026();
+ void removedBlock_qtbug18500();
private:
QTextDocument *doc;
@@ -174,5 +176,22 @@ void tst_QTextBlock::backwardsBlockIterator()
QCOMPARE(it.fragment().position(), 0);
}
+void tst_QTextBlock::previousBlock_qtbug18026()
+{
+ QTextBlock last = doc->end().previous();
+ QVERIFY(last.isValid());
+}
+
+void tst_QTextBlock::removedBlock_qtbug18500()
+{
+ cursor.insertText("line 1\nline 2\nline 3 \nline 4\n");
+ cursor.setPosition(7);
+ QTextBlock block = cursor.block();
+ cursor.setPosition(21, QTextCursor::KeepAnchor);
+
+ cursor.removeSelectedText();
+ QVERIFY(!block.isValid());
+}
+
QTEST_MAIN(tst_QTextBlock)
#include "tst_qtextblock.moc"
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index d6cf54c22a..85e6616135 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -123,7 +123,9 @@ private slots:
void testLineBreakingAllSpaces();
void lineWidthFromBOM();
void textWidthVsWIdth();
-
+ void textWidthWithStackedTextEngine();
+ void textWidthWithLineSeparator();
+ void textWithSurrogates_qtbug15679();
private:
QFont testFont;
@@ -1388,6 +1390,51 @@ void tst_QTextLayout::textWidthVsWIdth()
}
}
+void tst_QTextLayout::textWidthWithStackedTextEngine()
+{
+ QString text = QString::fromUtf8("คลิก ถัดไป เพื่อดำเนินการต่อ");
+ QTextLayout layout(text);
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ layout.endLayout();
+ QFontMetricsF fm(layout.font());
+ QCOMPARE(line.naturalTextWidth(), fm.width(text));
+}
+
+void tst_QTextLayout::textWidthWithLineSeparator()
+{
+ QString s1("Save Project"), s2("Save Project\ntest");
+ s2.replace('\n', QChar::LineSeparator);
+
+ QTextLayout layout1(s1), layout2(s2);
+ layout1.beginLayout();
+ layout2.beginLayout();
+
+ QTextLine line1 = layout1.createLine();
+ QTextLine line2 = layout2.createLine();
+ line1.setLineWidth(0x1000);
+ line2.setLineWidth(0x1000);
+ QCOMPARE(line1.naturalTextWidth(), line2.naturalTextWidth());
+}
+
+void tst_QTextLayout::textWithSurrogates_qtbug15679()
+{
+ QString str = QString::fromUtf8("🀀a🀀");
+ QTextLayout layout(str);
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ layout.endLayout();
+
+ qreal x[6];
+ for (int i = 0; i < 6; i++)
+ x[i] = line.cursorToX(i);
+
+ // If the first and third character are using the same
+ // font, they must have the same advance (since they
+ // are surrogate pairs, we need to add two for each
+ // character)
+ QCOMPARE(x[2] - x[0], x[5] - x[3]);
+}
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"
diff --git a/tests/auto/qvolatileimage/qvolatileimage.pro b/tests/auto/qvolatileimage/qvolatileimage.pro
new file mode 100644
index 0000000000..5a0a613ffa
--- /dev/null
+++ b/tests/auto/qvolatileimage/qvolatileimage.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+SOURCES += tst_qvolatileimage.cpp
+
+symbian {
+ TARGET.EPOCHEAPSIZE = 0x200000 0x800000
+ LIBS += -lfbscli
+}
diff --git a/tests/auto/qvolatileimage/tst_qvolatileimage.cpp b/tests/auto/qvolatileimage/tst_qvolatileimage.cpp
new file mode 100644
index 0000000000..b91a150b1b
--- /dev/null
+++ b/tests/auto/qvolatileimage/tst_qvolatileimage.cpp
@@ -0,0 +1,403 @@
+/****************************************************************************
+**
+** 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 test suite 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$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QtGui/qpainter.h>
+#include <QtGui/qpaintengine.h>
+#include <QtGui/private/qvolatileimage_p.h>
+#ifdef Q_OS_SYMBIAN
+#include <fbs.h>
+#endif
+
+class tst_QVolatileImage : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QVolatileImage() { }
+
+private slots:
+ void create();
+ void ensureFormat();
+ void dataAccess();
+ void sharing();
+ void paint();
+ void fill();
+ void copy();
+ void bitmap();
+};
+
+void tst_QVolatileImage::create()
+{
+ QVolatileImage nullImg;
+ QVERIFY(nullImg.isNull());
+
+ QVolatileImage img(100, 200, QImage::Format_ARGB32);
+ QVERIFY(!img.isNull());
+ QCOMPARE(img.width(), 100);
+ QCOMPARE(img.height(), 200);
+ QCOMPARE(img.format(), QImage::Format_ARGB32);
+ QCOMPARE(img.byteCount(), img.bytesPerLine() * img.height());
+ QCOMPARE(img.hasAlphaChannel(), true);
+ QCOMPARE(img.depth(), 32);
+
+ QImage source(12, 23, QImage::Format_ARGB32_Premultiplied);
+ img = QVolatileImage(source);
+ QVERIFY(!img.isNull());
+ QCOMPARE(img.width(), 12);
+ QCOMPARE(img.height(), 23);
+ QCOMPARE(img.format(), source.format());
+ QCOMPARE(img.byteCount(), img.bytesPerLine() * img.height());
+ QVERIFY(img.imageRef() == source);
+ QVERIFY(img.toImage() == source);
+ QCOMPARE(img.hasAlphaChannel(), true);
+ QCOMPARE(img.hasAlphaChannel(), img.imageRef().hasAlphaChannel());
+ QCOMPARE(img.hasAlphaChannel(), img.toImage().hasAlphaChannel());
+ QCOMPARE(img.depth(), 32);
+
+#ifdef Q_OS_SYMBIAN
+ CFbsBitmap *bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(100, 50), EColor16MAP) == KErrNone);
+ QVolatileImage bmpimg(bmp);
+ QVERIFY(!bmpimg.isNull());
+ QCOMPARE(bmpimg.width(), 100);
+ QCOMPARE(bmpimg.height(), 50);
+ // Verify that we only did handle duplication, not pixel data copying.
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ delete bmp;
+ // Check if content is still valid.
+ QImage copyimg = bmpimg.toImage();
+ QCOMPARE(copyimg.format(), QImage::Format_ARGB32_Premultiplied);
+#endif
+}
+
+void tst_QVolatileImage::ensureFormat()
+{
+ QImage source(12, 23, QImage::Format_ARGB32_Premultiplied);
+ QVolatileImage img(source);
+ QVERIFY(!img.isNull());
+ QVERIFY(img.imageRef() == source);
+ QVERIFY(img.toImage() == source);
+
+ QVERIFY(img.ensureFormat(QImage::Format_ARGB32_Premultiplied)); // no-op
+ QVERIFY(img.imageRef() == source);
+ QVERIFY(img.toImage() == source);
+ QVERIFY(img.format() == QImage::Format_ARGB32_Premultiplied);
+
+ QVERIFY(img.ensureFormat(QImage::Format_RGB32)); // new data under-the-hood
+ QVERIFY(img.imageRef() != source);
+ QVERIFY(img.toImage() != source);
+ QVERIFY(img.format() == QImage::Format_RGB32);
+
+#ifdef Q_OS_SYMBIAN
+ CFbsBitmap *bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(100, 50), EColor16MAP) == KErrNone);
+ QVolatileImage bmpimg(bmp);
+ QVERIFY(bmpimg.ensureFormat(QImage::Format_ARGB32_Premultiplied)); // no-op
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+
+ // A different format should cause data copying.
+ QVERIFY(bmpimg.ensureFormat(QImage::Format_RGB32));
+ QVERIFY(bmpimg.constBits() != (const uchar *) bmp->DataAddress());
+ const uchar *prevBits = bmpimg.constBits();
+
+ QVERIFY(bmpimg.ensureFormat(QImage::Format_RGB16));
+ QVERIFY(bmpimg.constBits() != (const uchar *) bmp->DataAddress());
+ QVERIFY(bmpimg.constBits() != prevBits);
+ prevBits = bmpimg.constBits();
+
+ QVERIFY(bmpimg.ensureFormat(QImage::Format_MonoLSB));
+ QVERIFY(bmpimg.constBits() != (const uchar *) bmp->DataAddress());
+ QVERIFY(bmpimg.constBits() != prevBits);
+
+ delete bmp;
+#endif
+}
+
+void tst_QVolatileImage::dataAccess()
+{
+ QImage source(12, 23, QImage::Format_ARGB32_Premultiplied);
+ QVolatileImage img(source);
+ QVERIFY(!img.isNull());
+ img.beginDataAccess();
+ QVERIFY(img.constBits());
+ QVERIFY(img.imageRef().constBits());
+ QVERIFY(img.bits());
+ QVERIFY(img.imageRef().bits());
+ img.endDataAccess();
+
+ img = QVolatileImage(12, 23, QImage::Format_ARGB32);
+ img.beginDataAccess();
+ QVERIFY(img.constBits() && img.bits());
+ img.endDataAccess();
+}
+
+void tst_QVolatileImage::sharing()
+{
+ QVolatileImage img1(100, 100, QImage::Format_ARGB32);
+ QVolatileImage img2 = img1;
+ img1.beginDataAccess();
+ img2.beginDataAccess();
+ QVERIFY(img1.constBits() == img2.constBits());
+ img2.endDataAccess();
+ img1.endDataAccess();
+ img1.imageRef(); // non-const call, should detach
+ img1.beginDataAccess();
+ img2.beginDataAccess();
+ QVERIFY(img1.constBits() != img2.constBits());
+ img2.endDataAccess();
+ img1.endDataAccess();
+
+ // toImage() should return a copy of the internal QImage.
+ // imageRef() is a reference to the internal QImage.
+ QVERIFY(img1.imageRef().constBits() != img1.toImage().constBits());
+
+#ifdef Q_OS_SYMBIAN
+ CFbsBitmap *bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(100, 50), EColor16MAP) == KErrNone);
+ QVolatileImage bmpimg(bmp);
+ QVolatileImage bmpimg2;
+ bmpimg2 = bmpimg;
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ QCOMPARE(bmpimg2.constBits(), (const uchar *) bmp->DataAddress());
+ // Now force a detach, which should copy the pixel data under-the-hood.
+ bmpimg.imageRef();
+ QVERIFY(bmpimg.constBits() != (const uchar *) bmp->DataAddress());
+ QCOMPARE(bmpimg2.constBits(), (const uchar *) bmp->DataAddress());
+ delete bmp;
+#endif
+}
+
+bool fuzzyCompareImages(const QImage &image1, const QImage &image2, int tolerance)
+{
+ if (image1.bytesPerLine() != image2.bytesPerLine()
+ || image1.width() != image2.width()
+ || image1.height() != image2.height()) {
+ return false;
+ }
+ for (int i = 0; i < image1.height(); i++) {
+ const uchar *line1 = image1.scanLine(i);
+ const uchar *line2 = image2.scanLine(i);
+ int bytes = image1.bytesPerLine();
+ for (int j = 0; j < bytes; j++) {
+ int delta = line1[j] - line2[j];
+ if (qAbs(delta) > tolerance)
+ return false;
+ }
+ }
+ return true;
+}
+
+void tst_QVolatileImage::paint()
+{
+#ifdef Q_OS_SYMBIAN
+ QVolatileImage img(100, 100, QImage::Format_ARGB32);
+ img.beginDataAccess();
+ img.imageRef().fill(QColor(Qt::green).rgba());
+ QPainter p(&img.imageRef());
+ p.drawRect(10, 10, 50, 50);
+ p.end();
+ img.endDataAccess();
+ QImage imgA = img.toImage();
+
+ // The following assumes that on openvg the pixmapdata is backed by QVolatileImage)
+ // (and that openvg is in use)
+ // It should pass with any engine nonetheless.
+ // See if painting into the underlying QImage succeeds.
+ QPixmap pm(100, 100);
+ if (pm.paintEngine()->type() == QPaintEngine::Raster) {
+ pm.fill(Qt::green);
+ QPainter pmp(&pm);
+ pmp.drawRect(10, 10, 50, 50);
+ pmp.end();
+ QImage imgB = pm.toImage();
+ QVERIFY(fuzzyCompareImages(imgA, imgB, 0));
+ // Exercise the accelerated QVolatileImagePaintEngine::drawPixmap() a bit.
+ QPixmap targetPm(pm.size());
+ targetPm.fill(Qt::black);
+ pmp.begin(&targetPm);
+ pmp.drawPixmap(QPointF(0, 0), pm);
+ pmp.end();
+ imgB = targetPm.toImage();
+ QVERIFY(fuzzyCompareImages(imgA, imgB, 0));
+ // Now the overload taking rects.
+ targetPm.fill(Qt::black);
+ pmp.begin(&targetPm);
+ QRectF rect(QPointF(0, 0), pm.size());
+ pmp.drawPixmap(rect, pm, rect);
+ pmp.end();
+ imgB = targetPm.toImage();
+ QVERIFY(fuzzyCompareImages(imgA, imgB, 0));
+ } else {
+ QSKIP("Pixmaps not painted via raster, skipping paint test", SkipSingle);
+ }
+#endif
+}
+
+void tst_QVolatileImage::fill()
+{
+ QVolatileImage img(100, 100, QImage::Format_ARGB32_Premultiplied);
+ QColor col = QColor(10, 20, 30);
+ img.fill(col.rgba());
+ QVERIFY(img.imageRef().pixel(1, 1) == col.rgba());
+ QVERIFY(img.toImage().pixel(1, 1) == col.rgba());
+
+#ifdef Q_OS_SYMBIAN
+ CFbsBitmap *bmp = static_cast<CFbsBitmap *>(img.duplicateNativeImage());
+ QVERIFY(bmp);
+ TRgb pix;
+ bmp->GetPixel(pix, TPoint(1, 1));
+ QCOMPARE(pix.Red(), col.red());
+ QCOMPARE(pix.Green(), col.green());
+ QCOMPARE(pix.Blue(), col.blue());
+ delete bmp;
+#endif
+}
+
+void tst_QVolatileImage::copy()
+{
+ QVolatileImage img(100, 100, QImage::Format_RGB32);
+ img.beginDataAccess();
+ img.imageRef().fill(QColor(Qt::green).rgba());
+ QPainter p(&img.imageRef());
+ p.drawRect(10, 10, 50, 50);
+ p.end();
+ img.endDataAccess();
+
+ QVolatileImage img2(100, 100, QImage::Format_RGB32);
+ img2.copyFrom(&img, QRect());
+ QImage imgA = img.toImage();
+ QImage imgB = img2.toImage();
+ QCOMPARE(imgA.size(), imgB.size());
+ QVERIFY(fuzzyCompareImages(imgA, imgB, 0));
+
+ img2 = QVolatileImage(20, 20, QImage::Format_RGB32);
+ img2.copyFrom(&img, QRect(5, 5, 20, 20));
+ imgA = img.toImage().copy(5, 5, 20, 20);
+ imgB = img2.toImage();
+ QCOMPARE(imgA.size(), imgB.size());
+ QVERIFY(fuzzyCompareImages(imgA, imgB, 0));
+}
+
+void tst_QVolatileImage::bitmap()
+{
+#ifdef Q_OS_SYMBIAN
+ CFbsBitmap *bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(100, 50), EColor64K) == KErrNone);
+ QVolatileImage bmpimg(bmp);
+ CFbsBitmap *dupbmp = static_cast<CFbsBitmap *>(bmpimg.duplicateNativeImage());
+ QVERIFY(dupbmp);
+ QVERIFY(dupbmp != bmp);
+ QCOMPARE(dupbmp->DataAddress(), bmp->DataAddress());
+ delete dupbmp;
+ delete bmp;
+ bmpimg.beginDataAccess();
+ qMemSet(bmpimg.bits(), 0, bmpimg.byteCount());
+ qMemSet(bmpimg.bits(), 1, bmpimg.bytesPerLine() * bmpimg.height());
+ bmpimg.endDataAccess();
+
+ // Test bgr->rgb conversion in case of EColor16M.
+ bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(101, 89), EColor16M) == KErrNone);
+ bmp->BeginDataAccess();
+ TUint32 *addr = bmp->DataAddress();
+ uint rgb = QColor(10, 20, 30).rgb();
+ qMemCopy(bmp->DataAddress(), &rgb, 3);
+ bmp->EndDataAccess();
+ TRgb symrgb;
+ bmp->GetPixel(symrgb, TPoint(0, 0));
+ QVERIFY(symrgb.Red() == 10 && symrgb.Green() == 20 && symrgb.Blue() == 30);
+ bmpimg = QVolatileImage(bmp);
+ QVERIFY(bmpimg.toImage().pixel(0, 0) == rgb);
+ // check if there really was a conversion
+ bmp->BeginDataAccess();
+ bmpimg.beginDataAccess();
+ qMemCopy(&rgb, bmpimg.constBits(), 3);
+ uint rgb2 = rgb;
+ qMemCopy(&rgb2, bmp->DataAddress(), 3);
+ QVERIFY(rgb != rgb2);
+ bmpimg.endDataAccess(true);
+ bmp->EndDataAccess(true);
+ delete bmp;
+
+ bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(101, 89), EGray2) == KErrNone);
+ bmpimg = QVolatileImage(bmp); // inverts pixels, but should do it in place
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ QCOMPARE(bmpimg.format(), QImage::Format_MonoLSB);
+ bmpimg.ensureFormat(QImage::Format_ARGB32_Premultiplied);
+ QVERIFY(bmpimg.constBits() != (const uchar *) bmp->DataAddress());
+ QCOMPARE(bmpimg.format(), QImage::Format_ARGB32_Premultiplied);
+ delete bmp;
+
+ // The following two formats must be optimal always.
+ bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(101, 89), EColor16MAP) == KErrNone);
+ bmpimg = QVolatileImage(bmp);
+ QCOMPARE(bmpimg.format(), QImage::Format_ARGB32_Premultiplied);
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ bmpimg.ensureFormat(QImage::Format_ARGB32_Premultiplied);
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ delete bmp;
+ bmp = new CFbsBitmap;
+ QVERIFY(bmp->Create(TSize(101, 89), EColor16MU) == KErrNone);
+ bmpimg = QVolatileImage(bmp);
+ QCOMPARE(bmpimg.format(), QImage::Format_RGB32);
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ bmpimg.ensureFormat(QImage::Format_RGB32);
+ QCOMPARE(bmpimg.constBits(), (const uchar *) bmp->DataAddress());
+ delete bmp;
+
+#else
+ QSKIP("CFbsBitmap is only available on Symbian, skipping bitmap test", SkipSingle);
+#endif
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication::setGraphicsSystem("openvg");
+ QApplication app(argc, argv);
+ tst_QVolatileImage tc;
+ return QTest::qExec(&tc, argc, argv);
+}
+
+#include "tst_qvolatileimage.moc"
diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt
index fccaca36d3..a0d3485f6d 100644
--- a/tests/auto/selftests/expected_cmptest.txt
+++ b/tests/auto/selftests/expected_cmptest.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Cmptest *********
-Config: Using QTest library 4.7.2, Qt 4.7.2
+Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : tst_Cmptest::initTestCase()
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_pointerfuncs()
diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt
index 2558f680d2..88ba69f89f 100644
--- a/tests/auto/selftests/expected_crashes_3.txt
+++ b/tests/auto/selftests/expected_crashes_3.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Crashes *********
-Config: Using QTest library 4.7.2, Qt 4.7.2
+Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : tst_Crashes::initTestCase()
QFATAL : tst_Crashes::crash() Received signal 11
FAIL! : tst_Crashes::crash() Received a fatal error.
diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt
index c56244b1ef..7f50020376 100644
--- a/tests/auto/selftests/expected_longstring.txt
+++ b/tests/auto/selftests/expected_longstring.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_LongString *********
-Config: Using QTest library 4.7.2, Qt 4.7.2
+Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : tst_LongString::initTestCase()
FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt
index 7846435bb3..cd80a040ae 100644
--- a/tests/auto/selftests/expected_maxwarnings.txt
+++ b/tests/auto/selftests/expected_maxwarnings.txt
@@ -1,5 +1,5 @@
********* Start testing of MaxWarnings *********
-Config: Using QTest library 4.7.2, Qt 4.7.2
+Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : MaxWarnings::initTestCase()
QWARN : MaxWarnings::warn() 0
QWARN : MaxWarnings::warn() 1
diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt
index 5c9e497c39..c259c683bd 100644
--- a/tests/auto/selftests/expected_skip.txt
+++ b/tests/auto/selftests/expected_skip.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Skip *********
-Config: Using QTest library 4.7.2, Qt 4.7.2
+Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : tst_Skip::initTestCase()
SKIP : tst_Skip::test() skipping all
Loc: [/home/user/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)]
diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf
index 57abeae1de..45ad76a7e5 100644
--- a/tools/assistant/tools/assistant/doc/assistant.qdocconf
+++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf
@@ -10,7 +10,7 @@ description = "Qt Assistant"
HTML.{postheader,address} = ""
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
- "<td width=\"30%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
+ "<td width=\"30%\" align=\"left\">Copyright &copy; 2011 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\">Trademarks</td>\n" \
- "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.2</div></td>\n" \
+ "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.4</div></td>\n" \
"</tr></table></div></address>"
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 1b77058aca..be44646cde 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -752,7 +752,7 @@ void Configure::parseCmdLine()
} else if ( configCmdLine.at(i) == "es2" ) {
dictionary[ "OPENGL_ES_2" ] = "yes";
} else if ( configCmdLine.at(i) == "desktop" ) {
- dictionary[ "OPENGL_ES_2" ] = "yes";
+ // OPENGL=yes suffices
} else {
cout << "Argument passed to -opengl option is not valid." << endl;
dictionary[ "DONE" ] = "error";
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index 430b070a6d..6d718bbd0c 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -1190,7 +1190,7 @@ QWidget *QDesignerResource::createWidget(const QString &widgetName, QWidget *par
parentWidget->setProperty("_q_widgetOrder", qVariantFromValue(list));
QList<QWidget *> zOrder = qVariantValue<QWidgetList>(parentWidget->property("_q_zOrder"));
zOrder.append(w);
- parentWidget->setProperty("_q_zOrder", qVariantFromValue(list));
+ parentWidget->setProperty("_q_zOrder", qVariantFromValue(zOrder));
}
} else {
core()->metaDataBase()->add(w);
diff --git a/tools/designer/src/lib/sdk/membersheet.qdoc b/tools/designer/src/lib/sdk/membersheet.qdoc
index fdd13f254d..57a3664078 100644
--- a/tools/designer/src/lib/sdk/membersheet.qdoc
+++ b/tools/designer/src/lib/sdk/membersheet.qdoc
@@ -40,7 +40,7 @@
manipulate the member functions' appearance in \QD's signals and
slots editing mode. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 2
When implementing a custom widget plugin, a pointer to \QD's
current QDesignerFormEditorInterface object (\c formEditor in the
@@ -69,7 +69,7 @@
made known to the meta object system using the Q_INTERFACES()
macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 3
This enables \QD to use qobject_cast() to query for
supported interfaces using nothing but a QObject pointer.
@@ -101,13 +101,13 @@
QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 4
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a member sheet extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 5
For a complete example using an extension class, see \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/propertysheet.qdoc b/tools/designer/src/lib/sdk/propertysheet.qdoc
index d82de885fa..becc74b0ed 100644
--- a/tools/designer/src/lib/sdk/propertysheet.qdoc
+++ b/tools/designer/src/lib/sdk/propertysheet.qdoc
@@ -41,7 +41,7 @@
manipulate the properties' appearance in the property editor. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 15
Note that if you change the value of a property using the
QDesignerPropertySheetExtension::setProperty() function, the undo
@@ -80,7 +80,7 @@
an interface, we must ensure that it's made known to the meta
object system using the Q_INTERFACES() macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 16
This enables \QD to use qobject_cast() to query for supported
interfaces using nothing but a QObject pointer.
@@ -112,14 +112,14 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 17
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a property sheet extension extension as well. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 18
For a complete example using an extension class, see the \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/taskmenu.qdoc b/tools/designer/src/lib/sdk/taskmenu.qdoc
index 06d0b96732..c5a3795396 100644
--- a/tools/designer/src/lib/sdk/taskmenu.qdoc
+++ b/tools/designer/src/lib/sdk/taskmenu.qdoc
@@ -51,7 +51,7 @@
inherit from both QObject and QDesignerTaskMenuExtension. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 9
Since we are implementing an interface, we must ensure that it
is made known to the meta-object system using the Q_INTERFACES()
@@ -94,13 +94,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 10
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a task menu extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 11
For a complete example using the QDesignerTaskMenuExtension class,
see the \l {designer/taskmenuextension}{Task Menu Extension
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index 887bb04cd4..36f795eb6c 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -412,8 +412,10 @@ QWidget *WidgetFactory::createWidget(const QString &widgetName, QWidget *parentW
// Currently happens in the case of Q3-Support widgets
baseClass =fallBackBaseClass;
}
- w = createWidget(baseClass, parentWidget);
- promoteWidget(core(),w,widgetName);
+ if (QWidget *promotedWidget = createWidget(baseClass, parentWidget)) {
+ promoteWidget(core(), promotedWidget, widgetName);
+ return promotedWidget; // Do not initialize twice.
+ }
} while (false);
Q_ASSERT(w != 0);
diff --git a/tools/designer/src/lib/uilib/container.qdoc b/tools/designer/src/lib/uilib/container.qdoc
index 51d942eedd..d9310515d3 100644
--- a/tools/designer/src/lib/uilib/container.qdoc
+++ b/tools/designer/src/lib/uilib/container.qdoc
@@ -44,7 +44,7 @@
To create a container extension, your extension class must inherit
from both QObject and QDesignerContainerExtension. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 6
Since we are implementing an interface, we must ensure that it's
made known to the meta object system using the Q_INTERFACES()
@@ -88,13 +88,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 7
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a container extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 8
For a complete example using the QDesignerContainerExtension
class, see the \l {designer/containerextension}{Container
diff --git a/tools/designer/src/lib/uilib/customwidget.qdoc b/tools/designer/src/lib/uilib/customwidget.qdoc
index 3410fc66d3..d5ddaa7d30 100644
--- a/tools/designer/src/lib/uilib/customwidget.qdoc
+++ b/tools/designer/src/lib/uilib/customwidget.qdoc
@@ -73,7 +73,7 @@
class called \c MyCustomWidget, we can export it by adding the
following line to the file containing the plugin implementation:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 14
This macro ensures that \QD can access and construct the custom widget.
Without this macro, there is no way for \QD to use it.
@@ -264,13 +264,13 @@
several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and
\c CustomWidgetThree, the class definition may look like this:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 12
In the class constructor you add the interfaces to your custom
widgets to the list which you return in the customWidgets()
function:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 13
Note that instead of exporting each custom widget plugin using the
Q_EXPORT_PLUGIN2() macro, you export the entire collection. The
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index a10a42b2c1..a9960fc65c 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -65,7 +65,7 @@ static int usage(const QStringList &args)
foreach (Translator::FileFormat format, Translator::registeredFileFormats())
loaders += line.arg(format.extension, -5).arg(format.description);
- std::cerr << qPrintable(LC::tr("\nUsage:\n"
+ std::cout << qPrintable(LC::tr("\nUsage:\n"
" lconvert [options] <infile> [<infile>...]\n\n"
"lconvert is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert and filter translation data files.\n"
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 15583e1375..f8e6a90e3c 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -61,6 +61,11 @@ static QString m_defaultExtensions;
static void printOut(const QString & out)
{
+ std::cout << qPrintable(out);
+}
+
+static void printErr(const QString & out)
+{
std::cerr << qPrintable(out);
}
@@ -151,23 +156,23 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
cd.m_sortContexts = !(options & NoSort);
if (QFile(fileName).exists()) {
if (!tor.load(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
continue;
}
tor.resolveDuplicates();
cd.clearErrors();
if (setCodec && fetchedTor.codec() != tor.codec())
- printOut(LU::tr("lupdate warning: Codec for tr() '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Codec for tr() '%1' disagrees with"
" existing file's codec '%2'. Expect trouble.\n")
.arg(QString::fromLatin1(fetchedTor.codecName()),
QString::fromLatin1(tor.codecName())));
if (!targetLanguage.isEmpty() && targetLanguage != tor.languageCode())
- printOut(LU::tr("lupdate warning: Specified target language '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Specified target language '%1' disagrees with"
" existing file's language '%2'. Ignoring.\n")
.arg(targetLanguage, tor.languageCode()));
if (!sourceLanguage.isEmpty() && sourceLanguage != tor.sourceLanguageCode())
- printOut(LU::tr("lupdate warning: Specified source language '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Specified source language '%1' disagrees with"
" existing file's language '%2'. Ignoring.\n")
.arg(sourceLanguage, tor.sourceLanguageCode()));
} else {
@@ -212,11 +217,11 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
out.normalizeTranslations(cd);
if (!cd.errors().isEmpty()) {
- printOut(cd.error());
+ printErr(cd.error());
cd.clearErrors();
}
if (!out.save(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
}
}
@@ -278,7 +283,7 @@ static void processSources(Translator &fetchedTor,
}
loadCPP(fetchedTor, sourceFilesCpp, cd);
if (!cd.error().isEmpty())
- printOut(cd.error());
+ printErr(cd.error());
}
static void processProjects(
@@ -298,7 +303,7 @@ static void processProject(
if (!tmp.isEmpty()) {
codecForSource = tmp.last().toLatin1();
if (!QTextCodec::codecForName(codecForSource)) {
- printOut(LU::tr("lupdate warning: Codec for source '%1' is invalid."
+ printErr(LU::tr("lupdate warning: Codec for source '%1' is invalid."
" Falling back to codec for tr().\n")
.arg(QString::fromLatin1(codecForSource)));
codecForSource.clear();
@@ -365,12 +370,12 @@ static void processProjects(
if (visitor.contains(QLatin1String("TRANSLATIONS"))) {
if (parentTor) {
if (topLevel) {
- std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
- "will override TRANSLATIONS in %1.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: TS files from command line "
+ "will override TRANSLATIONS in %1.\n").arg(proFile));
goto noTrans;
} else if (nestComplain) {
- std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
- "prevent recursing into %1.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: TS files from command line "
+ "prevent recursing into %1.\n").arg(proFile));
continue;
}
}
@@ -401,8 +406,8 @@ static void processProjects(
noTrans:
if (!parentTor) {
if (topLevel)
- std::cerr << qPrintable(LU::tr("lupdate warning: no TS files specified. Only diagnostics "
- "will be produced for '%1'.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: no TS files specified. Only diagnostics "
+ "will be produced for '%1'.\n").arg(proFile));
Translator tor;
processProject(nestComplain, pfi, visitor, options, codecForSource,
targetLanguage, sourceLanguage, &tor, fail);
@@ -471,7 +476,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-target-language")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -target-language requires a parameter.\n"));
+ printErr(LU::tr("The option -target-language requires a parameter.\n"));
return 1;
}
targetLanguage = args[i];
@@ -479,7 +484,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-source-language")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -source-language requires a parameter.\n"));
+ printErr(LU::tr("The option -source-language requires a parameter.\n"));
return 1;
}
sourceLanguage = args[i];
@@ -487,7 +492,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-disable-heuristic")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -disable-heuristic requires a parameter.\n"));
+ printErr(LU::tr("The option -disable-heuristic requires a parameter.\n"));
return 1;
}
arg = args[i];
@@ -498,14 +503,14 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("number")) {
options &= ~HeuristicNumber;
} else {
- printOut(LU::tr("Invalid heuristic name passed to -disable-heuristic.\n"));
+ printErr(LU::tr("Invalid heuristic name passed to -disable-heuristic.\n"));
return 1;
}
continue;
} else if (arg == QLatin1String("-locations")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -locations requires a parameter.\n"));
+ printErr(LU::tr("The option -locations requires a parameter.\n"));
return 1;
}
if (args[i] == QLatin1String("none")) {
@@ -515,7 +520,7 @@ int main(int argc, char **argv)
} else if (args[i] == QLatin1String("absolute")) {
options |= AbsoluteLocations;
} else {
- printOut(LU::tr("Invalid parameter passed to -locations.\n"));
+ printErr(LU::tr("Invalid parameter passed to -locations.\n"));
return 1;
}
continue;
@@ -541,7 +546,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-codecfortr")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -codecfortr option should be followed by a codec name.\n"));
+ printErr(LU::tr("The -codecfortr option should be followed by a codec name.\n"));
return 1;
}
codecForTr = args[i].toLatin1();
@@ -552,7 +557,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-extensions")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -extensions option should be followed by an extension list.\n"));
+ printErr(LU::tr("The -extensions option should be followed by an extension list.\n"));
return 1;
}
extensions = args[i];
@@ -560,7 +565,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-pro")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -pro option should be followed by a filename of .pro file.\n"));
+ printErr(LU::tr("The -pro option should be followed by a filename of .pro file.\n"));
return 1;
}
proFiles += args[i];
@@ -570,7 +575,7 @@ int main(int argc, char **argv)
if (arg.length() == 2) {
++i;
if (i == argc) {
- printOut(LU::tr("The -I option should be followed by a path.\n"));
+ printErr(LU::tr("The -I option should be followed by a path.\n"));
return 1;
}
includePath += args[i];
@@ -579,7 +584,7 @@ int main(int argc, char **argv)
}
continue;
} else if (arg.startsWith(QLatin1String("-")) && arg != QLatin1String("-")) {
- printOut(LU::tr("Unrecognized option '%1'.\n").arg(arg));
+ printErr(LU::tr("Unrecognized option '%1'.\n").arg(arg));
return 1;
}
@@ -587,7 +592,7 @@ int main(int argc, char **argv)
if (arg.startsWith(QLatin1String("@"))) {
QFile lstFile(arg.mid(1));
if (!lstFile.open(QIODevice::ReadOnly)) {
- printOut(LU::tr("lupdate error: List file '%1' is not readable.\n")
+ printErr(LU::tr("lupdate error: List file '%1' is not readable.\n")
.arg(lstFile.fileName()));
return 1;
}
@@ -605,7 +610,7 @@ int main(int argc, char **argv)
if (!fi.exists() || fi.isWritable()) {
tsFileNames.append(QFileInfo(file).absoluteFilePath());
} else {
- printOut(LU::tr("lupdate warning: For some reason, '%1' is not writable.\n")
+ printErr(LU::tr("lupdate warning: For some reason, '%1' is not writable.\n")
.arg(file));
}
found = true;
@@ -613,7 +618,7 @@ int main(int argc, char **argv)
}
}
if (!found) {
- printOut(LU::tr("lupdate error: File '%1' has no recognized extension.\n")
+ printErr(LU::tr("lupdate error: File '%1' has no recognized extension.\n")
.arg(file));
return 1;
}
@@ -623,7 +628,7 @@ int main(int argc, char **argv)
foreach (const QString &file, files) {
QFileInfo fi(file);
if (!fi.exists()) {
- printOut(LU::tr("lupdate error: File '%1' does not exist.\n").arg(file));
+ printErr(LU::tr("lupdate error: File '%1' does not exist.\n").arg(file));
return 1;
}
if (file.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
@@ -682,15 +687,15 @@ int main(int argc, char **argv)
}
if (!targetLanguage.isEmpty() && tsFileNames.count() != 1)
- printOut(LU::tr("lupdate warning: -target-language usually only"
+ printErr(LU::tr("lupdate warning: -target-language usually only"
" makes sense with exactly one TS file.\n"));
if (!codecForTr.isEmpty() && tsFileNames.isEmpty())
- printOut(LU::tr("lupdate warning: -codecfortr has no effect without -ts.\n"));
+ printErr(LU::tr("lupdate warning: -codecfortr has no effect without -ts.\n"));
bool fail = false;
if (proFiles.isEmpty()) {
if (tsFileNames.isEmpty())
- printOut(LU::tr("lupdate warning:"
+ printErr(LU::tr("lupdate warning:"
" no TS files specified. Only diagnostics will be produced.\n"));
Translator fetchedTor;
@@ -705,7 +710,7 @@ int main(int argc, char **argv)
sourceLanguage, targetLanguage, options, &fail);
} else {
if (!sourceFiles.isEmpty() || !includePath.isEmpty()) {
- printOut(LU::tr("lupdate error:"
+ printErr(LU::tr("lupdate error:"
" Both project and source files / include paths specified.\n"));
return 1;
}
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index 7b30643b1c..0b4bd9e324 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -723,7 +723,7 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData
continue;
}
if (typ == TranslatorMessage::Unfinished) {
- if (!cd.m_idBased && msg.translation().isEmpty()) {
+ if (msg.translation().isEmpty() && !cd.m_idBased && cd.m_unTrPrefix.isEmpty()) {
++untranslated;
continue;
} else {
diff --git a/tools/linguist/shared/ts.cpp b/tools/linguist/shared/ts.cpp
index 85be5c6540..4523bc55d0 100644
--- a/tools/linguist/shared/ts.cpp
+++ b/tools/linguist/shared/ts.cpp
@@ -264,6 +264,7 @@ bool TSReader::read(Translator &translator)
//qDebug() << "TS " << attributes();
QHash<QString, int> currentLine;
QString currentFile;
+ bool maybeRelative = false, maybeAbsolute = false;
QXmlStreamAttributes atts = attributes();
//QString version = atts.value(strversion).toString();
@@ -342,10 +343,12 @@ bool TSReader::read(Translator &translator)
msg.setTranslatorComment(readContents());
} else if (elementStarts(strlocation)) {
// <location/>
+ maybeAbsolute = true;
QXmlStreamAttributes atts = attributes();
QString fileName = atts.value(strfilename).toString();
if (fileName.isEmpty()) {
fileName = currentMsgFile;
+ maybeRelative = true;
} else {
if (refs.isEmpty())
currentFile = fileName;
@@ -353,7 +356,6 @@ bool TSReader::read(Translator &translator)
}
const QString lin = atts.value(strline).toString();
if (lin.isEmpty()) {
- translator.setLocationsType(Translator::RelativeLocations);
refs.append(TranslatorMessage::Reference(fileName, -1));
} else {
bool bOK;
@@ -361,9 +363,7 @@ bool TSReader::read(Translator &translator)
if (bOK) {
if (lin.startsWith(QLatin1Char('+')) || lin.startsWith(QLatin1Char('-'))) {
lineNo = (currentLine[fileName] += lineNo);
- translator.setLocationsType(Translator::RelativeLocations);
- } else {
- translator.setLocationsType(Translator::AbsoluteLocations);
+ maybeRelative = true;
}
refs.append(TranslatorMessage::Reference(fileName, lineNo));
}
@@ -422,6 +422,9 @@ bool TSReader::read(Translator &translator)
} else {
handleError();
}
+ translator.setLocationsType(maybeRelative ? Translator::RelativeLocations :
+ maybeAbsolute ? Translator::AbsoluteLocations :
+ Translator::NoLocations);
} // </TS>
} else {
handleError();
@@ -727,7 +730,6 @@ bool saveTS(const Translator &translator, QIODevice &dev, ConversionData &cd, in
bool loadTS(Translator &translator, QIODevice &dev, ConversionData &cd)
{
- translator.setLocationsType(Translator::NoLocations);
TSReader reader(dev, cd);
return reader.read(translator);
}
diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp
index fb473c760f..2d50e5a586 100644
--- a/tools/qdoc3/atom.cpp
+++ b/tools/qdoc3/atom.cpp
@@ -51,6 +51,7 @@ QString Atom::INDEX_ ("index");
QString Atom::ITALIC_ ("italic");
QString Atom::LINK_ ("link");
QString Atom::PARAMETER_ ("parameter");
+QString Atom::SPAN_ ("span");
QString Atom::SUBSCRIPT_ ("subscript");
QString Atom::SUPERSCRIPT_ ("superscript");
QString Atom::TELETYPE_ ("teletype");
@@ -107,7 +108,8 @@ QString Atom::UPPERROMAN_ ("upperroman");
\value CodeOld
\value CodeQuoteArgument
\value CodeQuoteCommand
- \value Div
+ \value DivLeft
+ \value DivRight
\value EndQmlText
\value FormatElse
\value FormatEndif
@@ -180,8 +182,8 @@ static const struct {
{ "CodeOld", Atom::CodeOld },
{ "CodeQuoteArgument", Atom::CodeQuoteArgument },
{ "CodeQuoteCommand", Atom::CodeQuoteCommand },
- { "Div", Atom::Div },
- { "EndDiv", Atom::EndDiv },
+ { "DivLeft", Atom::DivLeft },
+ { "DivRight", Atom::DivRight },
#ifdef QDOC_QML
{ "EndQmlText", Atom::EndQmlText },
#endif
diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h
index e3b993e905..dbb1a8bc0e 100644
--- a/tools/qdoc3/atom.h
+++ b/tools/qdoc3/atom.h
@@ -46,7 +46,7 @@
#ifndef ATOM_H
#define ATOM_H
-#include <qstring.h>
+#include <qstringlist.h>
#define QDOC_QML
@@ -72,9 +72,9 @@ class Atom
CodeOld,
CodeQuoteArgument,
CodeQuoteCommand,
- Div,
+ DivLeft, // 16
+ DivRight, // 17
#ifdef QDOC_QML
- EndDiv,
EndQmlText,
#endif
FootnoteLeft,
@@ -101,10 +101,10 @@ class Atom
ListLeft,
ListItemNumber,
ListTagLeft, // 40
- ListTagRight, // 41
- ListItemLeft, // 42
- ListItemRight, // 43
- ListRight, // 44
+ ListTagRight,
+ ListItemLeft,
+ ListItemRight,
+ ListRight,
Nop,
ParaLeft,
ParaRight,
@@ -115,7 +115,7 @@ class Atom
QuotationLeft, // 50
QuotationRight,
RawString,
- SectionLeft, // 53
+ SectionLeft,
SectionRight,
SectionHeadingLeft,
SectionHeadingRight,
@@ -125,8 +125,8 @@ class Atom
SnippetCommand, // 60
SnippetIdentifier,
SnippetLocation,
- String, // 63
- TableLeft, // 64
+ String,
+ TableLeft,
TableRight,
TableHeaderLeft,
TableHeaderRight,
@@ -135,30 +135,57 @@ class Atom
TableItemLeft, // 70
TableItemRight,
TableOfContents,
- Target, // 73
+ Target,
UnhandledFormat,
UnknownCommand,
Last = UnknownCommand
};
- Atom(Type type, const QString &string = "")
- : nxt(0), typ(type), str(string) { }
- Atom(Atom *prev, Type type, const QString &string = "")
- : nxt(prev->nxt), typ(type), str(string) { prev->nxt = this; }
-
- void appendChar(QChar ch) { str += ch; }
- void appendString(const QString& string) { str += string; }
- void chopString() { str.chop(1); }
- void setString(const QString &string) { str = string; }
- Atom *next() { return nxt; }
- void setNext(Atom *newNext) { nxt = newNext; }
-
- const Atom *next() const { return nxt; }
- const Atom *next(Type t) const;
- const Atom *next(Type t, const QString& s) const;
+ Atom(Type type, const QString& string = "")
+ : nxt(0), typ(type)
+ {
+ strs << string;
+ }
+
+ Atom(Type type, const QString& p1, const QString& p2)
+ : nxt(0), typ(type)
+ {
+ strs << p1;
+ if (!p2.isEmpty())
+ strs << p2;
+ }
+
+ Atom(Atom* prev, Type type, const QString& string = "")
+ : nxt(prev->nxt), typ(type)
+ {
+ strs << string;
+ prev->nxt = this;
+ }
+
+ Atom(Atom* prev, Type type, const QString& p1, const QString& p2)
+ : nxt(prev->nxt), typ(type)
+ {
+ strs << p1;
+ if (!p2.isEmpty())
+ strs << p2;
+ prev->nxt = this;
+ }
+
+ void appendChar(QChar ch) { strs[0] += ch; }
+ void appendString(const QString& string) { strs[0] += string; }
+ void chopString() { strs[0].chop(1); }
+ void setString(const QString& string) { strs[0] = string; }
+ Atom* next() { return nxt; }
+ void setNext(Atom* newNext) { nxt = newNext; }
+
+ const Atom* next() const { return nxt; }
+ const Atom* next(Type t) const;
+ const Atom* next(Type t, const QString& s) const;
Type type() const { return typ; }
QString typeString() const;
- const QString& string() const { return str; }
+ const QString& string() const { return strs[0]; }
+ const QString& string(int i) const { return strs[i]; }
+ int count() const { return strs.size(); }
void dump() const;
static QString BOLD_;
@@ -166,6 +193,7 @@ class Atom
static QString ITALIC_;
static QString LINK_;
static QString PARAMETER_;
+ static QString SPAN_;
static QString SUBSCRIPT_;
static QString SUPERSCRIPT_;
static QString TELETYPE_;
@@ -181,9 +209,9 @@ class Atom
static QString UPPERROMAN_;
private:
- Atom *nxt;
+ Atom* nxt;
Type typ;
- QString str;
+ QStringList strs;
};
#define ATOM_FORMATTING_BOLD "bold"
@@ -191,6 +219,7 @@ class Atom
#define ATOM_FORMATTING_ITALIC "italic"
#define ATOM_FORMATTING_LINK "link"
#define ATOM_FORMATTING_PARAMETER "parameter"
+#define ATOM_FORMATTING_SPAN "span "
#define ATOM_FORMATTING_SUBSCRIPT "subscript"
#define ATOM_FORMATTING_SUPERSCRIPT "superscript"
#define ATOM_FORMATTING_TELETYPE "teletype"
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 58642efd91..84a09ce46a 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -491,7 +491,7 @@ static QString encode(const QString &string)
#endif
}
-QStringList CodeMarker::macRefsForNode(const Node *node)
+QStringList CodeMarker::macRefsForNode(Node *node)
{
QString result = QLatin1String("cpp/");
switch (node->type()) {
@@ -583,7 +583,7 @@ QStringList CodeMarker::macRefsForNode(const Node *node)
{
NodeList list = static_cast<const PropertyNode*>(node)->functions();
QStringList stringList;
- foreach (const Node *node, list) {
+ foreach (Node* node, list) {
stringList += macRefsForNode(node);
}
return stringList;
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 65fcdd4415..21bc31f68a 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -155,7 +155,7 @@ class CodeMarker
const Tree* tree,
const Node* relative,
const Node* self = 0);
- virtual QStringList macRefsForNode(const Node* node);
+ virtual QStringList macRefsForNode(Node* node);
static void initialize(const Config& config);
static void terminate();
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index 08a8187403..838f6ac205 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -329,13 +329,16 @@ QList<QRegExp> Config::getRegExpList(const QString& var) const
}
/*!
- This function is slower than it could be.
+ This function is slower than it could be. What it does is
+ find all the keys that begin with \a var + dot and return
+ the matching keys in a set, stripped of the matching prefix
+ and dot.
*/
QSet<QString> Config::subVars(const QString& var) const
{
QSet<QString> result;
QString varDot = var + QLatin1Char('.');
- QMap<QString, QString>::ConstIterator v = stringValueMap.begin();
+ QStringMultiMap::ConstIterator v = stringValueMap.begin();
while (v != stringValueMap.end()) {
if (v.key().startsWith(varDot)) {
QString subVar = v.key().mid(varDot.length());
@@ -350,6 +353,27 @@ QSet<QString> Config::subVars(const QString& var) const
}
/*!
+ Same as subVars(), but in this case we return a string map
+ with the matching keys (stripped of the prefix \a var and
+ mapped to their values. The pairs are inserted into \a t
+ */
+void Config::subVarsAndValues(const QString& var, QStringMultiMap& t) const
+{
+ QString varDot = var + QLatin1Char('.');
+ QStringMultiMap::ConstIterator v = stringValueMap.begin();
+ while (v != stringValueMap.end()) {
+ if (v.key().startsWith(varDot)) {
+ QString subVar = v.key().mid(varDot.length());
+ int dot = subVar.indexOf(QLatin1Char('.'));
+ if (dot != -1)
+ subVar.truncate(dot);
+ t.insert(subVar,v.value());
+ }
+ ++v;
+ }
+}
+
+/*!
Builds and returns a list of file pathnames for the file
type specified by \a filesVar (e.g. "headers" or "sources").
The files are found in the directories specified by
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index 9ebc0f8330..8e19ed23d0 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -54,6 +54,8 @@
QT_BEGIN_NAMESPACE
+typedef QMultiMap<QString, QString> QStringMultiMap;
+
class Config
{
public:
@@ -74,6 +76,7 @@ class Config
QRegExp getRegExp(const QString& var) const;
QList<QRegExp> getRegExpList(const QString& var) const;
QSet<QString> subVars(const QString& var) const;
+ void subVarsAndValues(const QString& var, QStringMultiMap& t) const;
QStringList getAllFiles(const QString& filesVar,
const QString& dirsVar,
const QSet<QString> &excludedDirs = QSet<QString>());
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 39791768c4..4d04085230 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -97,6 +97,22 @@ QT_BEGIN_NAMESPACE
#define COMMAND_QMLBASICTYPE Doc::alias("qmlbasictype")
#endif
+#define COMMAND_AUDIENCE Doc::alias("audience")
+#define COMMAND_CATEGORY Doc::alias("category")
+#define COMMAND_PRODNAME Doc::alias("prodname")
+#define COMMAND_COMPONENT Doc::alias("component")
+#define COMMAND_AUTHOR Doc::alias("author")
+#define COMMAND_PUBLISHER Doc::alias("publisher")
+#define COMMAND_COPYRYEAR Doc::alias("copyryear")
+#define COMMAND_COPYRHOLDER Doc::alias("copyrholder")
+#define COMMAND_PERMISSIONS Doc::alias("permissions")
+#define COMMAND_LIFECYCLEVERSION Doc::alias("lifecycleversion")
+#define COMMAND_LIFECYCLEWSTATUS Doc::alias("lifecyclestatus")
+#define COMMAND_LICENSEYEAR Doc::alias("licenseyear")
+#define COMMAND_LICENSENAME Doc::alias("licensename")
+#define COMMAND_LICENSEDESCRIPTION Doc::alias("licensedescription")
+#define COMMAND_RELEASEDATE Doc::alias("releasedate")
+
QStringList CppCodeParser::exampleFiles;
QStringList CppCodeParser::exampleDirs;
@@ -863,10 +879,12 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
}
if (qmlPropGroup) {
const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode();
- PropertyNode *correspondingProperty = 0;
- if (correspondingClass)
- correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property));
QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached);
+
+ const PropertyNode *correspondingProperty = 0;
+ if (correspondingClass) {
+ correspondingProperty = qmlPropNode->correspondingProperty(tre);
+ }
if (correspondingProperty) {
bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*');
qmlPropNode->setWritable(writableList || correspondingProperty->isWritable());
@@ -1809,7 +1827,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
!match(Tok_QDOC_PROPERTY)) {
return false;
}
-
+
if (!match(expected_tok))
return false;
@@ -1829,7 +1847,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
QString key = previousLexeme();
QString value;
- if (match(Tok_Ident)) {
+ if (match(Tok_Ident) || match(Tok_Number)) {
value = previousLexeme();
}
else if (match(Tok_LeftParen)) {
@@ -1872,8 +1890,15 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
tre->addPropertyFunction(property, value, PropertyNode::Resetter);
else if (key == "NOTIFY") {
tre->addPropertyFunction(property, value, PropertyNode::Notifier);
- }
- else if (key == "SCRIPTABLE") {
+ } else if (key == "REVISION") {
+ int revision;
+ bool ok;
+ revision = value.toInt(&ok);
+ if (ok)
+ property->setRevision(revision);
+ else
+ parent->doc().location().warning(tr("Invalid revision number: %1").arg(value));
+ } else if (key == "SCRIPTABLE") {
QString v = value.toLower();
if (v == "true")
property->setScriptable(true);
@@ -1884,9 +1909,9 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
property->setRuntimeScrFunc(value);
}
}
- else if (key == "COSTANT")
+ else if (key == "CONSTANT")
property->setConstant();
- else if (key == "FINAL")
+ else if (key == "FINAL")
property->setFinal();
}
match(Tok_RightParen);
diff --git a/tools/qdoc3/declarativeparser/parser.pri b/tools/qdoc3/declarativeparser/parser.pri
new file mode 100644
index 0000000000..fd4361c2df
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/parser.pri
@@ -0,0 +1,21 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += \
+ $$PWD/qdeclarativejsast_p.h \
+ $$PWD/qdeclarativejsastfwd_p.h \
+ $$PWD/qdeclarativejsastvisitor_p.h \
+ $$PWD/qdeclarativejsengine_p.h \
+ $$PWD/qdeclarativejsgrammar_p.h \
+ $$PWD/qdeclarativejslexer_p.h \
+ $$PWD/qdeclarativejsmemorypool_p.h \
+ $$PWD/qdeclarativejsnodepool_p.h \
+ $$PWD/qdeclarativejsparser_p.h \
+ $$PWD/qdeclarativejsglobal_p.h
+
+SOURCES += \
+ $$PWD/qdeclarativejsast.cpp \
+ $$PWD/qdeclarativejsastvisitor.cpp \
+ $$PWD/qdeclarativejsengine_p.cpp \
+ $$PWD/qdeclarativejsgrammar.cpp \
+ $$PWD/qdeclarativejslexer.cpp \
+ $$PWD/qdeclarativejsparser.cpp
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejs.g b/tools/qdoc3/declarativeparser/qdeclarativejs.g
new file mode 100644
index 0000000000..0e7454e42b
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejs.g
@@ -0,0 +1,3149 @@
+----------------------------------------------------------------------------
+--
+-- 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 QtDeclarative module of the Qt Toolkit.
+--
+-- $QT_BEGIN_LICENSE:LGPL-ONLY$
+-- GNU Lesser General Public License Usage
+-- 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.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
+
+%parser QDeclarativeJSGrammar
+%decl qdeclarativejsparser_p.h
+%impl qdeclarativejsparser.cpp
+%expect 2
+%expect-rr 2
+
+%token T_AND "&" T_AND_AND "&&" T_AND_EQ "&="
+%token T_BREAK "break" T_CASE "case" T_CATCH "catch"
+%token T_COLON ":" T_COMMA ";" T_CONTINUE "continue"
+%token T_DEFAULT "default" T_DELETE "delete" T_DIVIDE_ "/"
+%token T_DIVIDE_EQ "/=" T_DO "do" T_DOT "."
+%token T_ELSE "else" T_EQ "=" T_EQ_EQ "=="
+%token T_EQ_EQ_EQ "===" T_FINALLY "finally" T_FOR "for"
+%token T_FUNCTION "function" T_GE ">=" T_GT ">"
+%token T_GT_GT ">>" T_GT_GT_EQ ">>=" T_GT_GT_GT ">>>"
+%token T_GT_GT_GT_EQ ">>>=" T_IDENTIFIER "identifier" T_IF "if"
+%token T_IN "in" T_INSTANCEOF "instanceof" T_LBRACE "{"
+%token T_LBRACKET "[" T_LE "<=" T_LPAREN "("
+%token T_LT "<" T_LT_LT "<<" T_LT_LT_EQ "<<="
+%token T_MINUS "-" T_MINUS_EQ "-=" T_MINUS_MINUS "--"
+%token T_NEW "new" T_NOT "!" T_NOT_EQ "!="
+%token T_NOT_EQ_EQ "!==" T_NUMERIC_LITERAL "numeric literal" T_OR "|"
+%token T_OR_EQ "|=" T_OR_OR "||" T_PLUS "+"
+%token T_PLUS_EQ "+=" T_PLUS_PLUS "++" T_QUESTION "?"
+%token T_RBRACE "}" T_RBRACKET "]" T_REMAINDER "%"
+%token T_REMAINDER_EQ "%=" T_RETURN "return" T_RPAREN ")"
+%token T_SEMICOLON ";" T_AUTOMATIC_SEMICOLON T_STAR "*"
+%token T_STAR_EQ "*=" T_STRING_LITERAL "string literal"
+%token T_PROPERTY "property" T_SIGNAL "signal" T_READONLY "readonly"
+%token T_SWITCH "switch" T_THIS "this" T_THROW "throw"
+%token T_TILDE "~" T_TRY "try" T_TYPEOF "typeof"
+%token T_VAR "var" T_VOID "void" T_WHILE "while"
+%token T_WITH "with" T_XOR "^" T_XOR_EQ "^="
+%token T_NULL "null" T_TRUE "true" T_FALSE "false"
+%token T_CONST "const"
+%token T_DEBUGGER "debugger"
+%token T_RESERVED_WORD "reserved word"
+%token T_MULTILINE_STRING_LITERAL "multiline string literal"
+%token T_COMMENT "comment"
+
+--- context keywords.
+%token T_PUBLIC "public"
+%token T_IMPORT "import"
+%token T_AS "as"
+%token T_ON "on"
+
+--- feed tokens
+%token T_FEED_UI_PROGRAM
+%token T_FEED_UI_OBJECT_MEMBER
+%token T_FEED_JS_STATEMENT
+%token T_FEED_JS_EXPRESSION
+%token T_FEED_JS_SOURCE_ELEMENT
+%token T_FEED_JS_PROGRAM
+
+%nonassoc SHIFT_THERE
+%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY T_READONLY
+%nonassoc REDUCE_HERE
+
+%start TopLevel
+
+/./****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#include <QtCore/QtDebug>
+#include <QtGui/QApplication>
+
+#include <string.h>
+
+#include "private/qdeclarativejsengine_p.h"
+#include "private/qdeclarativejslexer_p.h"
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsnodepool_p.h"
+
+./
+
+/:/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+#ifndef QDECLARATIVEJSPARSER_P_H
+#define QDECLARATIVEJSPARSER_P_H
+
+#include "private/qdeclarativejsglobal_p.h"
+#include "private/qdeclarativejsgrammar_p.h"
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsengine_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Parser: protected $table
+{
+public:
+ union Value {
+ int ival;
+ double dval;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiParameterList *UiParameterList;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiArrayMemberList *UiArrayMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
+ AST::UiSignature *UiSignature;
+ AST::UiFormalList *UiFormalList;
+ AST::UiFormal *UiFormal;
+ };
+
+public:
+ Parser(Engine *engine);
+ ~Parser();
+
+ // parse a UI program
+ bool parse() { return parse(T_FEED_UI_PROGRAM); }
+ bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
+ bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
+ bool parseSourceElement() { return parse(T_FEED_JS_SOURCE_ELEMENT); }
+ bool parseUiObjectMember() { return parse(T_FEED_UI_OBJECT_MEMBER); }
+ bool parseProgram() { return parse(T_FEED_JS_PROGRAM); }
+
+ AST::UiProgram *ast() const
+ { return AST::cast<AST::UiProgram *>(program); }
+
+ AST::Statement *statement() const
+ {
+ if (! program)
+ return 0;
+
+ return program->statementCast();
+ }
+
+ AST::ExpressionNode *expression() const
+ {
+ if (! program)
+ return 0;
+
+ return program->expressionCast();
+ }
+
+ AST::UiObjectMember *uiObjectMember() const
+ {
+ if (! program)
+ return 0;
+
+ return program->uiObjectMemberCast();
+ }
+
+ AST::Node *rootNode() const
+ { return program; }
+
+ QList<DiagnosticMessage> diagnosticMessages() const
+ { return diagnostic_messages; }
+
+ inline DiagnosticMessage diagnosticMessage() const
+ {
+ foreach (const DiagnosticMessage &d, diagnostic_messages) {
+ if (! d.kind == DiagnosticMessage::Warning)
+ return d;
+ }
+
+ return DiagnosticMessage();
+ }
+
+ inline QString errorMessage() const
+ { return diagnosticMessage().message; }
+
+ inline int errorLineNumber() const
+ { return diagnosticMessage().loc.startLine; }
+
+ inline int errorColumnNumber() const
+ { return diagnosticMessage().loc.startColumn; }
+
+protected:
+ bool parse(int startToken);
+
+ void reallocateStack();
+
+ inline Value &sym(int index)
+ { return sym_stack [tos + index - 1]; }
+
+ inline AST::SourceLocation &loc(int index)
+ { return location_stack [tos + index - 1]; }
+
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
+protected:
+ Engine *driver;
+ int tos;
+ int stack_size;
+ Value *sym_stack;
+ int *state_stack;
+ AST::SourceLocation *location_stack;
+
+ AST::Node *program;
+
+ // error recovery
+ enum { TOKEN_BUFFER_SIZE = 3 };
+
+ struct SavedToken {
+ int token;
+ double dval;
+ AST::SourceLocation loc;
+ };
+
+ double yylval;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
+
+ SavedToken token_buffer[TOKEN_BUFFER_SIZE];
+ SavedToken *first_token;
+ SavedToken *last_token;
+
+ QList<DiagnosticMessage> diagnostic_messages;
+};
+
+} // end of namespace QDeclarativeJS
+
+
+:/
+
+
+/.
+
+#include "private/qdeclarativejsparser_p.h"
+#include <QVarLengthArray>
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+using namespace QDeclarativeJS;
+
+QT_QML_BEGIN_NAMESPACE
+
+void Parser::reallocateStack()
+{
+ if (! stack_size)
+ stack_size = 128;
+ else
+ stack_size <<= 1;
+
+ sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
+ state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
+ location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
+}
+
+inline static bool automatic(Engine *driver, int token)
+{
+ return token == $table::T_RBRACE
+ || token == 0
+ || driver->lexer()->prevTerminator();
+}
+
+
+Parser::Parser(Engine *engine):
+ driver(engine),
+ tos(0),
+ stack_size(0),
+ sym_stack(0),
+ state_stack(0),
+ location_stack(0),
+ first_token(0),
+ last_token(0)
+{
+}
+
+Parser::~Parser()
+{
+ if (stack_size) {
+ qFree(sym_stack);
+ qFree(state_stack);
+ qFree(location_stack);
+ }
+}
+
+static inline AST::SourceLocation location(Lexer *lexer)
+{
+ AST::SourceLocation loc;
+ loc.offset = lexer->tokenOffset();
+ loc.length = lexer->tokenLength();
+ loc.startLine = lexer->startLineNo();
+ loc.startColumn = lexer->startColumnNo();
+ return loc;
+}
+
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse(int startToken)
+{
+ Lexer *lexer = driver->lexer();
+ bool hadErrors = false;
+ int yytoken = -1;
+ int action = 0;
+
+ token_buffer[0].token = startToken;
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ tos = -1;
+ program = 0;
+
+ do {
+ if (++tos == stack_size)
+ reallocateStack();
+
+ state_stack[tos] = action;
+
+ _Lcheck_token:
+ if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
+ yyprevlloc = yylloc;
+
+ if (first_token == last_token) {
+ yytoken = lexer->lex();
+ yylval = lexer->dval();
+ yylloc = location(lexer);
+ } else {
+ yytoken = first_token->token;
+ yylval = first_token->dval;
+ yylloc = first_token->loc;
+ ++first_token;
+ }
+ }
+
+ action = t_action(action, yytoken);
+ if (action > 0) {
+ if (action != ACCEPT_STATE) {
+ yytoken = -1;
+ sym(1).dval = yylval;
+ loc(1) = yylloc;
+ } else {
+ --tos;
+ return ! hadErrors;
+ }
+ } else if (action < 0) {
+ const int r = -action - 1;
+ tos -= rhs[r];
+
+ switch (r) {
+./
+
+--------------------------------------------------------------------------------------------------------
+-- Declarative UI
+--------------------------------------------------------------------------------------------------------
+
+TopLevel: T_FEED_UI_PROGRAM UiProgram ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_STATEMENT Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_EXPRESSION Expression ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_SOURCE_ELEMENT SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_UI_OBJECT_MEMBER UiObjectMember ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+TopLevel: T_FEED_JS_PROGRAM Program ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+./
+
+UiProgram: UiImportListOpt UiRootMember ;
+/.
+case $rule_number: {
+ sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
+ sym(2).UiObjectMemberList->finish());
+} break;
+./
+
+UiImportListOpt: Empty ;
+UiImportListOpt: UiImportList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).UiImportList->finish();
+} break;
+./
+
+UiImportList: UiImport ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport);
+} break;
+./
+
+UiImportList: UiImportList UiImport ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(),
+ sym(1).UiImportList, sym(2).UiImport);
+} break;
+./
+
+ImportId: MemberExpression ;
+
+UiImport: UiImportHead T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->semicolonToken = loc(2);
+} break;
+./
+
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_NUMERIC_LITERAL T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->semicolonToken = loc(3);
+} break;
+./
+
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AS JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_NUMERIC_LITERAL T_AS JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->asToken = loc(3);
+ sym(1).UiImport->importIdToken = loc(4);
+ sym(1).UiImport->importId = sym(4).sval;
+ sym(1).UiImport->semicolonToken = loc(5);
+} break;
+./
+
+UiImport: UiImportHead T_AS JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiImport: UiImportHead T_AS JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ sym(1).UiImport->asToken = loc(2);
+ sym(1).UiImport->importIdToken = loc(3);
+ sym(1).UiImport->importId = sym(3).sval;
+ sym(1).UiImport->semicolonToken = loc(4);
+} break;
+./
+
+
+UiImportHead: T_IMPORT ImportId ;
+/.
+case $rule_number: {
+ AST::UiImport *node = 0;
+
+ if (AST::StringLiteral *importIdLiteral = AST::cast<AST::StringLiteral *>(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), importIdLiteral->value);
+ node->fileNameToken = loc(2);
+ } else if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), qualifiedId);
+ node->fileNameToken = loc(2);
+ }
+
+ sym(1).Node = node;
+
+ if (node) {
+ node->importToken = loc(1);
+ } else {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id or a string literal")));
+
+ return false; // ### remove me
+ }
+} break;
+./
+
+Empty: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+UiRootMember: UiObjectDefinition ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiObjectMemberList: UiObjectMember ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiObjectMemberList: UiObjectMemberList UiObjectMember ;
+/.
+case $rule_number: {
+ AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
+ sym(1).UiObjectMemberList, sym(2).UiObjectMember);
+ sym(1).Node = node;
+} break;
+./
+
+UiArrayMemberList: UiObjectDefinition ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
+UiArrayMemberList: UiArrayMemberList T_COMMA UiObjectDefinition ;
+/.
+case $rule_number: {
+ AST::UiArrayMemberList *node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(),
+ sym(1).UiArrayMemberList, sym(3).UiObjectMember);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectInitializer: T_LBRACE T_RBRACE ;
+/.
+case $rule_number: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectInitializer: T_LBRACE UiObjectMemberList T_RBRACE ;
+/.
+case $rule_number: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectDefinition: UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId,
+ sym(2).UiObjectInitializer);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiObjectDefinition ;
+
+UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(4).UiArrayMemberList->finish());
+ node->colonToken = loc(2);
+ node->lbracketToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_COLON UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_ON UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(3).UiQualifiedId, sym(1).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ node->hasOnToken = true;
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_COLON Block ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON EmptyStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON ExpressionStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON IfStatement ; --- ### do we really want if statement in a binding?
+/.case $rule_number:./
+
+/.
+{
+ AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).Statement);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiPropertyType: T_VAR ;
+/.
+case $rule_number:
+./
+UiPropertyType: T_RESERVED_WORD ;
+/.
+case $rule_number: {
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+ break;
+}
+./
+
+UiPropertyType: T_IDENTIFIER ;
+
+UiParameterListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+UiParameterListOpt: UiParameterList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).UiParameterList->finish ();
+} break;
+./
+
+UiParameterList: UiPropertyType JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval);
+ node->identifierToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->parameters = sym(4).UiParameterList;
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_SIGNAL T_IDENTIFIER T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->semicolonToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
+ sym(5).Expression);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->colonToken = loc(4);
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_READONLY T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isReadonlyMember = true;
+ node->readonlyToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_AUTOMATIC_SEMICOLON ;
+UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType JsIdentifier T_COLON Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT JsIdentifier T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7); // insert a fake ';' before ':'
+
+ AST::UiQualifiedId *propertyName = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), sym(6).sval);
+ propertyName->identifierToken = loc(6);
+ propertyName->next = 0;
+
+ AST::UiArrayBinding *binding = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ propertyName, sym(9).UiArrayMemberList->finish());
+ binding->colonToken = loc(7);
+ binding->lbracketToken = loc(8);
+ binding->rbracketToken = loc(10);
+
+ node->binding = binding;
+
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: T_PROPERTY UiPropertyType JsIdentifier T_COLON UiQualifiedId UiObjectInitializer ;
+/.
+case $rule_number: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4); // insert a fake ';' before ':'
+
+ AST::UiQualifiedId *propertyName = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), sym(3).sval);
+ propertyName->identifierToken = loc(3);
+ propertyName->next = 0;
+
+ AST::UiObjectBinding *binding = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ propertyName, sym(5).UiQualifiedId, sym(6).UiObjectInitializer);
+ binding->colonToken = loc(4);
+
+ node->binding = binding;
+
+ sym(1).Node = node;
+} break;
+./
+
+UiObjectMember: FunctionDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+./
+
+UiObjectMember: VariableStatement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+./
+
+JsIdentifier: T_IDENTIFIER;
+
+JsIdentifier: T_PROPERTY ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_SIGNAL ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_READONLY ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+JsIdentifier: T_ON ;
+/.
+case $rule_number: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+./
+
+--------------------------------------------------------------------------------------------------------
+-- Expressions
+--------------------------------------------------------------------------------------------------------
+
+PrimaryExpression: T_THIS ;
+/.
+case $rule_number: {
+ AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
+ node->thisToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_NULL ;
+/.
+case $rule_number: {
+ AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
+ node->nullToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_TRUE ;
+/.
+case $rule_number: {
+ AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
+ node->trueToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_FALSE ;
+/.
+case $rule_number: {
+ AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
+ node->falseToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_NUMERIC_LITERAL ;
+/.
+case $rule_number: {
+ AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_MULTILINE_STRING_LITERAL ;
+/.case $rule_number:./
+
+PrimaryExpression: T_STRING_LITERAL ;
+/.
+case $rule_number: {
+ AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_DIVIDE_ ;
+/:
+#define J_SCRIPT_REGEXPLITERAL_RULE1 $rule_number
+:/
+/.
+case $rule_number: {
+ bool rx = lexer->scanRegExp(Lexer::NoPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
+ }
+
+ loc(1).length = lexer->tokenLength();
+
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_DIVIDE_EQ ;
+/:
+#define J_SCRIPT_REGEXPLITERAL_RULE2 $rule_number
+:/
+/.
+case $rule_number: {
+ bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
+ }
+
+ loc(1).length = lexer->tokenLength();
+
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET Elision T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_COMMA T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_COMMA Elision T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+-- PrimaryExpression: T_LBRACE T_RBRACE ;
+-- /.
+-- case $rule_number: {
+-- sym(1).Node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+-- } break;
+-- ./
+
+PrimaryExpression: T_LBRACE PropertyNameAndValueListOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::ObjectLiteral *node = 0;
+ if (sym(2).Node)
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ else
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACE PropertyNameAndValueList T_COMMA T_RBRACE ;
+/.
+case $rule_number: {
+ AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LPAREN Expression T_RPAREN ;
+/.
+case $rule_number: {
+ AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+UiQualifiedId: MemberExpression ;
+/.
+case $rule_number: {
+ if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
+ QLatin1String("Ignored annotation")));
+
+ sym(1).Expression = mem->base;
+ }
+
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(1).Expression)) {
+ sym(1).UiQualifiedId = qualifiedId;
+ } else {
+ sym(1).UiQualifiedId = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### recover
+ }
+} break;
+./
+
+ElementList: AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
+} break;
+./
+
+ElementList: Elision AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
+} break;
+./
+
+ElementList: ElementList T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ElementList: ElementList T_COMMA Elision AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+Elision: T_COMMA ;
+/.
+case $rule_number: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
+ node->commaToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Elision: Elision T_COMMA ;
+/.
+case $rule_number: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyNameAndValueList: PropertyName T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyName, sym(3).Expression);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyNameAndValueList: PropertyNameAndValueList T_COMMA PropertyName T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
+ node->commaToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_IDENTIFIER %prec SHIFT_THERE ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_SIGNAL ;
+/.case $rule_number:./
+
+PropertyName: T_PROPERTY ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_STRING_LITERAL ;
+/.
+case $rule_number: {
+ AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: T_NUMERIC_LITERAL ;
+/.
+case $rule_number: {
+ AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+PropertyName: ReservedIdentifier ;
+/.
+case $rule_number: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+ReservedIdentifier: T_BREAK ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CASE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CATCH ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CONTINUE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DEFAULT ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DELETE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DO ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_ELSE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FALSE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FINALLY ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FOR ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_FUNCTION ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_IF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_IN ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_INSTANCEOF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_NEW ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_NULL ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_RETURN ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_SWITCH ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_THIS ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_THROW ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TRUE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TRY ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_TYPEOF ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_VAR ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_VOID ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_WHILE ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_CONST ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_DEBUGGER ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_RESERVED_WORD ;
+/.
+case $rule_number:
+./
+ReservedIdentifier: T_WITH ;
+/.
+case $rule_number:
+{
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+} break;
+./
+
+PropertyIdentifier: JsIdentifier ;
+PropertyIdentifier: ReservedIdentifier ;
+
+MemberExpression: PrimaryExpression ;
+MemberExpression: FunctionExpression ;
+
+MemberExpression: MemberExpression T_LBRACKET Expression T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+MemberExpression: MemberExpression T_DOT PropertyIdentifier ;
+/.
+case $rule_number: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+MemberExpression: T_NEW MemberExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
+ node->newToken = loc(1);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+NewExpression: MemberExpression ;
+
+NewExpression: T_NEW NewExpression ;
+/.
+case $rule_number: {
+ AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
+ node->newToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: MemberExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_LPAREN ArgumentListOpt T_RPAREN ;
+/.
+case $rule_number: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_LBRACKET Expression T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CallExpression: CallExpression T_DOT PropertyIdentifier ;
+/.
+case $rule_number: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+ArgumentListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ArgumentListOpt: ArgumentList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).ArgumentList->finish();
+} break;
+./
+
+ArgumentList: AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
+} break;
+./
+
+ArgumentList: ArgumentList T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LeftHandSideExpression: NewExpression ;
+LeftHandSideExpression: CallExpression ;
+PostfixExpression: LeftHandSideExpression ;
+
+PostfixExpression: LeftHandSideExpression T_PLUS_PLUS ;
+/.
+case $rule_number: {
+ AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->incrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PostfixExpression: LeftHandSideExpression T_MINUS_MINUS ;
+/.
+case $rule_number: {
+ AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->decrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: PostfixExpression ;
+
+UnaryExpression: T_DELETE UnaryExpression ;
+/.
+case $rule_number: {
+ AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
+ node->deleteToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_VOID UnaryExpression ;
+/.
+case $rule_number: {
+ AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
+ node->voidToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_TYPEOF UnaryExpression ;
+/.
+case $rule_number: {
+ AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
+ node->typeofToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_PLUS_PLUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->incrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_MINUS_MINUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->decrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_PLUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
+ node->plusToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_MINUS UnaryExpression ;
+/.
+case $rule_number: {
+ AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
+ node->minusToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_TILDE UnaryExpression ;
+/.
+case $rule_number: {
+ AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
+ node->tildeToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UnaryExpression: T_NOT UnaryExpression ;
+/.
+case $rule_number: {
+ AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
+ node->notToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: UnaryExpression ;
+
+MultiplicativeExpression: MultiplicativeExpression T_STAR UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mul, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: MultiplicativeExpression T_DIVIDE_ UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Div, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+MultiplicativeExpression: MultiplicativeExpression T_REMAINDER UnaryExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mod, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AdditiveExpression: MultiplicativeExpression ;
+
+AdditiveExpression: AdditiveExpression T_PLUS MultiplicativeExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Add, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AdditiveExpression: AdditiveExpression T_MINUS MultiplicativeExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Sub, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: AdditiveExpression ;
+
+ShiftExpression: ShiftExpression T_LT_LT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::LShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: ShiftExpression T_GT_GT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::RShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ShiftExpression: ShiftExpression T_GT_GT_GT AdditiveExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::URShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: ShiftExpression ;
+
+RelationalExpression: RelationalExpression T_LT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_GT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_LE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_GE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_INSTANCEOF ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpression: RelationalExpression T_IN ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::In, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: ShiftExpression ;
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_LT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_GT ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_LE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_GE ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+RelationalExpressionNotIn: RelationalExpressionNotIn T_INSTANCEOF ShiftExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: RelationalExpression ;
+
+EqualityExpression: EqualityExpression T_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_NOT_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_EQ_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpression: EqualityExpression T_NOT_EQ_EQ RelationalExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: RelationalExpressionNotIn ;
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_NOT_EQ RelationalExpressionNotIn;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_EQ_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+EqualityExpressionNotIn: EqualityExpressionNotIn T_NOT_EQ_EQ RelationalExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseANDExpression: EqualityExpression ;
+
+BitwiseANDExpression: BitwiseANDExpression T_AND EqualityExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseANDExpressionNotIn: EqualityExpressionNotIn ;
+
+BitwiseANDExpressionNotIn: BitwiseANDExpressionNotIn T_AND EqualityExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseXORExpression: BitwiseANDExpression ;
+
+BitwiseXORExpression: BitwiseXORExpression T_XOR BitwiseANDExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseXORExpressionNotIn: BitwiseANDExpressionNotIn ;
+
+BitwiseXORExpressionNotIn: BitwiseXORExpressionNotIn T_XOR BitwiseANDExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseORExpression: BitwiseXORExpression ;
+
+BitwiseORExpression: BitwiseORExpression T_OR BitwiseXORExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BitwiseORExpressionNotIn: BitwiseXORExpressionNotIn ;
+
+BitwiseORExpressionNotIn: BitwiseORExpressionNotIn T_OR BitwiseXORExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalANDExpression: BitwiseORExpression ;
+
+LogicalANDExpression: LogicalANDExpression T_AND_AND BitwiseORExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalANDExpressionNotIn: BitwiseORExpressionNotIn ;
+
+LogicalANDExpressionNotIn: LogicalANDExpressionNotIn T_AND_AND BitwiseORExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalORExpression: LogicalANDExpression ;
+
+LogicalORExpression: LogicalORExpression T_OR_OR LogicalANDExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LogicalORExpressionNotIn: LogicalANDExpressionNotIn ;
+
+LogicalORExpressionNotIn: LogicalORExpressionNotIn T_OR_OR LogicalANDExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ConditionalExpression: LogicalORExpression ;
+
+ConditionalExpression: LogicalORExpression T_QUESTION AssignmentExpression T_COLON AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+ConditionalExpressionNotIn: LogicalORExpressionNotIn ;
+
+ConditionalExpressionNotIn: LogicalORExpressionNotIn T_QUESTION AssignmentExpressionNotIn T_COLON AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentExpression: ConditionalExpression ;
+
+AssignmentExpression: LeftHandSideExpression AssignmentOperator AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentExpressionNotIn: ConditionalExpressionNotIn ;
+
+AssignmentExpressionNotIn: LeftHandSideExpression AssignmentOperator AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+AssignmentOperator: T_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::Assign;
+} break;
+./
+
+AssignmentOperator: T_STAR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceMul;
+} break;
+./
+
+AssignmentOperator: T_DIVIDE_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceDiv;
+} break;
+./
+
+AssignmentOperator: T_REMAINDER_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceMod;
+} break;
+./
+
+AssignmentOperator: T_PLUS_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceAdd;
+} break;
+./
+
+AssignmentOperator: T_MINUS_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceSub;
+} break;
+./
+
+AssignmentOperator: T_LT_LT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceLeftShift;
+} break;
+./
+
+AssignmentOperator: T_GT_GT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceRightShift;
+} break;
+./
+
+AssignmentOperator: T_GT_GT_GT_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceURightShift;
+} break;
+./
+
+AssignmentOperator: T_AND_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceAnd;
+} break;
+./
+
+AssignmentOperator: T_XOR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceXor;
+} break;
+./
+
+AssignmentOperator: T_OR_EQ ;
+/.
+case $rule_number: {
+ sym(1).ival = QSOperator::InplaceOr;
+} break;
+./
+
+Expression: AssignmentExpression ;
+
+Expression: Expression T_COMMA AssignmentExpression ;
+/.
+case $rule_number: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ExpressionOpt: Expression ;
+
+ExpressionNotIn: AssignmentExpressionNotIn ;
+
+ExpressionNotIn: ExpressionNotIn T_COMMA AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionNotInOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+ExpressionNotInOpt: ExpressionNotIn ;
+
+Statement: Block ;
+Statement: VariableStatement ;
+Statement: EmptyStatement ;
+Statement: ExpressionStatement ;
+Statement: IfStatement ;
+Statement: IterationStatement ;
+Statement: ContinueStatement ;
+Statement: BreakStatement ;
+Statement: ReturnStatement ;
+Statement: WithStatement ;
+Statement: LabelledStatement ;
+Statement: SwitchStatement ;
+Statement: ThrowStatement ;
+Statement: TryStatement ;
+Statement: DebuggerStatement ;
+
+
+Block: T_LBRACE StatementListOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+StatementList: Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
+} break;
+./
+
+StatementList: StatementList Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
+} break;
+./
+
+StatementListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+StatementListOpt: StatementList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).StatementList->finish ();
+} break;
+./
+
+VariableStatement: VariableDeclarationKind VariableDeclarationList T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+VariableStatement: VariableDeclarationKind VariableDeclarationList T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
+ sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+ node->declarationKindToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationKind: T_CONST ;
+/.
+case $rule_number: {
+ sym(1).ival = T_CONST;
+} break;
+./
+
+VariableDeclarationKind: T_VAR ;
+/.
+case $rule_number: {
+ sym(1).ival = T_VAR;
+} break;
+./
+
+VariableDeclarationList: VariableDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+./
+
+VariableDeclarationList: VariableDeclarationList T_COMMA VariableDeclaration ;
+/.
+case $rule_number: {
+ AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
+ sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationListNotIn: VariableDeclarationNotIn ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+./
+
+VariableDeclarationListNotIn: VariableDeclarationListNotIn T_COMMA VariableDeclarationNotIn ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+} break;
+./
+
+VariableDeclaration: JsIdentifier InitialiserOpt ;
+/.
+case $rule_number: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+VariableDeclarationNotIn: JsIdentifier InitialiserNotInOpt ;
+/.
+case $rule_number: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Initialiser: T_EQ AssignmentExpression ;
+/.
+case $rule_number: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+./
+
+InitialiserOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+InitialiserOpt: Initialiser ;
+
+InitialiserNotIn: T_EQ AssignmentExpressionNotIn ;
+/.
+case $rule_number: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+./
+
+InitialiserNotInOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+InitialiserNotInOpt: InitialiserNotIn ;
+
+EmptyStatement: T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
+ node->semicolonToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+ExpressionStatement: Expression T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ExpressionStatement: Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+IfStatement: T_IF T_LPAREN Expression T_RPAREN Statement T_ELSE Statement ;
+/.
+case $rule_number: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ node->elseToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+IfStatement: T_IF T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+
+IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+IterationStatement: T_DO Statement T_WHILE T_LPAREN Expression T_RPAREN T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
+ node->doToken = loc(1);
+ node->whileToken = loc(3);
+ node->lparenToken = loc(4);
+ node->rparenToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_WHILE T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->whileToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN ExpressionNotInOpt T_SEMICOLON ExpressionOpt T_SEMICOLON ExpressionOpt T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Expression, sym(9).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->firstSemicolonToken = loc(4);
+ node->secondSemicolonToken = loc(6);
+ node->rparenToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN T_VAR VariableDeclarationListNotIn T_SEMICOLON ExpressionOpt T_SEMICOLON ExpressionOpt T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
+ sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(8).Expression, sym(10).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->firstSemicolonToken = loc(5);
+ node->secondSemicolonToken = loc(7);
+ node->rparenToken = loc(9);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN LeftHandSideExpression T_IN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->inToken = loc(4);
+ node->rparenToken = loc(6);
+ sym(1).Node = node;
+} break;
+./
+
+IterationStatement: T_FOR T_LPAREN T_VAR VariableDeclarationNotIn T_IN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
+ sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->inToken = loc(5);
+ node->rparenToken = loc(7);
+ sym(1).Node = node;
+} break;
+./
+
+ContinueStatement: T_CONTINUE T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ContinueStatement: T_CONTINUE T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
+ node->continueToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ContinueStatement: T_CONTINUE JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ContinueStatement: T_CONTINUE JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
+ node->continueToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+BreakStatement: T_BREAK T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+BreakStatement: T_BREAK T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
+ node->breakToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+BreakStatement: T_BREAK JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+BreakStatement: T_BREAK JsIdentifier T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
+ node->breakToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+ReturnStatement: T_RETURN ExpressionOpt T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ReturnStatement: T_RETURN ExpressionOpt T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
+ node->returnToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+WithStatement: T_WITH T_LPAREN Expression T_RPAREN Statement ;
+/.
+case $rule_number: {
+ AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->withToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+SwitchStatement: T_SWITCH T_LPAREN Expression T_RPAREN CaseBlock ;
+/.
+case $rule_number: {
+ AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
+ node->switchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+CaseBlock: T_LBRACE CaseClausesOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+CaseBlock: T_LBRACE CaseClausesOpt DefaultClause CaseClausesOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(5);
+ sym(1).Node = node;
+} break;
+./
+
+CaseClauses: CaseClause ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
+} break;
+./
+
+CaseClauses: CaseClauses CaseClause ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
+} break;
+./
+
+CaseClausesOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+CaseClausesOpt: CaseClauses ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).CaseClauses->finish ();
+} break;
+./
+
+CaseClause: T_CASE Expression T_COLON StatementListOpt ;
+/.
+case $rule_number: {
+ AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
+ node->caseToken = loc(1);
+ node->colonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+DefaultClause: T_DEFAULT T_COLON StatementListOpt ;
+/.
+case $rule_number: {
+ AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
+ node->defaultToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LabelledStatement: T_SIGNAL T_COLON Statement ;
+/.case $rule_number:./
+
+LabelledStatement: T_PROPERTY T_COLON Statement ;
+/.
+case $rule_number: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+LabelledStatement: T_IDENTIFIER T_COLON Statement ;
+/.
+case $rule_number: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+ThrowStatement: T_THROW Expression T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+ThrowStatement: T_THROW Expression T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
+ node->throwToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Catch ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Finally ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+TryStatement: T_TRY Block Catch Finally ;
+/.
+case $rule_number: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+Catch: T_CATCH T_LPAREN JsIdentifier T_RPAREN Block ;
+/.
+case $rule_number: {
+ AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
+ node->catchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->identifierToken = loc(3);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+Finally: T_FINALLY Block ;
+/.
+case $rule_number: {
+ AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
+ node->finallyToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+DebuggerStatement: T_DEBUGGER T_AUTOMATIC_SEMICOLON ; -- automatic semicolon
+DebuggerStatement: T_DEBUGGER T_SEMICOLON ;
+/.
+case $rule_number: {
+ AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
+ node->debuggerToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+FunctionDeclaration: T_FUNCTION JsIdentifier T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+FunctionExpression: T_FUNCTION IdentifierOpt T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ;
+/.
+case $rule_number: {
+ AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ if (sym(2).sval)
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterList: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterList: FormalParameterList T_COMMA JsIdentifier ;
+/.
+case $rule_number: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+FormalParameterListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+FormalParameterListOpt: FormalParameterList ;
+/.
+case $rule_number: {
+ sym(1).Node = sym(1).FormalParameterList->finish ();
+} break;
+./
+
+FunctionBodyOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+FunctionBodyOpt: FunctionBody ;
+
+FunctionBody: SourceElements ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+./
+
+Program: SourceElements ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::Program> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+./
+
+SourceElements: SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
+} break;
+./
+
+SourceElements: SourceElements SourceElement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
+} break;
+./
+
+SourceElement: Statement ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
+} break;
+./
+
+SourceElement: FunctionDeclaration ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
+} break;
+./
+
+IdentifierOpt: ;
+/.
+case $rule_number: {
+ sym(1).sval = 0;
+} break;
+./
+
+IdentifierOpt: JsIdentifier ;
+
+PropertyNameAndValueListOpt: ;
+/.
+case $rule_number: {
+ sym(1).Node = 0;
+} break;
+./
+
+PropertyNameAndValueListOpt: PropertyNameAndValueList ;
+
+/.
+ } // switch
+ action = nt_action(state_stack[tos], lhs[r] - TERMINAL_COUNT);
+ } // if
+ } while (action != 0);
+
+ if (first_token == last_token) {
+ const int errorState = state_stack[tos];
+
+ // automatic insertion of `;'
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ SavedToken &tk = token_buffer[0];
+ tk.token = yytoken;
+ tk.dval = yylval;
+ tk.loc = yylloc;
+
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
+ yylloc.length = 0;
+
+ //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ yytoken = T_SEMICOLON;
+ yylval = 0;
+
+ action = errorState;
+
+ goto _Lcheck_token;
+ }
+
+ hadErrors = true;
+
+ token_buffer[0].token = yytoken;
+ token_buffer[0].dval = yylval;
+ token_buffer[0].loc = yylloc;
+
+ token_buffer[1].token = yytoken = lexer->lex();
+ token_buffer[1].dval = yylval = lexer->dval();
+ token_buffer[1].loc = yylloc = location(lexer);
+
+ if (t_action(errorState, yytoken)) {
+ QString msg;
+ int token = token_buffer[0].token;
+ if (token < 0 || token >= TERMINAL_COUNT)
+ msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ else
+ msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+
+ static int tokens[] = {
+ T_PLUS,
+ T_EQ,
+
+ T_COMMA,
+ T_COLON,
+ T_SEMICOLON,
+
+ T_RPAREN, T_RBRACKET, T_RBRACE,
+
+ T_NUMERIC_LITERAL,
+ T_IDENTIFIER,
+
+ T_LPAREN, T_LBRACKET, T_LBRACE,
+
+ EOF_SYMBOL
+ };
+
+ for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
+ int a = t_action(errorState, *tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = *tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[2];
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
+ if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM ||
+ tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION ||
+ tk == T_FEED_JS_SOURCE_ELEMENT)
+ continue;
+
+ int a = t_action(errorState, tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ const QString msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+ }
+
+ return false;
+}
+
+QT_QML_END_NAMESPACE
+
+
+./
+/:
+QT_QML_END_NAMESPACE
+
+
+
+#endif // QDECLARATIVEJSPARSER_P_H
+:/
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsast.cpp b/tools/qdoc3/declarativeparser/qdeclarativejsast.cpp
new file mode 100644
index 0000000000..e59ffd753c
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsast.cpp
@@ -0,0 +1,956 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#include "qdeclarativejsast_p.h"
+
+#include "qdeclarativejsastvisitor_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+void Node::accept(Visitor *visitor)
+{
+ if (visitor->preVisit(this)) {
+ accept0(visitor);
+ }
+ visitor->postVisit(this);
+}
+
+void Node::accept(Node *node, Visitor *visitor)
+{
+ if (node)
+ node->accept(visitor);
+}
+
+ExpressionNode *Node::expressionCast()
+{
+ return 0;
+}
+
+BinaryExpression *Node::binaryExpressionCast()
+{
+ return 0;
+}
+
+Statement *Node::statementCast()
+{
+ return 0;
+}
+
+UiObjectMember *Node::uiObjectMemberCast()
+{
+ return 0;
+}
+
+ExpressionNode *ExpressionNode::expressionCast()
+{
+ return this;
+}
+
+BinaryExpression *BinaryExpression::binaryExpressionCast()
+{
+ return this;
+}
+
+Statement *Statement::statementCast()
+{
+ return this;
+}
+
+UiObjectMember *UiObjectMember::uiObjectMemberCast()
+{
+ return this;
+}
+
+void NestedExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+ visitor->endVisit(this);
+}
+
+void ThisExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void IdentifierExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NullExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void TrueLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void FalseLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void StringLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NumericLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void RegExpLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArrayLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ accept(elision, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ObjectLiteral::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(properties, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ElementList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (ElementList *it = this; it; it = it->next) {
+ accept(it->elision, visitor);
+ accept(it->expression, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void Elision::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // ###
+ }
+
+ visitor->endVisit(this);
+}
+
+void PropertyNameAndValueList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (PropertyNameAndValueList *it = this; it; it = it->next) {
+ accept(it->name, visitor);
+ accept(it->value, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void IdentifierPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void StringLiteralPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void NumericLiteralPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArrayMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FieldMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NewMemberExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(arguments, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NewExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CallExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ accept(arguments, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ArgumentList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (ArgumentList *it = this; it; it = it->next) {
+ accept(it->expression, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void PostIncrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PostDecrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(base, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DeleteExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void VoidExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TypeOfExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PreIncrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void PreDecrementExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UnaryPlusExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UnaryMinusExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TildeExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void NotExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void BinaryExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(left, visitor);
+ accept(right, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ConditionalExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(ok, visitor);
+ accept(ko, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Expression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(left, visitor);
+ accept(right, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Block::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void StatementList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (StatementList *it = this; it; it = it->next) {
+ accept(it->statement, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declarations, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableDeclarationList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (VariableDeclarationList *it = this; it; it = it->next) {
+ accept(it->declaration, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void VariableDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void EmptyStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ExpressionStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void IfStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(ok, visitor);
+ accept(ko, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DoWhileStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void WhileStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ForStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(initialiser, visitor);
+ accept(condition, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LocalForStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declarations, visitor);
+ accept(condition, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ForEachStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(initialiser, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LocalForEachStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declaration, visitor);
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ContinueStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void BreakStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void ReturnStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void WithStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void SwitchStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(block, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseBlock::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(clauses, visitor);
+ accept(defaultClause, visitor);
+ accept(moreClauses, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseClauses::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (CaseClauses *it = this; it; it = it->next) {
+ accept(it->clause, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void CaseClause::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DefaultClause::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void LabelledStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void ThrowStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void TryStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ accept(catchExpression, visitor);
+ accept(finallyExpression, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Catch::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Finally::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ accept(body, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionExpression::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ accept(body, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void FormalParameterList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // ###
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionBody::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void Program::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(elements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void SourceElements::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (SourceElements *it = this; it; it = it->next) {
+ accept(it->element, visitor);
+ }
+ }
+
+ visitor->endVisit(this);
+}
+
+void FunctionSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(declaration, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void StatementSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void DebuggerStatement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiProgram::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(imports, visitor);
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiSignature::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(formals, visitor);
+ }
+ visitor->endVisit(this);
+}
+
+void UiFormalList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiFormalList *it = this; it; it = it->next) {
+ accept(it->formal, visitor);
+ }
+ }
+ visitor->endVisit(this);
+}
+
+void UiFormal::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+ visitor->endVisit(this);
+}
+
+void UiPublicMember::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ accept(binding, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectDefinition::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedTypeNameId, visitor);
+ accept(initializer, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectInitializer::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(qualifiedTypeNameId, visitor);
+ accept(initializer, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiScriptBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(statement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiArrayBinding::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(qualifiedId, visitor);
+ accept(members, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiObjectMemberList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiObjectMemberList *it = this; it; it = it->next)
+ accept(it->member, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiArrayMemberList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ for (UiArrayMemberList *it = this; it; it = it->next)
+ accept(it->member, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiQualifiedId::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiImport::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(importUri, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiImportList::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(import, visitor);
+ accept(next, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+void UiSourceElement::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(sourceElement, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
+} } // namespace QDeclarativeJS::AST
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsast_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsast_p.h
new file mode 100644
index 0000000000..cd4118720b
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsast_p.h
@@ -0,0 +1,2546 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSAST_P_H
+#define QDECLARATIVEJSAST_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsastvisitor_p.h"
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+#define QDECLARATIVEJS_DECLARE_AST_NODE(name) \
+ enum { K = Kind_##name };
+
+namespace QSOperator // ### rename
+{
+
+enum Op {
+ Add,
+ And,
+ InplaceAnd,
+ Assign,
+ BitAnd,
+ BitOr,
+ BitXor,
+ InplaceSub,
+ Div,
+ InplaceDiv,
+ Equal,
+ Ge,
+ Gt,
+ In,
+ InplaceAdd,
+ InstanceOf,
+ Le,
+ LShift,
+ InplaceLeftShift,
+ Lt,
+ Mod,
+ InplaceMod,
+ Mul,
+ InplaceMul,
+ NotEqual,
+ Or,
+ InplaceOr,
+ RShift,
+ InplaceRightShift,
+ StrictEqual,
+ StrictNotEqual,
+ Sub,
+ URShift,
+ InplaceURightShift,
+ InplaceXor
+};
+
+} // namespace QSOperator
+
+namespace QDeclarativeJS {
+class NameId;
+namespace AST {
+
+template <typename _T1, typename _T2>
+_T1 cast(_T2 *ast)
+{
+ if (ast && ast->kind == static_cast<_T1>(0)->K)
+ return static_cast<_T1>(ast);
+
+ return 0;
+}
+
+class QML_PARSER_EXPORT Node
+{
+public:
+ enum Kind {
+ Kind_Undefined,
+
+ Kind_ArgumentList,
+ Kind_ArrayLiteral,
+ Kind_ArrayMemberExpression,
+ Kind_BinaryExpression,
+ Kind_Block,
+ Kind_BreakStatement,
+ Kind_CallExpression,
+ Kind_CaseBlock,
+ Kind_CaseClause,
+ Kind_CaseClauses,
+ Kind_Catch,
+ Kind_ConditionalExpression,
+ Kind_ContinueStatement,
+ Kind_DebuggerStatement,
+ Kind_DefaultClause,
+ Kind_DeleteExpression,
+ Kind_DoWhileStatement,
+ Kind_ElementList,
+ Kind_Elision,
+ Kind_EmptyStatement,
+ Kind_Expression,
+ Kind_ExpressionStatement,
+ Kind_FalseLiteral,
+ Kind_FieldMemberExpression,
+ Kind_Finally,
+ Kind_ForEachStatement,
+ Kind_ForStatement,
+ Kind_FormalParameterList,
+ Kind_FunctionBody,
+ Kind_FunctionDeclaration,
+ Kind_FunctionExpression,
+ Kind_FunctionSourceElement,
+ Kind_IdentifierExpression,
+ Kind_IdentifierPropertyName,
+ Kind_IfStatement,
+ Kind_LabelledStatement,
+ Kind_LocalForEachStatement,
+ Kind_LocalForStatement,
+ Kind_NewExpression,
+ Kind_NewMemberExpression,
+ Kind_NotExpression,
+ Kind_NullExpression,
+ Kind_NumericLiteral,
+ Kind_NumericLiteralPropertyName,
+ Kind_ObjectLiteral,
+ Kind_PostDecrementExpression,
+ Kind_PostIncrementExpression,
+ Kind_PreDecrementExpression,
+ Kind_PreIncrementExpression,
+ Kind_Program,
+ Kind_PropertyName,
+ Kind_PropertyNameAndValueList,
+ Kind_RegExpLiteral,
+ Kind_ReturnStatement,
+ Kind_SourceElement,
+ Kind_SourceElements,
+ Kind_StatementList,
+ Kind_StatementSourceElement,
+ Kind_StringLiteral,
+ Kind_StringLiteralPropertyName,
+ Kind_SwitchStatement,
+ Kind_ThisExpression,
+ Kind_ThrowStatement,
+ Kind_TildeExpression,
+ Kind_TrueLiteral,
+ Kind_TryStatement,
+ Kind_TypeOfExpression,
+ Kind_UnaryMinusExpression,
+ Kind_UnaryPlusExpression,
+ Kind_VariableDeclaration,
+ Kind_VariableDeclarationList,
+ Kind_VariableStatement,
+ Kind_VoidExpression,
+ Kind_WhileStatement,
+ Kind_WithStatement,
+ Kind_NestedExpression,
+
+ Kind_UiArrayBinding,
+ Kind_UiImport,
+ Kind_UiImportList,
+ Kind_UiObjectBinding,
+ Kind_UiObjectDefinition,
+ Kind_UiObjectInitializer,
+ Kind_UiObjectMemberList,
+ Kind_UiArrayMemberList,
+ Kind_UiProgram,
+ Kind_UiParameterList,
+ Kind_UiPublicMember,
+ Kind_UiQualifiedId,
+ Kind_UiScriptBinding,
+ Kind_UiSourceElement,
+ Kind_UiFormal,
+ Kind_UiFormalList,
+ Kind_UiSignature
+ };
+
+ inline Node()
+ : kind(Kind_Undefined) {}
+
+ // NOTE: node destructors are never called,
+ // instead we block free the memory
+ // (see the NodePool class)
+ virtual ~Node() {}
+
+ virtual ExpressionNode *expressionCast();
+ virtual BinaryExpression *binaryExpressionCast();
+ virtual Statement *statementCast();
+ virtual UiObjectMember *uiObjectMemberCast();
+
+ void accept(Visitor *visitor);
+ static void accept(Node *node, Visitor *visitor);
+
+ inline static void acceptChild(Node *node, Visitor *visitor)
+ { return accept(node, visitor); } // ### remove
+
+ virtual void accept0(Visitor *visitor) = 0;
+
+// attributes
+ int kind;
+};
+
+class QML_PARSER_EXPORT ExpressionNode: public Node
+{
+public:
+ ExpressionNode() {}
+
+ virtual ExpressionNode *expressionCast();
+
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+};
+
+class QML_PARSER_EXPORT Statement: public Node
+{
+public:
+ Statement() {}
+
+ virtual Statement *statementCast();
+
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+};
+
+class QML_PARSER_EXPORT UiFormal: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiFormal)
+
+ UiFormal(NameId *name, NameId *alias = 0)
+ : name(name), alias(alias)
+ { }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ NameId *alias;
+ SourceLocation identifierToken;
+ SourceLocation asToken;
+ SourceLocation aliasToken;
+};
+
+class QML_PARSER_EXPORT UiFormalList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiFormalList)
+
+ UiFormalList(UiFormal *formal)
+ : formal(formal), next(this) {}
+
+ UiFormalList(UiFormalList *previous, UiFormal *formal)
+ : formal(formal)
+ {
+ next = previous->next;
+ previous->next = this;
+ }
+
+ UiFormalList *finish()
+ {
+ UiFormalList *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiFormal *formal;
+ UiFormalList *next;
+};
+
+class QML_PARSER_EXPORT UiSignature: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiSignature)
+
+ UiSignature(UiFormalList *formals = 0)
+ : formals(formals)
+ { }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return SourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceLocation lparenToken;
+ UiFormalList *formals;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT NestedExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NestedExpression)
+
+ NestedExpression(ExpressionNode *expression)
+ : expression(expression)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lparenToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ThisExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression)
+
+ ThisExpression() { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return thisToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return thisToken; }
+
+// attributes
+ SourceLocation thisToken;
+};
+
+class QML_PARSER_EXPORT IdentifierExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierExpression)
+
+ IdentifierExpression(NameId *n):
+ name (n) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return identifierToken; }
+
+// attributes
+ NameId *name;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT NullExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression)
+
+ NullExpression() { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return nullToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return nullToken; }
+
+// attributes
+ SourceLocation nullToken;
+};
+
+class QML_PARSER_EXPORT TrueLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral)
+
+ TrueLiteral() { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return trueToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return trueToken; }
+
+// attributes
+ SourceLocation trueToken;
+};
+
+class QML_PARSER_EXPORT FalseLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral)
+
+ FalseLiteral() { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return falseToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return falseToken; }
+
+// attributes
+ SourceLocation falseToken;
+};
+
+class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteral)
+
+ NumericLiteral(double v):
+ value(v) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ double value;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT StringLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteral)
+
+ StringLiteral(NameId *v):
+ value (v) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ NameId *value;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(RegExpLiteral)
+
+ RegExpLiteral(NameId *p, int f):
+ pattern (p), flags (f) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return literalToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return literalToken; }
+
+// attributes:
+ NameId *pattern;
+ int flags;
+ SourceLocation literalToken;
+};
+
+class QML_PARSER_EXPORT ArrayLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArrayLiteral)
+
+ ArrayLiteral(Elision *e):
+ elements (0), elision (e)
+ { kind = K; }
+
+ ArrayLiteral(ElementList *elts):
+ elements (elts), elision (0)
+ { kind = K; }
+
+ ArrayLiteral(ElementList *elts, Elision *e):
+ elements (elts), elision (e)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbracketToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+// attributes
+ ElementList *elements;
+ Elision *elision;
+ SourceLocation lbracketToken;
+ SourceLocation commaToken;
+ SourceLocation rbracketToken;
+};
+
+class QML_PARSER_EXPORT ObjectLiteral: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ObjectLiteral)
+
+ ObjectLiteral():
+ properties (0) { kind = K; }
+
+ ObjectLiteral(PropertyNameAndValueList *plist):
+ properties (plist) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbraceToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+// attributes
+ PropertyNameAndValueList *properties;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT ElementList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ElementList)
+
+ ElementList(Elision *e, ExpressionNode *expr):
+ elision (e), expression (expr), next (this)
+ { kind = K; }
+
+ ElementList(ElementList *previous, Elision *e, ExpressionNode *expr):
+ elision (e), expression (expr)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ inline ElementList *finish ()
+ {
+ ElementList *front = next;
+ next = 0;
+ return front;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Elision *elision;
+ ExpressionNode *expression;
+ ElementList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT Elision: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Elision)
+
+ Elision():
+ next (this) { kind = K; }
+
+ Elision(Elision *previous)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline Elision *finish ()
+ {
+ Elision *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ Elision *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PropertyNameAndValueList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PropertyNameAndValueList)
+
+ PropertyNameAndValueList(PropertyName *n, ExpressionNode *v):
+ name (n), value (v), next (this)
+ { kind = K; }
+
+ PropertyNameAndValueList(PropertyNameAndValueList *previous, PropertyName *n, ExpressionNode *v):
+ name (n), value (v)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline PropertyNameAndValueList *finish ()
+ {
+ PropertyNameAndValueList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ PropertyName *name;
+ ExpressionNode *value;
+ PropertyNameAndValueList *next;
+ SourceLocation colonToken;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PropertyName: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName)
+
+ PropertyName() { kind = K; }
+
+// attributes
+ SourceLocation propertyNameToken;
+};
+
+class QML_PARSER_EXPORT IdentifierPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierPropertyName)
+
+ IdentifierPropertyName(NameId *n):
+ id (n) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *id;
+};
+
+class QML_PARSER_EXPORT StringLiteralPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteralPropertyName)
+
+ StringLiteralPropertyName(NameId *n):
+ id (n) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *id;
+};
+
+class QML_PARSER_EXPORT NumericLiteralPropertyName: public PropertyName
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteralPropertyName)
+
+ NumericLiteralPropertyName(double n):
+ id (n) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ double id;
+};
+
+class QML_PARSER_EXPORT ArrayMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArrayMemberExpression)
+
+ ArrayMemberExpression(ExpressionNode *b, ExpressionNode *e):
+ base (b), expression (e)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+// attributes
+ ExpressionNode *base;
+ ExpressionNode *expression;
+ SourceLocation lbracketToken;
+ SourceLocation rbracketToken;
+};
+
+class QML_PARSER_EXPORT FieldMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FieldMemberExpression)
+
+ FieldMemberExpression(ExpressionNode *b, NameId *n):
+ base (b), name (n)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return identifierToken; }
+
+ // attributes
+ ExpressionNode *base;
+ NameId *name;
+ SourceLocation dotToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT NewMemberExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NewMemberExpression)
+
+ NewMemberExpression(ExpressionNode *b, ArgumentList *a):
+ base (b), arguments (a)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return newToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+ // attributes
+ ExpressionNode *base;
+ ArgumentList *arguments;
+ SourceLocation newToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT NewExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NewExpression)
+
+ NewExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return newToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation newToken;
+};
+
+class QML_PARSER_EXPORT CallExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CallExpression)
+
+ CallExpression(ExpressionNode *b, ArgumentList *a):
+ base (b), arguments (a)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rparenToken; }
+
+// attributes
+ ExpressionNode *base;
+ ArgumentList *arguments;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ArgumentList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ArgumentList)
+
+ ArgumentList(ExpressionNode *e):
+ expression (e), next (this)
+ { kind = K; }
+
+ ArgumentList(ArgumentList *previous, ExpressionNode *e):
+ expression (e)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline ArgumentList *finish ()
+ {
+ ArgumentList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ ExpressionNode *expression;
+ ArgumentList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT PostIncrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PostIncrementExpression)
+
+ PostIncrementExpression(ExpressionNode *b):
+ base (b) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return incrementToken; }
+
+// attributes
+ ExpressionNode *base;
+ SourceLocation incrementToken;
+};
+
+class QML_PARSER_EXPORT PostDecrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PostDecrementExpression)
+
+ PostDecrementExpression(ExpressionNode *b):
+ base (b) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return base->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return decrementToken; }
+
+// attributes
+ ExpressionNode *base;
+ SourceLocation decrementToken;
+};
+
+class QML_PARSER_EXPORT DeleteExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DeleteExpression)
+
+ DeleteExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return deleteToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation deleteToken;
+};
+
+class QML_PARSER_EXPORT VoidExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VoidExpression)
+
+ VoidExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return voidToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation voidToken;
+};
+
+class QML_PARSER_EXPORT TypeOfExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TypeOfExpression)
+
+ TypeOfExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return typeofToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation typeofToken;
+};
+
+class QML_PARSER_EXPORT PreIncrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PreIncrementExpression)
+
+ PreIncrementExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return incrementToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation incrementToken;
+};
+
+class QML_PARSER_EXPORT PreDecrementExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(PreDecrementExpression)
+
+ PreDecrementExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return decrementToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation decrementToken;
+};
+
+class QML_PARSER_EXPORT UnaryPlusExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UnaryPlusExpression)
+
+ UnaryPlusExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return plusToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation plusToken;
+};
+
+class QML_PARSER_EXPORT UnaryMinusExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UnaryMinusExpression)
+
+ UnaryMinusExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return minusToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation minusToken;
+};
+
+class QML_PARSER_EXPORT TildeExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TildeExpression)
+
+ TildeExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return tildeToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation tildeToken;
+};
+
+class QML_PARSER_EXPORT NotExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(NotExpression)
+
+ NotExpression(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return notToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return expression->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation notToken;
+};
+
+class QML_PARSER_EXPORT BinaryExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(BinaryExpression)
+
+ BinaryExpression(ExpressionNode *l, int o, ExpressionNode *r):
+ left (l), op (o), right (r)
+ { kind = K; }
+
+ virtual BinaryExpression *binaryExpressionCast();
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return left->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return right->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *left;
+ int op;
+ ExpressionNode *right;
+ SourceLocation operatorToken;
+};
+
+class QML_PARSER_EXPORT ConditionalExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ConditionalExpression)
+
+ ConditionalExpression(ExpressionNode *e, ExpressionNode *t, ExpressionNode *f):
+ expression (e), ok (t), ko (f)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return expression->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return ko->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ ExpressionNode *ok;
+ ExpressionNode *ko;
+ SourceLocation questionToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT Expression: public ExpressionNode // ### rename
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Expression)
+
+ Expression(ExpressionNode *l, ExpressionNode *r):
+ left (l), right (r) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return left->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return right->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *left;
+ ExpressionNode *right;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT Block: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Block)
+
+ Block(StatementList *slist):
+ statements (slist) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return lbraceToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+ // attributes
+ StatementList *statements;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT StatementList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StatementList)
+
+ StatementList(Statement *stmt):
+ statement (stmt), next (this)
+ { kind = K; }
+
+ StatementList(StatementList *previous, Statement *stmt):
+ statement (stmt)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline StatementList *finish ()
+ {
+ StatementList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ Statement *statement;
+ StatementList *next;
+};
+
+class QML_PARSER_EXPORT VariableStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableStatement)
+
+ VariableStatement(VariableDeclarationList *vlist):
+ declarations (vlist)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return declarationKindToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ VariableDeclarationList *declarations;
+ SourceLocation declarationKindToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT VariableDeclaration: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclaration)
+
+ VariableDeclaration(NameId *n, ExpressionNode *e):
+ name (n), expression (e), readOnly(false)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ ExpressionNode *expression;
+ bool readOnly;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT VariableDeclarationList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclarationList)
+
+ VariableDeclarationList(VariableDeclaration *decl):
+ declaration (decl), next (this)
+ { kind = K; }
+
+ VariableDeclarationList(VariableDeclarationList *previous, VariableDeclaration *decl):
+ declaration (decl)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline VariableDeclarationList *finish (bool readOnly)
+ {
+ VariableDeclarationList *front = next;
+ next = 0;
+ if (readOnly) {
+ VariableDeclarationList *vdl;
+ for (vdl = front; vdl != 0; vdl = vdl->next)
+ vdl->declaration->readOnly = true;
+ }
+ return front;
+ }
+
+// attributes
+ VariableDeclaration *declaration;
+ VariableDeclarationList *next;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT EmptyStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement)
+
+ EmptyStatement() { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return semicolonToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT ExpressionStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ExpressionStatement)
+
+ ExpressionStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return expression->firstSourceLocation(); }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT IfStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(IfStatement)
+
+ IfStatement(ExpressionNode *e, Statement *t, Statement *f = 0):
+ expression (e), ok (t), ko (f)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return ifToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (ko)
+ return ko->lastSourceLocation();
+
+ return ok->lastSourceLocation();
+ }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *ok;
+ Statement *ko;
+ SourceLocation ifToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation elseToken;
+};
+
+class QML_PARSER_EXPORT DoWhileStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DoWhileStatement)
+
+ DoWhileStatement(Statement *stmt, ExpressionNode *e):
+ statement (stmt), expression (e)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return doToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ Statement *statement;
+ ExpressionNode *expression;
+ SourceLocation doToken;
+ SourceLocation whileToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT WhileStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(WhileStatement)
+
+ WhileStatement(ExpressionNode *e, Statement *stmt):
+ expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return whileToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation whileToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ForStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ForStatement)
+
+ ForStatement(ExpressionNode *i, ExpressionNode *c, ExpressionNode *e, Statement *stmt):
+ initialiser (i), condition (c), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *initialiser;
+ ExpressionNode *condition;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation firstSemicolonToken;
+ SourceLocation secondSemicolonToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT LocalForStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LocalForStatement)
+
+ LocalForStatement(VariableDeclarationList *vlist, ExpressionNode *c, ExpressionNode *e, Statement *stmt):
+ declarations (vlist), condition (c), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ VariableDeclarationList *declarations;
+ ExpressionNode *condition;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation varToken;
+ SourceLocation firstSemicolonToken;
+ SourceLocation secondSemicolonToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ForEachStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ForEachStatement)
+
+ ForEachStatement(ExpressionNode *i, ExpressionNode *e, Statement *stmt):
+ initialiser (i), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *initialiser;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation inToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT LocalForEachStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LocalForEachStatement)
+
+ LocalForEachStatement(VariableDeclaration *v, ExpressionNode *e, Statement *stmt):
+ declaration (v), expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return forToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ VariableDeclaration *declaration;
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation forToken;
+ SourceLocation lparenToken;
+ SourceLocation varToken;
+ SourceLocation inToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT ContinueStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ContinueStatement)
+
+ ContinueStatement(NameId *l = 0):
+ label (l) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return continueToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ NameId *label;
+ SourceLocation continueToken;
+ SourceLocation identifierToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT BreakStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(BreakStatement)
+
+ BreakStatement(NameId *l = 0):
+ label (l) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return breakToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ // attributes
+ NameId *label;
+ SourceLocation breakToken;
+ SourceLocation identifierToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT ReturnStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ReturnStatement)
+
+ ReturnStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return returnToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ ExpressionNode *expression;
+ SourceLocation returnToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT WithStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(WithStatement)
+
+ WithStatement(ExpressionNode *e, Statement *stmt):
+ expression (e), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return withToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ ExpressionNode *expression;
+ Statement *statement;
+ SourceLocation withToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT CaseBlock: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseBlock)
+
+ CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0):
+ clauses (c), defaultClause (d), moreClauses (r)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ CaseClauses *clauses;
+ DefaultClause *defaultClause;
+ CaseClauses *moreClauses;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT SwitchStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SwitchStatement)
+
+ SwitchStatement(ExpressionNode *e, CaseBlock *b):
+ expression (e), block (b)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return switchToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return block->rbraceToken; }
+
+// attributes
+ ExpressionNode *expression;
+ CaseBlock *block;
+ SourceLocation switchToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT CaseClauses: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseClauses)
+
+ CaseClauses(CaseClause *c):
+ clause (c), next (this)
+ { kind = K; }
+
+ CaseClauses(CaseClauses *previous, CaseClause *c):
+ clause (c)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline CaseClauses *finish ()
+ {
+ CaseClauses *front = next;
+ next = 0;
+ return front;
+ }
+
+//attributes
+ CaseClause *clause;
+ CaseClauses *next;
+};
+
+class QML_PARSER_EXPORT CaseClause: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(CaseClause)
+
+ CaseClause(ExpressionNode *e, StatementList *slist):
+ expression (e), statements (slist)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ ExpressionNode *expression;
+ StatementList *statements;
+ SourceLocation caseToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT DefaultClause: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DefaultClause)
+
+ DefaultClause(StatementList *slist):
+ statements (slist)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ StatementList *statements;
+ SourceLocation defaultToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT LabelledStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(LabelledStatement)
+
+ LabelledStatement(NameId *l, Statement *stmt):
+ label (l), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+// attributes
+ NameId *label;
+ Statement *statement;
+ SourceLocation identifierToken;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT ThrowStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(ThrowStatement)
+
+ ThrowStatement(ExpressionNode *e):
+ expression (e) { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return throwToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ // attributes
+ ExpressionNode *expression;
+ SourceLocation throwToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT Catch: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Catch)
+
+ Catch(NameId *n, Block *stmt):
+ name (n), statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *name;
+ Block *statement;
+ SourceLocation catchToken;
+ SourceLocation lparenToken;
+ SourceLocation identifierToken;
+ SourceLocation rparenToken;
+};
+
+class QML_PARSER_EXPORT Finally: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Finally)
+
+ Finally(Block *stmt):
+ statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Block *statement;
+ SourceLocation finallyToken;
+};
+
+class QML_PARSER_EXPORT TryStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(TryStatement)
+
+ TryStatement(Statement *stmt, Catch *c, Finally *f):
+ statement (stmt), catchExpression (c), finallyExpression (f)
+ { kind = K; }
+
+ TryStatement(Statement *stmt, Finally *f):
+ statement (stmt), catchExpression (0), finallyExpression (f)
+ { kind = K; }
+
+ TryStatement(Statement *stmt, Catch *c):
+ statement (stmt), catchExpression (c), finallyExpression (0)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return tryToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (finallyExpression)
+ return finallyExpression->statement->rbraceToken;
+ else if (catchExpression)
+ return catchExpression->statement->rbraceToken;
+
+ return statement->lastSourceLocation();
+ }
+
+// attributes
+ Statement *statement;
+ Catch *catchExpression;
+ Finally *finallyExpression;
+ SourceLocation tryToken;
+};
+
+class QML_PARSER_EXPORT FunctionExpression: public ExpressionNode
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionExpression)
+
+ FunctionExpression(NameId *n, FormalParameterList *f, FunctionBody *b):
+ name (n), formals (f), body (b)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return functionToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbraceToken; }
+
+// attributes
+ NameId *name;
+ FormalParameterList *formals;
+ FunctionBody *body;
+ SourceLocation functionToken;
+ SourceLocation identifierToken;
+ SourceLocation lparenToken;
+ SourceLocation rparenToken;
+ SourceLocation lbraceToken;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT FunctionDeclaration: public FunctionExpression
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionDeclaration)
+
+ FunctionDeclaration(NameId *n, FormalParameterList *f, FunctionBody *b):
+ FunctionExpression(n, f, b)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+};
+
+class QML_PARSER_EXPORT FormalParameterList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FormalParameterList)
+
+ FormalParameterList(NameId *n):
+ name (n), next (this)
+ { kind = K; }
+
+ FormalParameterList(FormalParameterList *previous, NameId *n):
+ name (n)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline FormalParameterList *finish ()
+ {
+ FormalParameterList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ NameId *name;
+ FormalParameterList *next;
+ SourceLocation commaToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT FunctionBody: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionBody)
+
+ FunctionBody(SourceElements *elts):
+ elements (elts)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceElements *elements;
+};
+
+class QML_PARSER_EXPORT Program: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(Program)
+
+ Program(SourceElements *elts):
+ elements (elts)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceElements *elements;
+};
+
+class QML_PARSER_EXPORT SourceElements: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SourceElements)
+
+ SourceElements(SourceElement *elt):
+ element (elt), next (this)
+ { kind = K; }
+
+ SourceElements(SourceElements *previous, SourceElement *elt):
+ element (elt)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ inline SourceElements *finish ()
+ {
+ SourceElements *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ SourceElement *element;
+ SourceElements *next;
+};
+
+class QML_PARSER_EXPORT SourceElement: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(SourceElement)
+
+ inline SourceElement()
+ { kind = K; }
+};
+
+class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(FunctionSourceElement)
+
+ FunctionSourceElement(FunctionDeclaration *f):
+ declaration (f)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ FunctionDeclaration *declaration;
+};
+
+class QML_PARSER_EXPORT StatementSourceElement: public SourceElement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(StatementSourceElement)
+
+ StatementSourceElement(Statement *stmt):
+ statement (stmt)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Statement *statement;
+};
+
+class QML_PARSER_EXPORT DebuggerStatement: public Statement
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(DebuggerStatement)
+
+ DebuggerStatement()
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+ virtual SourceLocation firstSourceLocation() const
+ { return debuggerToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+// attributes
+ SourceLocation debuggerToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiProgram: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiProgram)
+
+ UiProgram(UiImportList *imports, UiObjectMemberList *members)
+ : imports(imports), members(members)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiImportList *imports;
+ UiObjectMemberList *members;
+};
+
+class QML_PARSER_EXPORT UiQualifiedId: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiQualifiedId)
+
+ UiQualifiedId(NameId *name)
+ : next(this), name(name)
+ { kind = K; }
+
+ UiQualifiedId(UiQualifiedId *previous, NameId *name)
+ : name(name)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ UiQualifiedId *finish()
+ {
+ UiQualifiedId *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *next;
+ NameId *name;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT UiImport: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiImport)
+
+ UiImport(NameId *fileName)
+ : fileName(fileName), importUri(0), importId(0)
+ { kind = K; }
+
+ UiImport(UiQualifiedId *uri)
+ : fileName(0), importUri(uri), importId(0)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return importToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ NameId *fileName;
+ UiQualifiedId *importUri;
+ NameId *importId;
+ SourceLocation importToken;
+ SourceLocation fileNameToken;
+ SourceLocation versionToken;
+ SourceLocation asToken;
+ SourceLocation importIdToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiImportList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiImportList)
+
+ UiImportList(UiImport *import)
+ : import(import),
+ next(this)
+ { kind = K; }
+
+ UiImportList(UiImportList *previous, UiImport *import)
+ : import(import)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (import) return import->firstSourceLocation();
+ else return SourceLocation();
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ for (const UiImportList *it = this; it; it = it->next)
+ if (!it->next && it->import)
+ return it->import->lastSourceLocation();
+
+ return SourceLocation();
+ }
+
+ UiImportList *finish()
+ {
+ UiImportList *head = next;
+ next = 0;
+ return head;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiImport *import;
+ UiImportList *next;
+};
+
+class QML_PARSER_EXPORT UiObjectMember: public Node
+{
+public:
+ virtual SourceLocation firstSourceLocation() const = 0;
+ virtual SourceLocation lastSourceLocation() const = 0;
+
+ virtual UiObjectMember *uiObjectMemberCast();
+};
+
+class QML_PARSER_EXPORT UiObjectMemberList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectMemberList)
+
+ UiObjectMemberList(UiObjectMember *member)
+ : next(this), member(member)
+ { kind = K; }
+
+ UiObjectMemberList(UiObjectMemberList *previous, UiObjectMember *member)
+ : member(member)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ UiObjectMemberList *finish()
+ {
+ UiObjectMemberList *head = next;
+ next = 0;
+ return head;
+ }
+
+// attributes
+ UiObjectMemberList *next;
+ UiObjectMember *member;
+};
+
+class QML_PARSER_EXPORT UiArrayMemberList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayMemberList)
+
+ UiArrayMemberList(UiObjectMember *member)
+ : next(this), member(member)
+ { kind = K; }
+
+ UiArrayMemberList(UiArrayMemberList *previous, UiObjectMember *member)
+ : member(member)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+ UiArrayMemberList *finish()
+ {
+ UiArrayMemberList *head = next;
+ next = 0;
+ return head;
+ }
+
+// attributes
+ UiArrayMemberList *next;
+ UiObjectMember *member;
+ SourceLocation commaToken;
+};
+
+class QML_PARSER_EXPORT UiObjectInitializer: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectInitializer)
+
+ UiObjectInitializer(UiObjectMemberList *members)
+ : members(members)
+ { kind = K; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ SourceLocation lbraceToken;
+ UiObjectMemberList *members;
+ SourceLocation rbraceToken;
+};
+
+class QML_PARSER_EXPORT UiParameterList: public Node
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiParameterList)
+
+ UiParameterList(NameId *t, NameId *n):
+ type (t), name (n), next (this)
+ { kind = K; }
+
+ UiParameterList(UiParameterList *previous, NameId *t, NameId *n):
+ type (t), name (n)
+ {
+ kind = K;
+ next = previous->next;
+ previous->next = this;
+ }
+
+ virtual void accept0(Visitor *) {}
+
+ inline UiParameterList *finish ()
+ {
+ UiParameterList *front = next;
+ next = 0;
+ return front;
+ }
+
+// attributes
+ NameId *type;
+ NameId *name;
+ UiParameterList *next;
+ SourceLocation commaToken;
+ SourceLocation identifierToken;
+};
+
+class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiPublicMember)
+
+ UiPublicMember(NameId *memberType,
+ NameId *name)
+ : type(Property), typeModifier(0), memberType(memberType), name(name), expression(0), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0)
+ { kind = K; }
+
+ UiPublicMember(NameId *memberType,
+ NameId *name,
+ ExpressionNode *expression)
+ : type(Property), typeModifier(0), memberType(memberType), name(name), expression(expression), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (defaultToken.isValid())
+ return defaultToken;
+ else if (readonlyToken.isValid())
+ return readonlyToken;
+
+ return propertyToken;
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (binding)
+ return binding->lastSourceLocation();
+
+ return semicolonToken;
+ }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ enum { Signal, Property } type;
+ NameId *typeModifier;
+ NameId *memberType;
+ NameId *name;
+ ExpressionNode *expression; // initialized with a JS expression
+ UiObjectMember *binding; // initialized with a QML object or array.
+ bool isDefaultMember;
+ bool isReadonlyMember;
+ UiParameterList *parameters;
+ SourceLocation defaultToken;
+ SourceLocation readonlyToken;
+ SourceLocation propertyToken;
+ SourceLocation typeModifierToken;
+ SourceLocation typeToken;
+ SourceLocation identifierToken;
+ SourceLocation colonToken;
+ SourceLocation semicolonToken;
+};
+
+class QML_PARSER_EXPORT UiObjectDefinition: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectDefinition)
+
+ UiObjectDefinition(UiQualifiedId *qualifiedTypeNameId,
+ UiObjectInitializer *initializer)
+ : qualifiedTypeNameId(qualifiedTypeNameId), initializer(initializer)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedTypeNameId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return initializer->rbraceToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedTypeNameId;
+ UiObjectInitializer *initializer;
+};
+
+class QML_PARSER_EXPORT UiSourceElement: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiSourceElement)
+
+ UiSourceElement(Node *sourceElement)
+ : sourceElement(sourceElement)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (FunctionDeclaration *funDecl = cast<FunctionDeclaration *>(sourceElement))
+ return funDecl->firstSourceLocation();
+ else if (VariableStatement *varStmt = cast<VariableStatement *>(sourceElement))
+ return varStmt->firstSourceLocation();
+
+ return SourceLocation();
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ if (FunctionDeclaration *funDecl = cast<FunctionDeclaration *>(sourceElement))
+ return funDecl->lastSourceLocation();
+ else if (VariableStatement *varStmt = cast<VariableStatement *>(sourceElement))
+ return varStmt->lastSourceLocation();
+
+ return SourceLocation();
+ }
+
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ Node *sourceElement;
+};
+
+class QML_PARSER_EXPORT UiObjectBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectBinding)
+
+ UiObjectBinding(UiQualifiedId *qualifiedId,
+ UiQualifiedId *qualifiedTypeNameId,
+ UiObjectInitializer *initializer)
+ : qualifiedId(qualifiedId),
+ qualifiedTypeNameId(qualifiedTypeNameId),
+ initializer(initializer),
+ hasOnToken(false)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (hasOnToken && qualifiedTypeNameId)
+ return qualifiedTypeNameId->identifierToken;
+
+ return qualifiedId->identifierToken;
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return initializer->rbraceToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ UiQualifiedId *qualifiedTypeNameId;
+ UiObjectInitializer *initializer;
+ SourceLocation colonToken;
+ bool hasOnToken;
+};
+
+class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiScriptBinding)
+
+ UiScriptBinding(UiQualifiedId *qualifiedId,
+ Statement *statement)
+ : qualifiedId(qualifiedId),
+ statement(statement)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return statement->lastSourceLocation(); }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ Statement *statement;
+ SourceLocation colonToken;
+};
+
+class QML_PARSER_EXPORT UiArrayBinding: public UiObjectMember
+{
+public:
+ QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayBinding)
+
+ UiArrayBinding(UiQualifiedId *qualifiedId,
+ UiArrayMemberList *members)
+ : qualifiedId(qualifiedId),
+ members(members)
+ { kind = K; }
+
+ virtual SourceLocation firstSourceLocation() const
+ { return qualifiedId->identifierToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return rbracketToken; }
+
+ virtual void accept0(Visitor *visitor);
+
+// attributes
+ UiQualifiedId *qualifiedId;
+ UiArrayMemberList *members;
+ SourceLocation colonToken;
+ SourceLocation lbracketToken;
+ SourceLocation rbracketToken;
+};
+
+} } // namespace AST
+
+
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsastfwd_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsastfwd_p.h
new file mode 100644
index 0000000000..8344d5476b
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsastfwd_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSAST_FWD_P_H
+#define QDECLARATIVEJSAST_FWD_P_H
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/qglobal.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+class SourceLocation
+{
+public:
+ SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
+ : offset(offset), length(length),
+ startLine(line), startColumn(column)
+ { }
+
+ bool isValid() const { return length != 0; }
+
+ quint32 begin() const { return offset; }
+ quint32 end() const { return offset + length; }
+
+// attributes
+ // ### encode
+ quint32 offset;
+ quint32 length;
+ quint32 startLine;
+ quint32 startColumn;
+};
+
+class Visitor;
+class Node;
+class ExpressionNode;
+class Statement;
+class ThisExpression;
+class IdentifierExpression;
+class NullExpression;
+class TrueLiteral;
+class FalseLiteral;
+class NumericLiteral;
+class StringLiteral;
+class RegExpLiteral;
+class ArrayLiteral;
+class ObjectLiteral;
+class ElementList;
+class Elision;
+class PropertyNameAndValueList;
+class PropertyName;
+class IdentifierPropertyName;
+class StringLiteralPropertyName;
+class NumericLiteralPropertyName;
+class ArrayMemberExpression;
+class FieldMemberExpression;
+class NewMemberExpression;
+class NewExpression;
+class CallExpression;
+class ArgumentList;
+class PostIncrementExpression;
+class PostDecrementExpression;
+class DeleteExpression;
+class VoidExpression;
+class TypeOfExpression;
+class PreIncrementExpression;
+class PreDecrementExpression;
+class UnaryPlusExpression;
+class UnaryMinusExpression;
+class TildeExpression;
+class NotExpression;
+class BinaryExpression;
+class ConditionalExpression;
+class Expression; // ### rename
+class Block;
+class StatementList;
+class VariableStatement;
+class VariableDeclarationList;
+class VariableDeclaration;
+class EmptyStatement;
+class ExpressionStatement;
+class IfStatement;
+class DoWhileStatement;
+class WhileStatement;
+class ForStatement;
+class LocalForStatement;
+class ForEachStatement;
+class LocalForEachStatement;
+class ContinueStatement;
+class BreakStatement;
+class ReturnStatement;
+class WithStatement;
+class SwitchStatement;
+class CaseBlock;
+class CaseClauses;
+class CaseClause;
+class DefaultClause;
+class LabelledStatement;
+class ThrowStatement;
+class TryStatement;
+class Catch;
+class Finally;
+class FunctionDeclaration;
+class FunctionExpression;
+class FormalParameterList;
+class FunctionBody;
+class Program;
+class SourceElements;
+class SourceElement;
+class FunctionSourceElement;
+class StatementSourceElement;
+class DebuggerStatement;
+class NestedExpression;
+
+// ui elements
+class UiProgram;
+class UiImportList;
+class UiImport;
+class UiPublicMember;
+class UiObjectDefinition;
+class UiObjectInitializer;
+class UiObjectBinding;
+class UiScriptBinding;
+class UiSourceElement;
+class UiArrayBinding;
+class UiObjectMember;
+class UiObjectMemberList;
+class UiArrayMemberList;
+class UiQualifiedId;
+class UiFormalList;
+class UiFormal;
+class UiSignature;
+
+} } // namespace AST
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor.cpp b/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor.cpp
new file mode 100644
index 0000000000..b4eecc18ad
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#include "qdeclarativejsastvisitor_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+Visitor::Visitor()
+{
+}
+
+Visitor::~Visitor()
+{
+}
+
+} } // namespace QDeclarativeJS::AST
+
+QT_QML_END_NAMESPACE
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor_p.h
new file mode 100644
index 0000000000..6ef7c81a28
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsastvisitor_p.h
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSASTVISITOR_P_H
+#define QDECLARATIVEJSASTVISITOR_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsastfwd_p.h"
+#include "qdeclarativejsglobal_p.h"
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS { namespace AST {
+
+class QML_PARSER_EXPORT Visitor
+{
+public:
+ Visitor();
+ virtual ~Visitor();
+
+ virtual bool preVisit(Node *) { return true; }
+ virtual void postVisit(Node *) {}
+
+ // Ui
+ virtual bool visit(UiProgram *) { return true; }
+ virtual bool visit(UiImportList *) { return true; }
+ virtual bool visit(UiImport *) { return true; }
+ virtual bool visit(UiPublicMember *) { return true; }
+ virtual bool visit(UiSourceElement *) { return true; }
+ virtual bool visit(UiObjectDefinition *) { return true; }
+ virtual bool visit(UiObjectInitializer *) { return true; }
+ virtual bool visit(UiObjectBinding *) { return true; }
+ virtual bool visit(UiScriptBinding *) { return true; }
+ virtual bool visit(UiArrayBinding *) { return true; }
+ virtual bool visit(UiObjectMemberList *) { return true; }
+ virtual bool visit(UiArrayMemberList *) { return true; }
+ virtual bool visit(UiQualifiedId *) { return true; }
+ virtual bool visit(UiSignature *) { return true; }
+ virtual bool visit(UiFormalList *) { return true; }
+ virtual bool visit(UiFormal *) { return true; }
+
+ virtual void endVisit(UiProgram *) {}
+ virtual void endVisit(UiImportList *) {}
+ virtual void endVisit(UiImport *) {}
+ virtual void endVisit(UiPublicMember *) {}
+ virtual void endVisit(UiSourceElement *) {}
+ virtual void endVisit(UiObjectDefinition *) {}
+ virtual void endVisit(UiObjectInitializer *) {}
+ virtual void endVisit(UiObjectBinding *) {}
+ virtual void endVisit(UiScriptBinding *) {}
+ virtual void endVisit(UiArrayBinding *) {}
+ virtual void endVisit(UiObjectMemberList *) {}
+ virtual void endVisit(UiArrayMemberList *) {}
+ virtual void endVisit(UiQualifiedId *) {}
+ virtual void endVisit(UiSignature *) {}
+ virtual void endVisit(UiFormalList *) {}
+ virtual void endVisit(UiFormal *) {}
+
+ // QDeclarativeJS
+ virtual bool visit(ThisExpression *) { return true; }
+ virtual void endVisit(ThisExpression *) {}
+
+ virtual bool visit(IdentifierExpression *) { return true; }
+ virtual void endVisit(IdentifierExpression *) {}
+
+ virtual bool visit(NullExpression *) { return true; }
+ virtual void endVisit(NullExpression *) {}
+
+ virtual bool visit(TrueLiteral *) { return true; }
+ virtual void endVisit(TrueLiteral *) {}
+
+ virtual bool visit(FalseLiteral *) { return true; }
+ virtual void endVisit(FalseLiteral *) {}
+
+ virtual bool visit(StringLiteral *) { return true; }
+ virtual void endVisit(StringLiteral *) {}
+
+ virtual bool visit(NumericLiteral *) { return true; }
+ virtual void endVisit(NumericLiteral *) {}
+
+ virtual bool visit(RegExpLiteral *) { return true; }
+ virtual void endVisit(RegExpLiteral *) {}
+
+ virtual bool visit(ArrayLiteral *) { return true; }
+ virtual void endVisit(ArrayLiteral *) {}
+
+ virtual bool visit(ObjectLiteral *) { return true; }
+ virtual void endVisit(ObjectLiteral *) {}
+
+ virtual bool visit(ElementList *) { return true; }
+ virtual void endVisit(ElementList *) {}
+
+ virtual bool visit(Elision *) { return true; }
+ virtual void endVisit(Elision *) {}
+
+ virtual bool visit(PropertyNameAndValueList *) { return true; }
+ virtual void endVisit(PropertyNameAndValueList *) {}
+
+ virtual bool visit(NestedExpression *) { return true; }
+ virtual void endVisit(NestedExpression *) {}
+
+ virtual bool visit(IdentifierPropertyName *) { return true; }
+ virtual void endVisit(IdentifierPropertyName *) {}
+
+ virtual bool visit(StringLiteralPropertyName *) { return true; }
+ virtual void endVisit(StringLiteralPropertyName *) {}
+
+ virtual bool visit(NumericLiteralPropertyName *) { return true; }
+ virtual void endVisit(NumericLiteralPropertyName *) {}
+
+ virtual bool visit(ArrayMemberExpression *) { return true; }
+ virtual void endVisit(ArrayMemberExpression *) {}
+
+ virtual bool visit(FieldMemberExpression *) { return true; }
+ virtual void endVisit(FieldMemberExpression *) {}
+
+ virtual bool visit(NewMemberExpression *) { return true; }
+ virtual void endVisit(NewMemberExpression *) {}
+
+ virtual bool visit(NewExpression *) { return true; }
+ virtual void endVisit(NewExpression *) {}
+
+ virtual bool visit(CallExpression *) { return true; }
+ virtual void endVisit(CallExpression *) {}
+
+ virtual bool visit(ArgumentList *) { return true; }
+ virtual void endVisit(ArgumentList *) {}
+
+ virtual bool visit(PostIncrementExpression *) { return true; }
+ virtual void endVisit(PostIncrementExpression *) {}
+
+ virtual bool visit(PostDecrementExpression *) { return true; }
+ virtual void endVisit(PostDecrementExpression *) {}
+
+ virtual bool visit(DeleteExpression *) { return true; }
+ virtual void endVisit(DeleteExpression *) {}
+
+ virtual bool visit(VoidExpression *) { return true; }
+ virtual void endVisit(VoidExpression *) {}
+
+ virtual bool visit(TypeOfExpression *) { return true; }
+ virtual void endVisit(TypeOfExpression *) {}
+
+ virtual bool visit(PreIncrementExpression *) { return true; }
+ virtual void endVisit(PreIncrementExpression *) {}
+
+ virtual bool visit(PreDecrementExpression *) { return true; }
+ virtual void endVisit(PreDecrementExpression *) {}
+
+ virtual bool visit(UnaryPlusExpression *) { return true; }
+ virtual void endVisit(UnaryPlusExpression *) {}
+
+ virtual bool visit(UnaryMinusExpression *) { return true; }
+ virtual void endVisit(UnaryMinusExpression *) {}
+
+ virtual bool visit(TildeExpression *) { return true; }
+ virtual void endVisit(TildeExpression *) {}
+
+ virtual bool visit(NotExpression *) { return true; }
+ virtual void endVisit(NotExpression *) {}
+
+ virtual bool visit(BinaryExpression *) { return true; }
+ virtual void endVisit(BinaryExpression *) {}
+
+ virtual bool visit(ConditionalExpression *) { return true; }
+ virtual void endVisit(ConditionalExpression *) {}
+
+ virtual bool visit(Expression *) { return true; }
+ virtual void endVisit(Expression *) {}
+
+ virtual bool visit(Block *) { return true; }
+ virtual void endVisit(Block *) {}
+
+ virtual bool visit(StatementList *) { return true; }
+ virtual void endVisit(StatementList *) {}
+
+ virtual bool visit(VariableStatement *) { return true; }
+ virtual void endVisit(VariableStatement *) {}
+
+ virtual bool visit(VariableDeclarationList *) { return true; }
+ virtual void endVisit(VariableDeclarationList *) {}
+
+ virtual bool visit(VariableDeclaration *) { return true; }
+ virtual void endVisit(VariableDeclaration *) {}
+
+ virtual bool visit(EmptyStatement *) { return true; }
+ virtual void endVisit(EmptyStatement *) {}
+
+ virtual bool visit(ExpressionStatement *) { return true; }
+ virtual void endVisit(ExpressionStatement *) {}
+
+ virtual bool visit(IfStatement *) { return true; }
+ virtual void endVisit(IfStatement *) {}
+
+ virtual bool visit(DoWhileStatement *) { return true; }
+ virtual void endVisit(DoWhileStatement *) {}
+
+ virtual bool visit(WhileStatement *) { return true; }
+ virtual void endVisit(WhileStatement *) {}
+
+ virtual bool visit(ForStatement *) { return true; }
+ virtual void endVisit(ForStatement *) {}
+
+ virtual bool visit(LocalForStatement *) { return true; }
+ virtual void endVisit(LocalForStatement *) {}
+
+ virtual bool visit(ForEachStatement *) { return true; }
+ virtual void endVisit(ForEachStatement *) {}
+
+ virtual bool visit(LocalForEachStatement *) { return true; }
+ virtual void endVisit(LocalForEachStatement *) {}
+
+ virtual bool visit(ContinueStatement *) { return true; }
+ virtual void endVisit(ContinueStatement *) {}
+
+ virtual bool visit(BreakStatement *) { return true; }
+ virtual void endVisit(BreakStatement *) {}
+
+ virtual bool visit(ReturnStatement *) { return true; }
+ virtual void endVisit(ReturnStatement *) {}
+
+ virtual bool visit(WithStatement *) { return true; }
+ virtual void endVisit(WithStatement *) {}
+
+ virtual bool visit(SwitchStatement *) { return true; }
+ virtual void endVisit(SwitchStatement *) {}
+
+ virtual bool visit(CaseBlock *) { return true; }
+ virtual void endVisit(CaseBlock *) {}
+
+ virtual bool visit(CaseClauses *) { return true; }
+ virtual void endVisit(CaseClauses *) {}
+
+ virtual bool visit(CaseClause *) { return true; }
+ virtual void endVisit(CaseClause *) {}
+
+ virtual bool visit(DefaultClause *) { return true; }
+ virtual void endVisit(DefaultClause *) {}
+
+ virtual bool visit(LabelledStatement *) { return true; }
+ virtual void endVisit(LabelledStatement *) {}
+
+ virtual bool visit(ThrowStatement *) { return true; }
+ virtual void endVisit(ThrowStatement *) {}
+
+ virtual bool visit(TryStatement *) { return true; }
+ virtual void endVisit(TryStatement *) {}
+
+ virtual bool visit(Catch *) { return true; }
+ virtual void endVisit(Catch *) {}
+
+ virtual bool visit(Finally *) { return true; }
+ virtual void endVisit(Finally *) {}
+
+ virtual bool visit(FunctionDeclaration *) { return true; }
+ virtual void endVisit(FunctionDeclaration *) {}
+
+ virtual bool visit(FunctionExpression *) { return true; }
+ virtual void endVisit(FunctionExpression *) {}
+
+ virtual bool visit(FormalParameterList *) { return true; }
+ virtual void endVisit(FormalParameterList *) {}
+
+ virtual bool visit(FunctionBody *) { return true; }
+ virtual void endVisit(FunctionBody *) {}
+
+ virtual bool visit(Program *) { return true; }
+ virtual void endVisit(Program *) {}
+
+ virtual bool visit(SourceElements *) { return true; }
+ virtual void endVisit(SourceElements *) {}
+
+ virtual bool visit(FunctionSourceElement *) { return true; }
+ virtual void endVisit(FunctionSourceElement *) {}
+
+ virtual bool visit(StatementSourceElement *) { return true; }
+ virtual void endVisit(StatementSourceElement *) {}
+
+ virtual bool visit(DebuggerStatement *) { return true; }
+ virtual void endVisit(DebuggerStatement *) {}
+};
+
+} } // namespace AST
+
+QT_QML_END_NAMESPACE
+
+#endif // QDECLARATIVEJSASTVISITOR_P_H
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.cpp b/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.cpp
new file mode 100644
index 0000000000..4d135c2c54
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#include "qdeclarativejsengine_p.h"
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsnodepool_p.h"
+
+#include <qnumeric.h>
+#include <QHash>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+uint qHash(const QDeclarativeJS::NameId &id)
+{ return qHash(id.asString()); }
+
+QString numberToString(double value)
+{ return QString::number(value); }
+
+int Ecma::RegExp::flagFromChar(const QChar &ch)
+{
+ static QHash<QChar, int> flagsHash;
+ if (flagsHash.isEmpty()) {
+ flagsHash[QLatin1Char('g')] = Global;
+ flagsHash[QLatin1Char('i')] = IgnoreCase;
+ flagsHash[QLatin1Char('m')] = Multiline;
+ }
+ QHash<QChar, int>::const_iterator it;
+ it = flagsHash.constFind(ch);
+ if (it == flagsHash.constEnd())
+ return 0;
+ return it.value();
+}
+
+QString Ecma::RegExp::flagsToString(int flags)
+{
+ QString result;
+ if (flags & Global)
+ result += QLatin1Char('g');
+ if (flags & IgnoreCase)
+ result += QLatin1Char('i');
+ if (flags & Multiline)
+ result += QLatin1Char('m');
+ return result;
+}
+
+NodePool::NodePool(const QString &fileName, Engine *engine)
+ : m_fileName(fileName), m_engine(engine)
+{
+ m_engine->setNodePool(this);
+}
+
+NodePool::~NodePool()
+{
+}
+
+Code *NodePool::createCompiledCode(AST::Node *, CompilationUnit &)
+{
+ Q_ASSERT(0);
+ return 0;
+}
+
+static int toDigit(char c)
+{
+ if ((c >= '0') && (c <= '9'))
+ return c - '0';
+ else if ((c >= 'a') && (c <= 'z'))
+ return 10 + c - 'a';
+ else if ((c >= 'A') && (c <= 'Z'))
+ return 10 + c - 'A';
+ return -1;
+}
+
+double integerFromString(const char *buf, int size, int radix)
+{
+ if (size == 0)
+ return qSNaN();
+
+ double sign = 1.0;
+ int i = 0;
+ if (buf[0] == '+') {
+ ++i;
+ } else if (buf[0] == '-') {
+ sign = -1.0;
+ ++i;
+ }
+
+ if (((size-i) >= 2) && (buf[i] == '0')) {
+ if (((buf[i+1] == 'x') || (buf[i+1] == 'X'))
+ && (radix < 34)) {
+ if ((radix != 0) && (radix != 16))
+ return 0;
+ radix = 16;
+ i += 2;
+ } else {
+ if (radix == 0) {
+ radix = 8;
+ ++i;
+ }
+ }
+ } else if (radix == 0) {
+ radix = 10;
+ }
+
+ int j = i;
+ for ( ; i < size; ++i) {
+ int d = toDigit(buf[i]);
+ if ((d == -1) || (d >= radix))
+ break;
+ }
+ double result;
+ if (j == i) {
+ if (!qstrcmp(buf, "Infinity"))
+ result = qInf();
+ else
+ result = qSNaN();
+ } else {
+ result = 0;
+ double multiplier = 1;
+ for (--i ; i >= j; --i, multiplier *= radix)
+ result += toDigit(buf[i]) * multiplier;
+ }
+ result *= sign;
+ return result;
+}
+
+double integerFromString(const QString &str, int radix)
+{
+ QByteArray ba = str.trimmed().toLatin1();
+ return integerFromString(ba.constData(), ba.size(), radix);
+}
+
+
+Engine::Engine()
+ : _lexer(0), _nodePool(0)
+{ }
+
+Engine::~Engine()
+{ }
+
+QSet<NameId> Engine::literals() const
+{ return _literals; }
+
+void Engine::addComment(int pos, int len, int line, int col)
+{ if (len > 0) _comments.append(QDeclarativeJS::AST::SourceLocation(pos, len, line, col)); }
+
+QList<QDeclarativeJS::AST::SourceLocation> Engine::comments() const
+{ return _comments; }
+
+NameId *Engine::intern(const QChar *u, int s)
+{ return const_cast<NameId *>(&*_literals.insert(NameId(u, s))); }
+
+QString Engine::toString(NameId *id)
+{ return id->asString(); }
+
+Lexer *Engine::lexer() const
+{ return _lexer; }
+
+void Engine::setLexer(Lexer *lexer)
+{ _lexer = lexer; }
+
+NodePool *Engine::nodePool() const
+{ return _nodePool; }
+
+void Engine::setNodePool(NodePool *nodePool)
+{ _nodePool = nodePool; }
+
+
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.h
new file mode 100644
index 0000000000..c6126ea600
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsengine_p.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSENGINE_P_H
+#define QDECLARATIVEJSENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsastfwd_p.h"
+
+#include <QString>
+#include <QSet>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+class QML_PARSER_EXPORT NameId
+{
+ QString _text;
+
+public:
+ NameId(const QChar *u, int s)
+ : _text(u, s)
+ { }
+
+ const QString asString() const
+ { return _text; }
+
+ bool operator == (const NameId &other) const
+ { return _text == other._text; }
+
+ bool operator != (const NameId &other) const
+ { return _text != other._text; }
+
+ bool operator < (const NameId &other) const
+ { return _text < other._text; }
+};
+
+uint qHash(const QDeclarativeJS::NameId &id);
+
+} // end of namespace QDeclarativeJS
+
+#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
+//this ensures that code outside QDeclarativeJS can use the hash function
+//it also a workaround for some compilers
+inline uint qHash(const QDeclarativeJS::NameId &nameId) { return QDeclarativeJS::qHash(nameId); }
+#endif
+
+namespace QDeclarativeJS {
+
+class Lexer;
+class NodePool;
+
+namespace Ecma {
+
+class QML_PARSER_EXPORT RegExp
+{
+public:
+ enum RegExpFlag {
+ Global = 0x01,
+ IgnoreCase = 0x02,
+ Multiline = 0x04
+ };
+
+public:
+ static int flagFromChar(const QChar &);
+ static QString flagsToString(int flags);
+};
+
+} // end of namespace Ecma
+
+class QML_PARSER_EXPORT DiagnosticMessage
+{
+public:
+ enum Kind { Warning, Error };
+
+ DiagnosticMessage()
+ : kind(Error) {}
+
+ DiagnosticMessage(Kind kind, const AST::SourceLocation &loc, const QString &message)
+ : kind(kind), loc(loc), message(message) {}
+
+ bool isWarning() const
+ { return kind == Warning; }
+
+ bool isError() const
+ { return kind == Error; }
+
+ Kind kind;
+ AST::SourceLocation loc;
+ QString message;
+};
+
+class QML_PARSER_EXPORT Engine
+{
+ Lexer *_lexer;
+ NodePool *_nodePool;
+ QSet<NameId> _literals;
+ QList<QDeclarativeJS::AST::SourceLocation> _comments;
+
+public:
+ Engine();
+ ~Engine();
+
+ QSet<NameId> literals() const;
+
+ void addComment(int pos, int len, int line, int col);
+ QList<QDeclarativeJS::AST::SourceLocation> comments() const;
+
+ NameId *intern(const QChar *u, int s);
+
+ static QString toString(NameId *id);
+
+ Lexer *lexer() const;
+ void setLexer(Lexer *lexer);
+
+ NodePool *nodePool() const;
+ void setNodePool(NodePool *nodePool);
+};
+
+} // end of namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif // QDECLARATIVEJSENGINE_P_H
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsglobal_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsglobal_p.h
new file mode 100644
index 0000000000..776937cfdf
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsglobal_p.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+#ifndef QDECLARATIVEJSGLOBAL_P_H
+#define QDECLARATIVEJSGLOBAL_P_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef QT_CREATOR
+# define QT_QML_BEGIN_NAMESPACE
+# define QT_QML_END_NAMESPACE
+
+# ifdef QDECLARATIVEJS_BUILD_DIR
+# define QML_PARSER_EXPORT Q_DECL_EXPORT
+# elif QML_BUILD_STATIC_LIB
+# define QML_PARSER_EXPORT
+# else
+# define QML_PARSER_EXPORT Q_DECL_IMPORT
+# endif // QDECLARATIVEJS_BUILD_DIR
+
+#else // !QT_CREATOR
+# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
+# define QT_QML_END_NAMESPACE QT_END_NAMESPACE
+# define QML_PARSER_EXPORT
+#endif // QT_CREATOR
+
+#endif // QDECLARATIVEJSGLOBAL_P_H
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsgrammar.cpp b/tools/qdoc3/declarativeparser/qdeclarativejsgrammar.cpp
new file mode 100644
index 0000000000..ea19e1ccd5
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsgrammar.cpp
@@ -0,0 +1,989 @@
+/****************************************************************************
+**
+** 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 QtCore module 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$
+**
+****************************************************************************/
+
+// This file was generated by qlalr - DO NOT EDIT!
+#include "qdeclarativejsgrammar_p.h"
+
+QT_BEGIN_NAMESPACE
+
+const char *const QDeclarativeJSGrammar::spell [] = {
+ "end of file", "&", "&&", "&=", "break", "case", "catch", ":", ";", "continue",
+ "default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===",
+ "finally", "for", "function", ">=", ">", ">>", ">>=", ">>>", ">>>=", "identifier",
+ "if", "in", "instanceof", "{", "[", "<=", "(", "<", "<<", "<<=",
+ "-", "-=", "--", "new", "!", "!=", "!==", "numeric literal", "|", "|=",
+ "||", "+", "+=", "++", "?", "}", "]", "%", "%=", "return",
+ ")", ";", 0, "*", "*=", "string literal", "property", "signal", "readonly", "switch",
+ "this", "throw", "~", "try", "typeof", "var", "void", "while", "with", "^",
+ "^=", "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "comment", "public",
+ "import", "as", "on", 0, 0, 0, 0, 0, 0, 0,
+ 0};
+
+const short QDeclarativeJSGrammar::lhs [] = {
+ 101, 101, 101, 101, 101, 101, 102, 108, 108, 111,
+ 111, 113, 112, 112, 112, 112, 112, 112, 112, 112,
+ 115, 110, 109, 118, 118, 119, 119, 120, 120, 117,
+ 106, 106, 106, 106, 106, 106, 106, 106, 126, 126,
+ 126, 127, 127, 128, 128, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 116, 116, 116, 116, 116,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 121, 133,
+ 133, 133, 133, 132, 132, 135, 135, 137, 137, 137,
+ 137, 137, 137, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 139, 139, 114, 114, 114, 114,
+ 114, 142, 142, 143, 143, 143, 143, 141, 141, 144,
+ 144, 145, 145, 146, 146, 146, 147, 147, 147, 147,
+ 147, 147, 147, 147, 147, 147, 148, 148, 148, 148,
+ 149, 149, 149, 150, 150, 150, 150, 151, 151, 151,
+ 151, 151, 151, 151, 152, 152, 152, 152, 152, 152,
+ 153, 153, 153, 153, 153, 154, 154, 154, 154, 154,
+ 155, 155, 156, 156, 157, 157, 158, 158, 159, 159,
+ 160, 160, 161, 161, 162, 162, 163, 163, 164, 164,
+ 165, 165, 166, 166, 136, 136, 167, 167, 168, 168,
+ 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
+ 104, 104, 169, 169, 170, 170, 171, 171, 103, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
+ 103, 103, 103, 122, 183, 183, 182, 182, 130, 130,
+ 184, 184, 185, 185, 187, 187, 186, 188, 191, 189,
+ 189, 192, 190, 190, 123, 124, 124, 125, 125, 172,
+ 172, 172, 172, 172, 172, 172, 173, 173, 173, 173,
+ 174, 174, 174, 174, 175, 175, 176, 178, 193, 193,
+ 196, 196, 194, 194, 197, 195, 177, 177, 177, 179,
+ 179, 180, 180, 180, 198, 199, 181, 181, 129, 140,
+ 203, 203, 200, 200, 201, 201, 204, 107, 205, 205,
+ 105, 105, 202, 202, 134, 134, 206};
+
+const short QDeclarativeJSGrammar::rhs [] = {
+ 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
+ 2, 1, 2, 2, 3, 3, 5, 5, 4, 4,
+ 2, 0, 1, 1, 2, 1, 3, 2, 3, 2,
+ 1, 5, 4, 4, 3, 3, 3, 3, 1, 1,
+ 1, 0, 1, 2, 4, 6, 6, 3, 3, 7,
+ 7, 4, 4, 5, 5, 6, 6, 7, 7, 7,
+ 7, 10, 6, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 3, 3, 4, 5, 3, 4, 3, 1, 1,
+ 2, 3, 4, 1, 2, 3, 5, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 4, 3,
+ 5, 1, 2, 4, 4, 4, 3, 0, 1, 1,
+ 3, 1, 1, 1, 2, 2, 1, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 3, 3, 3,
+ 1, 3, 3, 1, 3, 3, 3, 1, 3, 3,
+ 3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
+ 1, 3, 3, 3, 3, 1, 3, 3, 3, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 1, 5, 1, 5, 1, 3, 1, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 2, 0, 1, 3, 3,
+ 1, 1, 1, 3, 1, 3, 2, 2, 2, 0,
+ 1, 2, 0, 1, 1, 2, 2, 7, 5, 7,
+ 7, 5, 9, 10, 7, 8, 2, 2, 3, 3,
+ 2, 2, 3, 3, 3, 3, 5, 5, 3, 5,
+ 1, 2, 0, 1, 4, 3, 3, 3, 3, 3,
+ 3, 3, 3, 4, 5, 2, 2, 2, 8, 8,
+ 1, 3, 0, 1, 0, 1, 1, 1, 1, 2,
+ 1, 1, 0, 1, 0, 1, 2};
+
+const short QDeclarativeJSGrammar::action_default [] = {
+ 0, 0, 0, 0, 0, 0, 22, 0, 174, 241,
+ 205, 213, 209, 153, 225, 201, 3, 138, 72, 154,
+ 217, 221, 142, 171, 152, 157, 137, 191, 178, 0,
+ 79, 80, 75, 343, 66, 345, 0, 0, 0, 0,
+ 77, 0, 0, 73, 76, 70, 0, 0, 67, 69,
+ 68, 78, 71, 0, 74, 0, 0, 167, 0, 0,
+ 154, 173, 156, 155, 0, 0, 0, 169, 170, 168,
+ 172, 0, 202, 0, 0, 0, 0, 192, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 176, 177,
+ 175, 180, 184, 183, 181, 179, 194, 193, 195, 0,
+ 210, 0, 206, 0, 0, 148, 135, 147, 136, 104,
+ 105, 106, 131, 107, 132, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 133, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 134,
+ 0, 0, 146, 242, 149, 0, 150, 0, 151, 145,
+ 0, 238, 231, 229, 236, 237, 235, 234, 240, 233,
+ 232, 230, 239, 226, 0, 214, 0, 0, 218, 0,
+ 0, 222, 0, 0, 148, 140, 0, 139, 0, 144,
+ 158, 0, 344, 333, 334, 0, 331, 0, 332, 0,
+ 335, 249, 256, 255, 263, 251, 0, 252, 336, 0,
+ 342, 253, 254, 259, 257, 339, 337, 341, 260, 0,
+ 271, 0, 0, 0, 0, 343, 66, 0, 345, 67,
+ 243, 285, 68, 0, 0, 0, 272, 0, 0, 261,
+ 262, 0, 250, 258, 286, 287, 330, 340, 0, 301,
+ 302, 303, 304, 0, 297, 298, 299, 300, 327, 328,
+ 0, 0, 0, 0, 0, 290, 291, 247, 245, 207,
+ 215, 211, 227, 203, 248, 0, 154, 219, 223, 196,
+ 185, 0, 0, 204, 0, 0, 0, 0, 197, 0,
+ 0, 0, 0, 0, 189, 187, 190, 188, 186, 199,
+ 198, 200, 0, 212, 0, 208, 0, 246, 154, 0,
+ 228, 243, 244, 0, 243, 0, 0, 293, 0, 0,
+ 0, 295, 0, 216, 0, 0, 220, 0, 0, 224,
+ 283, 0, 275, 284, 278, 0, 282, 0, 243, 276,
+ 0, 243, 0, 0, 294, 0, 0, 0, 296, 344,
+ 333, 0, 0, 335, 0, 329, 0, 319, 0, 0,
+ 0, 289, 0, 288, 0, 346, 0, 103, 265, 268,
+ 0, 104, 271, 107, 132, 109, 110, 75, 114, 115,
+ 66, 116, 119, 73, 76, 67, 243, 68, 78, 122,
+ 71, 124, 74, 126, 127, 272, 129, 130, 134, 0,
+ 96, 0, 0, 98, 102, 100, 87, 99, 101, 0,
+ 97, 86, 266, 264, 142, 143, 148, 0, 141, 0,
+ 318, 0, 305, 306, 0, 317, 0, 0, 0, 308,
+ 313, 311, 314, 0, 0, 312, 313, 0, 309, 0,
+ 310, 267, 316, 0, 267, 315, 0, 320, 321, 0,
+ 267, 322, 323, 0, 0, 324, 0, 0, 0, 325,
+ 326, 160, 159, 0, 0, 0, 292, 0, 0, 0,
+ 307, 280, 273, 0, 281, 277, 0, 279, 269, 0,
+ 270, 274, 90, 0, 0, 94, 81, 0, 83, 92,
+ 0, 84, 93, 95, 85, 91, 82, 0, 88, 164,
+ 162, 166, 163, 161, 165, 6, 338, 4, 2, 64,
+ 89, 0, 0, 67, 69, 68, 31, 5, 0, 65,
+ 0, 41, 40, 39, 0, 0, 54, 0, 55, 0,
+ 60, 61, 0, 41, 0, 0, 0, 0, 0, 50,
+ 0, 51, 0, 0, 26, 0, 0, 62, 27, 0,
+ 30, 28, 24, 0, 29, 25, 0, 52, 0, 53,
+ 0, 142, 0, 56, 57, 63, 0, 0, 0, 0,
+ 0, 58, 59, 0, 48, 42, 49, 43, 0, 0,
+ 0, 0, 45, 0, 46, 47, 44, 0, 0, 35,
+ 36, 37, 38, 142, 267, 0, 0, 104, 271, 107,
+ 132, 109, 110, 75, 114, 115, 66, 116, 119, 73,
+ 76, 67, 243, 68, 78, 122, 71, 124, 74, 126,
+ 127, 272, 129, 130, 134, 0, 32, 33, 0, 34,
+ 8, 0, 10, 0, 9, 0, 1, 21, 12, 0,
+ 13, 0, 14, 0, 19, 20, 0, 15, 16, 0,
+ 17, 18, 11, 23, 7, 347};
+
+const short QDeclarativeJSGrammar::goto_default [] = {
+ 7, 626, 207, 196, 205, 507, 495, 625, 644, 620,
+ 624, 622, 627, 22, 623, 18, 506, 543, 533, 540,
+ 535, 191, 195, 197, 201, 524, 568, 567, 200, 232,
+ 26, 474, 473, 356, 355, 9, 354, 357, 107, 17,
+ 145, 24, 13, 144, 19, 25, 57, 23, 8, 28,
+ 27, 269, 15, 263, 10, 259, 12, 261, 11, 260,
+ 20, 267, 21, 268, 14, 262, 258, 299, 411, 264,
+ 265, 202, 193, 192, 204, 233, 203, 208, 229, 230,
+ 194, 360, 359, 231, 463, 462, 321, 322, 465, 324,
+ 464, 323, 419, 423, 426, 422, 421, 441, 442, 185,
+ 199, 181, 184, 198, 206, 0};
+
+const short QDeclarativeJSGrammar::action_index [] = {
+ 421, 1288, 2322, 2322, 2419, 1016, -52, 37, 140, -101,
+ 35, -13, -40, 190, -101, 272, 34, -101, -101, 658,
+ 42, 103, 194, 201, -101, -101, -101, 439, 256, 1288,
+ -101, -101, -101, 282, -101, 2128, 1751, 1288, 1288, 1288,
+ -101, 917, 1288, -101, -101, -101, 1288, 1288, -101, -101,
+ -101, -101, -101, 1288, -101, 1288, 1288, -101, 1288, 1288,
+ 109, 245, -101, -101, 1288, 1288, 1288, -101, -101, -101,
+ 185, 1288, 295, 1288, 1288, 1288, 1288, 461, 1288, 1288,
+ 1288, 1288, 1288, 1288, 256, 1288, 1288, 1288, 155, 119,
+ 114, 176, 256, 332, 202, 332, 560, 560, 471, 1288,
+ -23, 1288, 53, 2031, 1288, 1288, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ 100, 1288, -101, -101, 70, 59, -101, 1288, -101, -101,
+ 1288, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, -101, 1288, 41, 1288, 1288, 98, 91,
+ 1288, -101, 2031, 1288, 1288, -101, 121, -101, 73, -101,
+ -101, 39, -101, 385, 180, 78, -101, 391, -101, 64,
+ 2322, -101, -101, -101, -101, -101, 208, -101, -101, 82,
+ -101, -101, -101, -101, -101, -101, 2322, -101, -101, 538,
+ -101, 495, 128, 2419, 54, 358, 62, 44, 2613, 67,
+ 1288, -101, 76, 63, 1288, 58, -101, 60, 46, -101,
+ -101, 309, -101, -101, -101, -101, -101, -101, 86, -101,
+ -101, -101, -101, 107, -101, -101, -101, -101, -101, -101,
+ 28, 52, 1288, 101, 102, -101, -101, 1472, -101, 83,
+ 75, 79, -101, 287, 84, 80, 585, 69, 89, 321,
+ 177, 482, 1288, 297, 1288, 1288, 1288, 1288, 331, 1288,
+ 1288, 1288, 1288, 1288, 332, 222, 332, 332, 332, 410,
+ 410, 410, 1288, 57, 1288, 72, 1288, -101, 658, 1288,
+ -101, 1288, 71, 45, 1288, 61, 2419, -101, 1288, 132,
+ 2419, -101, 1288, 47, 1288, 1288, 66, 65, 1288, -101,
+ 68, 112, 81, -101, -101, 1288, -101, 369, 1288, -101,
+ 85, 1288, 74, 2419, -101, 1288, 122, 2419, -101, 77,
+ 294, 16, -29, 2322, -53, -101, 2419, -101, 1288, 127,
+ 2419, -15, 2419, -101, 10, 11, -34, -101, -101, 2419,
+ -48, 504, 4, 476, 113, 1288, 2419, 2, -28, 420,
+ 6, -21, 719, 7, 87, -101, 1382, -101, -4, -16,
+ 5, 1288, 3, -27, 1288, 9, 1288, -18, -31, 1288,
+ -101, 2225, -7, -101, -101, -101, -101, -101, -101, 1288,
+ -101, -101, -101, -101, 246, -101, 1288, -38, -101, 2419,
+ -101, 88, -101, -101, 2419, -101, 1288, 106, 26, -101,
+ 55, -101, 50, 105, 1288, -101, 48, 38, -101, -8,
+ -101, 2419, -101, 94, 2419, -101, 238, -101, -101, 104,
+ 2419, 31, -101, 21, 19, -101, 305, 1, 30, -101,
+ -101, -101, -101, 1288, 136, 2419, -101, 1288, 134, 2419,
+ -101, 49, -101, 173, -101, -101, 1288, -101, -101, 363,
+ -101, -101, -101, 137, 1565, -101, -101, 1658, -101, -101,
+ 1844, -101, -101, -101, -101, -101, -101, 95, -101, -101,
+ -101, -101, -101, -101, -101, -101, 2322, -101, -101, -101,
+ 92, 15, 925, 169, 27, -6, -101, -101, 212, -101,
+ 191, -101, -101, -101, 323, 211, -101, 1288, -101, 214,
+ -101, -101, 216, 40, 317, 210, 43, 259, 236, -101,
+ 36, -101, 747, 96, -101, 29, 747, -101, -101, 1198,
+ -101, -101, -101, 1107, -101, -101, 231, -101, 1288, -101,
+ 217, 286, 32, -101, -101, -101, 188, 340, 51, 1288,
+ 175, -101, -101, 171, -101, 179, -101, 56, -11, 351,
+ 181, 336, -101, 110, -101, -101, -101, 1934, 647, -101,
+ -101, -101, -101, 253, 2516, 1751, -5, 460, 22, 468,
+ 138, 1288, 2419, 24, -2, 412, 23, -3, 836, 20,
+ 87, -101, 1382, -101, 17, -10, 18, 1288, 25, 8,
+ 1288, 33, 1288, 12, 14, 120, -101, -101, 13, -101,
+ -101, 747, -101, 248, -47, 828, -101, -101, 152, 482,
+ -101, 150, -101, 123, -101, -101, 398, -101, -101, 117,
+ -101, -101, -101, -101, -101, -101,
+
+ -106, 6, -92, 10, 5, 278, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -42,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, 109,
+ -106, -106, -106, -10, -106, -106, -35, 24, 73, 90,
+ -106, 219, 181, -106, -106, -106, 171, 120, -106, -106,
+ -106, -106, -106, 174, -106, 170, 167, -106, 175, 163,
+ -106, -106, -106, -106, 184, 177, 180, -106, -106, -106,
+ -106, 125, -106, 132, 134, 162, 130, -106, 121, 124,
+ 123, 141, 142, 152, -106, 154, 161, 160, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, 139,
+ -106, 143, -106, 156, 91, 55, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, 32, -106, -106, -106, -106, -106, 33, -106, -106,
+ 26, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, 96, -106, 119, 52, -106, -106,
+ 66, -106, 220, 69, 71, -106, -106, -106, -106, -106,
+ -106, -106, -106, 25, -106, -106, -106, 64, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 70, -106, -106, 61,
+ -106, 41, -106, 39, -106, 37, -106, -106, 42, -106,
+ 79, -106, -106, -106, 81, 72, -106, -106, -106, -106,
+ -106, -5, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, 21, -106, -106, -106, -106, 112, -106, -106,
+ -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, 17, 237, -106, 192, 236, 224, 225, -106, 97,
+ 98, 101, 99, 113, -106, -106, -106, -106, -106, -106,
+ -106, -106, 204, -106, 223, -106, 235, -106, -106, 239,
+ -106, 197, -106, -106, 228, -106, 27, -106, 13, -106,
+ 2, -106, 233, -106, 190, 198, -106, -106, 196, -106,
+ -106, -106, -106, -106, -106, 200, -106, 107, 135, -106,
+ -106, 186, -106, 84, -106, 80, -106, 76, -106, -106,
+ 89, -106, -106, -49, -106, -106, 47, -106, 40, -106,
+ 44, -106, 68, -106, -106, -106, -106, -106, -106, 53,
+ -106, 35, -106, 49, -106, 87, 63, -106, -106, 30,
+ -106, -106, 103, -106, -106, -106, 51, -106, -106, -106,
+ -106, 86, -106, 67, 114, -106, 74, -106, -106, 65,
+ -106, 56, -106, -106, -106, -106, -106, -106, -106, 62,
+ -106, -106, -106, -106, -106, -106, 95, -106, -106, 78,
+ -106, -106, -106, -106, 75, -106, 88, -106, -106, -106,
+ -106, -106, -54, -106, 45, -106, -40, -106, -106, -106,
+ -106, 94, -106, -106, 100, -106, -106, -106, -106, -106,
+ 150, -41, -106, -106, 54, -106, 43, -106, 48, -106,
+ -106, -106, -106, 59, -106, 57, -106, 60, -106, 58,
+ -106, -106, -106, -106, -106, -106, 38, -106, -106, 144,
+ -106, -106, -106, -106, 31, -106, -106, 202, -106, -106,
+ 50, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106, 77, -106, -106, -106,
+ -106, -106, 82, -106, -106, -106, -106, -106, -106, -106,
+ -17, -106, -106, -106, -4, -106, -106, 12, -106, -106,
+ -106, -106, -106, -106, -14, 46, -106, -13, -106, -106,
+ -106, -106, 108, -106, -106, -106, 243, -106, -106, 295,
+ -106, -106, -106, 290, -106, -106, -106, -106, 346, -106,
+ -106, -106, 16, -106, -106, -106, 22, 23, -106, 34,
+ -106, -106, -106, -106, -106, 11, -106, -106, -106, 7,
+ 1, 8, -106, -106, -106, -106, -106, 307, 179, -106,
+ -106, -106, -106, -106, 18, 281, 9, 15, -106, 4,
+ -106, 83, 29, -106, -106, -2, -106, -106, 85, -106,
+ -106, -106, 3, -106, -106, -106, -106, 14, -106, 0,
+ 105, -106, 93, -106, -106, -106, -106, -106, -1, -106,
+ -106, 20, -106, -106, 28, 92, -106, -106, -106, 19,
+ -106, -106, -106, -106, -106, -106, -12, -106, -106, -106,
+ -106, -106, -106, -106, -106, -106};
+
+const short QDeclarativeJSGrammar::action_info [] = {
+ 399, 352, 345, -101, 343, 457, 440, 403, 257, -112,
+ -125, -131, -123, 346, -120, 348, -128, 389, 453, 391,
+ 416, 401, 408, 563, -101, -123, 416, -120, 539, -131,
+ 346, -112, -125, 348, 257, 99, 71, 645, 621, 101,
+ -128, 440, 141, 621, 164, 431, 539, 430, 453, 573,
+ 457, 444, 440, 424, 71, 424, 101, 446, 559, 420,
+ 424, 448, 539, 440, 570, 539, 466, 527, 312, 346,
+ 532, 312, 318, 272, 409, 183, 342, 525, 147, 141,
+ 348, 510, 457, 414, 272, 325, 0, 0, 252, 99,
+ 257, 440, 296, 556, -102, 292, 453, 190, 170, 416,
+ 164, 434, 141, 141, 536, 251, 304, 172, 141, 141,
+ 443, 0, 335, 340, 141, 427, 0, 0, 0, 149,
+ 327, 306, 0, 292, 444, 0, 173, 0, 536, 141,
+ 141, 0, 0, 179, 333, 141, 294, 236, 189, 314,
+ 141, 301, 141, 315, 141, 477, 331, 242, 241, 413,
+ 412, 62, 537, 166, 58, 488, 142, 167, 294, 58,
+ 428, 254, 63, 256, 255, 59, 418, 172, 247, 246,
+ 59, 575, 574, 328, 249, 248, 616, 177, 641, 640,
+ 58, 469, 337, 141, 635, 634, 173, 350, 187, 249,
+ 248, 59, 310, 478, 459, 58, 455, 64, 523, 249,
+ 248, 85, 85, 86, 86, 103, 59, 565, 511, 172,
+ 511, 638, 637, 64, 87, 87, 141, 511, 517, 577,
+ 511, 0, 141, 0, 104, 141, 105, 85, 173, 86,
+ 174, 172, 566, 564, 470, 468, 562, 561, 548, 511,
+ 87, 636, 65, 530, 513, 539, 141, 85, 66, 86,
+ 173, 0, 406, 0, 513, 512, 513, 64, 65, 0,
+ 87, 172, 0, 513, 66, 512, 513, 512, 172, 235,
+ 234, 0, 518, 516, 512, 521, 520, 512, 554, 553,
+ 173, 85, 406, 86, 0, 513, -89, 173, 34, 174,
+ 73, 74, 549, 547, 87, 631, 512, 531, 529, 438,
+ 437, 172, 65, 0, 578, 274, 275, 0, 66, 632,
+ 630, 34, 0, 73, 74, 274, 275, 75, 76, -89,
+ 173, 0, 174, 34, 0, 48, 50, 49, 0, 0,
+ 0, 0, 276, 277, 34, 0, 0, 0, 34, 629,
+ 75, 76, 276, 277, 279, 280, 34, 0, 48, 50,
+ 49, 45, 34, 281, 279, 280, 282, 85, 283, 86,
+ 48, 50, 49, 281, 0, 34, 282, 0, 283, 34,
+ 87, 48, 50, 49, 45, 48, 50, 49, 0, 0,
+ 34, 0, 0, 48, 50, 49, 45, 34, 0, 48,
+ 50, 49, 34, 0, 0, 0, 0, 45, 34, 0,
+ 0, 45, 48, 50, 49, 0, 48, 50, 49, 45,
+ 0, 0, 0, 0, 34, 45, 0, 48, 50, 49,
+ 34, 0, 0, 0, 48, 50, 49, 34, 45, 48,
+ 50, 49, 45, 279, 280, 48, 50, 49, 0, 0,
+ 0, 34, 281, 45, 0, 282, 0, 283, -343, 34,
+ 45, 48, 50, 49, 0, 45, -343, 48, 50, 49,
+ 0, 45, 78, 79, 48, 50, 49, 0, 0, 0,
+ 80, 81, 0, 0, 82, 0, 83, 45, 48, 50,
+ 49, 0, 0, 45, 78, 79, 48, 50, 49, 34,
+ 45, 0, 80, 81, 78, 79, 82, 34, 83, 0,
+ 0, 0, 80, 81, 45, 34, 82, 0, 83, 0,
+ 0, 34, 45, 0, 6, 5, 4, 1, 3, 2,
+ 0, 240, 239, 0, 34, 0, 48, 50, 49, 245,
+ 244, 0, 0, 34, 48, 50, 49, 245, 244, 0,
+ 0, 0, 48, 50, 49, 0, 0, 0, 48, 50,
+ 49, 0, 45, 0, 0, 0, 245, 244, 0, 0,
+ 45, 48, 50, 49, 0, 240, 239, 34, 45, 0,
+ 48, 50, 49, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 78, 79, 0, 0, 45, 151, 0,
+ 0, 80, 81, 0, 0, 82, 45, 83, 152, 240,
+ 239, 0, 153, 0, 48, 50, 49, 0, 0, 0,
+ 0, 154, 0, 155, 0, 0, 308, 0, 0, 0,
+ 0, 0, 0, 0, 156, 0, 157, 62, 0, 0,
+ 45, 0, 0, 0, 158, 0, 0, 159, 63, 0,
+ 0, 0, 0, 160, 0, 0, 0, 0, 0, 161,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,
+ 31, 151, 0, 0, 0, 162, 0, 0, 0, 33,
+ 0, 152, 0, 0, 0, 153, 34, 0, 0, 0,
+ 35, 36, 0, 37, 154, 0, 155, 0, 0, 0,
+ 502, 0, 0, 0, 44, 0, 0, 156, 0, 157,
+ 62, 0, 0, 0, 0, 0, 0, 158, 0, 0,
+ 159, 63, 51, 48, 50, 49, 160, 52, 0, 0,
+ 0, 0, 161, 0, 0, 0, 0, 0, 43, 54,
+ 32, 30, 31, 0, 40, 0, 0, 0, 162, 45,
+ 0, 33, 0, 0, 0, 0, 0, 0, 34, 0,
+ 0, 0, 35, 36, 0, 37, 0, 0, 0, 30,
+ 31, 0, 41, 0, 0, 0, 44, 0, 0, 33,
+ 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
+ 35, 36, 0, 37, 51, 48, 50, 49, 0, 52,
+ 502, 0, 0, 0, 44, 0, 0, 0, 0, 0,
+ 43, 54, 32, 0, 0, 0, 40, 0, 0, 0,
+ 0, 45, 51, 48, 50, 49, 0, 52, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 43, 54,
+ 32, 0, 0, 0, 40, 0, 0, 0, 0, 45,
+ 30, 31, 0, 0, 0, 0, 0, 0, 30, 31,
+ 33, 0, 0, 0, 0, 0, 0, 34, 33, 0,
+ 0, 35, 36, 0, 37, 34, 0, 0, 0, 35,
+ 36, 502, 37, 0, 0, 44, 0, 0, 0, 41,
+ 0, 0, 0, 44, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 48, 50, 49, 0, 52, 0,
+ 0, 51, 48, 50, 49, 0, 52, 0, 0, 43,
+ 54, 32, 0, 0, 0, 40, 0, 43, 54, 32,
+ 45, 0, 0, 40, 0, 0, 0, 0, 45, 30,
+ 31, 0, 0, 0, 0, 0, 0, 30, 31, 33,
+ 0, 0, 0, 0, 0, 0, 34, 33, 0, 0,
+ 35, 36, 0, 37, 34, 0, 0, 0, 35, 36,
+ 41, 37, 0, 0, 44, 0, 0, 0, 502, 0,
+ 0, 0, 44, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 48, 50, 49, 0, 52, 0, 0,
+ 51, 48, 50, 49, 0, 52, 0, 0, 43, 54,
+ 32, 0, 0, 0, 40, 0, 43, 54, 32, 45,
+ 0, 0, 40, 0, 0, 0, 0, 45, 0, 0,
+ 0, 0, 0, 0, 0, 0, 501, 0, 30, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 215, 0,
+ 0, 0, 0, 0, 0, 34, 0, 0, 0, 35,
+ 36, 0, 37, 0, 0, 0, 0, 0, 0, 502,
+ 0, 0, 0, 44, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 503, 505, 504, 0, 52, 0, 0, 0,
+ 0, 226, 0, 0, 0, 0, 0, 43, 54, 32,
+ 210, 0, 0, 40, 0, 0, 0, 0, 45, 0,
+ 0, 0, 0, 0, 0, 0, 0, 501, 0, 30,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 215,
+ 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
+ 35, 36, 0, 37, 0, 0, 0, 0, 0, 0,
+ 502, 0, 0, 0, 44, 0, 0, 0, 0, 0,
+ 0, 0, 544, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 503, 505, 504, 0, 52, 0, 0,
+ 0, 0, 226, 0, 0, 0, 0, 0, 43, 54,
+ 32, 210, 0, 0, 40, 0, 0, 0, 0, 45,
+ 0, 0, 0, 0, 0, 0, 0, 0, 501, 0,
+ 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 215, 0, 0, 0, 0, 0, 0, 34, 0, 0,
+ 0, 35, 36, 0, 37, 0, 0, 0, 0, 0,
+ 0, 502, 0, 0, 0, 44, 0, 0, 0, 0,
+ 0, 0, 0, 541, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 503, 505, 504, 0, 52, 0,
+ 0, 0, 0, 226, 0, 0, 0, 0, 0, 43,
+ 54, 32, 210, 0, 0, 40, 0, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0, 29,
+ 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 33, 0, 0, 0, 0, 0, 0, 34, 0, 0,
+ 0, 35, 36, 0, 37, 0, 0, 0, 38, 0,
+ 39, 41, 42, 0, 0, 44, 0, 0, 0, 46,
+ 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 48, 50, 49, 0, 52, 0,
+ 53, 0, 55, 0, 56, 0, 0, 0, 0, 43,
+ 54, 32, 0, 0, 0, 40, 0, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0, -121,
+ 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
+ 0, 34, 0, 0, 0, 35, 36, 0, 37, 0,
+ 0, 0, 38, 0, 39, 41, 42, 0, 0, 44,
+ 0, 0, 0, 46, 0, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 51, 48, 50,
+ 49, 0, 52, 0, 53, 0, 55, 0, 56, 0,
+ 0, 0, 0, 43, 54, 32, 0, 0, 0, 40,
+ 0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 29, 30, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 33, 0, 0, 0, 0, 0,
+ 0, 34, 0, 0, 0, 35, 36, 0, 37, 0,
+ 0, 0, 38, 0, 39, 41, 42, 0, 0, 44,
+ 0, 0, 0, 46, 0, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 51, 48, 50,
+ 49, 0, 52, 0, 53, 0, 55, 271, 56, 0,
+ 0, 0, 0, 43, 54, 32, 0, 0, 0, 40,
+ 0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 483, 0, 0, 29, 30, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
+ 0, 0, 0, 0, 34, 0, 0, 0, 35, 36,
+ 0, 37, 0, 0, 0, 38, 0, 39, 41, 42,
+ 0, 0, 44, 0, 0, 0, 46, 0, 47, 0,
+ 0, 486, 0, 0, 0, 0, 0, 0, 0, 0,
+ 51, 48, 50, 49, 0, 52, 0, 53, 0, 55,
+ 0, 56, 0, 0, 0, 0, 43, 54, 32, 0,
+ 0, 0, 40, 0, 0, 0, 0, 45, 0, 0,
+ 0, 0, 0, 0, 0, 0, 475, 0, 0, 29,
+ 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 33, 0, 0, 0, 0, 0, 0, 34, 0, 0,
+ 0, 35, 36, 0, 37, 0, 0, 0, 38, 0,
+ 39, 41, 42, 0, 0, 44, 0, 0, 0, 46,
+ 0, 47, 0, 0, 481, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 48, 50, 49, 0, 52, 0,
+ 53, 0, 55, 0, 56, 0, 0, 0, 0, 43,
+ 54, 32, 0, 0, 0, 40, 0, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0, 475,
+ 0, 0, 29, 30, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 33, 0, 0, 0, 0, 0, 0,
+ 34, 0, 0, 0, 35, 36, 0, 37, 0, 0,
+ 0, 38, 0, 39, 41, 42, 0, 0, 44, 0,
+ 0, 0, 46, 0, 47, 0, 0, 476, 0, 0,
+ 0, 0, 0, 0, 0, 0, 51, 48, 50, 49,
+ 0, 52, 0, 53, 0, 55, 0, 56, 0, 0,
+ 0, 0, 43, 54, 32, 0, 0, 0, 40, 0,
+ 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
+ 0, 0, 483, 0, 0, 29, 30, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
+ 0, 0, 0, 34, 0, 0, 0, 35, 36, 0,
+ 37, 0, 0, 0, 38, 0, 39, 41, 42, 0,
+ 0, 44, 0, 0, 0, 46, 0, 47, 0, 0,
+ 484, 0, 0, 0, 0, 0, 0, 0, 0, 51,
+ 48, 50, 49, 0, 52, 0, 53, 0, 55, 0,
+ 56, 0, 0, 0, 0, 43, 54, 32, 0, 0,
+ 0, 40, 0, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 29, 30, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
+ 0, 0, 0, 34, 217, 0, 0, 584, 585, 0,
+ 37, 0, 0, 0, 38, 0, 39, 41, 42, 0,
+ 0, 44, 0, 0, 0, 46, 0, 47, 0, 0,
+ 0, 0, 0, 0, 0, 221, 0, 0, 0, 51,
+ 48, 50, 49, 0, 52, 0, 53, 0, 55, 0,
+ 56, 0, 0, 0, 0, 43, 54, 32, 0, 0,
+ 0, 40, 0, 0, 0, 0, 45, 0, 0, 0,
+ 0, 0, 0, 0, 0, 109, 110, 111, 0, 0,
+ 113, 115, 116, 0, 0, 117, 0, 118, 0, 0,
+ 0, 120, 121, 122, 0, 0, 0, 0, 0, 0,
+ 34, 123, 124, 125, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 126, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 129, 0, 0, 0, 0, 0, 0, 48, 50, 49,
+ 130, 131, 132, 0, 134, 135, 136, 137, 138, 139,
+ 0, 0, 127, 133, 119, 112, 114, 128, 0, 0,
+ 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
+ 0, 0, 109, 110, 111, 0, 0, 113, 115, 116,
+ 0, 0, 117, 0, 118, 0, 0, 0, 120, 121,
+ 122, 0, 0, 0, 0, 0, 0, 393, 123, 124,
+ 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 126, 0, 0, 0, 394, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 129, 0, 0,
+ 0, 0, 0, 398, 395, 397, 0, 130, 131, 132,
+ 0, 134, 135, 136, 137, 138, 139, 0, 0, 127,
+ 133, 119, 112, 114, 128, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 109,
+ 110, 111, 0, 0, 113, 115, 116, 0, 0, 117,
+ 0, 118, 0, 0, 0, 120, 121, 122, 0, 0,
+ 0, 0, 0, 0, 393, 123, 124, 125, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 126, 0,
+ 0, 0, 394, 0, 0, 0, 0, 0, 0, 0,
+ 396, 0, 0, 0, 129, 0, 0, 0, 0, 0,
+ 398, 395, 397, 0, 130, 131, 132, 0, 134, 135,
+ 136, 137, 138, 139, 0, 0, 127, 133, 119, 112,
+ 114, 128, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 209, 0, 0, 0,
+ 0, 211, 0, 29, 30, 31, 213, 0, 0, 0,
+ 0, 0, 0, 214, 215, 0, 0, 0, 0, 0,
+ 0, 216, 217, 0, 0, 218, 36, 0, 37, 0,
+ 0, 0, 38, 0, 39, 41, 42, 0, 0, 44,
+ 0, 0, 0, 46, 0, 47, 0, 0, 0, 0,
+ 0, 220, 0, 221, 0, 0, 0, 51, 219, 222,
+ 49, 223, 52, 224, 53, 225, 55, 226, 56, 227,
+ 228, 0, 0, 43, 54, 32, 210, 212, 0, 40,
+ 0, 0, 0, 0, 45, 0, 0, 0, 0, 0,
+ 0, 0, 0, 209, 0, 0, 0, 0, 211, 0,
+ 29, 30, 31, 213, 0, 0, 0, 0, 0, 0,
+ 214, 33, 0, 0, 0, 0, 0, 0, 216, 217,
+ 0, 0, 218, 36, 0, 37, 0, 0, 0, 38,
+ 0, 39, 41, 42, 0, 0, 44, 0, 0, 0,
+ 46, 0, 47, 0, 0, 0, 0, 0, 220, 0,
+ 221, 0, 0, 0, 51, 219, 222, 49, 223, 52,
+ 224, 53, 225, 55, 226, 56, 227, 228, 0, 0,
+ 43, 54, 32, 210, 212, 0, 40, 0, 0, 0,
+ 0, 45, 0, 0, 0, 0, 0, 0, 0, 0,
+ 587, 110, 111, 0, 0, 589, 115, 591, 30, 31,
+ 592, 0, 118, 0, 0, 0, 120, 594, 595, 0,
+ 0, 0, 0, 0, 0, 596, 597, 124, 125, 218,
+ 36, 0, 37, 0, 0, 0, 38, 0, 39, 598,
+ 42, 0, 0, 600, 0, 0, 0, 46, 0, 47,
+ 0, 0, 0, 0, 0, 602, 0, 221, 0, 0,
+ 0, 604, 601, 603, 49, 605, 606, 607, 53, 609,
+ 610, 611, 612, 613, 614, 0, 0, 599, 608, 593,
+ 588, 590, 128, 40, 0, 0, 0, 0, 45, 0,
+ 0, 0, 0, 0, 0, 0, 0, 361, 110, 111,
+ 0, 0, 363, 115, 365, 30, 31, 366, 0, 118,
+ 0, 0, 0, 120, 368, 369, 0, 0, 0, 0,
+ 0, 0, 370, 371, 124, 125, 218, 36, 0, 37,
+ 0, 0, 0, 38, 0, 39, 372, 42, 0, 0,
+ 374, 0, 0, 0, 46, 0, 47, 0, -267, 0,
+ 0, 0, 376, 0, 221, 0, 0, 0, 378, 375,
+ 377, 49, 379, 380, 381, 53, 383, 384, 385, 386,
+ 387, 388, 0, 0, 373, 382, 367, 362, 364, 128,
+ 40, 0, 0, 0, 0, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0,
+
+ 472, 546, 528, 639, 311, 182, 302, 498, 514, 16,
+ 461, 515, 496, 182, 497, 519, 309, 436, 619, 243,
+ 358, 439, 576, 572, 253, 150, 571, 487, 617, 307,
+ 238, 250, 320, 628, 633, 555, 569, 560, 558, 642,
+ 186, 250, 425, 349, 358, 182, 351, 557, 433, 347,
+ 238, 344, 339, 429, 302, 402, 243, 445, 447, 456,
+ 460, 163, 454, 458, 243, 250, 485, 143, 148, 449,
+ 353, 526, 176, 467, 237, 450, 238, 415, 338, 188,
+ 410, 237, 302, 336, 436, 482, 334, 169, 439, 436,
+ 146, 417, 392, 439, 140, 522, 358, 400, 404, 0,
+ 390, 171, 358, 0, 186, 500, 146, 0, 643, 0,
+ 0, 178, 0, 0, 0, 0, 404, 60, 60, 489,
+ 452, 500, 320, 0, 534, 0, 405, 60, 0, 180,
+ 146, 60, 0, 180, 60, 407, 490, 60, 302, 452,
+ 60, 60, 60, 60, 405, 60, 284, 285, 287, 60,
+ 286, 451, 358, 60, 165, 180, 266, 60, 60, 461,
+ 451, 270, 288, 60, 60, 60, 493, 60, 60, 60,
+ 84, 106, 92, 91, 60, 432, 60, 72, 60, 168,
+ 98, 435, 77, 60, 96, 60, 60, 60, 341, 302,
+ 93, 94, 500, 108, 329, 100, 60, 102, 60, 618,
+ 302, 95, 88, 330, 60, 60, 60, 60, 90, 89,
+ 70, 60, 97, 452, 60, 60, 451, 492, 60, 60,
+ 494, 60, 61, 68, 60, 60, 69, 491, 60, 471,
+ 67, 302, 404, 480, 60, 106, 60, 479, 0, 270,
+ 298, 270, 298, 278, 298, 270, 0, 270, 60, 270,
+ 0, 316, 0, 270, 332, 0, 500, 108, 175, 538,
+ 405, 293, 319, 0, 317, 303, 326, 60, 60, 60,
+ 0, 0, 270, 270, 270, 290, 291, 60, 295, 298,
+ 60, 60, 270, 298, 270, 270, 270, 289, 270, 0,
+ 273, 500, 313, 0, 551, 545, 305, 534, 508, 615,
+ 542, 297, 0, 500, 0, 300, 499, 509, 500, 0,
+ 508, 0, 0, 0, 0, 508, 472, 0, 499, 509,
+ 583, 0, 0, 499, 509, 0, 0, 586, 579, 580,
+ 581, 582, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 550,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 551,
+ 0, 0, 0, 0, 0, 0, 552, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0};
+
+const short QDeclarativeJSGrammar::action_check [] = {
+ 7, 16, 55, 7, 33, 36, 33, 55, 36, 7,
+ 7, 7, 7, 7, 7, 36, 7, 7, 36, 8,
+ 36, 55, 60, 29, 7, 7, 36, 7, 33, 7,
+ 7, 7, 7, 36, 36, 48, 1, 0, 90, 79,
+ 7, 33, 8, 90, 2, 7, 33, 55, 36, 60,
+ 36, 20, 33, 5, 1, 5, 79, 36, 7, 33,
+ 5, 60, 33, 33, 8, 33, 17, 24, 2, 7,
+ 34, 2, 7, 1, 7, 36, 60, 37, 8, 8,
+ 36, 66, 36, 7, 1, 17, -1, -1, 36, 48,
+ 36, 33, 8, 66, 7, 48, 36, 33, 7, 36,
+ 2, 7, 8, 8, 8, 77, 61, 15, 8, 8,
+ 6, -1, 31, 36, 8, 10, -1, -1, -1, 60,
+ 8, 60, -1, 48, 20, -1, 34, -1, 8, 8,
+ 8, -1, -1, 60, 60, 8, 79, 55, 60, 50,
+ 8, 61, 8, 54, 8, 8, 61, 61, 62, 61,
+ 62, 42, 56, 50, 40, 60, 56, 54, 79, 40,
+ 55, 60, 53, 61, 62, 51, 60, 15, 61, 62,
+ 51, 61, 62, 61, 61, 62, 56, 56, 61, 62,
+ 40, 8, 60, 8, 61, 62, 34, 60, 8, 61,
+ 62, 51, 60, 56, 60, 40, 60, 12, 29, 61,
+ 62, 25, 25, 27, 27, 15, 51, 36, 29, 15,
+ 29, 61, 62, 12, 38, 38, 8, 29, 7, 7,
+ 29, -1, 8, -1, 34, 8, 36, 25, 34, 27,
+ 36, 15, 61, 62, 61, 62, 61, 62, 7, 29,
+ 38, 91, 57, 7, 75, 33, 8, 25, 63, 27,
+ 34, -1, 36, -1, 75, 86, 75, 12, 57, -1,
+ 38, 15, -1, 75, 63, 86, 75, 86, 15, 61,
+ 62, -1, 61, 62, 86, 61, 62, 86, 61, 62,
+ 34, 25, 36, 27, -1, 75, 33, 34, 29, 36,
+ 18, 19, 61, 62, 38, 47, 86, 61, 62, 61,
+ 62, 15, 57, -1, 92, 18, 19, -1, 63, 61,
+ 62, 29, -1, 18, 19, 18, 19, 45, 46, 33,
+ 34, -1, 36, 29, -1, 66, 67, 68, -1, -1,
+ -1, -1, 45, 46, 29, -1, -1, -1, 29, 91,
+ 45, 46, 45, 46, 23, 24, 29, -1, 66, 67,
+ 68, 92, 29, 32, 23, 24, 35, 25, 37, 27,
+ 66, 67, 68, 32, -1, 29, 35, -1, 37, 29,
+ 38, 66, 67, 68, 92, 66, 67, 68, -1, -1,
+ 29, -1, -1, 66, 67, 68, 92, 29, -1, 66,
+ 67, 68, 29, -1, -1, -1, -1, 92, 29, -1,
+ -1, 92, 66, 67, 68, -1, 66, 67, 68, 92,
+ -1, -1, -1, -1, 29, 92, -1, 66, 67, 68,
+ 29, -1, -1, -1, 66, 67, 68, 29, 92, 66,
+ 67, 68, 92, 23, 24, 66, 67, 68, -1, -1,
+ -1, 29, 32, 92, -1, 35, -1, 37, 36, 29,
+ 92, 66, 67, 68, -1, 92, 36, 66, 67, 68,
+ -1, 92, 23, 24, 66, 67, 68, -1, -1, -1,
+ 31, 32, -1, -1, 35, -1, 37, 92, 66, 67,
+ 68, -1, -1, 92, 23, 24, 66, 67, 68, 29,
+ 92, -1, 31, 32, 23, 24, 35, 29, 37, -1,
+ -1, -1, 31, 32, 92, 29, 35, -1, 37, -1,
+ -1, 29, 92, -1, 93, 94, 95, 96, 97, 98,
+ -1, 61, 62, -1, 29, -1, 66, 67, 68, 61,
+ 62, -1, -1, 29, 66, 67, 68, 61, 62, -1,
+ -1, -1, 66, 67, 68, -1, -1, -1, 66, 67,
+ 68, -1, 92, -1, -1, -1, 61, 62, -1, -1,
+ 92, 66, 67, 68, -1, 61, 62, 29, 92, -1,
+ 66, 67, 68, -1, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, 23, 24, -1, -1, 92, 3, -1,
+ -1, 31, 32, -1, -1, 35, 92, 37, 13, 61,
+ 62, -1, 17, -1, 66, 67, 68, -1, -1, -1,
+ -1, 26, -1, 28, -1, -1, 31, -1, -1, -1,
+ -1, -1, -1, -1, 39, -1, 41, 42, -1, -1,
+ 92, -1, -1, -1, 49, -1, -1, 52, 53, -1,
+ -1, -1, -1, 58, -1, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 12,
+ 13, 3, -1, -1, -1, 80, -1, -1, -1, 22,
+ -1, 13, -1, -1, -1, 17, 29, -1, -1, -1,
+ 33, 34, -1, 36, 26, -1, 28, -1, -1, -1,
+ 43, -1, -1, -1, 47, -1, -1, 39, -1, 41,
+ 42, -1, -1, -1, -1, -1, -1, 49, -1, -1,
+ 52, 53, 65, 66, 67, 68, 58, 70, -1, -1,
+ -1, -1, 64, -1, -1, -1, -1, -1, 81, 82,
+ 83, 12, 13, -1, 87, -1, -1, -1, 80, 92,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 12,
+ 13, -1, 43, -1, -1, -1, 47, -1, -1, 22,
+ -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
+ 33, 34, -1, 36, 65, 66, 67, 68, -1, 70,
+ 43, -1, -1, -1, 47, -1, -1, -1, -1, -1,
+ 81, 82, 83, -1, -1, -1, 87, -1, -1, -1,
+ -1, 92, 65, 66, 67, 68, -1, 70, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 81, 82,
+ 83, -1, -1, -1, 87, -1, -1, -1, -1, 92,
+ 12, 13, -1, -1, -1, -1, -1, -1, 12, 13,
+ 22, -1, -1, -1, -1, -1, -1, 29, 22, -1,
+ -1, 33, 34, -1, 36, 29, -1, -1, -1, 33,
+ 34, 43, 36, -1, -1, 47, -1, -1, -1, 43,
+ -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ -1, 65, 66, 67, 68, -1, 70, -1, -1, 81,
+ 82, 83, -1, -1, -1, 87, -1, 81, 82, 83,
+ 92, -1, -1, 87, -1, -1, -1, -1, 92, 12,
+ 13, -1, -1, -1, -1, -1, -1, 12, 13, 22,
+ -1, -1, -1, -1, -1, -1, 29, 22, -1, -1,
+ 33, 34, -1, 36, 29, -1, -1, -1, 33, 34,
+ 43, 36, -1, -1, 47, -1, -1, -1, 43, -1,
+ -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, 66, 67, 68, -1, 70, -1, -1,
+ 65, 66, 67, 68, -1, 70, -1, -1, 81, 82,
+ 83, -1, -1, -1, 87, -1, 81, 82, 83, 92,
+ -1, -1, 87, -1, -1, -1, -1, 92, -1, -1,
+ -1, -1, -1, -1, -1, -1, 10, -1, 12, 13,
+ -1, -1, -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, 29, -1, -1, -1, 33,
+ 34, -1, 36, -1, -1, -1, -1, -1, -1, 43,
+ -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 65, 66, 67, 68, -1, 70, -1, -1, -1,
+ -1, 75, -1, -1, -1, -1, -1, 81, 82, 83,
+ 84, -1, -1, 87, -1, -1, -1, -1, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, 10, -1, 12,
+ 13, -1, -1, -1, -1, -1, -1, -1, -1, 22,
+ -1, -1, -1, -1, -1, -1, 29, -1, -1, -1,
+ 33, 34, -1, 36, -1, -1, -1, -1, -1, -1,
+ 43, -1, -1, -1, 47, -1, -1, -1, -1, -1,
+ -1, -1, 55, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 65, 66, 67, 68, -1, 70, -1, -1,
+ -1, -1, 75, -1, -1, -1, -1, -1, 81, 82,
+ 83, 84, -1, -1, 87, -1, -1, -1, -1, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1, 10, -1,
+ 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, 55, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ -1, -1, -1, 75, -1, -1, -1, -1, -1, 81,
+ 82, 83, 84, -1, -1, 87, -1, -1, -1, -1,
+ 92, -1, -1, -1, -1, -1, -1, -1, -1, 11,
+ 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
+ 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
+ -1, 53, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ 72, -1, 74, -1, 76, -1, -1, -1, -1, 81,
+ 82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
+ 92, -1, -1, -1, -1, -1, -1, -1, -1, 7,
+ -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
+ -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, -1, 70, -1, 72, -1, 74, -1, 76, -1,
+ -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, -1, -1, -1, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
+ -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
+ 68, -1, 70, -1, 72, -1, 74, 75, 76, -1,
+ -1, -1, -1, 81, 82, 83, -1, -1, -1, 87,
+ -1, -1, -1, -1, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, 8, -1, -1, 11, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
+ -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
+ 65, 66, 67, 68, -1, 70, -1, 72, -1, 74,
+ -1, 76, -1, -1, -1, -1, 81, 82, 83, -1,
+ -1, -1, 87, -1, -1, -1, -1, 92, -1, -1,
+ -1, -1, -1, -1, -1, -1, 8, -1, -1, 11,
+ 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
+ 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
+ -1, 53, -1, -1, 56, -1, -1, -1, -1, -1,
+ -1, -1, -1, 65, 66, 67, 68, -1, 70, -1,
+ 72, -1, 74, -1, 76, -1, -1, -1, -1, 81,
+ 82, 83, -1, -1, -1, 87, -1, -1, -1, -1,
+ 92, -1, -1, -1, -1, -1, -1, -1, -1, 8,
+ -1, -1, 11, 12, 13, -1, -1, -1, -1, -1,
+ -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
+ 29, -1, -1, -1, 33, 34, -1, 36, -1, -1,
+ -1, 40, -1, 42, 43, 44, -1, -1, 47, -1,
+ -1, -1, 51, -1, 53, -1, -1, 56, -1, -1,
+ -1, -1, -1, -1, -1, -1, 65, 66, 67, 68,
+ -1, 70, -1, 72, -1, 74, -1, 76, -1, -1,
+ -1, -1, 81, 82, 83, -1, -1, -1, 87, -1,
+ -1, -1, -1, 92, -1, -1, -1, -1, -1, -1,
+ -1, -1, 8, -1, -1, 11, 12, 13, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
+ -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
+ 56, -1, -1, -1, -1, -1, -1, -1, -1, 65,
+ 66, 67, 68, -1, 70, -1, 72, -1, 74, -1,
+ 76, -1, -1, -1, -1, 81, 82, 83, -1, -1,
+ -1, 87, -1, -1, -1, -1, 92, -1, -1, -1,
+ -1, -1, -1, -1, -1, 11, 12, 13, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1, -1, -1,
+ -1, -1, -1, 29, 30, -1, -1, 33, 34, -1,
+ 36, -1, -1, -1, 40, -1, 42, 43, 44, -1,
+ -1, 47, -1, -1, -1, 51, -1, 53, -1, -1,
+ -1, -1, -1, -1, -1, 61, -1, -1, -1, 65,
+ 66, 67, 68, -1, 70, -1, 72, -1, 74, -1,
+ 76, -1, -1, -1, -1, 81, 82, 83, -1, -1,
+ -1, 87, -1, -1, -1, -1, 92, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4, 5, 6, -1, -1,
+ 9, 10, 11, -1, -1, 14, -1, 16, -1, -1,
+ -1, 20, 21, 22, -1, -1, -1, -1, -1, -1,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 43, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 59, -1, -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, 70, 71, -1, 73, 74, 75, 76, 77, 78,
+ -1, -1, 81, 82, 83, 84, 85, 86, -1, -1,
+ -1, -1, -1, 92, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
+ -1, -1, 14, -1, 16, -1, -1, -1, 20, 21,
+ 22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
+ -1, -1, -1, 65, 66, 67, -1, 69, 70, 71,
+ -1, 73, 74, 75, 76, 77, 78, -1, -1, 81,
+ 82, 83, 84, 85, 86, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
+ 5, 6, -1, -1, 9, 10, 11, -1, -1, 14,
+ -1, 16, -1, -1, -1, 20, 21, 22, -1, -1,
+ -1, -1, -1, -1, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 43, -1,
+ -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ 55, -1, -1, -1, 59, -1, -1, -1, -1, -1,
+ 65, 66, 67, -1, 69, 70, 71, -1, 73, 74,
+ 75, 76, 77, 78, -1, -1, 81, 82, 83, 84,
+ 85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4, -1, -1, -1,
+ -1, 9, -1, 11, 12, 13, 14, -1, -1, -1,
+ -1, -1, -1, 21, 22, -1, -1, -1, -1, -1,
+ -1, 29, 30, -1, -1, 33, 34, -1, 36, -1,
+ -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
+ -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
+ -1, 59, -1, 61, -1, -1, -1, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, -1, -1, 81, 82, 83, 84, 85, -1, 87,
+ -1, -1, -1, -1, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4, -1, -1, -1, -1, 9, -1,
+ 11, 12, 13, 14, -1, -1, -1, -1, -1, -1,
+ 21, 22, -1, -1, -1, -1, -1, -1, 29, 30,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, -1, -1, -1, 59, -1,
+ 61, -1, -1, -1, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, -1, -1,
+ 81, 82, 83, 84, 85, -1, 87, -1, -1, -1,
+ -1, 92, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4, 5, 6, -1, -1, 9, 10, 11, 12, 13,
+ 14, -1, 16, -1, -1, -1, 20, 21, 22, -1,
+ -1, -1, -1, -1, -1, 29, 30, 31, 32, 33,
+ 34, -1, 36, -1, -1, -1, 40, -1, 42, 43,
+ 44, -1, -1, 47, -1, -1, -1, 51, -1, 53,
+ -1, -1, -1, -1, -1, 59, -1, 61, -1, -1,
+ -1, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, -1, -1, 81, 82, 83,
+ 84, 85, 86, 87, -1, -1, -1, -1, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4, 5, 6,
+ -1, -1, 9, 10, 11, 12, 13, 14, -1, 16,
+ -1, -1, -1, 20, 21, 22, -1, -1, -1, -1,
+ -1, -1, 29, 30, 31, 32, 33, 34, -1, 36,
+ -1, -1, -1, 40, -1, 42, 43, 44, -1, -1,
+ 47, -1, -1, -1, 51, -1, 53, -1, 55, -1,
+ -1, -1, 59, -1, 61, -1, -1, -1, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, -1, -1, 81, 82, 83, 84, 85, 86,
+ 87, -1, -1, -1, -1, 92, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+
+ 35, 15, 15, 15, 2, 15, 3, 2, 25, 3,
+ 15, 15, 104, 15, 4, 3, 3, 3, 19, 15,
+ 2, 21, 15, 15, 3, 67, 25, 3, 19, 2,
+ 15, 2, 15, 13, 15, 19, 25, 3, 15, 11,
+ 15, 2, 96, 3, 2, 15, 2, 25, 3, 2,
+ 15, 100, 15, 93, 3, 2, 15, 98, 15, 2,
+ 2, 35, 3, 3, 15, 2, 35, 35, 35, 21,
+ 2, 25, 3, 35, 4, 21, 15, 2, 2, 15,
+ 2, 4, 3, 3, 3, 35, 2, 35, 21, 3,
+ 35, 3, 36, 21, 3, 13, 2, 35, 13, -1,
+ 35, 35, 2, -1, 15, 13, 35, -1, 16, -1,
+ -1, 40, -1, -1, -1, -1, 13, 44, 44, 46,
+ 46, 13, 15, -1, 16, -1, 41, 44, -1, 46,
+ 35, 44, -1, 46, 44, 40, 46, 44, 3, 46,
+ 44, 44, 44, 44, 41, 44, 49, 49, 49, 44,
+ 49, 46, 2, 44, 58, 46, 44, 44, 44, 15,
+ 46, 49, 49, 44, 44, 44, 46, 44, 44, 44,
+ 49, 15, 49, 49, 44, 81, 44, 52, 44, 60,
+ 50, 81, 50, 44, 50, 44, 44, 44, 99, 3,
+ 49, 49, 13, 37, 87, 56, 44, 54, 44, 20,
+ 3, 49, 48, 68, 44, 44, 44, 44, 48, 48,
+ 47, 44, 50, 46, 44, 44, 46, 46, 44, 44,
+ 46, 44, 47, 46, 44, 44, 46, 46, 44, 85,
+ 46, 3, 13, 31, 44, 15, 44, 35, -1, 49,
+ 44, 49, 44, 51, 44, 49, -1, 49, 44, 49,
+ -1, 61, -1, 49, 68, -1, 13, 37, 38, 16,
+ 41, 57, 66, -1, 66, 68, 66, 44, 44, 44,
+ -1, -1, 49, 49, 49, 51, 51, 44, 55, 44,
+ 44, 44, 49, 44, 49, 49, 49, 51, 49, -1,
+ 53, 13, 59, -1, 13, 5, 68, 16, 20, 18,
+ 5, 66, -1, 13, -1, 66, 28, 29, 13, -1,
+ 20, -1, -1, -1, -1, 20, 35, -1, 28, 29,
+ 13, -1, -1, 28, 29, -1, -1, 20, 21, 22,
+ 23, 24, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 13,
+ -1, -1, -1, -1, -1, -1, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1};
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsgrammar_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsgrammar_p.h
new file mode 100644
index 0000000000..ed3ca19041
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsgrammar_p.h
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** 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 QtCore module 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$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+// This file was generated by qlalr - DO NOT EDIT!
+#ifndef QDECLARATIVEJSGRAMMAR_P_H
+#define QDECLARATIVEJSGRAMMAR_P_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeJSGrammar
+{
+public:
+ enum VariousConstants {
+ EOF_SYMBOL = 0,
+ REDUCE_HERE = 100,
+ SHIFT_THERE = 99,
+ T_AND = 1,
+ T_AND_AND = 2,
+ T_AND_EQ = 3,
+ T_AS = 91,
+ T_AUTOMATIC_SEMICOLON = 62,
+ T_BREAK = 4,
+ T_CASE = 5,
+ T_CATCH = 6,
+ T_COLON = 7,
+ T_COMMA = 8,
+ T_COMMENT = 88,
+ T_CONST = 84,
+ T_CONTINUE = 9,
+ T_DEBUGGER = 85,
+ T_DEFAULT = 10,
+ T_DELETE = 11,
+ T_DIVIDE_ = 12,
+ T_DIVIDE_EQ = 13,
+ T_DO = 14,
+ T_DOT = 15,
+ T_ELSE = 16,
+ T_EQ = 17,
+ T_EQ_EQ = 18,
+ T_EQ_EQ_EQ = 19,
+ T_FALSE = 83,
+ T_FEED_JS_EXPRESSION = 96,
+ T_FEED_JS_PROGRAM = 98,
+ T_FEED_JS_SOURCE_ELEMENT = 97,
+ T_FEED_JS_STATEMENT = 95,
+ T_FEED_UI_OBJECT_MEMBER = 94,
+ T_FEED_UI_PROGRAM = 93,
+ T_FINALLY = 20,
+ T_FOR = 21,
+ T_FUNCTION = 22,
+ T_GE = 23,
+ T_GT = 24,
+ T_GT_GT = 25,
+ T_GT_GT_EQ = 26,
+ T_GT_GT_GT = 27,
+ T_GT_GT_GT_EQ = 28,
+ T_IDENTIFIER = 29,
+ T_IF = 30,
+ T_IMPORT = 90,
+ T_IN = 31,
+ T_INSTANCEOF = 32,
+ T_LBRACE = 33,
+ T_LBRACKET = 34,
+ T_LE = 35,
+ T_LPAREN = 36,
+ T_LT = 37,
+ T_LT_LT = 38,
+ T_LT_LT_EQ = 39,
+ T_MINUS = 40,
+ T_MINUS_EQ = 41,
+ T_MINUS_MINUS = 42,
+ T_MULTILINE_STRING_LITERAL = 87,
+ T_NEW = 43,
+ T_NOT = 44,
+ T_NOT_EQ = 45,
+ T_NOT_EQ_EQ = 46,
+ T_NULL = 81,
+ T_NUMERIC_LITERAL = 47,
+ T_ON = 92,
+ T_OR = 48,
+ T_OR_EQ = 49,
+ T_OR_OR = 50,
+ T_PLUS = 51,
+ T_PLUS_EQ = 52,
+ T_PLUS_PLUS = 53,
+ T_PROPERTY = 66,
+ T_PUBLIC = 89,
+ T_QUESTION = 54,
+ T_RBRACE = 55,
+ T_RBRACKET = 56,
+ T_READONLY = 68,
+ T_REMAINDER = 57,
+ T_REMAINDER_EQ = 58,
+ T_RESERVED_WORD = 86,
+ T_RETURN = 59,
+ T_RPAREN = 60,
+ T_SEMICOLON = 61,
+ T_SIGNAL = 67,
+ T_STAR = 63,
+ T_STAR_EQ = 64,
+ T_STRING_LITERAL = 65,
+ T_SWITCH = 69,
+ T_THIS = 70,
+ T_THROW = 71,
+ T_TILDE = 72,
+ T_TRUE = 82,
+ T_TRY = 73,
+ T_TYPEOF = 74,
+ T_VAR = 75,
+ T_VOID = 76,
+ T_WHILE = 77,
+ T_WITH = 78,
+ T_XOR = 79,
+ T_XOR_EQ = 80,
+
+ ACCEPT_STATE = 645,
+ RULE_COUNT = 347,
+ STATE_COUNT = 646,
+ TERMINAL_COUNT = 101,
+ NON_TERMINAL_COUNT = 106,
+
+ GOTO_INDEX_OFFSET = 646,
+ GOTO_INFO_OFFSET = 2714,
+ GOTO_CHECK_OFFSET = 2714
+ };
+
+ static const char *const spell [];
+ static const short lhs [];
+ static const short rhs [];
+ static const short goto_default [];
+ static const short action_default [];
+ static const short action_index [];
+ static const short action_info [];
+ static const short action_check [];
+
+ static inline int nt_action (int state, int nt)
+ {
+ const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
+ if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
+ return goto_default [nt];
+
+ return action_info [GOTO_INFO_OFFSET + yyn];
+ }
+
+ static inline int t_action (int state, int token)
+ {
+ const int yyn = action_index [state] + token;
+
+ if (yyn < 0 || action_check [yyn] != token)
+ return - action_default [state];
+
+ return action_info [yyn];
+ }
+};
+
+
+QT_END_NAMESPACE
+#endif // QDECLARATIVEJSGRAMMAR_P_H
+
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejslexer.cpp b/tools/qdoc3/declarativeparser/qdeclarativejslexer.cpp
new file mode 100644
index 0000000000..f5fb791405
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejslexer.cpp
@@ -0,0 +1,1258 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "qdeclarativejslexer_p.h"
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsengine_p.h"
+#include "qdeclarativejsgrammar_p.h"
+
+#include <QtCore/qcoreapplication.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+QT_BEGIN_NAMESPACE
+Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
+QT_END_NAMESPACE
+
+QT_QML_BEGIN_NAMESPACE
+
+#define shiftWindowsLineBreak() \
+ do { \
+ if (((current == '\r') && (next1 == '\n')) \
+ || ((current == '\n') && (next1 == '\r'))) { \
+ shift(1); \
+ } \
+ } \
+ while (0)
+
+namespace QDeclarativeJS {
+extern double integerFromString(const char *buf, int size, int radix);
+}
+
+using namespace QDeclarativeJS;
+
+Lexer::Lexer(Engine *eng, bool tokenizeComments)
+ : driver(eng),
+ yylineno(0),
+ done(false),
+ size8(128), size16(128),
+ pos8(0), pos16(0),
+ terminator(false),
+ restrKeyword(false),
+ delimited(false),
+ stackToken(-1),
+ state(Start),
+ pos(0),
+ code(0), length(0),
+ yycolumn(0),
+ startpos(0),
+ startlineno(0), startcolumn(0),
+ bol(true),
+ current(0), next1(0), next2(0), next3(0),
+ err(NoError),
+ wantRx(false),
+ check_reserved(true),
+ parenthesesState(IgnoreParentheses),
+ parenthesesCount(0),
+ prohibitAutomaticSemicolon(false),
+ tokenizeComments(tokenizeComments)
+{
+ if (driver) driver->setLexer(this);
+ // allocate space for read buffers
+ buffer8 = new char[size8];
+ buffer16 = new QChar[size16];
+ pattern = 0;
+ flags = 0;
+
+}
+
+Lexer::~Lexer()
+{
+ delete [] buffer8;
+ delete [] buffer16;
+}
+
+void Lexer::setCode(const QString &c, int lineno)
+{
+ errmsg.clear();
+ yylineno = lineno;
+ yycolumn = 1;
+ restrKeyword = false;
+ delimited = false;
+ stackToken = -1;
+ pos = 0;
+ code = c.unicode();
+ length = c.length();
+ bol = true;
+
+ // read first characters
+ current = (length > 0) ? code[0].unicode() : 0;
+ next1 = (length > 1) ? code[1].unicode() : 0;
+ next2 = (length > 2) ? code[2].unicode() : 0;
+ next3 = (length > 3) ? code[3].unicode() : 0;
+}
+
+void Lexer::shift(uint p)
+{
+ while (p--) {
+ ++pos;
+ ++yycolumn;
+ current = next1;
+ next1 = next2;
+ next2 = next3;
+ next3 = (pos + 3 < length) ? code[pos+3].unicode() : 0;
+ }
+}
+
+void Lexer::setDone(State s)
+{
+ state = s;
+ done = true;
+}
+
+int Lexer::findReservedWord(const QChar *c, int size) const
+{
+ switch (size) {
+ case 2: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o'))
+ return QDeclarativeJSGrammar::T_DO;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_IF;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_IN;
+ else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_AS;
+ else if (c[0] == QLatin1Char('o') && c[1] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_ON;
+ } break;
+
+ case 3: {
+ if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_FOR;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('w'))
+ return QDeclarativeJSGrammar::T_NEW;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_TRY;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_VAR;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n') && c[2] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 4: {
+ if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_CASE;
+ else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_ELSE;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_THIS;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_VOID;
+ else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_WITH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_TRUE;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_NULL;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('m'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('l') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('g'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('g') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('o'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 5: {
+ if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('e') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('k'))
+ return QDeclarativeJSGrammar::T_BREAK;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_CATCH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('w'))
+ return QDeclarativeJSGrammar::T_THROW;
+ else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_WHILE;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_CONST;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_FALSE;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('r')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('s')
+ && c[4] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('l')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 6: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_DELETE;
+ else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('u')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_RETURN;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('w')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('c') && c[5] == QLatin1Char('h'))
+ return QDeclarativeJSGrammar::T_SWITCH;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_TYPEOF;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_IMPORT;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('g') && c[3] == QLatin1Char('n')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('l'))
+ return QDeclarativeJSGrammar::T_SIGNAL;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('t')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('b')
+ && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c'))
+ return QDeclarativeJSGrammar::T_PUBLIC;
+ else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('i')
+ && c[4] == QLatin1Char('v') && c[5] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h')
+ && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o')
+ && c[4] == QLatin1Char('w') && c[5] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 7: {
+ if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('f') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('u') && c[5] == QLatin1Char('l')
+ && c[6] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_DEFAULT;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('l')
+ && c[6] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_FINALLY;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('a')
+ && c[6] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('n') && c[5] == QLatin1Char('d')
+ && c[6] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('a')
+ && c[2] == QLatin1Char('c') && c[3] == QLatin1Char('k')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('g')
+ && c[6] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('v')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('t')
+ && c[6] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 8: {
+ if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('u') && c[7] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_CONTINUE;
+ else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('u')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n'))
+ return QDeclarativeJSGrammar::T_FUNCTION;
+ else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('u')
+ && c[4] == QLatin1Char('g') && c[5] == QLatin1Char('g')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('r'))
+ return QDeclarativeJSGrammar::T_DEBUGGER;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('p')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('r')
+ && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_PROPERTY;
+ else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('d')
+ && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('y'))
+ return QDeclarativeJSGrammar::T_READONLY;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('b')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('a')
+ && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o')
+ && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('a')
+ && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 9: {
+ if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e')
+ && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('f')
+ && c[6] == QLatin1Char('a') && c[7] == QLatin1Char('c')
+ && c[8] == QLatin1Char('e'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('n')
+ && c[4] == QLatin1Char('s') && c[5] == QLatin1Char('i')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('t'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r')
+ && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('c')
+ && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('e')
+ && c[8] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 10: {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')
+ && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t')
+ && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('n')
+ && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('e')
+ && c[8] == QLatin1Char('o') && c[9] == QLatin1Char('f'))
+ return QDeclarativeJSGrammar::T_INSTANCEOF;
+ else if (check_reserved) {
+ if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m')
+ && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('l')
+ && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('m')
+ && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('t') && c[9] == QLatin1Char('s'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ case 12: {
+ if (check_reserved) {
+ if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('y')
+ && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('c')
+ && c[4] == QLatin1Char('h') && c[5] == QLatin1Char('r')
+ && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n')
+ && c[8] == QLatin1Char('i') && c[9] == QLatin1Char('z')
+ && c[10] == QLatin1Char('e') && c[11] == QLatin1Char('d'))
+ return QDeclarativeJSGrammar::T_RESERVED_WORD;
+ }
+ } break;
+
+ } // switch
+
+ return -1;
+}
+
+int Lexer::lex()
+{
+ int token = 0;
+ state = Start;
+ ushort stringType = 0; // either single or double quotes
+ bool multiLineString = false;
+ pos8 = pos16 = 0;
+ done = false;
+ terminator = false;
+
+ // did we push a token on the stack previously ?
+ // (after an automatic semicolon insertion)
+ if (stackToken >= 0) {
+ setDone(Other);
+ token = stackToken;
+ stackToken = -1;
+ }
+
+ bool identifierWithEscapedUnicode = false;
+
+ while (!done) {
+ switch (state) {
+ case Start:
+ if (isWhiteSpace()) {
+ // do nothing
+ } else if (current == '/' && next1 == '/') {
+ recordStartPos();
+ shift(1);
+ state = InSingleLineComment;
+ } else if (current == '/' && next1 == '*') {
+ recordStartPos();
+ shift(1);
+ state = InMultiLineComment;
+ } else if (current == 0) {
+ syncProhibitAutomaticSemicolon();
+ if (!terminator && !delimited && !prohibitAutomaticSemicolon) {
+ // automatic semicolon insertion if program incomplete
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ stackToken = 0;
+ setDone(Other);
+ } else {
+ setDone(Eof);
+ }
+ } else if (isLineTerminator()) {
+ if (restrKeyword) {
+ // automatic semicolon insertion
+ recordStartPos();
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ setDone(Other);
+ } else {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ terminator = true;
+ syncProhibitAutomaticSemicolon();
+ }
+ } else if (current == '"' || current == '\'') {
+ recordStartPos();
+ state = InString;
+ multiLineString = false;
+ stringType = current;
+ } else if (current == '\\' && next1 == 'u') {
+ identifierWithEscapedUnicode = true;
+ recordStartPos();
+
+ shift(2); // skip the unicode escape prefix `\u'
+
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ state = InIdentifier;
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ break;
+ }
+
+ } else if (isIdentLetter(current)) {
+ identifierWithEscapedUnicode = false;
+ recordStartPos();
+ record16(current);
+ state = InIdentifier;
+ } else if (current == '0') {
+ recordStartPos();
+ record8(current);
+ state = InNum0;
+ } else if (isDecimalDigit(current)) {
+ recordStartPos();
+ record8(current);
+ state = InNum;
+ } else if (current == '.' && isDecimalDigit(next1)) {
+ recordStartPos();
+ record8(current);
+ state = InDecimal;
+ } else {
+ recordStartPos();
+ token = matchPunctuator(current, next1, next2, next3);
+ if (token != -1) {
+ if (terminator && !delimited && !prohibitAutomaticSemicolon
+ && (token == QDeclarativeJSGrammar::T_PLUS_PLUS
+ || token == QDeclarativeJSGrammar::T_MINUS_MINUS)) {
+ // automatic semicolon insertion
+ stackToken = token;
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ }
+ setDone(Other);
+ }
+ else {
+ setDone(Bad);
+ err = IllegalCharacter;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal character");
+ }
+ }
+ break;
+ case InString:
+ if (current == stringType) {
+ shift(1);
+ setDone(String);
+ } else if (isLineTerminator()) {
+ multiLineString = true;
+ record16(current);
+ } else if (current == 0 || isLineTerminator()) {
+ setDone(Bad);
+ err = UnclosedStringLiteral;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed string at end of line");
+ } else if (current == '\\') {
+ state = InEscapeSequence;
+ } else {
+ record16(current);
+ }
+ break;
+ // Escape Sequences inside of strings
+ case InEscapeSequence:
+ if (isOctalDigit(current)) {
+ if (current >= '0' && current <= '3' &&
+ isOctalDigit(next1) && isOctalDigit(next2)) {
+ record16(convertOctal(current, next1, next2));
+ shift(2);
+ state = InString;
+ } else if (isOctalDigit(current) &&
+ isOctalDigit(next1)) {
+ record16(convertOctal('0', current, next1));
+ shift(1);
+ state = InString;
+ } else if (isOctalDigit(current)) {
+ record16(convertOctal('0', '0', current));
+ state = InString;
+ } else {
+ setDone(Bad);
+ err = IllegalEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal escape sequence");
+ }
+ } else if (current == 'x')
+ state = InHexEscape;
+ else if (current == 'u')
+ state = InUnicodeEscape;
+ else {
+ if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ } else {
+ record16(singleEscape(current));
+ }
+ state = InString;
+ }
+ break;
+ case InHexEscape:
+ if (isHexDigit(current) && isHexDigit(next1)) {
+ state = InString;
+ record16(QLatin1Char(convertHex(current, next1)));
+ shift(1);
+ } else if (current == stringType) {
+ record16(QLatin1Char('x'));
+ shift(1);
+ setDone(String);
+ } else {
+ record16(QLatin1Char('x'));
+ record16(current);
+ state = InString;
+ }
+ break;
+ case InUnicodeEscape:
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ state = InString;
+ } else if (current == stringType) {
+ record16(QLatin1Char('u'));
+ shift(1);
+ setDone(String);
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ }
+ break;
+ case InSingleLineComment:
+ if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ terminator = true;
+ bol = true;
+ if (restrKeyword) {
+ token = QDeclarativeJSGrammar::T_SEMICOLON;
+ setDone(Other);
+ } else
+ state = Start;
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
+ } else if (current == 0) {
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
+ setDone(Eof);
+ }
+
+ break;
+ case InMultiLineComment:
+ if (current == 0) {
+ setDone(Bad);
+ err = UnclosedComment;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file");
+ if (driver) driver->addComment(startpos+2, tokenLength()-2, startlineno, startcolumn+2);
+ } else if (isLineTerminator()) {
+ shiftWindowsLineBreak();
+ yylineno++;
+ } else if (current == '*' && next1 == '/') {
+ state = Start;
+ shift(1);
+ if (driver) driver->addComment(startpos+2, tokenLength()-3, startlineno, startcolumn+2);
+ }
+
+ break;
+ case InIdentifier:
+ if (isIdentLetter(current) || isDecimalDigit(current)) {
+ record16(current);
+ break;
+ } else if (current == '\\' && next1 == 'u') {
+ identifierWithEscapedUnicode = true;
+ shift(2); // skip the unicode escape prefix `\u'
+
+ if (isHexDigit(current) && isHexDigit(next1) &&
+ isHexDigit(next2) && isHexDigit(next3)) {
+ record16(convertUnicode(current, next1, next2, next3));
+ shift(3);
+ break;
+ } else {
+ setDone(Bad);
+ err = IllegalUnicodeEscapeSequence;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence");
+ break;
+ }
+ }
+ setDone(Identifier);
+ break;
+ case InNum0:
+ if (current == 'x' || current == 'X') {
+ record8(current);
+ state = InHex;
+ } else if (current == '.') {
+ record8(current);
+ state = InDecimal;
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else if (isOctalDigit(current)) {
+ record8(current);
+ state = InOctal;
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InDecimal;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InHex:
+ if (isHexDigit(current))
+ record8(current);
+ else
+ setDone(Hex);
+ break;
+ case InOctal:
+ if (isOctalDigit(current)) {
+ record8(current);
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InDecimal;
+ } else {
+ setDone(Octal);
+ }
+ break;
+ case InNum:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else if (current == '.') {
+ record8(current);
+ state = InDecimal;
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InDecimal:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else if (current == 'e' || current == 'E') {
+ record8(current);
+ state = InExponentIndicator;
+ } else {
+ setDone(Number);
+ }
+ break;
+ case InExponentIndicator:
+ if (current == '+' || current == '-') {
+ record8(current);
+ } else if (isDecimalDigit(current)) {
+ record8(current);
+ state = InExponent;
+ } else {
+ setDone(Bad);
+ err = IllegalExponentIndicator;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal syntax for exponential number");
+ }
+ break;
+ case InExponent:
+ if (isDecimalDigit(current)) {
+ record8(current);
+ } else {
+ setDone(Number);
+ }
+ break;
+ default:
+ Q_ASSERT_X(0, "Lexer::lex", "Unhandled state in switch statement");
+ }
+
+ // move on to the next character
+ if (!done)
+ shift(1);
+ if (state != Start && state != InSingleLineComment)
+ bol = false;
+ }
+
+ // no identifiers allowed directly after numeric literal, e.g. "3in" is bad
+ if ((state == Number || state == Octal || state == Hex)
+ && isIdentLetter(current)) {
+ state = Bad;
+ err = IllegalIdentifier;
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Identifier cannot start with numeric literal");
+ }
+
+ // terminate string
+ buffer8[pos8] = '\0';
+
+ double dval = 0;
+ if (state == Number) {
+ dval = qstrtod(buffer8, 0, 0);
+ } else if (state == Hex) { // scan hex numbers
+ dval = integerFromString(buffer8, pos8, 16);
+ state = Number;
+ } else if (state == Octal) { // scan octal number
+ dval = integerFromString(buffer8, pos8, 8);
+ state = Number;
+ }
+
+ restrKeyword = false;
+ delimited = false;
+
+ switch (parenthesesState) {
+ case IgnoreParentheses:
+ break;
+ case CountParentheses:
+ if (token == QDeclarativeJSGrammar::T_RPAREN) {
+ --parenthesesCount;
+ if (parenthesesCount == 0)
+ parenthesesState = BalancedParentheses;
+ } else if (token == QDeclarativeJSGrammar::T_LPAREN) {
+ ++parenthesesCount;
+ }
+ break;
+ case BalancedParentheses:
+ parenthesesState = IgnoreParentheses;
+ break;
+ }
+
+ switch (state) {
+ case Eof:
+ return 0;
+ case Other:
+ if (token == QDeclarativeJSGrammar::T_RBRACE || token == QDeclarativeJSGrammar::T_SEMICOLON)
+ delimited = true;
+ return token;
+ case Identifier:
+ token = -1;
+ if (! identifierWithEscapedUnicode)
+ token = findReservedWord(buffer16, pos16);
+
+ if (token < 0) {
+ /* TODO: close leak on parse error. same holds true for String */
+ if (driver)
+ qsyylval.ustr = driver->intern(buffer16, pos16);
+ else
+ qsyylval.ustr = 0;
+ return QDeclarativeJSGrammar::T_IDENTIFIER;
+ }
+ if (token == QDeclarativeJSGrammar::T_CONTINUE || token == QDeclarativeJSGrammar::T_BREAK
+ || token == QDeclarativeJSGrammar::T_RETURN || token == QDeclarativeJSGrammar::T_THROW) {
+ restrKeyword = true;
+ } else if (token == QDeclarativeJSGrammar::T_IF || token == QDeclarativeJSGrammar::T_FOR
+ || token == QDeclarativeJSGrammar::T_WHILE || token == QDeclarativeJSGrammar::T_WITH) {
+ parenthesesState = CountParentheses;
+ parenthesesCount = 0;
+ } else if (token == QDeclarativeJSGrammar::T_DO) {
+ parenthesesState = BalancedParentheses;
+ }
+ return token;
+ case String:
+ if (driver)
+ qsyylval.ustr = driver->intern(buffer16, pos16);
+ else
+ qsyylval.ustr = 0;
+ return multiLineString?QDeclarativeJSGrammar::T_MULTILINE_STRING_LITERAL:QDeclarativeJSGrammar::T_STRING_LITERAL;
+ case Number:
+ qsyylval.dval = dval;
+ return QDeclarativeJSGrammar::T_NUMERIC_LITERAL;
+ case Bad:
+ return -1;
+ default:
+ Q_ASSERT(!"unhandled numeration value in switch");
+ return -1;
+ }
+}
+
+bool Lexer::isWhiteSpace() const
+{
+ return (current == ' ' || current == '\t' ||
+ current == 0x0b || current == 0x0c);
+}
+
+bool Lexer::isLineTerminator() const
+{
+ return (current == '\n' || current == '\r');
+}
+
+bool Lexer::isIdentLetter(ushort c)
+{
+ // ASCII-biased, since all reserved words are ASCII, aand hence the
+ // bulk of content to be parsed.
+ if ((c >= 'a' && c <= 'z')
+ || (c >= 'A' && c <= 'Z')
+ || c == '$'
+ || c == '_')
+ return true;
+ if (c < 128)
+ return false;
+ return QChar(c).isLetterOrNumber();
+}
+
+bool Lexer::isDecimalDigit(ushort c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+bool Lexer::isHexDigit(ushort c) const
+{
+ return ((c >= '0' && c <= '9')
+ || (c >= 'a' && c <= 'f')
+ || (c >= 'A' && c <= 'F'));
+}
+
+bool Lexer::isOctalDigit(ushort c) const
+{
+ return (c >= '0' && c <= '7');
+}
+
+int Lexer::matchPunctuator(ushort c1, ushort c2,
+ ushort c3, ushort c4)
+{
+ if (c1 == '>' && c2 == '>' && c3 == '>' && c4 == '=') {
+ shift(4);
+ return QDeclarativeJSGrammar::T_GT_GT_GT_EQ;
+ } else if (c1 == '=' && c2 == '=' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_EQ_EQ_EQ;
+ } else if (c1 == '!' && c2 == '=' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_NOT_EQ_EQ;
+ } else if (c1 == '>' && c2 == '>' && c3 == '>') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_GT_GT_GT;
+ } else if (c1 == '<' && c2 == '<' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_LT_LT_EQ;
+ } else if (c1 == '>' && c2 == '>' && c3 == '=') {
+ shift(3);
+ return QDeclarativeJSGrammar::T_GT_GT_EQ;
+ } else if (c1 == '<' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_LE;
+ } else if (c1 == '>' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_GE;
+ } else if (c1 == '!' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_NOT_EQ;
+ } else if (c1 == '+' && c2 == '+') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_PLUS_PLUS;
+ } else if (c1 == '-' && c2 == '-') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_MINUS_MINUS;
+ } else if (c1 == '=' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_EQ_EQ;
+ } else if (c1 == '+' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_PLUS_EQ;
+ } else if (c1 == '-' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_MINUS_EQ;
+ } else if (c1 == '*' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_STAR_EQ;
+ } else if (c1 == '/' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_DIVIDE_EQ;
+ } else if (c1 == '&' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_AND_EQ;
+ } else if (c1 == '^' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_XOR_EQ;
+ } else if (c1 == '%' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_REMAINDER_EQ;
+ } else if (c1 == '|' && c2 == '=') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_OR_EQ;
+ } else if (c1 == '<' && c2 == '<') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_LT_LT;
+ } else if (c1 == '>' && c2 == '>') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_GT_GT;
+ } else if (c1 == '&' && c2 == '&') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_AND_AND;
+ } else if (c1 == '|' && c2 == '|') {
+ shift(2);
+ return QDeclarativeJSGrammar::T_OR_OR;
+ }
+
+ switch(c1) {
+ case '=': shift(1); return QDeclarativeJSGrammar::T_EQ;
+ case '>': shift(1); return QDeclarativeJSGrammar::T_GT;
+ case '<': shift(1); return QDeclarativeJSGrammar::T_LT;
+ case ',': shift(1); return QDeclarativeJSGrammar::T_COMMA;
+ case '!': shift(1); return QDeclarativeJSGrammar::T_NOT;
+ case '~': shift(1); return QDeclarativeJSGrammar::T_TILDE;
+ case '?': shift(1); return QDeclarativeJSGrammar::T_QUESTION;
+ case ':': shift(1); return QDeclarativeJSGrammar::T_COLON;
+ case '.': shift(1); return QDeclarativeJSGrammar::T_DOT;
+ case '+': shift(1); return QDeclarativeJSGrammar::T_PLUS;
+ case '-': shift(1); return QDeclarativeJSGrammar::T_MINUS;
+ case '*': shift(1); return QDeclarativeJSGrammar::T_STAR;
+ case '/': shift(1); return QDeclarativeJSGrammar::T_DIVIDE_;
+ case '&': shift(1); return QDeclarativeJSGrammar::T_AND;
+ case '|': shift(1); return QDeclarativeJSGrammar::T_OR;
+ case '^': shift(1); return QDeclarativeJSGrammar::T_XOR;
+ case '%': shift(1); return QDeclarativeJSGrammar::T_REMAINDER;
+ case '(': shift(1); return QDeclarativeJSGrammar::T_LPAREN;
+ case ')': shift(1); return QDeclarativeJSGrammar::T_RPAREN;
+ case '{': shift(1); return QDeclarativeJSGrammar::T_LBRACE;
+ case '}': shift(1); return QDeclarativeJSGrammar::T_RBRACE;
+ case '[': shift(1); return QDeclarativeJSGrammar::T_LBRACKET;
+ case ']': shift(1); return QDeclarativeJSGrammar::T_RBRACKET;
+ case ';': shift(1); return QDeclarativeJSGrammar::T_SEMICOLON;
+
+ default: return -1;
+ }
+}
+
+ushort Lexer::singleEscape(ushort c) const
+{
+ switch(c) {
+ case 'b':
+ return 0x08;
+ case 't':
+ return 0x09;
+ case 'n':
+ return 0x0A;
+ case 'v':
+ return 0x0B;
+ case 'f':
+ return 0x0C;
+ case 'r':
+ return 0x0D;
+ case '"':
+ return 0x22;
+ case '\'':
+ return 0x27;
+ case '\\':
+ return 0x5C;
+ default:
+ return c;
+ }
+}
+
+ushort Lexer::convertOctal(ushort c1, ushort c2,
+ ushort c3) const
+{
+ return ((c1 - '0') * 64 + (c2 - '0') * 8 + c3 - '0');
+}
+
+unsigned char Lexer::convertHex(ushort c)
+{
+ if (c >= '0' && c <= '9')
+ return (c - '0');
+ else if (c >= 'a' && c <= 'f')
+ return (c - 'a' + 10);
+ else
+ return (c - 'A' + 10);
+}
+
+unsigned char Lexer::convertHex(ushort c1, ushort c2)
+{
+ return ((convertHex(c1) << 4) + convertHex(c2));
+}
+
+QChar Lexer::convertUnicode(ushort c1, ushort c2,
+ ushort c3, ushort c4)
+{
+ return QChar((convertHex(c3) << 4) + convertHex(c4),
+ (convertHex(c1) << 4) + convertHex(c2));
+}
+
+void Lexer::record8(ushort c)
+{
+ Q_ASSERT(c <= 0xff);
+
+ // enlarge buffer if full
+ if (pos8 >= size8 - 1) {
+ char *tmp = new char[2 * size8];
+ memcpy(tmp, buffer8, size8 * sizeof(char));
+ delete [] buffer8;
+ buffer8 = tmp;
+ size8 *= 2;
+ }
+
+ buffer8[pos8++] = (char) c;
+}
+
+void Lexer::record16(QChar c)
+{
+ // enlarge buffer if full
+ if (pos16 >= size16 - 1) {
+ QChar *tmp = new QChar[2 * size16];
+ memcpy(tmp, buffer16, size16 * sizeof(QChar));
+ delete [] buffer16;
+ buffer16 = tmp;
+ size16 *= 2;
+ }
+
+ buffer16[pos16++] = c;
+}
+
+void Lexer::recordStartPos()
+{
+ startpos = pos;
+ startlineno = yylineno;
+ startcolumn = yycolumn;
+}
+
+bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
+{
+ pos16 = 0;
+ pattern = 0;
+
+ if (prefix == EqualPrefix)
+ record16(QLatin1Char('='));
+
+ while (true) {
+ switch (current) {
+
+ case 0: // eof
+ case '\n': case '\r': // line terminator
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression literal");
+ return false;
+
+ case '/':
+ shift(1);
+
+ if (driver) // create the pattern
+ pattern = driver->intern(buffer16, pos16);
+
+ // scan the flags
+ pos16 = 0;
+ flags = 0;
+ while (isIdentLetter(current)) {
+ int flag = Ecma::RegExp::flagFromChar(current);
+ if (flag == 0) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'")
+ .arg(QChar(current));
+ return false;
+ }
+ flags |= flag;
+ record16(current);
+ shift(1);
+ }
+ return true;
+
+ case '\\':
+ // regular expression backslash sequence
+ record16(current);
+ shift(1);
+
+ if (! current || isLineTerminator()) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence");
+ return false;
+ }
+
+ record16(current);
+ shift(1);
+ break;
+
+ case '[':
+ // regular expression class
+ record16(current);
+ shift(1);
+
+ while (current && ! isLineTerminator()) {
+ if (current == ']')
+ break;
+ else if (current == '\\') {
+ // regular expression backslash sequence
+ record16(current);
+ shift(1);
+
+ if (! current || isLineTerminator()) {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression backslash sequence");
+ return false;
+ }
+
+ record16(current);
+ shift(1);
+ } else {
+ record16(current);
+ shift(1);
+ }
+ }
+
+ if (current != ']') {
+ errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression class");
+ return false;
+ }
+
+ record16(current);
+ shift(1); // skip ]
+ break;
+
+ default:
+ record16(current);
+ shift(1);
+ } // switch
+ } // while
+
+ return false;
+}
+
+void Lexer::syncProhibitAutomaticSemicolon()
+{
+ if (parenthesesState == BalancedParentheses) {
+ // we have seen something like "if (foo)", which means we should
+ // never insert an automatic semicolon at this point, since it would
+ // then be expanded into an empty statement (ECMA-262 7.9.1)
+ prohibitAutomaticSemicolon = true;
+ parenthesesState = IgnoreParentheses;
+ } else {
+ prohibitAutomaticSemicolon = false;
+ }
+}
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejslexer_p.h b/tools/qdoc3/declarativeparser/qdeclarativejslexer_p.h
new file mode 100644
index 0000000000..8febb54a86
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejslexer_p.h
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSLEXER_P_H
+#define QDECLARATIVEJSLEXER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Lexer
+{
+public:
+ Lexer(Engine *eng, bool tokenizeComments = false);
+ ~Lexer();
+
+ void setCode(const QString &c, int lineno);
+ int lex();
+
+ int currentLineNo() const { return yylineno; }
+ int currentColumnNo() const { return yycolumn; }
+
+ int tokenOffset() const { return startpos; }
+ int tokenLength() const { return pos - startpos; }
+
+ int startLineNo() const { return startlineno; }
+ int startColumnNo() const { return startcolumn; }
+
+ int endLineNo() const { return currentLineNo(); }
+ int endColumnNo() const
+ { int col = currentColumnNo(); return (col > 0) ? col - 1 : col; }
+
+ bool prevTerminator() const { return terminator; }
+
+ enum State { Start,
+ Identifier,
+ InIdentifier,
+ InSingleLineComment,
+ InMultiLineComment,
+ InNum,
+ InNum0,
+ InHex,
+ InOctal,
+ InDecimal,
+ InExponentIndicator,
+ InExponent,
+ Hex,
+ Octal,
+ Number,
+ String,
+ Eof,
+ InString,
+ InEscapeSequence,
+ InHexEscape,
+ InUnicodeEscape,
+ Other,
+ Bad };
+
+ enum Error {
+ NoError,
+ IllegalCharacter,
+ UnclosedStringLiteral,
+ IllegalEscapeSequence,
+ IllegalUnicodeEscapeSequence,
+ UnclosedComment,
+ IllegalExponentIndicator,
+ IllegalIdentifier
+ };
+
+ enum ParenthesesState {
+ IgnoreParentheses,
+ CountParentheses,
+ BalancedParentheses
+ };
+
+ enum RegExpBodyPrefix {
+ NoPrefix,
+ EqualPrefix
+ };
+
+ bool scanRegExp(RegExpBodyPrefix prefix = NoPrefix);
+
+ NameId *pattern;
+ int flags;
+
+ State lexerState() const
+ { return state; }
+
+ QString errorMessage() const
+ { return errmsg; }
+ void setErrorMessage(const QString &err)
+ { errmsg = err; }
+ void setErrorMessage(const char *err)
+ { setErrorMessage(QString::fromLatin1(err)); }
+
+ Error error() const
+ { return err; }
+ void clearError()
+ { err = NoError; }
+
+private:
+ Engine *driver;
+ int yylineno;
+ bool done;
+ char *buffer8;
+ QChar *buffer16;
+ uint size8, size16;
+ uint pos8, pos16;
+ bool terminator;
+ bool restrKeyword;
+ // encountered delimiter like "'" and "}" on last run
+ bool delimited;
+ int stackToken;
+
+ State state;
+ void setDone(State s);
+ uint pos;
+ void shift(uint p);
+ int lookupKeyword(const char *);
+
+ bool isWhiteSpace() const;
+ bool isLineTerminator() const;
+ bool isHexDigit(ushort c) const;
+ bool isOctalDigit(ushort c) const;
+
+ int matchPunctuator(ushort c1, ushort c2,
+ ushort c3, ushort c4);
+ ushort singleEscape(ushort c) const;
+ ushort convertOctal(ushort c1, ushort c2,
+ ushort c3) const;
+public:
+ static unsigned char convertHex(ushort c1);
+ static unsigned char convertHex(ushort c1, ushort c2);
+ static QChar convertUnicode(ushort c1, ushort c2,
+ ushort c3, ushort c4);
+ static bool isIdentLetter(ushort c);
+ static bool isDecimalDigit(ushort c);
+
+ inline int ival() const { return qsyylval.ival; }
+ inline double dval() const { return qsyylval.dval; }
+ inline NameId *ustr() const { return qsyylval.ustr; }
+
+ const QChar *characterBuffer() const { return buffer16; }
+ int characterCount() const { return pos16; }
+
+private:
+ void record8(ushort c);
+ void record16(QChar c);
+ void recordStartPos();
+
+ int findReservedWord(const QChar *buffer, int size) const;
+
+ void syncProhibitAutomaticSemicolon();
+
+ const QChar *code;
+ uint length;
+ int yycolumn;
+ int startpos;
+ int startlineno;
+ int startcolumn;
+ int bol; // begin of line
+
+ union {
+ int ival;
+ double dval;
+ NameId *ustr;
+ } qsyylval;
+
+ // current and following unicode characters
+ ushort current, next1, next2, next3;
+
+ struct keyword {
+ const char *name;
+ int token;
+ };
+
+ QString errmsg;
+ Error err;
+
+ bool wantRx;
+ bool check_reserved;
+
+ ParenthesesState parenthesesState;
+ int parenthesesCount;
+ bool prohibitAutomaticSemicolon;
+ bool tokenizeComments;
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsmemorypool_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsmemorypool_p.h
new file mode 100644
index 0000000000..ebf75d1711
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsmemorypool_p.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSMEMORYPOOL_P_H
+#define QDECLARATIVEJSMEMORYPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qshareddata.h>
+
+#include <string.h>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class QML_PARSER_EXPORT MemoryPool : public QSharedData
+{
+public:
+ enum { maxBlockCount = -1 };
+ enum { defaultBlockSize = 1 << 12 };
+
+ MemoryPool() {
+ m_blockIndex = maxBlockCount;
+ m_currentIndex = 0;
+ m_storage = 0;
+ m_currentBlock = 0;
+ m_currentBlockSize = 0;
+ }
+
+ virtual ~MemoryPool() {
+ for (int index = 0; index < m_blockIndex + 1; ++index)
+ qFree(m_storage[index]);
+
+ qFree(m_storage);
+ }
+
+ char *allocate(int bytes) {
+ bytes += (8 - bytes) & 7; // ensure multiple of 8 bytes (maintain alignment)
+ if (m_currentBlock == 0 || m_currentBlockSize < m_currentIndex + bytes) {
+ ++m_blockIndex;
+ m_currentBlockSize = defaultBlockSize << m_blockIndex;
+
+ m_storage = reinterpret_cast<char**>(qRealloc(m_storage, sizeof(char*) * (1 + m_blockIndex)));
+ m_currentBlock = m_storage[m_blockIndex] = reinterpret_cast<char*>(qMalloc(m_currentBlockSize));
+ ::memset(m_currentBlock, 0, m_currentBlockSize);
+
+ m_currentIndex = (8 - quintptr(m_currentBlock)) & 7; // ensure first chunk is 64-bit aligned
+ Q_ASSERT(m_currentIndex + bytes <= m_currentBlockSize);
+ }
+
+ char *p = reinterpret_cast<char *>
+ (m_currentBlock + m_currentIndex);
+
+ m_currentIndex += bytes;
+
+ return p;
+ }
+
+ int bytesAllocated() const {
+ int bytes = 0;
+ for (int index = 0; index < m_blockIndex; ++index)
+ bytes += (defaultBlockSize << index);
+ bytes += m_currentIndex;
+ return bytes;
+ }
+
+private:
+ int m_blockIndex;
+ int m_currentIndex;
+ char *m_currentBlock;
+ int m_currentBlockSize;
+ char **m_storage;
+
+private:
+ Q_DISABLE_COPY(MemoryPool)
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsnodepool_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsnodepool_p.h
new file mode 100644
index 0000000000..ca3841c642
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsnodepool_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEJSNODEPOOL_P_H
+#define QDECLARATIVEJSNODEPOOL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsmemorypool_p.h"
+
+#include <QtCore/QHash>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+namespace AST {
+class Node;
+} // namespace AST
+
+class Code;
+class CompilationUnit;
+class Engine;
+
+template <typename NodeType>
+inline NodeType *makeAstNode(MemoryPool *storage)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType();
+ return node;
+}
+
+template <typename NodeType, typename Arg1>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2, typename Arg3>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg3)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2, arg3);
+ return node;
+}
+
+template <typename NodeType, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4)
+{
+ NodeType *node = new (storage->allocate(sizeof(NodeType))) NodeType(arg1, arg2, arg3, arg4);
+ return node;
+}
+
+class QML_PARSER_EXPORT NodePool : public MemoryPool
+{
+public:
+ NodePool(const QString &fileName, Engine *engine);
+ virtual ~NodePool();
+
+ Code *createCompiledCode(AST::Node *node, CompilationUnit &compilation);
+
+ inline QString fileName() const { return m_fileName; }
+ inline Engine *engine() const { return m_engine; }
+#ifndef J_SCRIPT_NO_EVENT_NOTIFY
+ inline qint64 id() const { return m_id; }
+#endif
+
+private:
+ QHash<AST::Node*, Code*> m_codeCache;
+ QString m_fileName;
+ Engine *m_engine;
+#ifndef J_SCRIPT_NO_EVENT_NOTIFY
+ qint64 m_id;
+#endif
+
+private:
+ Q_DISABLE_COPY(NodePool)
+};
+
+} // namespace QDeclarativeJS
+
+QT_QML_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsparser.cpp b/tools/qdoc3/declarativeparser/qdeclarativejsparser.cpp
new file mode 100644
index 0000000000..118dcc6538
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsparser.cpp
@@ -0,0 +1,1904 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+#include <QtCore/QtDebug>
+#include <QtGui/QApplication>
+
+#include <string.h>
+
+#include "qdeclarativejsengine_p.h"
+#include "qdeclarativejslexer_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsnodepool_p.h"
+
+
+
+#include "qdeclarativejsparser_p.h"
+#include <QVarLengthArray>
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+using namespace QDeclarativeJS;
+
+QT_QML_BEGIN_NAMESPACE
+
+void Parser::reallocateStack()
+{
+ if (! stack_size)
+ stack_size = 128;
+ else
+ stack_size <<= 1;
+
+ sym_stack = reinterpret_cast<Value*> (qRealloc(sym_stack, stack_size * sizeof(Value)));
+ state_stack = reinterpret_cast<int*> (qRealloc(state_stack, stack_size * sizeof(int)));
+ location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
+}
+
+inline static bool automatic(Engine *driver, int token)
+{
+ return token == QDeclarativeJSGrammar::T_RBRACE
+ || token == 0
+ || driver->lexer()->prevTerminator();
+}
+
+
+Parser::Parser(Engine *engine):
+ driver(engine),
+ tos(0),
+ stack_size(0),
+ sym_stack(0),
+ state_stack(0),
+ location_stack(0),
+ first_token(0),
+ last_token(0)
+{
+}
+
+Parser::~Parser()
+{
+ if (stack_size) {
+ qFree(sym_stack);
+ qFree(state_stack);
+ qFree(location_stack);
+ }
+}
+
+static inline AST::SourceLocation location(Lexer *lexer)
+{
+ AST::SourceLocation loc;
+ loc.offset = lexer->tokenOffset();
+ loc.length = lexer->tokenLength();
+ loc.startLine = lexer->startLineNo();
+ loc.startColumn = lexer->startColumnNo();
+ return loc;
+}
+
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse(int startToken)
+{
+ Lexer *lexer = driver->lexer();
+ bool hadErrors = false;
+ int yytoken = -1;
+ int action = 0;
+
+ token_buffer[0].token = startToken;
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ tos = -1;
+ program = 0;
+
+ do {
+ if (++tos == stack_size)
+ reallocateStack();
+
+ state_stack[tos] = action;
+
+ _Lcheck_token:
+ if (yytoken == -1 && -TERMINAL_COUNT != action_index[action]) {
+ yyprevlloc = yylloc;
+
+ if (first_token == last_token) {
+ yytoken = lexer->lex();
+ yylval = lexer->dval();
+ yylloc = location(lexer);
+ } else {
+ yytoken = first_token->token;
+ yylval = first_token->dval;
+ yylloc = first_token->loc;
+ ++first_token;
+ }
+ }
+
+ action = t_action(action, yytoken);
+ if (action > 0) {
+ if (action != ACCEPT_STATE) {
+ yytoken = -1;
+ sym(1).dval = yylval;
+ loc(1) = yylloc;
+ } else {
+ --tos;
+ return ! hadErrors;
+ }
+ } else if (action < 0) {
+ const int r = -action - 1;
+ tos -= rhs[r];
+
+ switch (r) {
+
+case 0: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 1: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 2: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 3: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 4: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 5: {
+ sym(1).Node = sym(2).Node;
+ program = sym(1).Node;
+} break;
+
+case 6: {
+ sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
+ sym(2).UiObjectMemberList->finish());
+} break;
+
+case 8: {
+ sym(1).Node = sym(1).UiImportList->finish();
+} break;
+
+case 9: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(), sym(1).UiImport);
+} break;
+
+case 10: {
+ sym(1).Node = makeAstNode<AST::UiImportList> (driver->nodePool(),
+ sym(1).UiImportList, sym(2).UiImport);
+} break;
+
+case 13: {
+ sym(1).UiImport->semicolonToken = loc(2);
+} break;
+
+case 15: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->semicolonToken = loc(3);
+} break;
+
+case 17: {
+ sym(1).UiImport->versionToken = loc(2);
+ sym(1).UiImport->asToken = loc(3);
+ sym(1).UiImport->importIdToken = loc(4);
+ sym(1).UiImport->importId = sym(4).sval;
+ sym(1).UiImport->semicolonToken = loc(5);
+} break;
+
+case 19: {
+ sym(1).UiImport->asToken = loc(2);
+ sym(1).UiImport->importIdToken = loc(3);
+ sym(1).UiImport->importId = sym(3).sval;
+ sym(1).UiImport->semicolonToken = loc(4);
+} break;
+
+case 20: {
+ AST::UiImport *node = 0;
+
+ if (AST::StringLiteral *importIdLiteral = AST::cast<AST::StringLiteral *>(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), importIdLiteral->value);
+ node->fileNameToken = loc(2);
+ } else if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(2).Expression)) {
+ node = makeAstNode<AST::UiImport>(driver->nodePool(), qualifiedId);
+ node->fileNameToken = loc(2);
+ }
+
+ sym(1).Node = node;
+
+ if (node) {
+ node->importToken = loc(1);
+ } else {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id or a string literal")));
+
+ return false; // ### remove me
+ }
+} break;
+
+case 21: {
+ sym(1).Node = 0;
+} break;
+
+case 22: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 23: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 24: {
+ AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
+ sym(1).UiObjectMemberList, sym(2).UiObjectMember);
+ sym(1).Node = node;
+} break;
+
+case 25: {
+ sym(1).Node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 26: {
+ AST::UiArrayMemberList *node = makeAstNode<AST::UiArrayMemberList> (driver->nodePool(),
+ sym(1).UiArrayMemberList, sym(3).UiObjectMember);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 27: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 28: {
+ AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 29: {
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId,
+ sym(2).UiObjectInitializer);
+ sym(1).Node = node;
+} break;
+
+case 31: {
+ AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(4).UiArrayMemberList->finish());
+ node->colonToken = loc(2);
+ node->lbracketToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 32: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 33: {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(3).UiQualifiedId, sym(1).UiQualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ node->hasOnToken = true;
+ sym(1).Node = node;
+} break;
+case 34:case 35:case 36:case 37:
+{
+ AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId, sym(3).Statement);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 38:
+
+case 39: {
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+ break;
+}
+
+case 41: {
+ sym(1).Node = 0;
+} break;
+
+case 42: {
+ sym(1).Node = sym(1).UiParameterList->finish ();
+} break;
+
+case 43: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval);
+ node->identifierToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 44: {
+ AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 46: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->parameters = sym(4).UiParameterList;
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 48: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
+ node->type = AST::UiPublicMember::Signal;
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 50: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 52: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 54: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->semicolonToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 56: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
+ sym(5).Expression);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->colonToken = loc(4);
+ node->semicolonToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 58: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isReadonlyMember = true;
+ node->readonlyToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 60: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
+ sym(6).Expression);
+ node->isDefaultMember = true;
+ node->defaultToken = loc(1);
+ node->propertyToken = loc(2);
+ node->typeToken = loc(3);
+ node->identifierToken = loc(4);
+ node->colonToken = loc(5);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 61: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(4).sval, sym(6).sval);
+ node->typeModifier = sym(2).sval;
+ node->propertyToken = loc(1);
+ node->typeModifierToken = loc(2);
+ node->typeToken = loc(4);
+ node->identifierToken = loc(6);
+ node->semicolonToken = loc(7); // insert a fake ';' before ':'
+
+ AST::UiQualifiedId *propertyName = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), sym(6).sval);
+ propertyName->identifierToken = loc(6);
+ propertyName->next = 0;
+
+ AST::UiArrayBinding *binding = makeAstNode<AST::UiArrayBinding> (driver->nodePool(),
+ propertyName, sym(9).UiArrayMemberList->finish());
+ binding->colonToken = loc(7);
+ binding->lbracketToken = loc(8);
+ binding->rbracketToken = loc(10);
+
+ node->binding = binding;
+
+ sym(1).Node = node;
+} break;
+
+case 62: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
+ node->propertyToken = loc(1);
+ node->typeToken = loc(2);
+ node->identifierToken = loc(3);
+ node->semicolonToken = loc(4); // insert a fake ';' before ':'
+
+ AST::UiQualifiedId *propertyName = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), sym(3).sval);
+ propertyName->identifierToken = loc(3);
+ propertyName->next = 0;
+
+ AST::UiObjectBinding *binding = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ propertyName, sym(5).UiQualifiedId, sym(6).UiObjectInitializer);
+ binding->colonToken = loc(4);
+
+ node->binding = binding;
+
+ sym(1).Node = node;
+} break;
+
+case 63: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+
+case 64: {
+ sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
+} break;
+
+case 66: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 67: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 68: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 69: {
+ QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_ON]);
+ sym(1).sval = driver->intern(s.constData(), s.length());
+ break;
+}
+
+case 70: {
+ AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
+ node->thisToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 71: {
+ AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 72: {
+ AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
+ node->nullToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 73: {
+ AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
+ node->trueToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 74: {
+ AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
+ node->falseToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 75: {
+ AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+case 76:
+case 77: {
+ AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 78: {
+ bool rx = lexer->scanRegExp(Lexer::NoPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
+ }
+
+ loc(1).length = lexer->tokenLength();
+
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 79: {
+ bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
+ if (!rx) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
+ }
+
+ loc(1).length = lexer->tokenLength();
+
+ AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
+ node->literalToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 80: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 81: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 82: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 83: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 84: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 85: {
+ AST::ObjectLiteral *node = 0;
+ if (sym(2).Node)
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ else
+ node = makeAstNode<AST::ObjectLiteral> (driver->nodePool());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 86: {
+ AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
+ sym(2).PropertyNameAndValueList->finish ());
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 87: {
+ AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
+ node->lparenToken = loc(1);
+ node->rparenToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 88: {
+ if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken,
+ QLatin1String("Ignored annotation")));
+
+ sym(1).Expression = mem->base;
+ }
+
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(1).Expression)) {
+ sym(1).UiQualifiedId = qualifiedId;
+ } else {
+ sym(1).UiQualifiedId = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1),
+ QLatin1String("Expected a qualified name id")));
+
+ return false; // ### recover
+ }
+} break;
+
+case 89: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
+} break;
+
+case 90: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
+} break;
+
+case 91: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 92: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 93: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
+ node->commaToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 94: {
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 95: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyName, sym(3).Expression);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 96: {
+ AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
+ sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
+ node->commaToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 97: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+case 98:
+case 99: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 100: {
+ AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 101: {
+ AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 102: {
+ AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
+ node->propertyNameToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 103:
+
+case 104:
+
+case 105:
+
+case 106:
+
+case 107:
+
+case 108:
+
+case 109:
+
+case 110:
+
+case 111:
+
+case 112:
+
+case 113:
+
+case 114:
+
+case 115:
+
+case 116:
+
+case 117:
+
+case 118:
+
+case 119:
+
+case 120:
+
+case 121:
+
+case 122:
+
+case 123:
+
+case 124:
+
+case 125:
+
+case 126:
+
+case 127:
+
+case 128:
+
+case 129:
+
+case 130:
+
+case 131:
+
+case 132:
+
+case 133:
+{
+ sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
+} break;
+
+case 138: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 139: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 140: {
+ AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
+ node->newToken = loc(1);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 142: {
+ AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
+ node->newToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 143: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 144: {
+ AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 145: {
+ AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->lbracketToken = loc(2);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 146: {
+ AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
+ node->dotToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 147: {
+ sym(1).Node = 0;
+} break;
+
+case 148: {
+ sym(1).Node = sym(1).ArgumentList->finish();
+} break;
+
+case 149: {
+ sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
+} break;
+
+case 150: {
+ AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 154: {
+ AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->incrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 155: {
+ AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
+ node->decrementToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 157: {
+ AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
+ node->deleteToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 158: {
+ AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
+ node->voidToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 159: {
+ AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
+ node->typeofToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 160: {
+ AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->incrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 161: {
+ AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
+ node->decrementToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 162: {
+ AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
+ node->plusToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 163: {
+ AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
+ node->minusToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 164: {
+ AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
+ node->tildeToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 165: {
+ AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
+ node->notToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 167: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mul, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 168: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Div, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 169: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Mod, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 171: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Add, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 172: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Sub, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 174: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::LShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 175: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::RShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 176: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::URShift, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 178: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 179: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 180: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 181: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 182: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 183: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::In, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 185: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Lt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 186: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Gt, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 187: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Le, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 188: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Ge, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 189: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::InstanceOf, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 191: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 192: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 193: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 194: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 196: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Equal, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 197: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::NotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 198: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 199: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::StrictNotEqual, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 201: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 203: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitAnd, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 205: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 207: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitXor, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 209: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 211: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::BitOr, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 213: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 215: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::And, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 217: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 219: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 221: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 223: {
+ AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
+ sym(3).Expression, sym(5).Expression);
+ node->questionToken = loc(2);
+ node->colonToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 225: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 227: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ sym(2).ival, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 228: {
+ sym(1).ival = QSOperator::Assign;
+} break;
+
+case 229: {
+ sym(1).ival = QSOperator::InplaceMul;
+} break;
+
+case 230: {
+ sym(1).ival = QSOperator::InplaceDiv;
+} break;
+
+case 231: {
+ sym(1).ival = QSOperator::InplaceMod;
+} break;
+
+case 232: {
+ sym(1).ival = QSOperator::InplaceAdd;
+} break;
+
+case 233: {
+ sym(1).ival = QSOperator::InplaceSub;
+} break;
+
+case 234: {
+ sym(1).ival = QSOperator::InplaceLeftShift;
+} break;
+
+case 235: {
+ sym(1).ival = QSOperator::InplaceRightShift;
+} break;
+
+case 236: {
+ sym(1).ival = QSOperator::InplaceURightShift;
+} break;
+
+case 237: {
+ sym(1).ival = QSOperator::InplaceAnd;
+} break;
+
+case 238: {
+ sym(1).ival = QSOperator::InplaceXor;
+} break;
+
+case 239: {
+ sym(1).ival = QSOperator::InplaceOr;
+} break;
+
+case 241: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 242: {
+ sym(1).Node = 0;
+} break;
+
+case 245: {
+ AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 246: {
+ sym(1).Node = 0;
+} break;
+
+case 263: {
+ AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 264: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
+} break;
+
+case 265: {
+ sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
+} break;
+
+case 266: {
+ sym(1).Node = 0;
+} break;
+
+case 267: {
+ sym(1).Node = sym(1).StatementList->finish ();
+} break;
+
+case 269: {
+ AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
+ sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
+ node->declarationKindToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 270: {
+ sym(1).ival = T_CONST;
+} break;
+
+case 271: {
+ sym(1).ival = T_VAR;
+} break;
+
+case 272: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+
+case 273: {
+ AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
+ sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 274: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
+} break;
+
+case 275: {
+ sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
+} break;
+
+case 276: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 277: {
+ AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 278: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+
+case 279: {
+ sym(1).Node = 0;
+} break;
+
+case 281: {
+ // ### TODO: AST for initializer
+ sym(1) = sym(2);
+} break;
+
+case 282: {
+ sym(1).Node = 0;
+} break;
+
+case 284: {
+ AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
+ node->semicolonToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 286: {
+ AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 287: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ node->elseToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 288: {
+ AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->ifToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 290: {
+ AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
+ node->doToken = loc(1);
+ node->whileToken = loc(3);
+ node->lparenToken = loc(4);
+ node->rparenToken = loc(6);
+ node->semicolonToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 291: {
+ AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->whileToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 292: {
+ AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Expression, sym(9).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->firstSemicolonToken = loc(4);
+ node->secondSemicolonToken = loc(6);
+ node->rparenToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 293: {
+ AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
+ sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
+ sym(8).Expression, sym(10).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->firstSemicolonToken = loc(5);
+ node->secondSemicolonToken = loc(7);
+ node->rparenToken = loc(9);
+ sym(1).Node = node;
+} break;
+
+case 294: {
+ AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
+ sym(5).Expression, sym(7).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->inToken = loc(4);
+ node->rparenToken = loc(6);
+ sym(1).Node = node;
+} break;
+
+case 295: {
+ AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
+ sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
+ node->forToken = loc(1);
+ node->lparenToken = loc(2);
+ node->varToken = loc(3);
+ node->inToken = loc(5);
+ node->rparenToken = loc(7);
+ sym(1).Node = node;
+} break;
+
+case 297: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
+ node->continueToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 299: {
+ AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
+ node->continueToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 301: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
+ node->breakToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 303: {
+ AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
+ node->breakToken = loc(1);
+ node->identifierToken = loc(2);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 305: {
+ AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
+ node->returnToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 306: {
+ AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
+ node->withToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 307: {
+ AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
+ node->switchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 308: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 309: {
+ AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
+ node->lbraceToken = loc(1);
+ node->rbraceToken = loc(5);
+ sym(1).Node = node;
+} break;
+
+case 310: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
+} break;
+
+case 311: {
+ sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
+} break;
+
+case 312: {
+ sym(1).Node = 0;
+} break;
+
+case 313: {
+ sym(1).Node = sym(1).CaseClauses->finish ();
+} break;
+
+case 314: {
+ AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
+ node->caseToken = loc(1);
+ node->colonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 315: {
+ AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
+ node->defaultToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+case 316:
+case 317: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 318: {
+ AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
+ node->identifierToken = loc(1);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 320: {
+ AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
+ node->throwToken = loc(1);
+ node->semicolonToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 321: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 322: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 323: {
+ AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
+ node->tryToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 324: {
+ AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
+ node->catchToken = loc(1);
+ node->lparenToken = loc(2);
+ node->identifierToken = loc(3);
+ node->rparenToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 325: {
+ AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
+ node->finallyToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 327: {
+ AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
+ node->debuggerToken = loc(1);
+ node->semicolonToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 328: {
+ AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 329: {
+ AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
+ node->functionToken = loc(1);
+ if (sym(2).sval)
+ node->identifierToken = loc(2);
+ node->lparenToken = loc(3);
+ node->rparenToken = loc(5);
+ node->lbraceToken = loc(6);
+ node->rbraceToken = loc(8);
+ sym(1).Node = node;
+} break;
+
+case 330: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 331: {
+ AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
+ node->commaToken = loc(2);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 332: {
+ sym(1).Node = 0;
+} break;
+
+case 333: {
+ sym(1).Node = sym(1).FormalParameterList->finish ();
+} break;
+
+case 334: {
+ sym(1).Node = 0;
+} break;
+
+case 336: {
+ sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+
+case 337: {
+ sym(1).Node = makeAstNode<AST::Program> (driver->nodePool(), sym(1).SourceElements->finish ());
+} break;
+
+case 338: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
+} break;
+
+case 339: {
+ sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
+} break;
+
+case 340: {
+ sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
+} break;
+
+case 341: {
+ sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
+} break;
+
+case 342: {
+ sym(1).sval = 0;
+} break;
+
+case 344: {
+ sym(1).Node = 0;
+} break;
+
+ } // switch
+ action = nt_action(state_stack[tos], lhs[r] - TERMINAL_COUNT);
+ } // if
+ } while (action != 0);
+
+ if (first_token == last_token) {
+ const int errorState = state_stack[tos];
+
+ // automatic insertion of `;'
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ SavedToken &tk = token_buffer[0];
+ tk.token = yytoken;
+ tk.dval = yylval;
+ tk.loc = yylloc;
+
+ yylloc = yyprevlloc;
+ yylloc.offset += yylloc.length;
+ yylloc.startColumn += yylloc.length;
+ yylloc.length = 0;
+
+ //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[1];
+
+ yytoken = T_SEMICOLON;
+ yylval = 0;
+
+ action = errorState;
+
+ goto _Lcheck_token;
+ }
+
+ hadErrors = true;
+
+ token_buffer[0].token = yytoken;
+ token_buffer[0].dval = yylval;
+ token_buffer[0].loc = yylloc;
+
+ token_buffer[1].token = yytoken = lexer->lex();
+ token_buffer[1].dval = yylval = lexer->dval();
+ token_buffer[1].loc = yylloc = location(lexer);
+
+ if (t_action(errorState, yytoken)) {
+ QString msg;
+ int token = token_buffer[0].token;
+ if (token < 0 || token >= TERMINAL_COUNT)
+ msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ else
+ msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+
+ static int tokens[] = {
+ T_PLUS,
+ T_EQ,
+
+ T_COMMA,
+ T_COLON,
+ T_SEMICOLON,
+
+ T_RPAREN, T_RBRACKET, T_RBRACE,
+
+ T_NUMERIC_LITERAL,
+ T_IDENTIFIER,
+
+ T_LPAREN, T_LBRACKET, T_LBRACE,
+
+ EOF_SYMBOL
+ };
+
+ for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
+ int a = t_action(errorState, *tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = *tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ first_token = &token_buffer[0];
+ last_token = &token_buffer[2];
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
+ if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM ||
+ tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION ||
+ tk == T_FEED_JS_SOURCE_ELEMENT)
+ continue;
+
+ int a = t_action(errorState, tk);
+ if (a > 0 && t_action(a, yytoken)) {
+ const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+
+ yytoken = tk;
+ yylval = 0;
+ yylloc = token_buffer[0].loc;
+ yylloc.length = 0;
+
+ action = errorState;
+ goto _Lcheck_token;
+ }
+ }
+
+ const QString msg = qApp->translate("QDeclarativeParser", "Syntax error");
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
+ }
+
+ return false;
+}
+
+QT_QML_END_NAMESPACE
+
+
diff --git a/tools/qdoc3/declarativeparser/qdeclarativejsparser_p.h b/tools/qdoc3/declarativeparser/qdeclarativejsparser_p.h
new file mode 100644
index 0000000000..5eec1a4850
--- /dev/null
+++ b/tools/qdoc3/declarativeparser/qdeclarativejsparser_p.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+//
+// This file is automatically generated from qmljs.g.
+// Changes will be lost.
+//
+
+#ifndef QDECLARATIVEJSPARSER_P_H
+#define QDECLARATIVEJSPARSER_P_H
+
+#include "qdeclarativejsglobal_p.h"
+#include "qdeclarativejsgrammar_p.h"
+#include "qdeclarativejsast_p.h"
+#include "qdeclarativejsengine_p.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+QT_QML_BEGIN_NAMESPACE
+
+namespace QDeclarativeJS {
+
+class Engine;
+class NameId;
+
+class QML_PARSER_EXPORT Parser: protected QDeclarativeJSGrammar
+{
+public:
+ union Value {
+ int ival;
+ double dval;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiParameterList *UiParameterList;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiArrayMemberList *UiArrayMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
+ AST::UiSignature *UiSignature;
+ AST::UiFormalList *UiFormalList;
+ AST::UiFormal *UiFormal;
+ };
+
+public:
+ Parser(Engine *engine);
+ ~Parser();
+
+ // parse a UI program
+ bool parse() { return parse(T_FEED_UI_PROGRAM); }
+ bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
+ bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
+ bool parseSourceElement() { return parse(T_FEED_JS_SOURCE_ELEMENT); }
+ bool parseUiObjectMember() { return parse(T_FEED_UI_OBJECT_MEMBER); }
+ bool parseProgram() { return parse(T_FEED_JS_PROGRAM); }
+
+ AST::UiProgram *ast() const
+ { return AST::cast<AST::UiProgram *>(program); }
+
+ AST::Statement *statement() const
+ {
+ if (! program)
+ return 0;
+
+ return program->statementCast();
+ }
+
+ AST::ExpressionNode *expression() const
+ {
+ if (! program)
+ return 0;
+
+ return program->expressionCast();
+ }
+
+ AST::UiObjectMember *uiObjectMember() const
+ {
+ if (! program)
+ return 0;
+
+ return program->uiObjectMemberCast();
+ }
+
+ AST::Node *rootNode() const
+ { return program; }
+
+ QList<DiagnosticMessage> diagnosticMessages() const
+ { return diagnostic_messages; }
+
+ inline DiagnosticMessage diagnosticMessage() const
+ {
+ foreach (const DiagnosticMessage &d, diagnostic_messages) {
+ if (! d.kind == DiagnosticMessage::Warning)
+ return d;
+ }
+
+ return DiagnosticMessage();
+ }
+
+ inline QString errorMessage() const
+ { return diagnosticMessage().message; }
+
+ inline int errorLineNumber() const
+ { return diagnosticMessage().loc.startLine; }
+
+ inline int errorColumnNumber() const
+ { return diagnosticMessage().loc.startColumn; }
+
+protected:
+ bool parse(int startToken);
+
+ void reallocateStack();
+
+ inline Value &sym(int index)
+ { return sym_stack [tos + index - 1]; }
+
+ inline AST::SourceLocation &loc(int index)
+ { return location_stack [tos + index - 1]; }
+
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
+protected:
+ Engine *driver;
+ int tos;
+ int stack_size;
+ Value *sym_stack;
+ int *state_stack;
+ AST::SourceLocation *location_stack;
+
+ AST::Node *program;
+
+ // error recovery
+ enum { TOKEN_BUFFER_SIZE = 3 };
+
+ struct SavedToken {
+ int token;
+ double dval;
+ AST::SourceLocation loc;
+ };
+
+ double yylval;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
+
+ SavedToken token_buffer[TOKEN_BUFFER_SIZE];
+ SavedToken *first_token;
+ SavedToken *last_token;
+
+ QList<DiagnosticMessage> diagnostic_messages;
+};
+
+} // end of namespace QDeclarativeJS
+
+
+
+#define J_SCRIPT_REGEXPLITERAL_RULE1 78
+
+#define J_SCRIPT_REGEXPLITERAL_RULE2 79
+
+QT_QML_END_NAMESPACE
+
+
+
+#endif // QDECLARATIVEJSPARSER_P_H
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index e180c0a72c..1bc4992595 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -61,230 +61,6 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
int DitaXmlGenerator::id = 0;
-bool DitaXmlGenerator::inApiDesc = false;
-bool DitaXmlGenerator::inSection = false;
-bool DitaXmlGenerator::inDetailedDescription = false;
-bool DitaXmlGenerator::inLegaleseText = false;
-
-#define cxxapi_d_xref Doc::alias("cxxapi-d-xref")
-#define cxxclass Doc::alias("cxxclass")
-#define cxxdefine Doc::alias("cxxdefine")
-#define cxxenumeration Doc::alias("cxxenumeration")
-#define cxxfile Doc::alias("cxxfile")
-#define cxxfunction Doc::alias("cxxfunction")
-#define cxxstruct Doc::alias("cxxstruct")
-#define cxxtypedef Doc::alias("cxxtypedef")
-#define cxxunion Doc::alias("cxxunion")
-#define cxxvariable Doc::alias("cxxvariable")
-
-#define CXXAPIMAP Doc::alias("cxxAPIMap")
-#define CXXCLASSREF Doc::alias("cxxClassRef")
-#define CXXDEFINEREF Doc::alias("cxxDefineRef")
-#define CXXENUMERATIONREF Doc::alias("cxxEnumerationRef")
-#define CXXFILEREF Doc::alias("cxxFileRef")
-#define CXXFUNCTIONREF Doc::alias("cxxFunctionRef")
-#define CXXSTRUCTREF Doc::alias("cxxStructRef")
-#define CXXTYPDEFREF Doc::alias("cxxTypedefRef")
-#define CXXUNIONREF Doc::alias("cxxUnionRef")
-#define CXXVARIABLEREF Doc::alias("cxxVariableRef")
-
-#define CXXCLASS Doc::alias("cxxClass")
-#define CXXCLASSABSTRACT Doc::alias("cxxClassAbstract")
-#define CXXCLASSACCESSSPECIFIER Doc::alias("cxxClassAccessSpecifier")
-#define CXXCLASSAPIITEMLOCATION Doc::alias("cxxClassAPIItemLocation")
-#define CXXCLASSBASECLASS Doc::alias("cxxClassBaseClass")
-#define CXXCLASSBASECLASSSTRUCT Doc::alias("cxxClassBaseStruct")
-#define CXXCLASSBASEUNION Doc::alias("cxxClassBaseUnion")
-#define CXXCLASSDECLARATIONFILE Doc::alias("cxxClassDeclarationFile")
-#define CXXCLASSDECLARATIONFILELINE Doc::alias("cxxClassDeclarationFileLine")
-#define CXXCLASSDEFINITION Doc::alias("cxxClassDefinition")
-#define CXXCLASSDEFINITIONFILE Doc::alias("cxxClassDefinitionFile")
-#define CXXCLASSDEFINITIONFILEEND Doc::alias("cxxClassDefinitionFileLineEnd")
-#define CXXCLASSDEFINITIONFILESTART Doc::alias("cxxClassDefinitionFileLineStart")
-#define CXXCLASSDERIVATION Doc::alias("cxxClassDerivation")
-#define CXXCLASSDERIVATIONACCESSSPECIFIER Doc::alias("cxxClassDerivationAccessSpecifier")
-#define CXXCLASSDERIVATIONS Doc::alias("cxxClassDerivations")
-#define CXXCLASSDERIVATIONVIRTUAL Doc::alias("cxxClassDerivationVirtual")
-#define CXXCLASSDETAIL Doc::alias("cxxClassDetail")
-#define CXXCLASSENUMERATIONINHERITED Doc::alias("cxxClassEnumerationInherited")
-#define CXXCLASSENUMERATORINHERITED Doc::alias("cxxClassEnumeratorInherited")
-#define CXXCLASSFUNCTIONINHERITED Doc::alias("cxxClassFunctionInherited")
-#define CXXCLASSINHERITS Doc::alias("cxxClassInherits")
-#define CXXCLASSINHERITSDETAIL Doc::alias("cxxClassInheritsDetail")
-#define CXXCLASSNESTED Doc::alias("cxxClassNested")
-#define CXXCLASSNESTEDCLASS Doc::alias("cxxClassNestedClass")
-#define CXXCLASSNESTEDDETAIL Doc::alias("cxxClassNestedDetail")
-#define CXXCLASSNESTEDSTRUCT Doc::alias("cxxClassNestedStruct")
-#define CXXCLASSNESTEDUNION Doc::alias("cxxClassNestedUnion")
-#define CXXCLASSTEMPLATEPARAMETER Doc::alias("cxxClassTemplateParameter")
-#define CXXCLASSTEMPLATEPARAMETERS Doc::alias("cxxClassTemplateParameters")
-#define CXXCLASSTEMPLATEPARAMETERTYPE Doc::alias("cxxClassTemplateParameterType")
-#define CXXCLASSVARIABLEINHERITED Doc::alias("cxxClassVariableInherited")
-
-#define CXXDEFINE Doc::alias("cxxDefine")
-#define CXXDEFINEACCESSSPECIFIER Doc::alias("cxxDefineAccessSpecifier")
-#define CXXDEFINEAPIITEMLOCATION Doc::alias("cxxDefineAPIItemLocation")
-#define CXXDEFINEDECLARATIONFILE Doc::alias("cxxDefineDeclarationFile")
-#define CXXDEFINEDECLARATIONFILELINE Doc::alias("cxxDefineDeclarationFileLine")
-#define CXXDEFINEDEFINITION Doc::alias("cxxDefineDefinition")
-#define CXXDEFINEDETAIL Doc::alias("cxxDefineDetail")
-#define CXXDEFINENAMELOOKUP Doc::alias("cxxDefineNameLookup")
-#define CXXDEFINEPARAMETER Doc::alias("cxxDefineParameter")
-#define CXXDEFINEPARAMETERDECLARATIONNAME Doc::alias("cxxDefineParameterDeclarationName")
-#define CXXDEFINEPARAMETERS Doc::alias("cxxDefineParameters")
-#define CXXDEFINEPROTOTYPE Doc::alias("cxxDefinePrototype")
-#define CXXDEFINEREIMPLEMENTED Doc::alias("cxxDefineReimplemented")
-
-#define CXXENUMERATION Doc::alias("cxxEnumeration")
-#define CXXENUMERATIONACCESSSPECIFIER Doc::alias("cxxEnumerationAccessSpecifier")
-#define CXXENUMERATIONAPIITEMLOCATION Doc::alias("cxxEnumerationAPIItemLocation")
-#define CXXENUMERATIONDECLARATIONFILE Doc::alias("cxxEnumerationDeclarationFile")
-#define CXXENUMERATIONDECLARATIONFILELINE Doc::alias("cxxEnumerationDeclarationFileLine")
-#define CXXENUMERATIONDEFINITION Doc::alias("cxxEnumerationDefinition")
-#define CXXENUMERATIONDEFINITIONFILE Doc::alias("cxxEnumerationDefinitionFile")
-#define CXXENUMERATIONDEFINITIONFILELINEEND Doc::alias("cxxEnumerationDefinitionFileLineEnd")
-#define CXXENUMERATIONDEFINITIONFILELINESTART Doc::alias("cxxEnumerationDefinitionFileLineStart")
-#define CXXENUMERATIONDETAIL Doc::alias("cxxEnumerationDetail")
-#define CXXENUMERATIONNAMELOOKUP Doc::alias("cxxEnumerationNameLookup")
-#define CXXENUMERATIONPROTOTYPE Doc::alias("cxxEnumerationPrototype")
-#define CXXENUMERATIONREIMPLEMENTED Doc::alias("cxxEnumerationReimplemented")
-#define CXXENUMERATIONSCOPEDNAME Doc::alias("cxxEnumerationScopedName")
-#define CXXENUMERATOR Doc::alias("cxxEnumerator")
-#define CXXENUMERATORAPIITEMLOCATION Doc::alias("cxxEnumeratorAPIItemLocation")
-#define CXXENUMERATORDECLARATIONFILE Doc::alias("cxxEnumeratorDeclarationFile")
-#define CXXENUMERATORDECLARATIONFILELINE Doc::alias("cxxEnumeratorDeclarationFileLine")
-#define CXXENUMERATORINITIALISER Doc::alias("cxxEnumeratorInitialiser")
-#define CXXENUMERATORNAMELOOKUP Doc::alias("cxxEnumeratorNameLookup")
-#define CXXENUMERATORPROTOTYPE Doc::alias("cxxEnumeratorPrototype")
-#define CXXENUMERATORS Doc::alias("cxxEnumerators")
-#define CXXENUMERATORSCOPEDNAME Doc::alias("cxxEnumeratorScopedName")
-
-#define CXXFILE_INFO_TYPES Doc::alias("cxxFile-info-types")
-#define CXXFILE_TYPES_DEFAULT Doc::alias("cxxFile-types-default")
-#define CXXFILE Doc::alias("cxxFile")
-#define CXXFILEAPIITMELOCATION Doc::alias("cxxFileAPIItemLocation")
-#define CXXFILEDECLARATIONFILE Doc::alias("cxxFileDeclarationFile")
-
-#define CXXFUNCTION Doc::alias("cxxFunction")
-#define CXXFUNCTIONACCESSSPECIFIER Doc::alias("cxxFunctionAccessSpecifier")
-#define CXXFUNCTIONAPIITEMLOCATION Doc::alias("cxxFunctionAPIItemLocation")
-#define CXXFUNCTIONCONST Doc::alias("cxxFunctionConst")
-#define CXXFUNCTIONCONSTRUCTOR Doc::alias("cxxFunctionConstructor")
-#define CXXFUNCTIONDECLARATIONFILE Doc::alias("cxxFunctionDeclarationFile")
-#define CXXFUNCTIONDECLARATIONFILELINE Doc::alias("cxxFunctionDeclarationFileLine")
-#define CXXFUNCTIONDECLAREDTYPE Doc::alias("cxxFunctionDeclaredType")
-#define CXXFUNCTIONDEFINITION Doc::alias("cxxFunctionDefinition")
-#define CXXFUNCTIONDEFINITIONFILE Doc::alias("cxxFunctionDefinitionFile")
-#define CXXFUNCTIONDEFINITIONFILELINEEND Doc::alias("cxxFunctionDefinitionFileLineEnd")
-#define CXXFUNCTIONDEFINITIONFILELINESTART Doc::alias("cxxFunctionDefinitionFileLineStart")
-#define CXXFUNCTIONDESTRUCTOR Doc::alias("cxxFunctionDestructor")
-#define CXXFUNCTIONDETAIL Doc::alias("cxxFunctionDetail")
-#define CXXFUNCTIONEXPLICIT Doc::alias("cxxFunctionExplicit")
-#define CXXFUNCTIONINLINE Doc::alias("cxxFunctionInline")
-#define CXXFUNCTIONNAMELOOKUP Doc::alias("cxxFunctionNameLookup")
-#define CXXFUNCTIONPARAMETER Doc::alias("cxxFunctionParameter")
-#define CXXFUNCTIONPARAMETERDECLARATIONNAME Doc::alias("cxxFunctionParameterDeclarationName")
-#define CXXFUNCTIONPARAMETERDECLAREDTYPE Doc::alias("cxxFunctionParameterDeclaredType")
-#define CXXFUNCTIONPARAMETERDEFAULTVALUE Doc::alias("cxxFunctionParameterDefaultValue")
-#define CXXFUNCTIONPARAMETERDEFINITIONNAME Doc::alias("cxxFunctionParameterDefinitionName")
-#define CXXFUNCTIONPARAMETERS Doc::alias("cxxFunctionParameters")
-#define CXXFUNCTIONPROTOTYPE Doc::alias("cxxFunctionPrototype")
-#define CXXFUNCTIONPUREVIRTUAL Doc::alias("cxxFunctionPureVirtual")
-#define CXXFUNCTIONREIMPLEMENTED Doc::alias("cxxFunctionReimplemented")
-#define CXXFUNCTIONRETURNTYPE Doc::alias("cxxFunctionReturnType")
-#define CXXFUNCTIONSCOPEDNAME Doc::alias("cxxFunctionScopedName")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxFunctionStorageClassSpecifierExtern")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxFunctionStorageClassSpecifierMutable")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxFunctionStorageClassSpecifierStatic")
-#define CXXFUNCTIONTEMPLATEPARAMETER Doc::alias("cxxFunctionTemplateParameter")
-#define CXXFUNCTIONTEMPLATEPARAMETERS Doc::alias("cxxFunctionTemplateParameters")
-#define CXXFUNCTIONTEMPLATEPARAMETERTYPE Doc::alias("cxxFunctionTemplateParameterType")
-#define CXXFUNCTIONVIRTUAL Doc::alias("cxxFunctionVirtual")
-#define CXXFUNCTIONVOLATILE Doc::alias("cxxFunctionVolatile")
-
-#define CXXSTRUCT Doc::alias("cxxStruct")
-#define CXXSTRUCTABSTRACT Doc::alias("cxxStructAbstract")
-#define CXXSTRUCTACCESSSPECIFIER Doc::alias("cxxStructAccessSpecifier")
-#define CXXSTRUCTAPIITEMLOCATION Doc::alias("cxxStructAPIItemLocation")
-#define CXXSTRUCTBASECLASS Doc::alias("cxxStructBaseClass")
-#define CXXSTRUCTBASESTRUCT Doc::alias("cxxStructBaseStruct")
-#define CXXSTRUCTBASEUNION Doc::alias("cxxStructBaseUnion")
-#define CXXSTRUCTDECLARATIONFILE Doc::alias("cxxStructDeclarationFile")
-#define CXXSTRUCTDECLARATIONFILELINE Doc::alias("cxxStructDeclarationFileLine")
-#define CXXSTRUCTDEFINITION Doc::alias("cxxStructDefinition")
-#define CXXSTRUCTDEFINITIONFILE Doc::alias("cxxStructDefinitionFile")
-#define CXXSTRUCTDEFINITIONFILELINEEND Doc::alias("cxxStructDefinitionFileLineEnd")
-#define CXXSTRUCTDEFINITIONFILELINESTART Doc::alias("cxxStructDefinitionFileLineStart")
-#define CXXSTRUCTDERIVATION Doc::alias("cxxStructDerivation")
-#define CXXSTRUCTDERIVATIONACCESSSPECIFIER Doc::alias("cxxStructDerivationAccessSpecifier")
-#define CXXSTRUCTDERIVATIONS Doc::alias("cxxStructDerivations")
-#define CXXSTRUCTDERIVATIONVIRTUAL Doc::alias("cxxStructDerivationVirtual")
-#define CXXSTRUCTDETAIL Doc::alias("cxxStructDetail")
-#define CXXSTRUCTENUMERATIONINHERITED Doc::alias("cxxStructEnumerationInherited")
-#define CXXSTRUCTENUMERATORINHERITED Doc::alias("cxxStructEnumeratorInherited")
-#define CXXSTRUCTFUNCTIONINHERITED Doc::alias("cxxStructFunctionInherited")
-#define CXXSTRUCTINHERITS Doc::alias("cxxStructInherits")
-#define CXXSTRUCTINHERITSDETAIL Doc::alias("cxxStructInheritsDetail")
-#define CXXSTRUCTNESTED Doc::alias("cxxStructNested")
-#define CXXSTRUCTNESTEDCLASS Doc::alias("cxxStructNestedClass")
-#define CXXSTRUCTNESTEDDETAIL Doc::alias("cxxStructNestedDetail")
-#define CXXSTRUCTNESTEDSTRUCT Doc::alias("cxxStructNestedStruct")
-#define CXXSTRUCTNESTEDUNION Doc::alias("cxxStructNestedUnion")
-#define CXXSTRUCTTEMPLATEPARAMETER Doc::alias("cxxStructTemplateParameter")
-#define CXXSTRUCTTEMPLATEPARAMETERS Doc::alias("cxxStructTemplateParameters")
-#define CXXSTRUCTTEMPLATEPARAMETERTYPE Doc::alias("cxxStructTemplateParameterType")
-#define CXXSTRUCTVARIABLEINHERITED Doc::alias("cxxStructVariableInherited")
-
-#define CXXTYPEDEF Doc::alias("cxxTypedef")
-#define CXXTYPEDEFACCESSSPECIFIER Doc::alias("cxxTypedefAccessSpecifier")
-#define CXXTYPEDEFAPIITEMLOCATION Doc::alias("cxxTypedefAPIItemLocation")
-#define CXXTYPEDEFDECLARATIONFILE Doc::alias("cxxTypedefDeclarationFile")
-#define CXXTYPEDEFDECLARATIONFILELINE Doc::alias("cxxTypedefDeclarationFileLine")
-#define CXXTYPEDEFDECLAREDTYPE Doc::alias("cxxTypedefDeclaredType")
-#define CXXTYPEDEFDEFINITION Doc::alias("cxxTypedefDefinition")
-#define CXXTYPEDEFDETAIL Doc::alias("cxxTypedefDetail")
-#define CXXTYPEDEFNAMELOOKUP Doc::alias("cxxTypedefNameLookup")
-#define CXXTYPEDEFPROTOTYPE Doc::alias("cxxTypedefPrototype")
-#define CXXTYPEDEFREIMPLEMENTED Doc::alias("cxxTypedefReimplemented")
-#define CXXTYPEDEFSCOPEDNAME Doc::alias("cxxTypedefScopedName")
-
-#define CXXUNION Doc::alias("cxxUnion")
-#define CXXUNIONABSTRACT Doc::alias("cxxUnionAbstract")
-#define CXXUNIONACCESSSPECIFIER Doc::alias("cxxUnionAccessSpecifier")
-#define CXXUNIONAPIITEMLOCATION Doc::alias("cxxUnionAPIItemLocation")
-#define CXXUNIONDECLARATIONFILE Doc::alias("cxxUnionDeclarationFile")
-#define CXXUNIONDECLARATIONFILELINE Doc::alias("cxxUnionDeclarationFileLine")
-#define CXXUNIONDEFINITION Doc::alias("cxxUnionDefinition")
-#define CXXUNIONDEFINITIONFILE Doc::alias("cxxUnionDefinitionFile")
-#define CXXUNIONDEFINITIONFILELINEEND Doc::alias("cxxUnionDefinitionFileLineEnd")
-#define CXXUNIONDEFINITIONFILELINESTART Doc::alias("cxxUnionDefinitionFileLineStart")
-#define CXXUNIONDETAIL Doc::alias("cxxUnionDetail")
-#define CXXUNIONNESTED Doc::alias("cxxUnionNested")
-#define CXXUNIONNESTEDCLASS Doc::alias("cxxUnionNestedClass")
-#define CXXUNIONNESTEDDETAIL Doc::alias("cxxUnionNestedDetail")
-#define CXXUNIONNESTEDSTRUCT Doc::alias("cxxUnionNestedStruct")
-#define CXXUNIONNESTEDUNION Doc::alias("cxxUnionNestedUnion")
-#define CXXUNIONTEMPLATEPARAMETER Doc::alias("cxxUnionTemplateParameter")
-#define CXXUNIONTEMPLATEPARAMETERS Doc::alias("cxxUnionTemplateParameters")
-#define CXXUNIONTEMPLATEPARAMETERTYPE Doc::alias("cxxUnionTemplateParameterType")
-
-#define CXXVARIABLE Doc::alias("cxxVariable")
-#define CXXVARIABLEACCESSSPECIFIER Doc::alias("cxxVariableAccessSpecifier")
-#define CXXVARIABLEAPIITEMLOCATION Doc::alias("cxxVariableAPIItemLocation")
-#define CXXVARIABLECONST Doc::alias("cxxVariableConst")
-#define CXXVARIABLEDECLARATIONFILE Doc::alias("cxxVariableDeclarationFile")
-#define CXXVARIABLEDECLARATIONFILELINE Doc::alias("cxxVariableDeclarationFileLine")
-#define CXXVARIABLEDECLAREDTYPE Doc::alias("cxxVariableDeclaredType")
-#define CXXVARIABLEDEFINITION Doc::alias("cxxVariableDefinition")
-#define CXXVARIABLEDETAIL Doc::alias("cxxVariableDetail")
-#define CXXVARIABLENAMELOOKUP Doc::alias("cxxVariableNameLookup")
-#define CXXVARIABLEPROTOTYPE Doc::alias("cxxVariablePrototype")
-#define CXXVARIABLEREIMPLEMENTED Doc::alias("cxxVariableReimplemented")
-#define CXXVARIABLESCOPEDNAME Doc::alias("cxxVariableScopedName")
-#define CXXVARIABLESTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxVariableStorageClassSpecifierExtern")
-#define CXXVARIABLESTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxVariableStorageClassSpecifierMutable")
-#define CXXVARIABLESTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxVariableStorageClassSpecifierStatic")
-#define CXXVARIABLEVOLATILE Doc::alias("cxxVariableVolatile")
QString DitaXmlGenerator::sinceTitles[] =
{
@@ -305,6 +81,187 @@ QString DitaXmlGenerator::sinceTitles[] =
""
};
+/*
+ The strings in this array must appear in the same order as
+ the values in enum DitaXmlGenerator::DitaTag.
+ */
+QString DitaXmlGenerator::ditaTags[] =
+ {
+ "",
+ "alt",
+ "apiDesc",
+ "APIMap",
+ "apiName",
+ "audience",
+ "author",
+ "b",
+ "body",
+ "bodydiv",
+ "brand",
+ "category",
+ "codeblock",
+ "comment",
+ "component",
+ "copyrholder",
+ "copyright",
+ "copyryear",
+ "created",
+ "critdates",
+ "cxxAPIMap",
+ "cxxClass",
+ "cxxClassAbstract",
+ "cxxClassAccessSpecifier",
+ "cxxClassAPIItemLocation",
+ "cxxClassBaseClass",
+ "cxxClassDeclarationFile",
+ "cxxClassDeclarationFileLine",
+ "cxxClassDefinition",
+ "cxxClassDerivation",
+ "cxxClassDerivationAccessSpecifier",
+ "cxxClassDerivations",
+ "cxxClassDetail",
+ "cxxClassNested",
+ "cxxClassNestedClass",
+ "cxxClassNestedDetail",
+ "cxxDefine",
+ "cxxDefineAccessSpecifier",
+ "cxxDefineAPIItemLocation",
+ "cxxDefineDeclarationFile",
+ "cxxDefineDeclarationFileLine",
+ "cxxDefineDefinition",
+ "cxxDefineDetail",
+ "cxxDefineNameLookup",
+ "cxxDefineParameter",
+ "cxxDefineParameterDeclarationName",
+ "cxxDefineParameters",
+ "cxxDefinePrototype",
+ "cxxDefineReimplemented",
+ "cxxEnumeration",
+ "cxxEnumerationAccessSpecifier",
+ "cxxEnumerationAPIItemLocation",
+ "cxxEnumerationDeclarationFile",
+ "cxxEnumerationDeclarationFileLine",
+ "cxxEnumerationDefinition",
+ "cxxEnumerationDefinitionFile",
+ "cxxEnumerationDefinitionFileLineStart",
+ "cxxEnumerationDefinitionFileLineEnd",
+ "cxxEnumerationDetail",
+ "cxxEnumerationNameLookup",
+ "cxxEnumerationPrototype",
+ "cxxEnumerationScopedName",
+ "cxxEnumerator",
+ "cxxEnumeratorInitialiser",
+ "cxxEnumeratorNameLookup",
+ "cxxEnumeratorPrototype",
+ "cxxEnumerators",
+ "cxxEnumeratorScopedName",
+ "cxxFunction",
+ "cxxFunctionAccessSpecifier",
+ "cxxFunctionAPIItemLocation",
+ "cxxFunctionConst",
+ "cxxFunctionConstructor",
+ "cxxFunctionDeclarationFile",
+ "cxxFunctionDeclarationFileLine",
+ "cxxFunctionDeclaredType",
+ "cxxFunctionDefinition",
+ "cxxFunctionDestructor",
+ "cxxFunctionDetail",
+ "cxxFunctionNameLookup",
+ "cxxFunctionParameter",
+ "cxxFunctionParameterDeclarationName",
+ "cxxFunctionParameterDeclaredType",
+ "cxxFunctionParameterDefaultValue",
+ "cxxFunctionParameters",
+ "cxxFunctionPrototype",
+ "cxxFunctionPureVirtual",
+ "cxxFunctionReimplemented",
+ "cxxFunctionScopedName",
+ "cxxFunctionStorageClassSpecifierStatic",
+ "cxxFunctionVirtual",
+ "cxxTypedef",
+ "cxxTypedefAccessSpecifier",
+ "cxxTypedefAPIItemLocation",
+ "cxxTypedefDeclarationFile",
+ "cxxTypedefDeclarationFileLine",
+ "cxxTypedefDefinition",
+ "cxxTypedefDetail",
+ "cxxTypedefNameLookup",
+ "cxxTypedefScopedName",
+ "cxxVariable",
+ "cxxVariableAccessSpecifier",
+ "cxxVariableAPIItemLocation",
+ "cxxVariableDeclarationFile",
+ "cxxVariableDeclarationFileLine",
+ "cxxVariableDeclaredType",
+ "cxxVariableDefinition",
+ "cxxVariableDetail",
+ "cxxVariableNameLookup",
+ "cxxVariablePrototype",
+ "cxxVariableReimplemented",
+ "cxxVariableScopedName",
+ "cxxVariableStorageClassSpecifierStatic",
+ "data",
+ "data-about",
+ "dd",
+ "dl",
+ "dlentry",
+ "dt",
+ "entry",
+ "fig",
+ "i",
+ "image",
+ "keyword",
+ "keywords",
+ "li",
+ "link",
+ "linktext",
+ "lq",
+ "metadata",
+ "ol",
+ "othermeta",
+ "p",
+ "parameter",
+ "permissions",
+ "ph",
+ "platform",
+ "pre",
+ "prodinfo",
+ "prodname",
+ "prolog",
+ "publisher",
+ "related-links",
+ "resourceid",
+ "revised",
+ "row",
+ "section",
+ "sectiondiv",
+ "shortdesc",
+ "simpletable",
+ "source",
+ "stentry",
+ "sthead",
+ "strow",
+ "sub",
+ "sup",
+ "table",
+ "tbody",
+ "tgroup",
+ "thead",
+ "title",
+ "tm",
+ "topic",
+ "topicmeta",
+ "topicref",
+ "tt",
+ "u",
+ "ul",
+ "unknown",
+ "vrm",
+ "vrmlist",
+ "xref",
+ ""
+ };
+
static bool showBrokenLinks = false;
/*!
@@ -330,10 +287,11 @@ void DitaXmlGenerator::addLink(const QString& href,
const QStringRef& text)
{
if (!href.isEmpty()) {
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href", href);
writeCharacters(text.toString());
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
else {
writeCharacters(text.toString());
@@ -341,22 +299,129 @@ void DitaXmlGenerator::addLink(const QString& href,
}
/*!
+ Push \a t onto the dita tag stack and write the appropriate
+ start tag to the DITA XML file.
+ */
+void DitaXmlGenerator::writeStartTag(DitaTag t)
+{
+ xmlWriter().writeStartElement(ditaTags[t]);
+ tagStack.push(t);
+}
+
+/*!
+ Pop the current DITA tag off the stack, and write the
+ appropriate end tag to the DITA XML file.
+ */
+void DitaXmlGenerator::writeEndTag(DitaTag t)
+{
+ DitaTag top = tagStack.pop();
+ if (t > DT_NONE && top != t)
+ qDebug() << "Expected:" << t << "ACTUAL:" << top;
+ xmlWriter().writeEndElement();
+}
+
+/*!
+ Return the current DITA element tag, the one
+ on top of the stack.
+ */
+DitaXmlGenerator::DitaTag DitaXmlGenerator::currentTag()
+{
+ return tagStack.top();
+}
+
+/*!
+ Write the start tag \c{<apiDesc>}. if \a title is not
+ empty, generate a GUID from it and write the GUID as the
+ value of the \e{id} attribute. Then write \a title as
+ the value of the \e {spectitle} attribute.
+
+ Then if \a outputclass is not empty, write it as the value
+ of the \a outputclass attribute.
+
+ Fiunally, set the section nesting level to 1 and return 1.
+ */
+int DitaXmlGenerator::enterApiDesc(const QString& outputclass, const QString& title)
+{
+ writeStartTag(DT_apiDesc);
+ if (!title.isEmpty()) {
+ writeGuidAttribute(title);
+ xmlWriter().writeAttribute("spectitle",title);
+ }
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ sectionNestingLevel = 1;
+ return sectionNestingLevel;
+}
+
+/*!
+ If the section nesting level is 0, output a \c{<section>}
+ element with an \e id attribute generated from \a title and
+ an \e outputclass attribute set to \a outputclass.
+ If \a title is null, no \e id attribute is output.
+ If \a outputclass is empty, no \e outputclass attribute
+ is output.
+
+ Finally, increment the section nesting level and return
+ the new value.
+ */
+int DitaXmlGenerator::enterSection(const QString& outputclass, const QString& title)
+{
+ if (sectionNestingLevel == 0) {
+ writeStartTag(DT_section);
+ if (!title.isEmpty())
+ writeGuidAttribute(title);
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ }
+ else if (!title.isEmpty()) {
+ writeStartTag(DT_p);
+ writeGuidAttribute(title);
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ writeCharacters(title);
+ writeEndTag(); // </p>
+ }
+ return ++sectionNestingLevel;
+}
+
+/*!
+ If the section nesting level is greater than 0, decrement
+ it. If it becomes 0, output a \c {</section>}. Return the
+ decremented section nesting level.
+ */
+int DitaXmlGenerator::leaveSection()
+{
+ if (sectionNestingLevel > 0) {
+ --sectionNestingLevel;
+ if (sectionNestingLevel == 0)
+ writeEndTag(); // </section> or </apiDesc>
+ }
+ return sectionNestingLevel;
+}
+
+/*!
The default constructor.
*/
DitaXmlGenerator::DitaXmlGenerator()
- : inLink(false),
- inContents(false),
+ : inContents(false),
+ inDetailedDescription(false),
+ inLegaleseText(false),
+ inLink(false),
+ inObsoleteLink(false),
inSectionHeading(false),
inTableHeader(false),
inTableBody(false),
- numTableRows(0),
- threeColumnEnumValueTable(true),
+ noLinks(false),
+ obsoleteLinks(false),
offlineDocs(true),
+ threeColumnEnumValueTable(true),
+ codeIndent(0),
+ numTableRows(0),
+ divNestingLevel(0),
+ sectionNestingLevel(0),
+ tableColumnCount(0),
funcLeftParen("\\S(\\()"),
- myTree(0),
- obsoleteLinks(false),
- noLinks(false),
- tableColumnCount(0)
+ myTree(0)
{
// nothing yet.
}
@@ -378,29 +443,9 @@ DitaXmlGenerator::~DitaXmlGenerator()
*/
void DitaXmlGenerator::initializeGenerator(const Config &config)
{
- static const struct {
- const char *key;
- const char *tag;
- } defaults[] = {
- { ATOM_FORMATTING_BOLD, "b" },
- { ATOM_FORMATTING_INDEX, "<!--" },
- { ATOM_FORMATTING_ITALIC, "i" },
- { ATOM_FORMATTING_PARAMETER, "i" },
- { ATOM_FORMATTING_SUBSCRIPT, "sub" },
- { ATOM_FORMATTING_SUPERSCRIPT, "sup" },
- { ATOM_FORMATTING_TELETYPE, "tt", },
- { ATOM_FORMATTING_UNDERLINE, "u", },
- { 0, 0 }
- };
-
Generator::initializeGenerator(config);
obsoleteLinks = config.getBool(QLatin1String(CONFIG_OBSOLETELINKS));
setImageFileExtensions(QStringList() << "png" << "jpg" << "jpeg" << "gif");
- int i = 0;
- while (defaults[i].key) {
- formattingLeftMap().insert(defaults[i].key, defaults[i].tag);
- i++;
- }
style = config.getString(DitaXmlGenerator::format() +
Config::dot +
@@ -437,6 +482,7 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
if (naturalLanguage.isEmpty())
naturalLanguage = QLatin1String("en");
+ config.subVarsAndValues("dita.metadata.default",metadataDefaults);
QSet<QString> editionNames = config.subVars(CONFIG_EDITION);
QSet<QString>::ConstIterator edition = editionNames.begin();
while (edition != editionNames.end()) {
@@ -467,7 +513,8 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
Config::dot +
DITAXMLGENERATOR_CUSTOMHEADELEMENTS);
codeIndent = config.getInt(CONFIG_CODEINDENT);
-
+ version = config.getString(CONFIG_VERSION);
+ vrm = version.split(".");
}
/*!
@@ -639,7 +686,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
int skipAhead = 0;
QString hx, str;
static bool in_para = false;
- QString guid, hc;
+ QString guid, hc, attr;
switch (atom->type()) {
case Atom::AbstractLeft:
@@ -670,13 +717,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
//skipAhead = skipAtoms(atom, Atom::BriefRight);
//break;
//}
- if (inApiDesc || inSection) {
- xmlWriter().writeStartElement("p");
+ if (inSection()) {
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","brief");
}
else {
noLinks = true;
- xmlWriter().writeStartElement("shortdesc");
+ writeStartTag(DT_shortdesc);
}
if (relative->type() == Node::Property ||
relative->type() == Node::Variable) {
@@ -704,62 +751,98 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::BriefRight:
// if (relative->type() != Node::Fake)
- xmlWriter().writeEndElement(); // </shortdesc> or </p>
+ writeEndTag(); // </shortdesc> or </p>
noLinks = false;
break;
case Atom::C:
- xmlWriter().writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]);
+ writeStartTag(DT_tt);
if (inLink) {
writeCharacters(protectEnc(plainCode(atom->string())));
}
else {
writeText(atom->string(), marker, relative);
}
- xmlWriter().writeEndElement(); // sse writeStartElement() above
+ writeEndTag(); // see writeStartElement() above
break;
case Atom::Code:
{
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
QString chars = trimmedTrailing(atom->string());
writeText(chars, marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
}
break;
case Atom::Qml:
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeText(trimmedTrailing(atom->string()), marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
case Atom::CodeNew:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("you can rewrite it as");
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeStartElement("codeblock");
+ writeEndTag(); // </p>
+ writeStartTag(DT_codeblock);
writeText(trimmedTrailing(atom->string()), marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
case Atom::CodeOld:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("For example, if you have code like");
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
// fallthrough
case Atom::CodeBad:
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeCharacters(trimmedTrailing(plainCode(atom->string())));
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
- case Atom::Div:
- xmlWriter().writeStartElement("bodydiv");
- if (!atom->string().isEmpty())
- xmlWriter().writeAttribute("outputclass", atom->string());
+ case Atom::DivLeft:
+ {
+ attr = atom->string();
+ DitaTag t = currentTag();
+ if ((t == DT_section) || (t == DT_sectiondiv)) {
+ writeStartTag(DT_sectiondiv);
+ divNestingLevel++;
+ }
+ else if ((t == DT_body) || (t == DT_bodydiv)) {
+ writeStartTag(DT_bodydiv);
+ divNestingLevel++;
+ }
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
+ }
break;
- case Atom::EndDiv:
- xmlWriter().writeEndElement(); // </bodydiv>
+ case Atom::DivRight:
+ if ((currentTag() == DT_sectiondiv) || (currentTag() == DT_bodydiv)) {
+ writeEndTag(); // </sectiondiv>, </bodydiv>, or </p>
+ if (divNestingLevel > 0)
+ --divNestingLevel;
+ }
break;
case Atom::FootnoteLeft:
// ### For now
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
xmlWriter().writeCharacters("<!-- ");
@@ -773,18 +856,68 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::FormatIf:
break;
case Atom::FormattingLeft:
- xmlWriter().writeStartElement(formattingLeftMap()[atom->string()]);
- if (atom->string() == ATOM_FORMATTING_PARAMETER) {
- if (atom->next() != 0 && atom->next()->type() == Atom::String) {
- QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
- if (subscriptRegExp.exactMatch(atom->next()->string())) {
- xmlWriter().writeCharacters(subscriptRegExp.cap(1));
- xmlWriter().writeStartElement("sub");
- xmlWriter().writeCharacters(subscriptRegExp.cap(2));
- xmlWriter().writeEndElement(); // </sub>
- skipAhead = 1;
+ {
+ DitaTag t = DT_LAST;
+ if (atom->string() == ATOM_FORMATTING_BOLD)
+ t = DT_b;
+ else if (atom->string() == ATOM_FORMATTING_PARAMETER)
+ t = DT_i;
+ else if (atom->string() == ATOM_FORMATTING_ITALIC)
+ t = DT_i;
+ else if (atom->string() == ATOM_FORMATTING_TELETYPE)
+ t = DT_tt;
+ else if (atom->string().startsWith("span ")) {
+ t = DT_keyword;
+ }
+ else if (atom->string() == ATOM_FORMATTING_UNDERLINE)
+ t = DT_u;
+ else if (atom->string() == ATOM_FORMATTING_INDEX)
+ t = DT_comment;
+ else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT)
+ t = DT_sub;
+ else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT)
+ t = DT_sup;
+ else
+ qDebug() << "DT_LAST";
+ writeStartTag(t);
+ if (atom->string() == ATOM_FORMATTING_PARAMETER) {
+ if (atom->next() != 0 && atom->next()->type() == Atom::String) {
+ QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
+ if (subscriptRegExp.exactMatch(atom->next()->string())) {
+ xmlWriter().writeCharacters(subscriptRegExp.cap(1));
+ writeStartTag(DT_sub);
+ xmlWriter().writeCharacters(subscriptRegExp.cap(2));
+ writeEndTag(); // </sub>
+ skipAhead = 1;
+ }
}
}
+ else if (t == DT_keyword) {
+ QString attr = atom->string().mid(5);
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
+ }
}
break;
case Atom::FormattingRight:
@@ -792,7 +925,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
endLink();
}
else {
- xmlWriter().writeEndElement(); // ?
+ writeEndTag(); // ?
}
break;
case Atom::AnnotatedList:
@@ -981,7 +1114,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
/*
First generate the table of contents.
*/
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
@@ -990,17 +1123,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
}
++s;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
int idx = 0;
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(Doc::canonicalTitle((*s).name));
xmlWriter().writeAttribute("outputclass","h3");
writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), false, QString("Q"));
else if (idx == QmlClass)
@@ -1020,15 +1153,16 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
pmap = parentmaps.begin();
while (pmap != parentmaps.end()) {
NodeList nlist = pmap->values();
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("Class ");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(pmap.key(), 0));
QStringList pieces = fullName(pmap.key(), 0, marker).split("::");
writeCharacters(protectEnc(pieces.last()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
xmlWriter().writeCharacters(":");
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
generateSection(nlist, 0, marker, CodeMarker::Summary);
++pmap;
@@ -1060,8 +1194,9 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
fileName = QLatin1String("images/") + protectEnc(atom->string());
}
- xmlWriter().writeStartElement("fig");
- xmlWriter().writeStartElement("image");
+ if (currentTag() != DT_xref)
+ writeStartTag(DT_fig);
+ writeStartTag(DT_image);
xmlWriter().writeAttribute("href",protectEnc(fileName));
if (atom->type() == Atom::InlineImage)
xmlWriter().writeAttribute("placement","inline");
@@ -1070,12 +1205,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
xmlWriter().writeAttribute("align","center");
}
if (!text.isEmpty()) {
- xmlWriter().writeStartElement("alt");
+ writeStartTag(DT_alt);
writeCharacters(protectEnc(text));
- xmlWriter().writeEndElement(); // </alt>
+ writeEndTag(); // </alt>
}
- xmlWriter().writeEndElement(); // </image>
- xmlWriter().writeEndElement(); // </fig>
+ writeEndTag(); // </image>
+ if (currentTag() != DT_xref)
+ writeEndTag(); // </fig>
}
break;
case Atom::ImageText:
@@ -1129,47 +1265,47 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::ListLeft:
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
if (atom->string() == ATOM_LIST_BULLET) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
}
else if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dl");
+ writeStartTag(DT_dl);
}
else if (atom->string() == ATOM_LIST_VALUE) {
threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable) {
- xmlWriter().writeStartElement("simpletable");
+ writeStartTag(DT_simpletable);
xmlWriter().writeAttribute("outputclass","valuelist");
- xmlWriter().writeStartElement("sthead");
- xmlWriter().writeStartElement("stentry");
+ writeStartTag(DT_sthead);
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Constant");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Value");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Description");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </sthead>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </sthead>
}
else {
- xmlWriter().writeStartElement("simpletable");
+ writeStartTag(DT_simpletable);
xmlWriter().writeAttribute("outputclass","valuelist");
- xmlWriter().writeStartElement("sthead");
- xmlWriter().writeStartElement("stentry");
+ writeStartTag(DT_sthead);
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Constant");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Value");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </sthead>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </sthead>
}
}
else {
- xmlWriter().writeStartElement("ol");
+ writeStartTag(DT_ol);
if (atom->string() == ATOM_LIST_UPPERALPHA)
xmlWriter().writeAttribute("outputclass","upperalpha");
else if (atom->string() == ATOM_LIST_LOWERALPHA)
@@ -1191,17 +1327,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::ListTagLeft:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dt");
+ writeStartTag(DT_dt);
}
else { // (atom->string() == ATOM_LIST_VALUE)
- xmlWriter().writeStartElement("strow");
- xmlWriter().writeStartElement("stentry");
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_strow);
+ writeStartTag(DT_stentry);
+ writeStartTag(DT_tt);
writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative))));
- xmlWriter().writeEndElement(); // </tt>
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </tt>
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -1212,64 +1348,64 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
if (itemValue.isEmpty())
xmlWriter().writeCharacters("?");
else {
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
writeCharacters(protectEnc(itemValue));
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
skipAhead = 1;
}
break;
case Atom::ListTagRight:
if (atom->string() == ATOM_LIST_TAG)
- xmlWriter().writeEndElement(); // </dt>
+ writeEndTag(); // </dt>
break;
case Atom::ListItemLeft:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dd");
+ writeStartTag(DT_dd);
}
else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable) {
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
}
}
else {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
case Atom::ListItemRight:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeEndElement(); // </dd>
+ writeEndTag(); // </dd>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </strow>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </strow>
}
else {
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
break;
case Atom::ListRight:
if (atom->string() == ATOM_LIST_BULLET) {
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
else if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeEndElement(); // </dl>
+ writeEndTag(); // </dl>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- xmlWriter().writeEndElement(); // </simpletable>
+ writeEndTag(); // </simpletable>
}
else {
- xmlWriter().writeEndElement(); // </ol>
+ writeEndTag(); // </ol>
}
break;
case Atom::Nop:
// nothing
break;
case Atom::ParaLeft:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
if (inLegaleseText)
xmlWriter().writeAttribute("outputclass","legalese");
in_para = true;
@@ -1277,15 +1413,15 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::ParaRight:
endLink();
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
break;
case Atom::QuotationLeft:
- xmlWriter().writeStartElement("lq");
+ writeStartTag(DT_lq);
break;
case Atom::QuotationRight:
- xmlWriter().writeEndElement(); // </lq>
+ writeEndTag(); // </lq>
break;
case Atom::RawString:
if (atom->string() == " ")
@@ -1293,41 +1429,44 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
if (atom->string().startsWith("&"))
writeCharacters(atom->string());
else if (atom->string() == "<sup>*</sup>") {
- xmlWriter().writeStartElement("sup");
+ writeStartTag(DT_sup);
writeCharacters("*");
- xmlWriter().writeEndElement(); // </sup>
+ writeEndTag(); // </sup>
+ }
+ else if (atom->string() == "<sup>&reg;</sup>") {
+ writeStartTag(DT_tm);
+ xmlWriter().writeAttribute("tmtype","reg");
+ writeEndTag(); // </tm>
}
else {
- xmlWriter().writeStartElement("pre");
+ writeStartTag(DT_pre);
xmlWriter().writeAttribute("outputclass","raw-html");
writeCharacters(atom->string());
- xmlWriter().writeEndElement(); // </pre>
+ writeEndTag(); // </pre>
}
break;
case Atom::SectionLeft:
- if (inSection || inApiDesc) {
+#if 0
+ if (inApiDesc) {
+ writeEndTag(); // </apiDesc>
inApiDesc = false;
- xmlWriter().writeEndElement(); // </section> or </apiDesc>
}
- inSection = true;
- xmlWriter().writeStartElement("section");
- writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
- xmlWriter().writeAttribute("outputclass","details");
+#endif
+ enterSection("details",QString());
+ //writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
break;
case Atom::SectionRight:
- if (inSection) {
- inSection = false;
- xmlWriter().writeEndElement(); // </section>
- }
+ leaveSection();
break;
case Atom::SectionHeadingLeft:
- xmlWriter().writeStartElement("title");
+ writeStartTag(DT_p);
+ writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
hx = "h" + QString::number(atom->string().toInt() + hOffset(relative));
xmlWriter().writeAttribute("outputclass",hx);
inSectionHeading = true;
break;
case Atom::SectionHeadingRight:
- xmlWriter().writeEndElement(); // </title> (see case Atom::SectionHeadingLeft)
+ writeEndTag(); // </title> (see case Atom::SectionHeadingLeft)
inSectionHeading = false;
break;
case Atom::SidebarLeft:
@@ -1347,97 +1486,144 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::TableLeft:
{
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
numTableRows = 0;
if (tableColumnCount != 0) {
qDebug() << "ERROR: Nested tables!";
tableColumnCount = 0;
}
tableColumnCount = countTableColumns(atom->next());
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols",QString::number(tableColumnCount));
inTableHeader = false;
inTableBody = false;
}
break;
case Atom::TableRight:
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
inTableHeader = false;
inTableBody = false;
tableColumnCount = 0;
break;
case Atom::TableHeaderLeft:
if (inTableBody) {
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
inTableHeader = false;
inTableBody = false;
tableColumnCount = 0;
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
numTableRows = 0;
tableColumnCount = countTableColumns(atom);
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols",QString::number(tableColumnCount));
}
- xmlWriter().writeStartElement("thead");
+ writeStartTag(DT_thead);
xmlWriter().writeAttribute("valign","top");
- xmlWriter().writeStartElement("row");
+ writeStartTag(DT_row);
xmlWriter().writeAttribute("valign","top");
inTableHeader = true;
inTableBody = false;
break;
case Atom::TableHeaderRight:
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- xmlWriter().writeStartElement("row");
+ writeStartTag(DT_row);
xmlWriter().writeAttribute("valign","top");
}
else {
- xmlWriter().writeEndElement(); // </thead>
+ writeEndTag(); // </thead>
inTableHeader = false;
inTableBody = true;
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
}
break;
case Atom::TableRowLeft:
if (!inTableHeader && !inTableBody) {
inTableBody = true;
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
+ }
+ writeStartTag(DT_row);
+ attr = atom->string();
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
}
- xmlWriter().writeStartElement("row");
xmlWriter().writeAttribute("valign","top");
break;
case Atom::TableRowRight:
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
break;
case Atom::TableItemLeft:
{
- xmlWriter().writeStartElement("entry");
- QStringList spans = atom->string().split(",");
- if (spans.size() == 2) {
- if (inTableHeader ||
- (spans[0].toInt() != 1) ||
- (spans[1].toInt() != 1)) {
- QString s = "span(" + spans[0] + "," + spans[1] + ")";
- xmlWriter().writeAttribute("outputclass",s);
+ QString values = "";
+ writeStartTag(DT_entry);
+ for (int i=0; i<atom->count(); ++i) {
+ attr = atom->string(i);
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ }
+ else {
+ QStringList spans = attr.split(",");
+ if (spans.size() == 2) {
+ if ((spans[0].toInt()>1) || (spans[1].toInt()>1)) {
+ values += "span(" + spans[0] + "," + spans[1] + ")";
+ }
+ }
}
}
+ if (!values.isEmpty())
+ xmlWriter().writeAttribute("outputclass",values);
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
}
break;
case Atom::TableItemRight:
if (inTableHeader)
- xmlWriter().writeEndElement(); // </entry>
+ writeEndTag(); // </entry>
else {
- xmlWriter().writeEndElement(); // </entry>
+ writeEndTag(); // </entry>
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1473,26 +1659,26 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::Target:
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(Doc::canonicalTitle(atom->string()));
xmlWriter().writeAttribute("outputclass","target");
//xmlWriter().writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
break;
case Atom::UnhandledFormat:
- xmlWriter().writeStartElement("b");
+ writeStartTag(DT_b);
xmlWriter().writeAttribute("outputclass","error");
xmlWriter().writeCharacters("<Missing DITAXML>");
- xmlWriter().writeEndElement(); // </b>
+ writeEndTag(); // </b>
break;
case Atom::UnknownCommand:
- xmlWriter().writeStartElement("b");
+ writeStartTag(DT_b);
xmlWriter().writeAttribute("outputclass","error unknown-command");
writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </b>
+ writeEndTag(); // </b>
break;
case Atom::QmlText:
case Atom::EndQmlText:
@@ -1532,85 +1718,81 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
-
- // not included: <prolog>
-
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement(CXXCLASSDEFINITION);
+ writeProlog(inner,marker);
+
+ writeStartTag(DT_cxxClassDetail);
+ writeStartTag(DT_cxxClassDefinition);
writeLocation(nsn);
- xmlWriter().writeEndElement(); // <cxxClassDefinition>
+ writeEndTag(); // <cxxClassDefinition>
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ enterApiDesc(QString(),title);
Text brief = nsn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, nsn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(nsn, marker);
generateStatus(nsn, marker);
generateThreadSafeness(nsn, marker);
generateSince(nsn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+
+ enterSection("h2","Detailed Description");
+ generateBody(nsn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </title>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </title>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </title>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(nsn, marker, false, QString("Detailed Description"));
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1646,7 +1828,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if (inner->type() == Node::Class) {
const ClassNode* cn = const_cast<ClassNode*>(static_cast<const ClassNode*>(inner));
@@ -1656,34 +1838,32 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
-
- // not included: <prolog>
+ writeProlog(inner,marker);
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement(CXXCLASSDEFINITION);
- xmlWriter().writeStartElement(CXXCLASSACCESSSPECIFIER);
+ writeStartTag(DT_cxxClassDetail);
+ writeStartTag(DT_cxxClassDefinition);
+ writeStartTag(DT_cxxClassAccessSpecifier);
xmlWriter().writeAttribute("value",inner->accessString());
- xmlWriter().writeEndElement(); // <cxxClassAccessSpecifier>
+ writeEndTag(); // <cxxClassAccessSpecifier>
if (cn->isAbstract()) {
- xmlWriter().writeStartElement(CXXCLASSABSTRACT);
+ writeStartTag(DT_cxxClassAbstract);
xmlWriter().writeAttribute("name","abstract");
xmlWriter().writeAttribute("value","abstract");
- xmlWriter().writeEndElement(); // </cxxClassAbstract>
+ writeEndTag(); // </cxxClassAbstract>
}
writeDerivations(cn, marker); // <cxxClassDerivations>
// not included: <cxxClassTemplateParameters>
writeLocation(cn);
- xmlWriter().writeEndElement(); // <cxxClassDefinition>
+ writeEndTag(); // <cxxClassDefinition>
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ enterApiDesc(QString(),title);
Text brief = cn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(cn, marker);
generateStatus(cn, marker);
@@ -1691,68 +1871,64 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateInheritedBy(cn, marker);
generateThreadSafeness(cn, marker);
generateSince(cn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ enterSection("h2","Detailed Description");
+ generateBody(cn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </p>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </p>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(cn, marker, false, QString("Detailed Description"));
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1782,7 +1958,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if ((inner->type() == Node::Fake) && (inner->subType() == Node::HeaderFile)) {
const FakeNode* fn = const_cast<FakeNode*>(static_cast<const FakeNode*>(inner));
@@ -1798,78 +1974,78 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ writeProlog(inner,marker);
+
+ writeStartTag(DT_cxxClassDetail);
+ enterApiDesc(QString(),title);
Text brief = fn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, fn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(fn, marker);
generateStatus(fn, marker);
generateThreadSafeness(fn, marker);
generateSince(fn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ generateSince(fn, marker);
+ enterSection("h2","Detailed Description");
+ generateBody(fn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </p>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ enterSection("additional-inherited-members redundant",QString());
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </p>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(fn, marker, false, QString("Detailed Description"));
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1904,7 +2080,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
}
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if ((inner->type() == Node::Fake) && (inner->subType() == Node::QmlClass)) {
const QmlClassNode* qcn = const_cast<QmlClassNode*>(static_cast<const QmlClassNode*>(inner));
@@ -1917,76 +2093,74 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
+ writeProlog(inner,marker);
- // not included: <prolog>
-
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ writeStartTag(DT_cxxClassDetail);
+ enterApiDesc(QString(),title);
Text brief = qcn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, qcn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateQmlInstantiates(qcn, marker);
generateQmlInherits(qcn, marker);
generateQmlInheritedBy(qcn, marker);
generateSince(qcn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ enterSection("h2","Detailed Description");
+ generateBody(qcn, marker);
+ if (cn)
+ generateQmlText(cn->doc().body(), cn, marker, qcn->name());
+ leaveSection();
+ leaveSection(); // </apiDesc>
QList<Section> summarySections;
summarySections = marker->qmlSections(qcn,CodeMarker::Summary,0);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateQmlSummary(*s,qcn,marker);
- //generateSection(s->members, inner, marker, CodeMarker::Summary);
- //generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateQmlSummary(*s,qcn,marker);
+ //generateSection(s->members, inner, marker, CodeMarker::Summary);
+ //generateSectionInheritedList(*s, inner, marker);
+ }
+ ++s;
}
- ++s;
+ leaveSection();
}
-
- writeDetailedDescription(qcn, marker, false, QString("Detailed Description"));
- if (cn)
- generateQmlText(cn->doc().body(), cn, marker, qcn->name());
QList<Section> detailSections;
detailSections = marker->qmlSections(qcn,CodeMarker::Detailed,0);
- s = detailSections.begin();
- while (s != detailSections.end()) {
- if (!s->members.isEmpty()) {
- QString attr;
- inSection = true;
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower();
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
- generateDetailedQmlMember(*m, qcn, marker);
- ++m;
+ if (!detailSections.isEmpty()) {
+ enterSection("details",QString());
+ s = detailSections.begin();
+ while (s != detailSections.end()) {
+ if (!s->members.isEmpty()) {
+ QString attr;
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ NodeList::ConstIterator m = (*s).members.begin();
+ while (m != (*s).members.end()) {
+ generateDetailedQmlMember(*m, qcn, marker);
+ ++m;
+ }
}
- xmlWriter().writeEndElement(); // </section>
- inSection = false;
+ ++s;
}
- ++s;
+ leaveSection();
}
-
- xmlWriter().writeEndElement(); // </cxxClassDetail>
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClassDetail>
+ writeEndTag(); // </cxxClass>
}
}
@@ -1996,12 +2170,13 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text)
{
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",link);
writeCharacters(text);
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
/*!
@@ -2010,45 +2185,31 @@ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& tex
*/
void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker)
{
- SubTitleSize subTitleSize = LargeSubTitle;
QList<Section> sections;
QList<Section>::const_iterator s;
QString fullTitle = fake->fullTitle();
- QString htmlTitle = fullTitle;
- if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) {
- subTitleSize = SmallSubTitle;
- htmlTitle += " (" + fake->subTitle() + ")";
- }
- else if (fake->subType() == Node::QmlBasicType) {
+ if (fake->subType() == Node::QmlBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
- htmlTitle = fullTitle;
}
generateHeader(fake, fullTitle);
generateBrief(fake, marker); // <shortdesc>
- xmlWriter().writeStartElement("body");
+ writeProlog(fake, marker);
+
+ writeStartTag(DT_body);
+ enterSection(QString(),QString());
if (fake->subType() == Node::Module) {
generateStatus(fake, marker);
if (moduleNamespaceMap.contains(fake->name())) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","namespaces");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- xmlWriter().writeCharacters("Namespaces");
- xmlWriter().writeEndElement(); // </title>
+ enterSection("h2","Namespaces");
generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]);
- xmlWriter().writeEndElement(); // </section>
+ leaveSection();
}
if (moduleClassMap.contains(fake->name())) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","classes");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- xmlWriter().writeCharacters("Classes");
- xmlWriter().writeEndElement(); // </title>
+ enterSection("h2","Classes");
generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]);
- xmlWriter().writeEndElement(); // </section>
+ leaveSection();
}
}
@@ -2056,11 +2217,11 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
if (fake->subType() == Node::File) {
Text text;
Quoter quoter;
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass", "small-subtitle");
text << fake->subTitle();
generateText(text, fake, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
Doc::quoteFromFile(fake->doc().location(), quoter, fake->name());
QString code = quoter.quoteTo(fake->location(), "", "");
text.clear();
@@ -2070,10 +2231,12 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
}
else {
if (fake->subType() == Node::Module) {
- writeDetailedDescription(fake, marker, false, QString("Detailed Description"));
+ enterSection("h2","Detailed Description");
+ generateBody(fake, marker);
+ leaveSection();
}
else
- writeDetailedDescription(fake, marker, false, QString());
+ generateBody(fake, marker);
generateAlsoList(fake, marker);
if (!fake->groupMembers().isEmpty()) {
@@ -2085,9 +2248,10 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
generateAnnotatedList(fake, marker, groupMembersMap);
}
}
- xmlWriter().writeEndElement(); // </body>
+ leaveSection(); // </section>
+ writeEndTag(); // </body>
writeRelatedLinks(fake, marker);
- xmlWriter().writeEndElement(); // </topic>
+ writeEndTag(); // </topic>
}
/*!
@@ -2102,13 +2266,13 @@ void DitaXmlGenerator::writeLink(const Node* node,
{
if (node) {
QString link = fileName(node) + "#" + node->guid();
- xmlWriter().writeStartElement("link");
+ writeStartTag(DT_link);
xmlWriter().writeAttribute("href", link);
xmlWriter().writeAttribute("role", role);
- xmlWriter().writeStartElement("linktext");
+ writeStartTag(DT_linktext);
writeCharacters(text);
- xmlWriter().writeEndElement(); // </linktext>
- xmlWriter().writeEndElement(); // </link>
+ writeEndTag(); // </linktext>
+ writeEndTag(); // </link>
}
}
@@ -2124,7 +2288,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
const Node* linkNode = 0;
QPair<QString,QString> linkPair;
if (node && !node->links().empty()) {
- xmlWriter().writeStartElement("related-links");
+ writeStartTag(DT_relatedLinks);
if (node->links().contains(Node::PreviousLink)) {
linkPair = node->links()[Node::PreviousLink];
linkNode = findNodeForTarget(linkPair.first, node, marker);
@@ -2140,7 +2304,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
linkNode = findNodeForTarget(linkPair.first, node, marker);
writeLink(linkNode, linkPair.second, "parent");
}
- xmlWriter().writeEndElement(); // </related-links>
+ writeEndTag(); // </related-links>
}
}
@@ -2166,59 +2330,59 @@ void DitaXmlGenerator::generateHeader(const Node* node,
if (!node)
return;
+ DitaTag mainTag = DT_cxxClass;
+ DitaTag nameTag = DT_apiName;
QString doctype;
- QString mainElement;
- QString nameElement;
QString dtd;
QString base;
QString version;
QString outputclass;
if (node->type() == Node::Class) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
}
else if (node->type() == Node::Namespace) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "namespace";
}
else if (node->type() == Node::Fake || subpage) {
if (node->subType() == Node::HeaderFile) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "headerfile";
}
else if (node->subType() == Node::QmlClass) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "QML-class";
}
else {
- mainElement = "topic";
- nameElement = "title";
+ mainTag = DT_topic;
+ nameTag = DT_title;
dtd = "dtd/topic.dtd";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"" + dtd + "\">";
switch (node->subType()) {
case Node::Page:
@@ -2250,13 +2414,13 @@ void DitaXmlGenerator::generateHeader(const Node* node,
xmlWriter().writeDTD(doctype);
xmlWriter().writeComment(node->doc().location().fileName());
- xmlWriter().writeStartElement(mainElement);
+ writeStartTag(mainTag);
xmlWriter().writeAttribute("id",node->guid());
if (!outputclass.isEmpty())
xmlWriter().writeAttribute("outputclass",outputclass);
- xmlWriter().writeStartElement(nameElement); // <title> or <apiName>
+ writeStartTag(nameTag); // <title> or <apiName>
writeCharacters(name);
- xmlWriter().writeEndElement(); // </title> or </apiName>
+ writeEndTag(); // </title> or </apiName>
}
/*!
@@ -2277,9 +2441,9 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker)
void DitaXmlGenerator::generateIncludes(const InnerNode* inner, CodeMarker* marker)
{
if (!inner->includes().isEmpty()) {
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeText(marker->markedUpIncludes(inner->includes()), marker, inner);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
}
}
@@ -2551,20 +2715,20 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
QStack<NodeMap > stack;
stack.push(topLevel);
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
while (!stack.isEmpty()) {
if (stack.top().isEmpty()) {
stack.pop();
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
if (!stack.isEmpty())
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
else {
const ClassNode *child =
static_cast<const ClassNode *>(*stack.top().begin());
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateFullName(child, relative, marker);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
stack.top().erase(stack.top().begin());
NodeMap newTop;
@@ -2574,8 +2738,8 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
}
if (!newTop.isEmpty()) {
stack.push(newTop);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_li);
+ writeStartTag(DT_ul);
}
}
}
@@ -2591,11 +2755,11 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative,
{
if (nodeMap.isEmpty())
return;
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
xmlWriter().writeAttribute("outputclass","annotated");
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols","2");
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
foreach (const QString& name, nodeMap.keys()) {
const Node* node = nodeMap[name];
@@ -2603,35 +2767,35 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative,
if (node->status() == Node::Obsolete)
continue;
- xmlWriter().writeStartElement("row");
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_row);
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
generateFullName(node, relative, marker);
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
if (!(node->type() == Node::Fake)) {
Text brief = node->doc().trimmedBriefText(name);
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
generateText(brief, node, marker);
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
}
}
else {
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
}
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
}
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
}
/*!
@@ -2768,26 +2932,27 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
Output the alphabet as a row of links.
*/
if (includeAlphabet) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","alphabet");
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
if (usedParagraphNames.contains(char('a' + i))) {
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString guid = lookupGuid(outFileName(),QString(ch));
QString attr = outFileName() + QString("#%1").arg(guid);
xmlWriter().writeAttribute("href", attr);
xmlWriter().writeCharacters(QString(ch.toUpper()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
}
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
/*
Output a <p> element to contain all the <dl> elements.
*/
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","compactlist");
for (int i=0; i<classMap.count()-1; i++) {
@@ -2802,25 +2967,25 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
*/
if (curParOffset == 0) {
if (i > 0) {
- xmlWriter().writeEndElement(); // </dlentry>
- xmlWriter().writeEndElement(); // </dl>
+ writeEndTag(); // </dlentry>
+ writeEndTag(); // </dl>
}
- xmlWriter().writeStartElement("dl");
- xmlWriter().writeStartElement("dlentry");
- xmlWriter().writeStartElement("dt");
+ writeStartTag(DT_dl);
+ writeStartTag(DT_dlentry);
+ writeStartTag(DT_dt);
if (includeAlphabet) {
QChar c = paragraphName[curParNr][0].toLower();
writeGuidAttribute(QString(c));
}
xmlWriter().writeAttribute("outputclass","sublist-header");
xmlWriter().writeCharacters(paragraphName[curParNr]);
- xmlWriter().writeEndElement(); // </dt>
+ writeEndTag(); // </dt>
}
/*
Output a <dd> for the current offset in the current paragraph.
*/
- xmlWriter().writeStartElement("dd");
+ writeStartTag(DT_dd);
if ((curParNr < NumParagraphs) &&
!paragraphName[curParNr].isEmpty()) {
NodeMap::Iterator it;
@@ -2832,7 +2997,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
Previously, we used generateFullName() for this, but we
require some special formatting.
*/
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(it.value(), relative));
QStringList pieces;
@@ -2841,19 +3007,19 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
else
pieces = fullName(it.value(), relative, marker).split("::");
xmlWriter().writeCharacters(protectEnc(pieces.last()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
if (pieces.size() > 1) {
xmlWriter().writeCharacters(" (");
generateFullName(it.value()->parent(),relative,marker);
xmlWriter().writeCharacters(")");
}
}
- xmlWriter().writeEndElement(); // </dd>
+ writeEndTag(); // </dd>
curParOffset++;
}
- xmlWriter().writeEndElement(); // </dlentry>
- xmlWriter().writeEndElement(); // </dl>
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </dlentry>
+ writeEndTag(); // </dl>
+ writeEndTag(); // </p>
}
/*!
@@ -2862,34 +3028,35 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
CodeMarker* marker)
{
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","alphabet");
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString guid = lookupGuid(outFileName(),QString(ch));
QString attr = outFileName() + QString("#%1").arg(guid);
xmlWriter().writeAttribute("href", attr);
xmlWriter().writeCharacters(QString(ch.toUpper()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
char nextLetter = 'a';
char currentLetter;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
QMap<QString, NodeMap >::ConstIterator f = funcIndex.begin();
while (f != funcIndex.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
currentLetter = f.key()[0].unicode();
while (islower(currentLetter) && currentLetter >= nextLetter) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(QString(nextLetter));
xmlWriter().writeAttribute("outputclass","target");
xmlWriter().writeCharacters(QString(nextLetter));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
nextLetter++;
}
xmlWriter().writeCharacters(protectEnc(f.key()));
@@ -2900,10 +3067,10 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
generateFullName((*s)->parent(), relative, marker, *s);
++s;
}
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++f;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
/*!
@@ -2916,14 +3083,14 @@ void DitaXmlGenerator::generateLegaleseList(const Node* relative,
while (it != legaleseTexts.end()) {
Text text = it.key();
generateText(text, relative, marker);
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
do {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateFullName(it.value(), relative, marker);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++it;
} while (it != legaleseTexts.end() && it.key() == text);
- xmlWriter().writeEndElement(); //</ul>
+ writeEndTag(); //</ul>
}
}
@@ -3044,50 +3211,53 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /*
if (!fakeNodeMap.isEmpty()) {
foreach (const QString& groupTitle, groupTitlesMap.keys()) {
const FakeNode* groupNode = groupTitlesMap[groupTitle];
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(groupNode, relative));
writeCharacters(protectEnc(groupNode->fullTitle()));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </p>
if (fakeNodeMap[groupNode].count() == 0)
continue;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
foreach (const FakeNode* fakeNode, fakeNodeMap[groupNode]) {
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative));
writeCharacters(protectEnc(title));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
if (!uncategorizedNodeMap.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","h3");
xmlWriter().writeCharacters("Miscellaneous");
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeStartElement("ul");
+ writeEndTag(); // </p>
+ writeStartTag(DT_ul);
foreach (const FakeNode *fakeNode, uncategorizedNodeMap) {
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative));
writeCharacters(protectEnc(title));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -3102,18 +3272,18 @@ void DitaXmlGenerator::generateSection(const NodeList& nl,
CodeMarker::SynopsisStyle style)
{
if (!nl.isEmpty()) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
NodeList::ConstIterator m = nl.begin();
while (m != nl.end()) {
if ((*m)->access() != Node::Private) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
QString marked = getMarkedUpSynopsis(*m, relative, marker, style);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
++m;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -3126,10 +3296,10 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
{
if (section.inherited.isEmpty())
return;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
QList<QPair<ClassNode*,int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
QString text;
text.setNum((*p).second);
text += " ";
@@ -3139,18 +3309,19 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
text += section.pluralMember;
text += " inherited from ";
writeCharacters(text);
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
// zzz
text = fileName((*p).first) + "#";
text += DitaXmlGenerator::cleanRef(section.name.toLower());
xmlWriter().writeAttribute("href",text);
text = protectEnc(marker->plainFullName((*p).first, relative));
writeCharacters(text);
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
++p;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
/*!
@@ -3299,18 +3470,18 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
writeCharacters(html);
html.clear();
}
- xmlWriter().writeStartElement("i");
+ writeStartTag(DT_i);
writeCharacters(arg.toString());
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else if (k == 5) { // <@extra>
if (!html.isEmpty()) {
writeCharacters(html);
html.clear();
}
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
writeCharacters(arg.toString());
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
else {
if (!html.isEmpty()) {
@@ -3362,10 +3533,10 @@ void DitaXmlGenerator::generateLink(const Atom* atom,
writeCharacters(protectEnc(atom->string().left(k)));
if (link.isEmpty()) {
if (showBrokenLinks)
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
inLink = false;
writeCharacters(protectEnc(atom->string().mid(k)));
}
@@ -3374,12 +3545,12 @@ void DitaXmlGenerator::generateLink(const Atom* atom,
bool func = atom->string().endsWith("()");
bool tt = (func || atom->string().contains(camelCase));
if (tt)
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
if (func)
writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2)));
else
writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
else
writeCharacters(protectEnc(atom->string()));
@@ -3714,11 +3885,12 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode,
{
if (actualNode == 0)
actualNode = apparentNode;
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString href = linkForNode(actualNode, relative);
xmlWriter().writeAttribute("href",href);
writeCharacters(protectEnc(fullName(apparentNode, relative, marker)));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
void DitaXmlGenerator::findAllClasses(const InnerNode* node)
@@ -3902,6 +4074,11 @@ void DitaXmlGenerator::findAllNamespaces(const InnerNode* node)
}
}
+/*!
+ We're writing an attribute that indicates that the text
+ data is a heading, hence, h1, h2, h3... etc, and we must
+ decide which number to use.
+ */
int DitaXmlGenerator::hOffset(const Node* node)
{
switch (node->type()) {
@@ -4142,7 +4319,8 @@ void DitaXmlGenerator::beginLink(const QString& link)
this->link = link;
if (link.isEmpty())
return;
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",link);
inLink = true;
}
@@ -4152,15 +4330,15 @@ void DitaXmlGenerator::endLink()
if (inLink) {
if (link.isEmpty()) {
if (showBrokenLinks)
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else {
if (inObsoleteLink) {
- xmlWriter().writeStartElement("sup");
+ writeStartTag(DT_sup);
xmlWriter().writeCharacters("(obsolete)");
- xmlWriter().writeEndElement(); // </sup>
+ writeEndTag(); // </sup>
}
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
}
inLink = false;
@@ -4178,16 +4356,16 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section,
CodeMarker* marker)
{
if (!section.members.isEmpty()) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
NodeList::ConstIterator m;
m = section.members.begin();
while (m != section.members.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateQmlItem(*m,relative,marker,true);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++m;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -4205,11 +4383,11 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node,
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
NodeList::ConstIterator p = qpgn->childNodes().begin();
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
while (p != qpgn->childNodes().end()) {
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
writeGuidAttribute((Node*)qpn);
QString attr;
if (!qpn->isWritable(myTree))
@@ -4222,31 +4400,31 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node,
if (!attr.isEmpty())
xmlWriter().writeAttribute("outputclass",attr);
generateQmlItem(qpn, relative, marker, false);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
++p;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
else if (node->type() == Node::QmlSignal) {
Node* n = const_cast<Node*>(node);
- xmlWriter().writeStartElement("ul");
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_ul);
+ writeStartTag(DT_li);
writeGuidAttribute(n);
marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </li>
+ writeEndTag(); // </ul>
}
else if (node->type() == Node::QmlMethod) {
Node* n = const_cast<Node*>(node);
- xmlWriter().writeStartElement("ul");
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_ul);
+ writeStartTag(DT_li);
writeGuidAttribute(n);
marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </li>
+ writeEndTag(); // </ul>
}
generateStatus(node, marker);
generateBody(node, marker);
@@ -4270,7 +4448,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn,
const Node* n = myTree->findNode(strList,Node::Fake);
if (n && n->subType() == Node::QmlClass) {
const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","inherits");
Text text;
text << "[Inherits ";
@@ -4280,7 +4458,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
}
@@ -4318,7 +4496,7 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
{
const ClassNode* cn = qcn->classNode();
if (cn && (cn->status() != Node::Internal)) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","instantiates");
Text text;
text << "[";
@@ -4333,7 +4511,7 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, qcn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
@@ -4350,7 +4528,7 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn,
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","instantiated-by");
Text text;
text << "[";
@@ -4365,7 +4543,7 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
}
@@ -4421,32 +4599,32 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
int index;
if (!cn->baseClasses().isEmpty()) {
- xmlWriter().writeStartElement(CXXCLASSDERIVATIONS);
+ writeStartTag(DT_cxxClassDerivations);
r = cn->baseClasses().begin();
index = 0;
while (r != cn->baseClasses().end()) {
- xmlWriter().writeStartElement(CXXCLASSDERIVATION);
- xmlWriter().writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxClassDerivation);
+ writeStartTag(DT_cxxClassDerivationAccessSpecifier);
xmlWriter().writeAttribute("value",(*r).accessString());
- xmlWriter().writeEndElement(); // </cxxClassDerivationAccessSpecifier>
+ writeEndTag(); // </cxxClassDerivationAccessSpecifier>
// not included: <cxxClassDerivationVirtual>
- xmlWriter().writeStartElement(CXXCLASSBASECLASS);
+ writeStartTag(DT_cxxClassBaseClass);
QString attr = fileName((*r).node) + "#" + (*r).node->guid();
xmlWriter().writeAttribute("href",attr);
writeCharacters(marker->plainFullName((*r).node));
- xmlWriter().writeEndElement(); // </cxxClassBaseClass>
+ writeEndTag(); // </cxxClassBaseClass>
// not included: <ClassBaseStruct> or <cxxClassBaseUnion>
- xmlWriter().writeEndElement(); // </cxxClassDerivation>
+ writeEndTag(); // </cxxClassDerivation>
// not included: <cxxStructDerivation>
++r;
}
- xmlWriter().writeEndElement(); // </cxxClassDerivations>
+ writeEndTag(); // </cxxClassDerivations>
}
}
@@ -4457,73 +4635,77 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
*/
void DitaXmlGenerator::writeLocation(const Node* n)
{
- QString s1, s2, s3, s4, s5, s6;
+ DitaTag s1, s2, s3, s4, s5, s6;
+ s1 = DT_cxxClassAPIItemLocation;
+ s2 = DT_cxxClassDeclarationFile;
+ s3 = DT_cxxClassDeclarationFileLine;
+ s4 = DT_LAST;
if (n->type() == Node::Class || n->type() == Node::Namespace) {
- s1 = CXXCLASSAPIITEMLOCATION;
- s2 = CXXCLASSDECLARATIONFILE;
- s3 = CXXCLASSDECLARATIONFILELINE;
+ s1 = DT_cxxClassAPIItemLocation;
+ s2 = DT_cxxClassDeclarationFile;
+ s3 = DT_cxxClassDeclarationFileLine;
}
else if (n->type() == Node::Function) {
FunctionNode* fn = const_cast<FunctionNode*>(static_cast<const FunctionNode*>(n));
if (fn->isMacro()) {
- s1 = CXXDEFINEAPIITEMLOCATION;
- s2 = CXXDEFINEDECLARATIONFILE;
- s3 = CXXDEFINEDECLARATIONFILELINE;
+ s1 = DT_cxxDefineAPIItemLocation;
+ s2 = DT_cxxDefineDeclarationFile;
+ s3 = DT_cxxDefineDeclarationFileLine;
}
else {
- s1 = CXXFUNCTIONAPIITEMLOCATION;
- s2 = CXXFUNCTIONDECLARATIONFILE;
- s3 = CXXFUNCTIONDECLARATIONFILELINE;
+ s1 = DT_cxxFunctionAPIItemLocation;
+ s2 = DT_cxxFunctionDeclarationFile;
+ s3 = DT_cxxFunctionDeclarationFileLine;
}
}
else if (n->type() == Node::Enum) {
- s1 = CXXENUMERATIONAPIITEMLOCATION;
- s2 = CXXENUMERATIONDECLARATIONFILE;
- s3 = CXXENUMERATIONDECLARATIONFILELINE;
- s4 = CXXENUMERATIONDEFINITIONFILE;
- s5 = CXXENUMERATIONDEFINITIONFILELINESTART;
- s6 = CXXENUMERATIONDEFINITIONFILELINEEND;
+ s1 = DT_cxxEnumerationAPIItemLocation;
+ s2 = DT_cxxEnumerationDeclarationFile;
+ s3 = DT_cxxEnumerationDeclarationFileLine;
+ s4 = DT_cxxEnumerationDefinitionFile;
+ s5 = DT_cxxEnumerationDefinitionFileLineStart;
+ s6 = DT_cxxEnumerationDefinitionFileLineEnd;
}
else if (n->type() == Node::Typedef) {
- s1 = CXXTYPEDEFAPIITEMLOCATION;
- s2 = CXXTYPEDEFDECLARATIONFILE;
- s3 = CXXTYPEDEFDECLARATIONFILELINE;
+ s1 = DT_cxxTypedefAPIItemLocation;
+ s2 = DT_cxxTypedefDeclarationFile;
+ s3 = DT_cxxTypedefDeclarationFileLine;
}
else if ((n->type() == Node::Property) ||
(n->type() == Node::Variable)) {
- s1 = CXXVARIABLEAPIITEMLOCATION;
- s2 = CXXVARIABLEDECLARATIONFILE;
- s3 = CXXVARIABLEDECLARATIONFILELINE;
+ s1 = DT_cxxVariableAPIItemLocation;
+ s2 = DT_cxxVariableDeclarationFile;
+ s3 = DT_cxxVariableDeclarationFileLine;
}
- xmlWriter().writeStartElement(s1);
- xmlWriter().writeStartElement(s2);
+ writeStartTag(s1);
+ writeStartTag(s2);
xmlWriter().writeAttribute("name","filePath");
xmlWriter().writeAttribute("value",n->location().filePath());
- xmlWriter().writeEndElement(); // </cxx<s2>DeclarationFile>
- xmlWriter().writeStartElement(s3);
+ writeEndTag(); // </cxx<s2>DeclarationFile>
+ writeStartTag(s3);
xmlWriter().writeAttribute("name","lineNumber");
QString lineNr;
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s3>DeclarationFileLine>
- if (!s4.isEmpty()) { // zzz This stuff is temporary, I think.
- xmlWriter().writeStartElement(s4);
+ writeEndTag(); // </cxx<s3>DeclarationFileLine>
+ if (s4 != DT_LAST) { // zzz This stuff is temporary, I think.
+ writeStartTag(s4);
xmlWriter().writeAttribute("name","filePath");
xmlWriter().writeAttribute("value",n->location().filePath());
- xmlWriter().writeEndElement(); // </cxx<s4>DefinitionFile>
- xmlWriter().writeStartElement(s5);
+ writeEndTag(); // </cxx<s4>DefinitionFile>
+ writeStartTag(s5);
xmlWriter().writeAttribute("name","lineNumber");
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s5>DefinitionFileLineStart>
- xmlWriter().writeStartElement(s6);
+ writeEndTag(); // </cxx<s5>DefinitionFileLineStart>
+ writeStartTag(s6);
xmlWriter().writeAttribute("name","lineNumber");
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s6>DefinitionFileLineEnd>
+ writeEndTag(); // </cxx<s6>DefinitionFileLineEnd>
}
// not included: <cxxXXXDefinitionFile>, <cxxXXXDefinitionFileLineStart>,
// and <cxxXXXDefinitionFileLineEnd>
- xmlWriter().writeEndElement(); // </cxx<s1>ApiItemLocation>
+ writeEndTag(); // </cxx<s1>ApiItemLocation>
}
/*!
@@ -4538,90 +4720,90 @@ void DitaXmlGenerator::writeFunctions(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Function) {
FunctionNode* fn = const_cast<FunctionNode*>(static_cast<const FunctionNode*>(*m));
- xmlWriter().writeStartElement(CXXFUNCTION);
+ writeStartTag(DT_cxxFunction);
xmlWriter().writeAttribute("id",fn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
if (fn->metaness() == FunctionNode::Signal)
xmlWriter().writeAttribute("class","signal");
else if (fn->metaness() == FunctionNode::Slot)
xmlWriter().writeAttribute("class","slot");
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(fn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXFUNCTIONDETAIL);
- xmlWriter().writeStartElement(CXXFUNCTIONDEFINITION);
- xmlWriter().writeStartElement(CXXFUNCTIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxFunctionDetail);
+ writeStartTag(DT_cxxFunctionDefinition);
+ writeStartTag(DT_cxxFunctionAccessSpecifier);
xmlWriter().writeAttribute("value",fn->accessString());
- xmlWriter().writeEndElement(); // <cxxFunctionAccessSpecifier>
+ writeEndTag(); // <cxxFunctionAccessSpecifier>
// not included: <cxxFunctionStorageClassSpecifierExtern>
if (fn->isStatic()) {
- xmlWriter().writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC);
+ writeStartTag(DT_cxxFunctionStorageClassSpecifierStatic);
xmlWriter().writeAttribute("name","static");
xmlWriter().writeAttribute("value","static");
- xmlWriter().writeEndElement(); // <cxxFunctionStorageClassSpecifierStatic>
+ writeEndTag(); // <cxxFunctionStorageClassSpecifierStatic>
}
// not included: <cxxFunctionStorageClassSpecifierMutable>,
if (fn->isConst()) {
- xmlWriter().writeStartElement(CXXFUNCTIONCONST);
+ writeStartTag(DT_cxxFunctionConst);
xmlWriter().writeAttribute("name","const");
xmlWriter().writeAttribute("value","const");
- xmlWriter().writeEndElement(); // <cxxFunctionConst>
+ writeEndTag(); // <cxxFunctionConst>
}
// not included: <cxxFunctionExplicit>
// <cxxFunctionInline
if (fn->virtualness() != FunctionNode::NonVirtual) {
- xmlWriter().writeStartElement(CXXFUNCTIONVIRTUAL);
+ writeStartTag(DT_cxxFunctionVirtual);
xmlWriter().writeAttribute("name","virtual");
xmlWriter().writeAttribute("value","virtual");
- xmlWriter().writeEndElement(); // <cxxFunctionVirtual>
+ writeEndTag(); // <cxxFunctionVirtual>
if (fn->virtualness() == FunctionNode::PureVirtual) {
- xmlWriter().writeStartElement(CXXFUNCTIONPUREVIRTUAL);
+ writeStartTag(DT_cxxFunctionPureVirtual);
xmlWriter().writeAttribute("name","pure virtual");
xmlWriter().writeAttribute("value","pure virtual");
- xmlWriter().writeEndElement(); // <cxxFunctionPureVirtual>
+ writeEndTag(); // <cxxFunctionPureVirtual>
}
}
if (fn->name() == n->name()) {
- xmlWriter().writeStartElement(CXXFUNCTIONCONSTRUCTOR);
+ writeStartTag(DT_cxxFunctionConstructor);
xmlWriter().writeAttribute("name","constructor");
xmlWriter().writeAttribute("value","constructor");
- xmlWriter().writeEndElement(); // <cxxFunctionConstructor>
+ writeEndTag(); // <cxxFunctionConstructor>
}
else if (fn->name()[0] == QChar('~')) {
- xmlWriter().writeStartElement(CXXFUNCTIONDESTRUCTOR);
+ writeStartTag(DT_cxxFunctionDestructor);
xmlWriter().writeAttribute("name","destructor");
xmlWriter().writeAttribute("value","destructor");
- xmlWriter().writeEndElement(); // <cxxFunctionDestructor>
+ writeEndTag(); // <cxxFunctionDestructor>
}
else {
- xmlWriter().writeStartElement(CXXFUNCTIONDECLAREDTYPE);
+ writeStartTag(DT_cxxFunctionDeclaredType);
writeCharacters(fn->returnType());
- xmlWriter().writeEndElement(); // <cxxFunctionDeclaredType>
+ writeEndTag(); // <cxxFunctionDeclaredType>
}
// not included: <cxxFunctionReturnType>
QString fq = fullQualification(fn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONSCOPEDNAME);
+ writeStartTag(DT_cxxFunctionScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxFunctionScopedName>
+ writeEndTag(); // <cxxFunctionScopedName>
}
- xmlWriter().writeStartElement(CXXFUNCTIONPROTOTYPE);
+ writeStartTag(DT_cxxFunctionPrototype);
writeCharacters(fn->signature(true));
- xmlWriter().writeEndElement(); // <cxxFunctionPrototype>
+ writeEndTag(); // <cxxFunctionPrototype>
QString fnl = fn->signature(false);
int idx = fnl.indexOf(' ');
@@ -4630,30 +4812,30 @@ void DitaXmlGenerator::writeFunctions(const Section& s,
else
++idx;
fnl = fn->parent()->name() + "::" + fnl.mid(idx);
- xmlWriter().writeStartElement(CXXFUNCTIONNAMELOOKUP);
+ writeStartTag(DT_cxxFunctionNameLookup);
writeCharacters(fnl);
- xmlWriter().writeEndElement(); // <cxxFunctionNameLookup>
+ writeEndTag(); // <cxxFunctionNameLookup>
if (!fn->isInternal() && fn->isReimp() && fn->reimplementedFrom() != 0) {
FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom();
if (rfn && !rfn->isInternal()) {
- xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED);
+ writeStartTag(DT_cxxFunctionReimplemented);
xmlWriter().writeAttribute("href",rfn->ditaXmlHref());
writeCharacters(marker->plainFullName(rfn));
- xmlWriter().writeEndElement(); // </cxxFunctionReimplemented>
+ writeEndTag(); // </cxxFunctionReimplemented>
}
}
writeParameters(fn);
writeLocation(fn);
- xmlWriter().writeEndElement(); // <cxxFunctionDefinition>
+ writeEndTag(); // <cxxFunctionDefinition>
- writeDetailedDescription(fn, marker, true, QString());
+ writeApiDesc(fn, marker, QString());
// generateAlsoList(inner, marker);
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxFunctionDetail>
- xmlWriter().writeEndElement(); // </cxxFunction>
+ writeEndTag(); // </cxxFunctionDetail>
+ writeEndTag(); // </cxxFunction>
if (fn->metaness() == FunctionNode::Ctor ||
fn->metaness() == FunctionNode::Dtor ||
@@ -4671,33 +4853,33 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn)
{
const QList<Parameter>& parameters = fn->parameters();
if (!parameters.isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERS);
+ writeStartTag(DT_cxxFunctionParameters);
QList<Parameter>::ConstIterator p = parameters.begin();
while (p != parameters.end()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETER);
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLAREDTYPE);
+ writeStartTag(DT_cxxFunctionParameter);
+ writeStartTag(DT_cxxFunctionParameterDeclaredType);
writeCharacters((*p).leftType());
if (!(*p).rightType().isEmpty())
writeCharacters((*p).rightType());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDeclaredType>
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME);
+ writeEndTag(); // <cxxFunctionParameterDeclaredType>
+ writeStartTag(DT_cxxFunctionParameterDeclarationName);
writeCharacters((*p).name());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDeclarationName>
+ writeEndTag(); // <cxxFunctionParameterDeclarationName>
// not included: <cxxFunctionParameterDefinitionName>
if (!(*p).defaultValue().isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE);
+ writeStartTag(DT_cxxFunctionParameterDefaultValue);
writeCharacters((*p).defaultValue());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDefaultValue>
+ writeEndTag(); // <cxxFunctionParameterDefaultValue>
}
// not included: <apiDefNote>
- xmlWriter().writeEndElement(); // <cxxFunctionParameter>
+ writeEndTag(); // <cxxFunctionParameter>
++p;
}
- xmlWriter().writeEndElement(); // <cxxFunctionParameters>
+ writeEndTag(); // <cxxFunctionParameters>
}
}
@@ -4712,32 +4894,32 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Enum) {
const EnumNode* en = static_cast<const EnumNode*>(*m);
- xmlWriter().writeStartElement(CXXENUMERATION);
+ writeStartTag(DT_cxxEnumeration);
xmlWriter().writeAttribute("id",en->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(en->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(en,marker);
// not included <prolog>
- xmlWriter().writeStartElement(CXXENUMERATIONDETAIL);
- xmlWriter().writeStartElement(CXXENUMERATIONDEFINITION);
- xmlWriter().writeStartElement(CXXENUMERATIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxEnumerationDetail);
+ writeStartTag(DT_cxxEnumerationDefinition);
+ writeStartTag(DT_cxxEnumerationAccessSpecifier);
xmlWriter().writeAttribute("value",en->accessString());
- xmlWriter().writeEndElement(); // <cxxEnumerationAccessSpecifier>
+ writeEndTag(); // <cxxEnumerationAccessSpecifier>
QString fq = fullQualification(en);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATIONSCOPEDNAME);
+ writeStartTag(DT_cxxEnumerationScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxEnumerationScopedName>
+ writeEndTag(); // <cxxEnumerationScopedName>
}
const QList<EnumItem>& items = en->items();
if (!items.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATIONPROTOTYPE);
+ writeStartTag(DT_cxxEnumerationPrototype);
writeCharacters(en->name());
xmlWriter().writeCharacters(" = { ");
QList<EnumItem>::ConstIterator i = items.begin();
@@ -4752,68 +4934,68 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
xmlWriter().writeCharacters(", ");
}
xmlWriter().writeCharacters(" }");
- xmlWriter().writeEndElement(); // <cxxEnumerationPrototype>
+ writeEndTag(); // <cxxEnumerationPrototype>
}
- xmlWriter().writeStartElement(CXXENUMERATIONNAMELOOKUP);
+ writeStartTag(DT_cxxEnumerationNameLookup);
writeCharacters(en->parent()->name() + "::" + en->name());
- xmlWriter().writeEndElement(); // <cxxEnumerationNameLookup>
+ writeEndTag(); // <cxxEnumerationNameLookup>
// not included: <cxxEnumerationReimplemented>
if (!items.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORS);
+ writeStartTag(DT_cxxEnumerators);
QList<EnumItem>::ConstIterator i = items.begin();
while (i != items.end()) {
- xmlWriter().writeStartElement(CXXENUMERATOR);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_cxxEnumerator);
+ writeStartTag(DT_apiName);
writeCharacters((*i).name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
QString fq = fullQualification(en->parent());
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORSCOPEDNAME);
+ writeStartTag(DT_cxxEnumeratorScopedName);
writeCharacters(fq + "::" + (*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorScopedName>
+ writeEndTag(); // <cxxEnumeratorScopedName>
}
- xmlWriter().writeStartElement(CXXENUMERATORPROTOTYPE);
+ writeStartTag(DT_cxxEnumeratorPrototype);
writeCharacters((*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorPrototype>
- xmlWriter().writeStartElement(CXXENUMERATORNAMELOOKUP);
+ writeEndTag(); // <cxxEnumeratorPrototype>
+ writeStartTag(DT_cxxEnumeratorNameLookup);
writeCharacters(en->parent()->name() + "::" + (*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorNameLookup>
+ writeEndTag(); // <cxxEnumeratorNameLookup>
if (!(*i).value().isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORINITIALISER);
+ writeStartTag(DT_cxxEnumeratorInitialiser);
xmlWriter().writeAttribute("value", (*i).value());
- xmlWriter().writeEndElement(); // <cxxEnumeratorInitialiser>
+ writeEndTag(); // <cxxEnumeratorInitialiser>
}
// not included: <cxxEnumeratorAPIItemLocation>
if (!(*i).text().isEmpty()) {
- xmlWriter().writeStartElement("apiDesc");
+ writeStartTag(DT_apiDesc);
generateText((*i).text(), en, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ writeEndTag(); // </apiDesc>
}
- xmlWriter().writeEndElement(); // <cxxEnumerator>
+ writeEndTag(); // <cxxEnumerator>
++i;
}
- xmlWriter().writeEndElement(); // <cxxEnumerators>
+ writeEndTag(); // <cxxEnumerators>
}
writeLocation(en);
- xmlWriter().writeEndElement(); // <cxxEnumerationDefinition>
+ writeEndTag(); // <cxxEnumerationDefinition>
- writeDetailedDescription(en, marker, true, QString());
+ writeApiDesc(en, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxEnumerationDetail>
+ writeEndTag(); // </cxxEnumerationDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxEnumeration>
+ writeEndTag(); // </cxxEnumeration>
}
++m;
}
@@ -4831,52 +5013,52 @@ void DitaXmlGenerator::writeTypedefs(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Typedef) {
const TypedefNode* tn = static_cast<const TypedefNode*>(*m);
- xmlWriter().writeStartElement(CXXTYPEDEF);
+ writeStartTag(DT_cxxTypedef);
xmlWriter().writeAttribute("id",tn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(tn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(tn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXTYPEDEFDETAIL);
- xmlWriter().writeStartElement(CXXTYPEDEFDEFINITION);
- xmlWriter().writeStartElement(CXXTYPEDEFACCESSSPECIFIER);
+ writeStartTag(DT_cxxTypedefDetail);
+ writeStartTag(DT_cxxTypedefDefinition);
+ writeStartTag(DT_cxxTypedefAccessSpecifier);
xmlWriter().writeAttribute("value",tn->accessString());
- xmlWriter().writeEndElement(); // <cxxTypedefAccessSpecifier>
+ writeEndTag(); // <cxxTypedefAccessSpecifier>
// not included: <cxxTypedefDeclaredType>
QString fq = fullQualification(tn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXTYPEDEFSCOPEDNAME);
+ writeStartTag(DT_cxxTypedefScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxTypedefScopedName>
+ writeEndTag(); // <cxxTypedefScopedName>
}
// not included: <cxxTypedefPrototype>
- xmlWriter().writeStartElement(CXXTYPEDEFNAMELOOKUP);
+ writeStartTag(DT_cxxTypedefNameLookup);
writeCharacters(tn->parent()->name() + "::" + tn->name());
- xmlWriter().writeEndElement(); // <cxxTypedefNameLookup>
+ writeEndTag(); // <cxxTypedefNameLookup>
// not included: <cxxTypedefReimplemented>
writeLocation(tn);
- xmlWriter().writeEndElement(); // <cxxTypedefDefinition>
+ writeEndTag(); // <cxxTypedefDefinition>
- writeDetailedDescription(tn, marker, true, QString());
+ writeApiDesc(tn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxTypedefDetail>
+ writeEndTag(); // </cxxTypedefDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxTypedef>
+ writeEndTag(); // </cxxTypedef>
}
++m;
}
@@ -4894,22 +5076,22 @@ void DitaXmlGenerator::writeProperties(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Property) {
const PropertyNode* pn = static_cast<const PropertyNode*>(*m);
- xmlWriter().writeStartElement(CXXVARIABLE);
+ writeStartTag(DT_cxxVariable);
xmlWriter().writeAttribute("id",pn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(pn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(pn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXVARIABLEDETAIL);
- xmlWriter().writeStartElement(CXXVARIABLEDEFINITION);
- xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER);
+ writeStartTag(DT_cxxVariableDetail);
+ writeStartTag(DT_cxxVariableDefinition);
+ writeStartTag(DT_cxxVariableAccessSpecifier);
xmlWriter().writeAttribute("value",pn->accessString());
- xmlWriter().writeEndElement(); // <cxxVariableAccessSpecifier>
+ writeEndTag(); // <cxxVariableAccessSpecifier>
// not included: <cxxVariableStorageClassSpecifierExtern>,
// <cxxVariableStorageClassSpecifierStatic>,
@@ -4917,18 +5099,18 @@ void DitaXmlGenerator::writeProperties(const Section& s,
// <cxxVariableConst>, <cxxVariableVolatile>
if (!pn->qualifiedDataType().isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE);
+ writeStartTag(DT_cxxVariableDeclaredType);
writeCharacters(pn->qualifiedDataType());
- xmlWriter().writeEndElement(); // <cxxVariableDeclaredType>
+ writeEndTag(); // <cxxVariableDeclaredType>
}
QString fq = fullQualification(pn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME);
+ writeStartTag(DT_cxxVariableScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxVariableScopedName>
+ writeEndTag(); // <cxxVariableScopedName>
}
- xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE);
+ writeStartTag(DT_cxxVariablePrototype);
xmlWriter().writeCharacters("Q_PROPERTY(");
writeCharacters(pn->qualifiedDataType());
xmlWriter().writeCharacters(" ");
@@ -4964,32 +5146,32 @@ void DitaXmlGenerator::writeProperties(const Section& s,
if (pn->isFinal())
xmlWriter().writeCharacters(" FINAL");
xmlWriter().writeCharacters(")");
- xmlWriter().writeEndElement(); // <cxxVariablePrototype>
+ writeEndTag(); // <cxxVariablePrototype>
- xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP);
+ writeStartTag(DT_cxxVariableNameLookup);
writeCharacters(pn->parent()->name() + "::" + pn->name());
- xmlWriter().writeEndElement(); // <cxxVariableNameLookup>
+ writeEndTag(); // <cxxVariableNameLookup>
if (pn->overriddenFrom() != 0) {
PropertyNode* opn = (PropertyNode*)pn->overriddenFrom();
- xmlWriter().writeStartElement(CXXVARIABLEREIMPLEMENTED);
+ writeStartTag(DT_cxxVariableReimplemented);
xmlWriter().writeAttribute("href",opn->ditaXmlHref());
writeCharacters(marker->plainFullName(opn));
- xmlWriter().writeEndElement(); // </cxxVariableReimplemented>
+ writeEndTag(); // </cxxVariableReimplemented>
}
writeLocation(pn);
- xmlWriter().writeEndElement(); // <cxxVariableDefinition>
+ writeEndTag(); // <cxxVariableDefinition>
- writeDetailedDescription(pn, marker, true, QString());
+ writeApiDesc(pn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxVariableDetail>
+ writeEndTag(); // </cxxVariableDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxVariable>
+ writeEndTag(); // </cxxVariable>
}
++m;
}
@@ -5006,74 +5188,74 @@ void DitaXmlGenerator::writeDataMembers(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Variable) {
const VariableNode* vn = static_cast<const VariableNode*>(*m);
- xmlWriter().writeStartElement(CXXVARIABLE);
+ writeStartTag(DT_cxxVariable);
xmlWriter().writeAttribute("id",vn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(vn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(vn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXVARIABLEDETAIL);
- xmlWriter().writeStartElement(CXXVARIABLEDEFINITION);
- xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER);
+ writeStartTag(DT_cxxVariableDetail);
+ writeStartTag(DT_cxxVariableDefinition);
+ writeStartTag(DT_cxxVariableAccessSpecifier);
xmlWriter().writeAttribute("value",vn->accessString());
- xmlWriter().writeEndElement(); // <cxxVariableAccessSpecifier>
+ writeEndTag(); // <cxxVariableAccessSpecifier>
// not included: <cxxVAriableStorageClassSpecifierExtern>
if (vn->isStatic()) {
- xmlWriter().writeStartElement(CXXVARIABLESTORAGECLASSSPECIFIERSTATIC);
+ writeStartTag(DT_cxxVariableStorageClassSpecifierStatic);
xmlWriter().writeAttribute("name","static");
xmlWriter().writeAttribute("value","static");
- xmlWriter().writeEndElement(); // <cxxVariableStorageClassSpecifierStatic>
+ writeEndTag(); // <cxxVariableStorageClassSpecifierStatic>
}
// not included: <cxxVAriableStorageClassSpecifierMutable>,
// <cxxVariableConst>, <cxxVariableVolatile>
- xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE);
+ writeStartTag(DT_cxxVariableDeclaredType);
writeCharacters(vn->leftType());
if (!vn->rightType().isEmpty())
writeCharacters(vn->rightType());
- xmlWriter().writeEndElement(); // <cxxVariableDeclaredType>
+ writeEndTag(); // <cxxVariableDeclaredType>
QString fq = fullQualification(vn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME);
+ writeStartTag(DT_cxxVariableScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxVariableScopedName>
+ writeEndTag(); // <cxxVariableScopedName>
}
- xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE);
+ writeStartTag(DT_cxxVariablePrototype);
writeCharacters(vn->leftType() + " ");
//writeCharacters(vn->parent()->name() + "::" + vn->name());
writeCharacters(vn->name());
if (!vn->rightType().isEmpty())
writeCharacters(vn->rightType());
- xmlWriter().writeEndElement(); // <cxxVariablePrototype>
+ writeEndTag(); // <cxxVariablePrototype>
- xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP);
+ writeStartTag(DT_cxxVariableNameLookup);
writeCharacters(vn->parent()->name() + "::" + vn->name());
- xmlWriter().writeEndElement(); // <cxxVariableNameLookup>
+ writeEndTag(); // <cxxVariableNameLookup>
// not included: <cxxVariableReimplemented>
writeLocation(vn);
- xmlWriter().writeEndElement(); // <cxxVariableDefinition>
+ writeEndTag(); // <cxxVariableDefinition>
- writeDetailedDescription(vn, marker, true, QString());
+ writeApiDesc(vn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxVariableDetail>
+ writeEndTag(); // </cxxVariableDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxVariable>
+ writeEndTag(); // </cxxVariable>
}
++m;
}
@@ -5091,24 +5273,24 @@ void DitaXmlGenerator::writeMacros(const Section& s,
if ((*m)->type() == Node::Function) {
const FunctionNode* fn = static_cast<const FunctionNode*>(*m);
if (fn->isMacro()) {
- xmlWriter().writeStartElement(CXXDEFINE);
+ writeStartTag(DT_cxxDefine);
xmlWriter().writeAttribute("id",fn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(fn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXDEFINEDETAIL);
- xmlWriter().writeStartElement(CXXDEFINEDEFINITION);
- xmlWriter().writeStartElement(CXXDEFINEACCESSSPECIFIER);
+ writeStartTag(DT_cxxDefineDetail);
+ writeStartTag(DT_cxxDefineDefinition);
+ writeStartTag(DT_cxxDefineAccessSpecifier);
xmlWriter().writeAttribute("value",fn->accessString());
- xmlWriter().writeEndElement(); // <cxxDefineAccessSpecifier>
+ writeEndTag(); // <cxxDefineAccessSpecifier>
- xmlWriter().writeStartElement(CXXDEFINEPROTOTYPE);
+ writeStartTag(DT_cxxDefinePrototype);
xmlWriter().writeCharacters("#define ");
writeCharacters(fn->name());
if (fn->metaness() == FunctionNode::MacroWithParams) {
@@ -5126,50 +5308,50 @@ void DitaXmlGenerator::writeMacros(const Section& s,
xmlWriter().writeCharacters(")");
}
}
- xmlWriter().writeEndElement(); // <cxxDefinePrototype>
+ writeEndTag(); // <cxxDefinePrototype>
- xmlWriter().writeStartElement(CXXDEFINENAMELOOKUP);
+ writeStartTag(DT_cxxDefineNameLookup);
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // <cxxDefineNameLookup>
+ writeEndTag(); // <cxxDefineNameLookup>
if (fn->reimplementedFrom() != 0) {
FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom();
- xmlWriter().writeStartElement(CXXDEFINEREIMPLEMENTED);
+ writeStartTag(DT_cxxDefineReimplemented);
xmlWriter().writeAttribute("href",rfn->ditaXmlHref());
writeCharacters(marker->plainFullName(rfn));
- xmlWriter().writeEndElement(); // </cxxDefineReimplemented>
+ writeEndTag(); // </cxxDefineReimplemented>
}
if (fn->metaness() == FunctionNode::MacroWithParams) {
QStringList params = fn->parameterNames();
if (!params.isEmpty()) {
- xmlWriter().writeStartElement(CXXDEFINEPARAMETERS);
+ writeStartTag(DT_cxxDefineParameters);
for (int i = 0; i < params.size(); ++i) {
- xmlWriter().writeStartElement(CXXDEFINEPARAMETER);
- xmlWriter().writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME);
+ writeStartTag(DT_cxxDefineParameter);
+ writeStartTag(DT_cxxDefineParameterDeclarationName);
writeCharacters(params[i]);
- xmlWriter().writeEndElement(); // <cxxDefineParameterDeclarationName>
+ writeEndTag(); // <cxxDefineParameterDeclarationName>
// not included: <apiDefNote>
- xmlWriter().writeEndElement(); // <cxxDefineParameter>
+ writeEndTag(); // <cxxDefineParameter>
}
- xmlWriter().writeEndElement(); // <cxxDefineParameters>
+ writeEndTag(); // <cxxDefineParameters>
}
}
writeLocation(fn);
- xmlWriter().writeEndElement(); // <cxxDefineDefinition>
+ writeEndTag(); // <cxxDefineDefinition>
- writeDetailedDescription(fn, marker, true, QString());
+ writeApiDesc(fn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxDefineDetail>
+ writeEndTag(); // </cxxDefineDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxDefine>
+ writeEndTag(); // </cxxDefine>
}
}
++m;
@@ -5212,6 +5394,7 @@ void DitaXmlGenerator::beginSubPage(const Location& location,
writer->setAutoFormatting(true);
writer->setAutoFormattingIndent(4);
writer->writeStartDocument();
+ clearSectionNesting();
}
/*!
@@ -5221,6 +5404,8 @@ void DitaXmlGenerator::beginSubPage(const Location& location,
*/
void DitaXmlGenerator::endSubPage()
{
+ if (inSection())
+ qDebug() << "Missing </section> in" << outFileName() << sectionNestingLevel;
xmlWriter().writeEndDocument();
delete xmlWriterStack.pop();
PageGenerator::endSubPage();
@@ -5238,58 +5423,18 @@ QXmlStreamWriter& DitaXmlGenerator::xmlWriter()
}
/*!
- Writes the \e {Detailed Description} section(s) for \a node to the
- current XML stream using the code \a marker. if the \a apiDesc flag
- is true, then the first section of the sequence of sections written
- will be an \c {apiDesc>} element with a \e {spectitle} attribute of
- \e {Detailed Description}. Otherwise, the first section will be a
- \c {<section>} element with a \c {<title>} element of \e {Detailed
- Description}. This function calls the Generator::generateBody()
- function to write the XML for the section list.
+ Writes the \e {<apiDesc>} element for \a node to the current XML
+ stream using the code \a marker and the \a title.
*/
-void DitaXmlGenerator::writeDetailedDescription(const Node* node,
- CodeMarker* marker,
- bool apiDesc,
- const QString& title)
+void DitaXmlGenerator::writeApiDesc(const Node* node,
+ CodeMarker* marker,
+ const QString& title)
{
if (!node->doc().isEmpty()) {
inDetailedDescription = true;
- if (apiDesc) {
- inApiDesc = true;
- xmlWriter().writeStartElement("apiDesc");
- if (!title.isEmpty()) {
- writeGuidAttribute(title);
- xmlWriter().writeAttribute("spectitle",title);
- }
- else
- writeGuidAttribute("Detailed Description");
- xmlWriter().writeAttribute("outputclass","details");
- }
- else {
- inSection = true;
- xmlWriter().writeStartElement("section");
- if (!title.isEmpty()) {
- writeGuidAttribute(title);
- xmlWriter().writeAttribute("outputclass","details");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(title);
- xmlWriter().writeEndElement(); // </title>
- }
- else {
- writeGuidAttribute("Detailed Description");
- xmlWriter().writeAttribute("outputclass","details");
- }
- }
+ enterApiDesc(QString(),title);
generateBody(node, marker);
- if (inApiDesc) {
- xmlWriter().writeEndElement(); // </apiDesc>
- inApiDesc = false;
- }
- else if (inSection) {
- xmlWriter().writeEndElement(); // </section>
- inSection = false;
- }
+ leaveSection();
}
inDetailedDescription = false;
}
@@ -5302,23 +5447,23 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s,
{
if (s.members.isEmpty())
return;
- xmlWriter().writeStartElement("cxxClassNested");
- xmlWriter().writeStartElement("cxxClassNestedDetail");
+ writeStartTag(DT_cxxClassNested);
+ writeStartTag(DT_cxxClassNestedDetail);
NodeList::ConstIterator m = s.members.begin();
while (m != s.members.end()) {
if ((*m)->type() == Node::Class) {
- xmlWriter().writeStartElement("cxxClassNestedClass");
+ writeStartTag(DT_cxxClassNestedClass);
QString link = linkForNode((*m), n);
xmlWriter().writeAttribute("href", link);
QString name = n->name() + "::" + (*m)->name();
writeCharacters(name);
- xmlWriter().writeEndElement(); // <cxxClassNestedClass>
+ writeEndTag(); // <cxxClassNestedClass>
}
++m;
}
- xmlWriter().writeEndElement(); // <cxxClassNestedDetail>
- xmlWriter().writeEndElement(); // <cxxClassNested>
+ writeEndTag(); // <cxxClassNestedDetail>
+ writeEndTag(); // <cxxClassNested>
}
/*!
@@ -5389,23 +5534,269 @@ void DitaXmlGenerator::writeDitaMap()
doctype = "<!DOCTYPE cxxAPIMap PUBLIC \"-//NOKIA//DTD DITA C++ API Map Reference Type v0.6.0//EN\" \"dtd/cxxAPIMap.dtd\">";
xmlWriter().writeDTD(doctype);
- xmlWriter().writeStartElement("cxxAPIMap");
+ writeStartTag(DT_cxxAPIMap);
xmlWriter().writeAttribute("id","Qt-DITA-Map");
xmlWriter().writeAttribute("title","Qt DITA Map");
- xmlWriter().writeStartElement("topicmeta");
- xmlWriter().writeStartElement("shortdesc");
+ writeStartTag(DT_topicmeta);
+ writeStartTag(DT_shortdesc);
xmlWriter().writeCharacters("The top level map for the Qt documentation");
- xmlWriter().writeEndElement(); // </shortdesc>
- xmlWriter().writeEndElement(); // </topicmeta>
+ writeEndTag(); // </shortdesc>
+ writeEndTag(); // </topicmeta>
GuidMaps::iterator i = guidMaps.begin();
while (i != guidMaps.end()) {
- xmlWriter().writeStartElement("topicref");
+ writeStartTag(DT_topicref);
xmlWriter().writeAttribute("href",i.key());
xmlWriter().writeAttribute("type","topic");
- xmlWriter().writeEndElement(); // </topicref>
+ writeEndTag(); // </topicref>
++i;
}
endSubPage();
}
+/*!
+ Looks up the tag name for \a t in the map of metadata
+ values for the current topic in \a inner. If a value
+ for the tag is found, the element is written with the
+ found value. Otherwise if \a force is set, an empty
+ element is written using the tag.
+
+ Returns true or false depending on whether it writes
+ an element using the tag \a t.
+
+ \note If \a t is found in the metadata map, it is erased.
+ i.e. Once you call this function for a particular \a t,
+ you consume \a t.
+ */
+bool DitaXmlGenerator::writeMetadataElement(const InnerNode* inner,
+ DitaXmlGenerator::DitaTag t,
+ bool force)
+{
+ QString s = getMetadataElement(inner,t);
+ if (s.isEmpty() && !force)
+ return false;
+ writeStartTag(t);
+ if (!s.isEmpty())
+ xmlWriter().writeCharacters(s);
+ writeEndTag();
+ return true;
+}
+
+
+/*!
+ Looks up the tag name for \a t in the map of metadata
+ values for the current topic in \a inner. If one or more
+ value sfor the tag are found, the elements are written.
+ Otherwise nothing is written.
+
+ Returns true or false depending on whether it writes
+ at least one element using the tag \a t.
+
+ \note If \a t is found in the metadata map, it is erased.
+ i.e. Once you call this function for a particular \a t,
+ you consume \a t.
+ */
+bool DitaXmlGenerator::writeMetadataElements(const InnerNode* inner,
+ DitaXmlGenerator::DitaTag t)
+{
+ QStringList s = getMetadataElements(inner,t);
+ if (s.isEmpty())
+ return false;
+ for (int i=0; i<s.size(); ++i) {
+ writeStartTag(t);
+ xmlWriter().writeCharacters(s[i]);
+ writeEndTag();
+ }
+ return true;
+}
+
+/*!
+ Looks up the tag name for \a t in the map of metadata
+ values for the current topic in \a inner. If a value
+ for the tag is found, the value is returned.
+
+ \note If \a t is found in the metadata map, it is erased.
+ i.e. Once you call this function for a particular \a t,
+ you consume \a t.
+ */
+QString DitaXmlGenerator::getMetadataElement(const InnerNode* inner, DitaXmlGenerator::DitaTag t)
+{
+ QString s = Generator::getMetadataElement(inner, ditaTags[t]);
+ if (s.isEmpty())
+ s = metadataDefault(t);
+ return s;
+}
+
+/*!
+ Looks up the tag name for \a t in the map of metadata
+ values for the current topic in \a inner. If values
+ for the tag are found, they are returned in a string
+ list.
+
+ \note If \a t is found in the metadata map, all the
+ pairs having the key \a t are erased. i.e. Once you
+ all this function for a particular \a t, you consume
+ \a t.
+ */
+QStringList DitaXmlGenerator::getMetadataElements(const InnerNode* inner,
+ DitaXmlGenerator::DitaTag t)
+{
+ QStringList s = Generator::getMetadataElements(inner,ditaTags[t]);
+ if (s.isEmpty())
+ s.append(metadataDefault(t));
+ return s;
+}
+
+/*!
+ Returns the value of key \a t or an empty string
+ if \a t is not found in the map.
+ */
+QString DitaXmlGenerator::metadataDefault(DitaTag t) const
+{
+ return metadataDefaults.value(ditaTags[t]);
+}
+
+/*!
+ Writes the <prolog> element for the \a inner node
+ using the \a marker. The <prolog> element contains
+ the <metadata> element, plus some others. This
+ function writes one or more of these elements:
+
+ \list
+ \o <audience> *
+ \o <author> *
+ \o <brand>
+ \o <category> *
+ \o <compomnent> *
+ \o <copyrholder> *
+ \o <copyright> *
+ \o <created>
+ \o <copyryear> *
+ \o <critdates>
+ \o <keyword>
+ \o <keywords>
+ \o <metadata> *
+ \o <othermeta>
+ \o <permissions> *
+ \o <platform>
+ \o <prodinfo> *
+ \o <prodname> *
+ \o <prolog> *
+ \o <publisher> *
+ \o <resourceid>
+ \o <revised>
+ \o <source>
+ \o <tm>
+ \o <unknown>
+ \o <vrm> *
+ \o <vrmlist> *
+ \endlist
+
+ \node * means the tag has been used.
+
+ */
+void
+DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker)
+{
+ if (!inner)
+ return;
+ writeStartTag(DT_prolog);
+ writeMetadataElements(inner,DT_author);
+ writeMetadataElement(inner,DT_publisher);
+ QString s = getMetadataElement(inner,DT_copyryear);
+ QString t = getMetadataElement(inner,DT_copyrholder);
+ writeStartTag(DT_copyright);
+ writeStartTag(DT_copyryear);
+ if (!s.isEmpty())
+ xmlWriter().writeAttribute("year",s);
+ writeEndTag(); // </copyryear>
+ writeStartTag(DT_copyrholder);
+ if (!s.isEmpty())
+ xmlWriter().writeCharacters(t);
+ writeEndTag(); // </copyrholder>
+ writeEndTag(); // </copyright>
+ s = getMetadataElement(inner,DT_permissions);
+ writeStartTag(DT_permissions);
+ xmlWriter().writeAttribute("view",s);
+ writeEndTag(); // </permissions>
+ writeStartTag(DT_metadata);
+ QStringList sl = getMetadataElements(inner,DT_audience);
+ if (!sl.isEmpty()) {
+ for (int i=0; i<sl.size(); ++i) {
+ writeStartTag(DT_audience);
+ xmlWriter().writeAttribute("type",sl[i]);
+ writeEndTag(); // </audience>
+ }
+ }
+ if (!writeMetadataElement(inner,DT_category,false)) {
+ writeStartTag(DT_category);
+ QString category = "Page";
+ if (inner->type() == Node::Class)
+ category = "Class reference";
+ else if (inner->type() == Node::Namespace)
+ category = "Namespace";
+ else if (inner->type() == Node::Fake) {
+ if (inner->subType() == Node::QmlClass)
+ category = "QML Element Reference";
+ else if (inner->subType() == Node::QmlBasicType)
+ category = "QML Basic Type";
+ else if (inner->subType() == Node::HeaderFile)
+ category = "Header File";
+ else if (inner->subType() == Node::Module)
+ category = "Module";
+ else if (inner->subType() == Node::File)
+ category = "Example Source File";
+ else if (inner->subType() == Node::Example)
+ category = "Example";
+ else if (inner->subType() == Node::Image)
+ category = "Image";
+ else if (inner->subType() == Node::Group)
+ category = "Group";
+ else if (inner->subType() == Node::Page)
+ category = "Page";
+ else if (inner->subType() == Node::ExternalPage)
+ category = "External Page"; // Is this necessary?
+ }
+ xmlWriter().writeCharacters(category);
+ writeEndTag(); // </category>
+ }
+ if (vrm.size() > 0) {
+ writeStartTag(DT_prodinfo);
+ if (!writeMetadataElement(inner,DT_prodname,false)) {
+ writeStartTag(DT_prodname);
+ xmlWriter().writeCharacters(projectDescription);
+ writeEndTag(); // </prodname>
+ }
+ writeStartTag(DT_vrmlist);
+ writeStartTag(DT_vrm);
+ if (vrm.size() > 0)
+ xmlWriter().writeAttribute("version",vrm[0]);
+ if (vrm.size() > 1)
+ xmlWriter().writeAttribute("release",vrm[1]);
+ if (vrm.size() > 2)
+ xmlWriter().writeAttribute("modification",vrm[2]);
+ writeEndTag(); // <vrm>
+ writeEndTag(); // <vrmlist>
+ if (!writeMetadataElement(inner,DT_component,false)) {
+ QString component = inner->moduleName();
+ if (!component.isEmpty()) {
+ writeStartTag(DT_component);
+ xmlWriter().writeCharacters(component);
+ writeEndTag(); // </component>
+ }
+ }
+ writeEndTag(); // </prodinfo>
+ }
+ const QStringMultiMap& metaTagMap = inner->doc().metaTagMap();
+ QMapIterator<QString, QString> i(metaTagMap);
+ while (i.hasNext()) {
+ i.next();
+ writeStartTag(DT_othermeta);
+ xmlWriter().writeAttribute("name",i.key());
+ xmlWriter().writeAttribute("content",i.value());
+ writeEndTag(); // </othermeta>
+ }
+ writeEndTag(); // </metadata>
+ writeEndTag(); // </prolog>
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 4aae657943..ffca234fd9 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -81,6 +81,182 @@ class DitaXmlGenerator : public PageGenerator
LastSinceType
};
+ enum DitaTag {
+ DT_NONE,
+ DT_alt,
+ DT_apiDesc,
+ DT_APIMap,
+ DT_apiName,
+ DT_audience,
+ DT_author,
+ DT_b,
+ DT_body,
+ DT_bodydiv,
+ DT_brand,
+ DT_category,
+ DT_codeblock,
+ DT_comment,
+ DT_component,
+ DT_copyrholder,
+ DT_copyright,
+ DT_copyryear,
+ DT_created,
+ DT_critdates,
+ DT_cxxAPIMap,
+ DT_cxxClass,
+ DT_cxxClassAbstract,
+ DT_cxxClassAccessSpecifier,
+ DT_cxxClassAPIItemLocation,
+ DT_cxxClassBaseClass,
+ DT_cxxClassDeclarationFile,
+ DT_cxxClassDeclarationFileLine,
+ DT_cxxClassDefinition,
+ DT_cxxClassDerivation,
+ DT_cxxClassDerivationAccessSpecifier,
+ DT_cxxClassDerivations,
+ DT_cxxClassDetail,
+ DT_cxxClassNested,
+ DT_cxxClassNestedClass,
+ DT_cxxClassNestedDetail,
+ DT_cxxDefine,
+ DT_cxxDefineAccessSpecifier,
+ DT_cxxDefineAPIItemLocation,
+ DT_cxxDefineDeclarationFile,
+ DT_cxxDefineDeclarationFileLine,
+ DT_cxxDefineDefinition,
+ DT_cxxDefineDetail,
+ DT_cxxDefineNameLookup,
+ DT_cxxDefineParameter,
+ DT_cxxDefineParameterDeclarationName,
+ DT_cxxDefineParameters,
+ DT_cxxDefinePrototype,
+ DT_cxxDefineReimplemented,
+ DT_cxxEnumeration,
+ DT_cxxEnumerationAccessSpecifier,
+ DT_cxxEnumerationAPIItemLocation,
+ DT_cxxEnumerationDeclarationFile,
+ DT_cxxEnumerationDeclarationFileLine,
+ DT_cxxEnumerationDefinition,
+ DT_cxxEnumerationDefinitionFile,
+ DT_cxxEnumerationDefinitionFileLineStart,
+ DT_cxxEnumerationDefinitionFileLineEnd,
+ DT_cxxEnumerationDetail,
+ DT_cxxEnumerationNameLookup,
+ DT_cxxEnumerationPrototype,
+ DT_cxxEnumerationScopedName,
+ DT_cxxEnumerator,
+ DT_cxxEnumeratorInitialiser,
+ DT_cxxEnumeratorNameLookup,
+ DT_cxxEnumeratorPrototype,
+ DT_cxxEnumerators,
+ DT_cxxEnumeratorScopedName,
+ DT_cxxFunction,
+ DT_cxxFunctionAccessSpecifier,
+ DT_cxxFunctionAPIItemLocation,
+ DT_cxxFunctionConst,
+ DT_cxxFunctionConstructor,
+ DT_cxxFunctionDeclarationFile,
+ DT_cxxFunctionDeclarationFileLine,
+ DT_cxxFunctionDeclaredType,
+ DT_cxxFunctionDefinition,
+ DT_cxxFunctionDestructor,
+ DT_cxxFunctionDetail,
+ DT_cxxFunctionNameLookup,
+ DT_cxxFunctionParameter,
+ DT_cxxFunctionParameterDeclarationName,
+ DT_cxxFunctionParameterDeclaredType,
+ DT_cxxFunctionParameterDefaultValue,
+ DT_cxxFunctionParameters,
+ DT_cxxFunctionPrototype,
+ DT_cxxFunctionPureVirtual,
+ DT_cxxFunctionReimplemented,
+ DT_cxxFunctionScopedName,
+ DT_cxxFunctionStorageClassSpecifierStatic,
+ DT_cxxFunctionVirtual,
+ DT_cxxTypedef,
+ DT_cxxTypedefAccessSpecifier,
+ DT_cxxTypedefAPIItemLocation,
+ DT_cxxTypedefDeclarationFile,
+ DT_cxxTypedefDeclarationFileLine,
+ DT_cxxTypedefDefinition,
+ DT_cxxTypedefDetail,
+ DT_cxxTypedefNameLookup,
+ DT_cxxTypedefScopedName,
+ DT_cxxVariable,
+ DT_cxxVariableAccessSpecifier,
+ DT_cxxVariableAPIItemLocation,
+ DT_cxxVariableDeclarationFile,
+ DT_cxxVariableDeclarationFileLine,
+ DT_cxxVariableDeclaredType,
+ DT_cxxVariableDefinition,
+ DT_cxxVariableDetail,
+ DT_cxxVariableNameLookup,
+ DT_cxxVariablePrototype,
+ DT_cxxVariableReimplemented,
+ DT_cxxVariableScopedName,
+ DT_cxxVariableStorageClassSpecifierStatic,
+ DT_data,
+ DT_dataabout,
+ DT_dd,
+ DT_dl,
+ DT_dlentry,
+ DT_dt,
+ DT_entry,
+ DT_fig,
+ DT_i,
+ DT_image,
+ DT_keyword,
+ DT_keywords,
+ DT_li,
+ DT_link,
+ DT_linktext,
+ DT_lq,
+ DT_metadata,
+ DT_ol,
+ DT_othermeta,
+ DT_p,
+ DT_parameter,
+ DT_permissions,
+ DT_ph,
+ DT_platform,
+ DT_pre,
+ DT_prodinfo,
+ DT_prodname,
+ DT_prolog,
+ DT_publisher,
+ DT_relatedLinks,
+ DT_resourceid,
+ DT_revised,
+ DT_row,
+ DT_section,
+ DT_sectiondiv,
+ DT_shortdesc,
+ DT_simpletable,
+ DT_source,
+ DT_stentry,
+ DT_sthead,
+ DT_strow,
+ DT_sub,
+ DT_sup,
+ DT_table,
+ DT_tbody,
+ DT_tgroup,
+ DT_thead,
+ DT_title,
+ DT_tm,
+ DT_topic,
+ DT_topicmeta,
+ DT_topicref,
+ DT_tt,
+ DT_u,
+ DT_ul,
+ DT_unknown,
+ DT_vrm,
+ DT_vrmlist,
+ DT_xref,
+ DT_LAST
+ };
+
public:
DitaXmlGenerator();
~DitaXmlGenerator();
@@ -139,6 +315,13 @@ class DitaXmlGenerator : public PageGenerator
void writePropertyParameter(const QString& tag, const NodeList& nlist);
void writeRelatedLinks(const FakeNode* fake, CodeMarker* marker);
void writeLink(const Node* node, const QString& tex, const QString& role);
+ void writeProlog(const InnerNode* inner, CodeMarker* marker);
+ bool writeMetadataElement(const InnerNode* inner,
+ DitaXmlGenerator::DitaTag t,
+ bool force=true);
+ bool writeMetadataElements(const InnerNode* inner, DitaXmlGenerator::DitaTag t);
+ QString getMetadataElement(const InnerNode* inner, DitaXmlGenerator::DitaTag t);
+ QStringList getMetadataElements(const InnerNode* inner, DitaXmlGenerator::DitaTag t);
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
@@ -254,27 +437,45 @@ class DitaXmlGenerator : public PageGenerator
virtual void endSubPage();
virtual void generateInnerNode(const InnerNode* node);
QXmlStreamWriter& xmlWriter();
- void writeDetailedDescription(const Node* node,
- CodeMarker* marker,
- bool apiDesc,
- const QString& title);
+ void writeApiDesc(const Node* node, CodeMarker* marker, const QString& title);
void addLink(const QString& href, const QStringRef& text);
void writeDitaMap();
+ void writeStartTag(DitaTag t);
+ void writeEndTag(DitaTag t=DT_NONE);
+ DitaTag currentTag();
+ void clearSectionNesting() { sectionNestingLevel = 0; }
+ int enterApiDesc(const QString& outputclass, const QString& title);
+ int enterSection(const QString& outputclass, const QString& title);
+ int leaveSection();
+ bool inSection() const { return (sectionNestingLevel > 0); }
+ int currentSectionNestingLevel() const { return sectionNestingLevel; }
+ QString metadataDefault(DitaTag t) const;
private:
- QMap<QString, QString> refMap;
- QMap<QString, QString> name2guidMap;
- GuidMaps guidMaps;
- int codeIndent;
+ /*
+ These flags indicate which elements the generator
+ is currently outputting.
+ */
+ bool inContents;
+ bool inDetailedDescription;
+ bool inLegaleseText;
bool inLink;
bool inObsoleteLink;
- bool inContents;
bool inSectionHeading;
bool inTableHeader;
bool inTableBody;
- int numTableRows;
- bool threeColumnEnumValueTable;
+
+ bool noLinks;
+ bool obsoleteLinks;
bool offlineDocs;
+ bool threeColumnEnumValueTable;
+
+ int codeIndent;
+ int numTableRows;
+ int divNestingLevel;
+ int sectionNestingLevel;
+ int tableColumnCount;
+
QString link;
QStringList sectionNumber;
QRegExp funcLeftParen;
@@ -288,12 +489,14 @@ class DitaXmlGenerator : public PageGenerator
QString projectDescription;
QString projectUrl;
QString navigationLinks;
+ QString version;
+ QStringList vrm;
QStringList stylesheets;
QStringList customHeadElements;
const Tree* myTree;
- bool obsoleteLinks;
- bool noLinks;
- int tableColumnCount;
+ QMap<QString, QString> refMap;
+ QMap<QString, QString> name2guidMap;
+ GuidMaps guidMaps;
QMap<QString, NodeMap > moduleClassMap;
QMap<QString, NodeMap > moduleNamespaceMap;
NodeMap nonCompatClasses;
@@ -312,12 +515,10 @@ class DitaXmlGenerator : public PageGenerator
NewClassMaps newClassMaps;
NewClassMaps newQmlClassMaps;
static int id;
- static bool inApiDesc;
- static bool inSection;
- static bool inDetailedDescription;
- static bool inLegaleseText;
-
+ static QString ditaTags[];
QStack<QXmlStreamWriter*> xmlWriterStack;
+ QStack<DitaTag> tagStack;
+ QStringMultiMap metadataDefaults;
};
#define DITAXMLGENERATOR_ADDRESS "address"
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index a730799e41..2239f433b2 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -55,6 +55,7 @@
#include <qregexp.h>
#include <ctype.h>
#include <limits.h>
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -62,6 +63,7 @@ Q_GLOBAL_STATIC(QSet<QString>, null_Set_QString)
Q_GLOBAL_STATIC(QStringList, null_QStringList)
Q_GLOBAL_STATIC(QList<Text>, null_QList_Text)
Q_GLOBAL_STATIC(QStringMap, null_QStringMap)
+Q_GLOBAL_STATIC(QStringMultiMap, null_QStringMultiMap)
struct Macro
{
@@ -90,8 +92,8 @@ enum {
CMD_QUOTEFROMFILE, CMD_QUOTEFUNCTION, CMD_RAW, CMD_ROW,
CMD_SA, CMD_SECTION1, CMD_SECTION2, CMD_SECTION3,
CMD_SECTION4, CMD_SIDEBAR, CMD_SINCELIST, CMD_SKIPLINE,
- CMD_SKIPTO, CMD_SKIPUNTIL, CMD_SNIPPET, CMD_SUB, CMD_SUP,
- CMD_TABLE, CMD_TABLEOFCONTENTS, CMD_TARGET, CMD_TT,
+ CMD_SKIPTO, CMD_SKIPUNTIL, CMD_SNIPPET, CMD_SPAN, CMD_SUB,
+ CMD_SUP, CMD_TABLE, CMD_TABLEOFCONTENTS, CMD_TARGET, CMD_TT,
CMD_UNDERLINE, CMD_UNICODE, CMD_VALUE, CMD_WARNING,
#ifdef QDOC_QML
CMD_QML, CMD_ENDQML, CMD_CPP, CMD_ENDCPP, CMD_QMLTEXT,
@@ -184,6 +186,7 @@ static struct {
{ "skipto", CMD_SKIPTO, 0 },
{ "skipuntil", CMD_SKIPUNTIL, 0 },
{ "snippet", CMD_SNIPPET, 0 },
+ { "span", CMD_SPAN, 0 },
{ "sub", CMD_SUB, 0 },
{ "sup", CMD_SUP, 0 },
{ "table", CMD_TABLE, 0 },
@@ -226,7 +229,7 @@ class DocPrivateExtra
QList<int> tableOfContentsLevels;
QList<Atom*> keywords;
QList<Atom*> targets;
- QStringMap metaMap;
+ QStringMultiMap metaMap;
DocPrivateExtra()
: granularity(Doc::Part) { }
@@ -358,7 +361,7 @@ class DocParser
void checkExpiry(const QString& date);
void insertBaseName(const QString &baseName);
void insertTarget(const QString& target, bool keyword);
- void include(const QString& fileName);
+ void include(const QString& fileName, const QString& identifier);
void startFormat(const QString& format, int cmd);
bool openCommand(int cmd);
bool closeCommand(int endCmd);
@@ -366,14 +369,15 @@ class DocParser
void endSection(int unit, int endCmd);
void parseAlso();
void append(Atom::Type type, const QString& string = "");
+ void append(Atom::Type type, const QString& p1, const QString& p2);
void appendChar(QChar ch);
void appendWord(const QString &word);
void appendToCode(const QString &code);
void appendToCode(const QString &code, Atom::Type defaultType);
void startNewPara();
void enterPara(Atom::Type leftType = Atom::ParaLeft,
- Atom::Type rightType = Atom::ParaRight,
- const QString& string = "");
+ Atom::Type rightType = Atom::ParaRight,
+ const QString& string = "");
void leavePara();
void leaveValue();
void leaveValueList();
@@ -405,9 +409,13 @@ class DocParser
Location cachedLoc;
int cachedPos;
- DocPrivate *priv;
- enum ParaState { OutsidePara, InsideSingleLinePara, InsideMultiLinePara };
- ParaState paraState;
+ DocPrivate* priv;
+ enum ParagraphState {
+ OutsideParagraph,
+ InSingleLineParagraph,
+ InMultiLineParagraph
+ };
+ ParagraphState paraState;
bool inTableHeader;
bool inTableRow;
bool inTableItem;
@@ -454,7 +462,7 @@ void DocParser::parse(const QString& source,
priv = docPrivate;
priv->text << Atom::Nop;
- paraState = OutsidePara;
+ paraState = OutsideParagraph;
inTableHeader = false;
inTableRow = false;
inTableItem = false;
@@ -470,7 +478,7 @@ void DocParser::parse(const QString& source,
CodeMarker *marker = 0;
Atom *currentLinkAtom = 0;
- QString x;
+ QString p1, p2;
QStack<bool> preprocessorSkipping;
int numPreprocessorSkipping = 0;
@@ -509,11 +517,11 @@ void DocParser::parse(const QString& source,
switch (cmd) {
case CMD_A:
enterPara();
- x = getArgument();
+ p1 = getArgument();
append(Atom::FormattingLeft,ATOM_FORMATTING_PARAMETER);
- append(Atom::String, x);
+ append(Atom::String, p1);
append(Atom::FormattingRight,ATOM_FORMATTING_PARAMETER);
- priv->params.insert(x);
+ priv->params.insert(p1);
break;
case CMD_ABSTRACT:
if (openCommand(cmd)) {
@@ -538,20 +546,20 @@ void DocParser::parse(const QString& source,
break;
case CMD_C:
enterPara();
- x = untabifyEtc(getArgument(true));
- marker = CodeMarker::markerForCode(x);
- append(Atom::C, marker->markedUpCode(x, 0, location()));
+ p1 = untabifyEtc(getArgument(true));
+ marker = CodeMarker::markerForCode(p1);
+ append(Atom::C, marker->markedUpCode(p1, 0, location()));
break;
case CMD_CAPTION:
leavePara();
- /* ... */
+ enterPara(Atom::CaptionLeft, Atom::CaptionRight);
break;
case CMD_CHAPTER:
startSection(Doc::Chapter, cmd);
break;
case CMD_CODE:
leavePara();
- append(Atom::Code, getCode(CMD_CODE, marker));
+ append(Atom::Code, getCode(CMD_CODE, 0));
break;
#ifdef QDOC_QML
case CMD_QML:
@@ -568,10 +576,14 @@ void DocParser::parse(const QString& source,
#endif
case CMD_DIV:
leavePara();
- x = getArgument(true);
- append(Atom::Div, x);
+ p1 = getArgument(true);
+ append(Atom::DivLeft, p1);
openedCommands.push(cmd);
- enterPara();
+ break;
+ case CMD_ENDDIV:
+ leavePara();
+ append(Atom::DivRight);
+ closeCommand(cmd);
break;
case CMD_CODELINE:
{
@@ -635,16 +647,11 @@ void DocParser::parse(const QString& source,
}
break;
case CMD_ENDCHAPTER:
- endSection(0, cmd);
+ endSection(Doc::Chapter, cmd);
break;
case CMD_ENDCODE:
closeCommand(cmd);
break;
- case CMD_ENDDIV:
- leavePara();
- append(Atom::EndDiv);
- closeCommand(cmd);
- break;
#ifdef QDOC_QML
case CMD_ENDQML:
closeCommand(cmd);
@@ -660,7 +667,7 @@ void DocParser::parse(const QString& source,
if (closeCommand(cmd)) {
leavePara();
append(Atom::FootnoteRight);
- paraState = InsideMultiLinePara; // ###
+ paraState = InMultiLineParagraph; // ###
}
break;
case CMD_ENDIF:
@@ -747,7 +754,7 @@ void DocParser::parse(const QString& source,
if (openCommand(cmd)) {
enterPara();
append(Atom::FootnoteLeft);
- paraState = OutsidePara; // ###
+ paraState = OutsideParagraph; // ###
}
break;
case CMD_ANNOTATEDLIST:
@@ -798,7 +805,11 @@ void DocParser::parse(const QString& source,
append(Atom::ImageText, getRestOfLine());
break;
case CMD_INCLUDE:
- include(getArgument());
+ {
+ QString fileName = getArgument();
+ QString identifier = getRestOfLine();
+ include(fileName, identifier);
+ }
break;
case CMD_INLINEIMAGE:
enterPara();
@@ -807,7 +818,7 @@ void DocParser::parse(const QString& source,
append(Atom::String, " ");
break;
case CMD_INDEX:
- if (paraState == OutsidePara) {
+ if (paraState == OutsideParagraph) {
enterPara();
indexStartedPara = true;
}
@@ -826,23 +837,23 @@ void DocParser::parse(const QString& source,
case CMD_L:
enterPara();
if (isLeftBraceAhead()) {
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
if (isLeftBraceAhead()) {
currentLinkAtom = priv->text.lastAtom();
startFormat(ATOM_FORMATTING_LINK, cmd);
}
else {
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- append(Atom::String, cleanLink(x));
+ append(Atom::String, cleanLink(p1));
append(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
}
else {
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- append(Atom::String, cleanLink(x));
+ append(Atom::String, cleanLink(p1));
append(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
break;
@@ -855,8 +866,8 @@ void DocParser::parse(const QString& source,
case CMD_LINK:
if (openCommand(cmd)) {
enterPara();
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
skipSpacesOrOneEndl();
}
@@ -870,8 +881,8 @@ void DocParser::parse(const QString& source,
break;
case CMD_META:
priv->constructExtra();
- x = getArgument();
- priv->extra->metaMap.insert(x, getRestOfLine());
+ p1 = getArgument();
+ priv->extra->metaMap.insert(p1, getArgument());
break;
case CMD_NEWCODE:
location().warning(tr("Unexpected '\\%1'").arg(cmdName(CMD_NEWCODE)));
@@ -895,9 +906,13 @@ void DocParser::parse(const QString& source,
enterPara();
}
else if (openedCommands.top() == CMD_TABLE) {
- x = "1,1";
- if (isLeftBraceAhead())
- x = getArgument();
+ p1 = "1,1";
+ if (isLeftBraceAhead()) {
+ p1 = getArgument();
+ if (isLeftBraceAhead()) {
+ p2 = getArgument();
+ }
+ }
if (!inTableHeader && !inTableRow) {
location().warning(tr("Missing '\\%1' or '\\%1' before '\\%3'")
@@ -912,7 +927,7 @@ void DocParser::parse(const QString& source,
inTableItem = false;
}
- append(Atom::TableItemLeft, x);
+ append(Atom::TableItemLeft, p1, p2);
inTableItem = true;
}
else {
@@ -931,11 +946,11 @@ void DocParser::parse(const QString& source,
getUntilEnd(cmd);
break;
case CMD_OMITVALUE:
- x = getArgument();
- if (!priv->enumItemList.contains(x))
- priv->enumItemList.append(x);
- if (!priv->omitEnumItemList.contains(x))
- priv->omitEnumItemList.append(x);
+ p1 = getArgument();
+ if (!priv->enumItemList.contains(p1))
+ priv->enumItemList.append(p1);
+ if (!priv->omitEnumItemList.contains(p1))
+ priv->omitEnumItemList.append(p1);
break;
case CMD_PART:
startSection(Doc::Part, cmd);
@@ -1004,35 +1019,38 @@ void DocParser::parse(const QString& source,
case CMD_QUOTEFUNCTION:
leavePara();
marker = quoteFromFile();
- x = getRestOfLine();
+ p1 = getRestOfLine();
if (!quoting) {
quoter.quoteTo(location(), cmdStr,
- slashed(marker->functionBeginRegExp(x)));
+ slashed(marker->functionBeginRegExp(p1)));
append(Atom::Code,
quoter.quoteUntil(location(), cmdStr,
- slashed(marker->functionEndRegExp(x))));
+ slashed(marker->functionEndRegExp(p1))));
quoter.reset();
}
else {
append(Atom::CodeQuoteCommand, cmdStr);
- append(Atom::CodeQuoteArgument, slashed(marker->functionEndRegExp(x)));
+ append(Atom::CodeQuoteArgument, slashed(marker->functionEndRegExp(p1)));
}
break;
case CMD_RAW:
leavePara();
- x = getRestOfLine();
- if (x.isEmpty())
+ p1 = getRestOfLine();
+ if (p1.isEmpty())
location().warning(tr("Missing format name after '\\%1")
.arg(cmdName(CMD_RAW)));
- append(Atom::FormatIf, x);
+ append(Atom::FormatIf, p1);
append(Atom::RawString, untabifyEtc(getUntilEnd(cmd)));
append(Atom::FormatElse);
append(Atom::FormatEndif);
break;
case CMD_ROW:
if (openedCommands.top() == CMD_TABLE) {
+ p1.clear();
+ if (isLeftBraceAhead())
+ p1 = getArgument(true);
leaveTableRow();
- append(Atom::TableRowLeft);
+ append(Atom::TableRowLeft,p1);
inTableRow = true;
}
else {
@@ -1102,6 +1120,10 @@ void DocParser::parse(const QString& source,
append(Atom::CodeQuoteArgument, getRestOfLine());
}
break;
+ case CMD_SPAN:
+ p1 = ATOM_FORMATTING_SPAN + getArgument(true);
+ startFormat(p1, cmd);
+ break;
case CMD_SNIPPET:
leavePara();
{
@@ -1125,22 +1147,22 @@ void DocParser::parse(const QString& source,
startFormat(ATOM_FORMATTING_SUPERSCRIPT, cmd);
break;
case CMD_TABLE:
- x = getRestOfLine();
+ p1 = getRestOfLine();
if (openCommand(cmd)) {
leavePara();
- append(Atom::TableLeft, x);
+ append(Atom::TableLeft, p1);
inTableHeader = false;
inTableRow = false;
inTableItem = false;
}
break;
case CMD_TABLEOFCONTENTS:
- x = "1";
+ p1 = "1";
if (isLeftBraceAhead())
- x = getArgument();
- x += ",";
- x += QString::number((int)getSectioningUnit());
- append(Atom::TableOfContents, x);
+ p1 = getArgument();
+ p1 += ",";
+ p1 += QString::number((int)getSectioningUnit());
+ append(Atom::TableOfContents, p1);
break;
case CMD_TARGET:
insertTarget(getRestOfLine(),false);
@@ -1153,16 +1175,16 @@ void DocParser::parse(const QString& source,
break;
case CMD_UNICODE:
enterPara();
- x = getArgument();
+ p1 = getArgument();
{
bool ok;
- uint unicodeChar = x.toUInt(&ok, 0);
+ uint unicodeChar = p1.toUInt(&ok, 0);
if (!ok ||
(unicodeChar == 0x0000) ||
(unicodeChar > 0xFFFE)) {
location().warning(tr("Invalid Unicode character '%1' specified "
"with '%2'")
- .arg(x, cmdName(CMD_UNICODE)));
+ .arg(p1, cmdName(CMD_UNICODE)));
}
else {
append(Atom::String, QChar(unicodeChar));
@@ -1172,13 +1194,13 @@ void DocParser::parse(const QString& source,
case CMD_VALUE:
leaveValue();
if (openedLists.top().style() == OpenedList::Value) {
- x = getArgument();
- if (!priv->enumItemList.contains(x))
- priv->enumItemList.append(x);
+ p1 = getArgument();
+ if (!priv->enumItemList.contains(p1))
+ priv->enumItemList.append(p1);
openedLists.top().next();
append(Atom::ListTagLeft, ATOM_LIST_VALUE);
- append(Atom::String, x);
+ append(Atom::String, p1);
append(Atom::ListTagRight, ATOM_LIST_VALUE);
append(Atom::ListItemLeft, ATOM_LIST_VALUE);
@@ -1191,7 +1213,8 @@ void DocParser::parse(const QString& source,
}
break;
case CMD_WARNING:
- startNewPara();
+ leavePara();
+ enterPara();
append(Atom::FormattingLeft, ATOM_FORMATTING_BOLD);
append(Atom::String, "Warning:");
append(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
@@ -1199,13 +1222,13 @@ void DocParser::parse(const QString& source,
break;
case CMD_OVERLOAD:
priv->metacommandsUsed.insert(cmdStr);
- x.clear();
+ p1.clear();
if (!isBlankLine())
- x = getRestOfLine();
- if (!x.isEmpty()) {
+ p1 = getRestOfLine();
+ if (!p1.isEmpty()) {
append(Atom::ParaLeft);
append(Atom::String, "This function overloads ");
- append(Atom::AutoLink,x);
+ append(Atom::AutoLink,p1);
append(Atom::String, ".");
append(Atom::ParaRight);
}
@@ -1213,9 +1236,9 @@ void DocParser::parse(const QString& source,
append(Atom::ParaLeft);
append(Atom::String,"This is an overloaded function.");
append(Atom::ParaRight);
- x = getMetaCommandArgument(cmdStr);
+ p1 = getMetaCommandArgument(cmdStr);
}
- priv->metaCommandMap[cmdStr].append(x);
+ priv->metaCommandMap[cmdStr].append(p1);
break;
case NOT_A_CMD:
if (metaCommandSet.contains(cmdStr)) {
@@ -1281,8 +1304,7 @@ void DocParser::parse(const QString& source,
braceDepth--;
pos++;
- QMap<int, QString>::Iterator f =
- pendingFormats.find(braceDepth);
+ QMap<int, QString>::Iterator f = pendingFormats.find(braceDepth);
if (f == pendingFormats.end()) {
enterPara();
appendChar('}');
@@ -1319,7 +1341,7 @@ void DocParser::parse(const QString& source,
newWord = false;
}
- if (paraState == OutsidePara) {
+ if (paraState == OutsideParagraph) {
if (ch.isSpace()) {
++pos;
newWord = false;
@@ -1333,7 +1355,7 @@ void DocParser::parse(const QString& source,
if (ch.isSpace()) {
++pos;
if ((ch == '\n') &&
- (paraState == InsideSingleLinePara ||
+ (paraState == InSingleLineParagraph ||
isBlankLine())) {
leavePara();
newWord = false;
@@ -1441,7 +1463,7 @@ void DocParser::parse(const QString& source,
location().warning(tr("Missing '\\%1'").arg(cmdName(CMD_ENDIF)));
}
- while (currentSectioningUnit > Doc::Chapter) {
+ while (currentSectioningUnit >= Doc::Chapter) {
int delta = currentSectioningUnit - priv->extra->sectioningUnit;
append(Atom::SectionRight, QString::number(delta));
currentSectioningUnit = Doc::SectioningUnit(int(currentSectioningUnit) - 1);
@@ -1561,7 +1583,7 @@ void DocParser::insertTarget(const QString &target, bool keyword)
}
}
-void DocParser::include(const QString& fileName)
+void DocParser::include(const QString& fileName, const QString& identifier)
{
if (location().depth() > 16)
location().fatal(tr("Too many nested '\\%1's")
@@ -1575,12 +1597,12 @@ void DocParser::include(const QString& fileName)
fileName,
userFriendlyFilePath);
if (filePath.isEmpty()) {
- location().warning(tr("Cannot find leaf file '%1'").arg(fileName));
+ location().warning(tr("Cannot find qdoc include file '%1'").arg(fileName));
}
else {
QFile inFile(filePath);
if (!inFile.open(QFile::ReadOnly)) {
- location().warning(tr("Cannot open leaf file '%1'")
+ location().warning(tr("Cannot open qdoc include file '%1'")
.arg(userFriendlyFilePath));
}
else {
@@ -1590,9 +1612,56 @@ void DocParser::include(const QString& fileName)
QString includedStuff = inStream.readAll();
inFile.close();
- in.insert(pos, includedStuff);
- len = in.length();
- openedInputs.push(pos + includedStuff.length());
+ if (identifier.isEmpty()) {
+ in.insert(pos, includedStuff);
+ len = in.length();
+ openedInputs.push(pos + includedStuff.length());
+ }
+ else {
+ QStringList lineBuffer = includedStuff.split(QLatin1Char('\n'));
+ int i = 0;
+ int startLine = -1;
+ while (i < lineBuffer.size()) {
+ if (lineBuffer[i].startsWith("//!")) {
+ if (lineBuffer[i].contains(identifier)) {
+ startLine = i+1;
+ break;
+ }
+ }
+ ++i;
+ }
+ if (startLine < 0) {
+ location().warning(tr("Cannot find '%1' in '%2'")
+ .arg(identifier)
+ .arg(userFriendlyFilePath));
+ return;
+
+ }
+ QString result;
+ i = startLine;
+ do {
+ if (lineBuffer[i].startsWith("//!")) {
+ if (i<lineBuffer.size()) {
+ if (lineBuffer[i].contains(identifier)) {
+ break;
+ }
+ }
+ }
+ else
+ result += lineBuffer[i] + "\n";
+ ++i;
+ } while (i < lineBuffer.size());
+ if (result.isEmpty()) {
+ location().warning(tr("Empty qdoc snippet '%1' in '%2'")
+ .arg(identifier)
+ .arg(userFriendlyFilePath));
+ }
+ else {
+ in.insert(pos, result);
+ len = in.length();
+ openedInputs.push(pos + result.length());
+ }
+ }
}
}
}
@@ -1697,8 +1766,7 @@ bool DocParser::closeCommand(int endCmd)
}
}
else {
- location().warning(tr("Unexpected '\\%1'")
- .arg(cmdName(endCmd)));
+ location().warning(tr("Unexpected '\\%1'").arg(cmdName(endCmd)));
}
return false;
}
@@ -1816,19 +1884,32 @@ void DocParser::parseAlso()
}
}
+//static bool debug = false;
+#if 0
+ if (type == Atom::DivLeft)
+ debug = true;
+ if (debug)
+ qDebug() << type << string;
+ if (type == Atom::DivRight)
+ debug = false;
+#endif
+
void DocParser::append(Atom::Type type, const QString &string)
{
Atom::Type lastType = priv->text.lastAtom()->type();
-#ifdef QDOC_QML
- if (((lastType == Atom::Code) || (lastType == Atom::Code)) &&
-#else
- if ((lastType == Atom::Code) &&
-#endif
- priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
+ if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
priv->text << Atom(type, string);
}
+void DocParser::append(Atom::Type type, const QString& p1, const QString& p2)
+{
+ Atom::Type lastType = priv->text.lastAtom()->type();
+ if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
+ priv->text.lastAtom()->chopString();
+ priv->text << Atom(type, p1, p2);
+}
+
void DocParser::appendChar(QChar ch)
{
if (priv->text.lastAtom()->type() != Atom::String)
@@ -1883,20 +1964,23 @@ void DocParser::enterPara(Atom::Type leftType,
Atom::Type rightType,
const QString& string)
{
- if (paraState == OutsidePara) {
- if (priv->text.lastAtom()->type() != Atom::ListItemLeft)
+ if (paraState == OutsideParagraph) {
+
+ if ((priv->text.lastAtom()->type() != Atom::ListItemLeft) &&
+ (priv->text.lastAtom()->type() != Atom::DivLeft)) {
leaveValueList();
+ }
+
append(leftType, string);
indexStartedPara = false;
pendingParaLeftType = leftType;
pendingParaRightType = rightType;
pendingParaString = string;
- if (
- leftType == Atom::SectionHeadingLeft) {
- paraState = InsideSingleLinePara;
+ if (leftType == Atom::SectionHeadingLeft) {
+ paraState = InSingleLineParagraph;
}
else {
- paraState = InsideMultiLinePara;
+ paraState = InMultiLineParagraph;
}
skipSpacesOrOneEndl();
}
@@ -1904,7 +1988,7 @@ void DocParser::enterPara(Atom::Type leftType,
void DocParser::leavePara()
{
- if (paraState != OutsidePara) {
+ if (paraState != OutsideParagraph) {
if (!pendingFormats.isEmpty()) {
location().warning(tr("Missing '}'"));
pendingFormats.clear();
@@ -1920,7 +2004,7 @@ void DocParser::leavePara()
}
append(pendingParaRightType, pendingParaString);
}
- paraState = OutsidePara;
+ paraState = OutsideParagraph;
indexStartedPara = false;
pendingParaRightType = Atom::Nop;
pendingParaString = "";
@@ -2154,10 +2238,8 @@ QString DocParser::getArgument(bool verbatim)
location().warning(tr("Missing '}'"));
}
else {
- while (pos < in.length() &&
- ((delimDepth > 0) ||
- ((delimDepth == 0) &&
- !in[pos].isSpace()))) {
+ while ((pos < in.length()) &&
+ ((delimDepth > 0) || ((delimDepth == 0) && !in[pos].isSpace()))) {
switch (in[pos].unicode()) {
case '(':
case '[':
@@ -2362,6 +2444,9 @@ bool DocParser::isLeftBraceAhead()
return numEndl < 2 && i < len && in[i] == '{';
}
+/*!
+ Skips to the next non-space character or EOL.
+ */
void DocParser::skipSpacesOnLine()
{
while ((pos < in.length()) &&
@@ -2370,6 +2455,9 @@ void DocParser::skipSpacesOnLine()
++pos;
}
+/*!
+ Skips spaces and on EOL.
+ */
void DocParser::skipSpacesOrOneEndl()
{
int firstEndl = -1;
@@ -2873,9 +2961,9 @@ const QList<Atom *> &Doc::targets() const
return priv->extra->targets;
}
-const QStringMap &Doc::metaTagMap() const
+const QStringMultiMap &Doc::metaTagMap() const
{
- return priv && priv->extra ? priv->extra->metaMap : *null_QStringMap();
+ return priv && priv->extra ? priv->extra->metaMap : *null_QStringMultiMap();
}
void Doc::initialize(const Config& config)
diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h
index ea832b1026..e043b3a520 100644
--- a/tools/qdoc3/doc.h
+++ b/tools/qdoc3/doc.h
@@ -64,7 +64,6 @@ class FakeNode;
typedef QMap<QString, QStringList> QCommandMap;
typedef QMap<QString, QString> QStringMap;
-typedef QStringMap::const_iterator QStringMapEntry;
typedef QMultiMap<QString, QString> QStringMultiMap;
class Doc
@@ -118,7 +117,7 @@ class Doc
const QList<int> &tableOfContentsLevels() const;
const QList<Atom *> &keywords() const;
const QList<Atom *> &targets() const;
- const QStringMap &metaTagMap() const;
+ const QStringMultiMap &metaTagMap() const;
static void initialize( const Config &config );
static void terminate();
diff --git a/tools/qdoc3/doc/config/compat.qdocconf b/tools/qdoc3/doc/config/compat.qdocconf
new file mode 100644
index 0000000000..4b8d7a490d
--- /dev/null
+++ b/tools/qdoc3/doc/config/compat.qdocconf
@@ -0,0 +1,28 @@
+macro.0 = "\\\\0"
+macro.b = "\\\\b"
+macro.n = "\\\\n"
+macro.r = "\\\\r"
+macro.i = "\\o"
+macro.i11 = "\\o{1,1}"
+macro.i12 = "\\o{1,2}"
+macro.i13 = "\\o{1,3}"
+macro.i14 = "\\o{1,4}"
+macro.i15 = "\\o{1,5}"
+macro.i16 = "\\o{1,6}"
+macro.i17 = "\\o{1,7}"
+macro.i18 = "\\o{1,8}"
+macro.i19 = "\\o{1,9}"
+macro.i21 = "\\o{2,1}"
+macro.i31 = "\\o{3,1}"
+macro.i41 = "\\o{4,1}"
+macro.i51 = "\\o{5,1}"
+macro.i61 = "\\o{6,1}"
+macro.i71 = "\\o{7,1}"
+macro.i81 = "\\o{8,1}"
+macro.i91 = "\\o{9,1}"
+macro.img = "\\image"
+macro.endquote = "\\endquotation"
+macro.relatesto = "\\relates"
+
+spurious = "Missing comma in .*" \
+ "Missing pattern .*"
diff --git a/tools/qdoc3/doc/config/macros.qdocconf b/tools/qdoc3/doc/config/macros.qdocconf
new file mode 100644
index 0000000000..2262daa98e
--- /dev/null
+++ b/tools/qdoc3/doc/config/macros.qdocconf
@@ -0,0 +1,37 @@
+macro.aacute.HTML = "&aacute;"
+macro.Aring.HTML = "&Aring;"
+macro.aring.HTML = "&aring;"
+macro.Auml.HTML = "&Auml;"
+macro.author = "\\bold{Author:}"
+macro.br.HTML = "<br />"
+macro.BR.HTML = "<br />"
+macro.copyright.HTML = "&copy;"
+macro.eacute.HTML = "&eacute;"
+macro.gui = "\\bold"
+macro.hr.HTML = "<hr />"
+macro.iacute.HTML = "&iacute;"
+macro.key = "\\bold"
+macro.menu = "\\bold"
+macro.note = "\\bold{Note:}"
+macro.oslash.HTML = "&oslash;"
+macro.ouml.HTML = "&ouml;"
+macro.QA = "\\e{Qt Assistant}"
+macro.QD = "\\e{Qt Designer}"
+macro.QL = "\\e{Qt Linguist}"
+macro.QQV = "\\e{Qt QML Viewer}"
+macro.param = "\\e"
+macro.raisedaster.HTML = "<sup>*</sup>"
+macro.rarrow.HTML = "&rarr;"
+macro.reg.HTML = "<sup>&reg;</sup>"
+macro.return = "Returns"
+macro.starslash = "\\c{*/}"
+macro.begincomment = "\\c{/*}"
+macro.endcomment = "\\c{*/}"
+macro.uuml.HTML = "&uuml;"
+macro.mdash.HTML = "&mdash;"
+
+macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">"
+macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
+macro.endfloat.HTML = "</div>"
+macro.clearfloat.HTML = "<br style=\"clear: both\" />"
+macro.emptyspan.HTML = "<span></span>"
diff --git a/tools/qdoc3/doc/config/qdoc-online.qdocconf b/tools/qdoc3/doc/config/qdoc-online.qdocconf
new file mode 100644
index 0000000000..7fd8ed59f4
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc-online.qdocconf
@@ -0,0 +1,2 @@
+include(qdoc-project.qdocconf)
+include(qt-html-templates-online.qdocconf)
diff --git a/tools/qdoc3/doc/config/qdoc-project.qdocconf b/tools/qdoc3/doc/config/qdoc-project.qdocconf
new file mode 100644
index 0000000000..969405276a
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc-project.qdocconf
@@ -0,0 +1,47 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-defines.qdocconf)
+
+indexes = $$QT_BUILD_TREE/doc/html/qt.index
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+
+project = QDoc
+description = QDoc3 Manual
+url = http://doc.qt.nokia.com/qdoc
+
+sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
+headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
+examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng"
+
+sourcedirs = ..
+
+exampledirs = .. \
+ ../examples \
+ ../../../../examples
+
+imagedirs = ../../../doc/src/templates/images \
+ images
+
+outputdir = $$QT_BUILD_TREE/tools/qdoc3/doc/html
+tagfile = $$QT_BUILD_TREE/tools/qdoc3/doc/html/qdoc.tags
+
+qhp.projects = QDoc
+
+qhp.QDoc.file = qdoc.qhp
+qhp.QDoc.namespace = com.trolltech.qdoc
+qhp.QDoc.virtualFolder = qdoc
+qhp.QDoc.indexTitle = QDoc Manual - Table of Contents
+qhp.QDoc.indexRoot =
+
+qhp.QDoc.filterAttributes = qdoc qtrefdoc
+qhp.QDoc.customFilters.QDoc.name = QDoc
+qhp.QDoc.customFilters.QDoc.filterAttributes = qdoc
+qhp.QDoc.subprojects = overviews
+qhp.QDoc.subprojects.overviews.title = Overviews
+qhp.QDoc.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QDoc.subprojects.overviews.selectors = fake:page,group,module
diff --git a/tools/qdoc3/doc/config/qdoc.qdocconf b/tools/qdoc3/doc/config/qdoc.qdocconf
new file mode 100644
index 0000000000..c238abef88
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc.qdocconf
@@ -0,0 +1,2 @@
+include(qdoc-project.qdocconf)
+include(qt-html-templates.qdocconf)
diff --git a/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf b/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf
new file mode 100644
index 0000000000..044eef4b8a
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf
@@ -0,0 +1,98 @@
+Cpp.ignoretokens = QAXFACTORY_EXPORT \
+ QDESIGNER_COMPONENTS_LIBRARY \
+ QDESIGNER_EXTENSION_LIBRARY \
+ QDESIGNER_SDK_LIBRARY \
+ QDESIGNER_SHARED_LIBRARY \
+ QDESIGNER_UILIB_LIBRARY \
+ QM_EXPORT_CANVAS \
+ QM_EXPORT_DNS \
+ QM_EXPORT_DOM \
+ QM_EXPORT_FTP \
+ QM_EXPORT_HTTP \
+ QM_EXPORT_ICONVIEW \
+ QM_EXPORT_NETWORK \
+ QM_EXPORT_OPENGL \
+ QM_EXPORT_OPENVG \
+ QM_EXPORT_SQL \
+ QM_EXPORT_TABLE \
+ QM_EXPORT_WORKSPACE \
+ QM_EXPORT_XML \
+ QT_ASCII_CAST_WARN \
+ QT_ASCII_CAST_WARN_CONSTRUCTOR \
+ QT_BEGIN_HEADER \
+ QT_DESIGNER_STATIC \
+ QT_END_HEADER \
+ QT_FASTCALL \
+ QT_WIDGET_PLUGIN_EXPORT \
+ Q_COMPAT_EXPORT \
+ Q_CORE_EXPORT \
+ Q_CORE_EXPORT_INLINE \
+ Q_EXPLICIT \
+ Q_EXPORT \
+ Q_EXPORT_CODECS_CN \
+ Q_EXPORT_CODECS_JP \
+ Q_EXPORT_CODECS_KR \
+ Q_EXPORT_PLUGIN \
+ Q_GFX_INLINE \
+ Q_AUTOTEST_EXPORT \
+ Q_GUI_EXPORT \
+ Q_GUI_EXPORT_INLINE \
+ Q_GUI_EXPORT_STYLE_CDE \
+ Q_GUI_EXPORT_STYLE_COMPACT \
+ Q_GUI_EXPORT_STYLE_MAC \
+ Q_GUI_EXPORT_STYLE_MOTIF \
+ Q_GUI_EXPORT_STYLE_MOTIFPLUS \
+ Q_GUI_EXPORT_STYLE_PLATINUM \
+ Q_GUI_EXPORT_STYLE_POCKETPC \
+ Q_GUI_EXPORT_STYLE_SGI \
+ Q_GUI_EXPORT_STYLE_WINDOWS \
+ Q_GUI_EXPORT_STYLE_WINDOWSXP \
+ QHELP_EXPORT \
+ Q_INLINE_TEMPLATE \
+ Q_INTERNAL_WIN_NO_THROW \
+ Q_NETWORK_EXPORT \
+ Q_OPENGL_EXPORT \
+ Q_OPENVG_EXPORT \
+ Q_OUTOFLINE_TEMPLATE \
+ Q_SQL_EXPORT \
+ Q_SVG_EXPORT \
+ Q_SCRIPT_EXPORT \
+ Q_SCRIPTTOOLS_EXPORT \
+ Q_TESTLIB_EXPORT \
+ Q_TYPENAME \
+ Q_XML_EXPORT \
+ Q_XMLSTREAM_EXPORT \
+ Q_XMLPATTERNS_EXPORT \
+ QDBUS_EXPORT \
+ Q_DBUS_EXPORT \
+ QT_BEGIN_NAMESPACE \
+ QT_BEGIN_INCLUDE_NAMESPACE \
+ QT_END_NAMESPACE \
+ QT_END_INCLUDE_NAMESPACE \
+ PHONON_EXPORT \
+ Q_DECLARATIVE_EXPORT \
+ Q_GADGET \
+ QWEBKIT_EXPORT \
+ Q_INVOKABLE
+Cpp.ignoredirectives = Q_DECLARE_HANDLE \
+ Q_DECLARE_INTERFACE \
+ Q_DECLARE_METATYPE \
+ Q_DECLARE_OPERATORS_FOR_FLAGS \
+ Q_DECLARE_PRIVATE \
+ Q_DECLARE_PUBLIC \
+ Q_DECLARE_SHARED \
+ Q_DECLARE_TR_FUNCTIONS \
+ Q_DECLARE_TYPEINFO \
+ Q_DISABLE_COPY \
+ QT_FORWARD_DECLARE_CLASS \
+ Q_DUMMY_COMPARISON_OPERATOR \
+ Q_ENUMS \
+ Q_FLAGS \
+ Q_INTERFACES \
+ __attribute__ \
+ K_DECLARE_PRIVATE \
+ PHONON_OBJECT \
+ PHONON_HEIR \
+ Q_PRIVATE_PROPERTY \
+ Q_DECLARE_PRIVATE_D \
+ Q_CLASSINFO
diff --git a/tools/qdoc3/doc/config/qt-defines.qdocconf b/tools/qdoc3/doc/config/qt-defines.qdocconf
new file mode 100644
index 0000000000..50a355f04c
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-defines.qdocconf
@@ -0,0 +1,17 @@
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ Q_NO_USING_KEYWORD \
+ __cplusplus
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
diff --git a/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf b/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf
new file mode 100644
index 0000000000..47e550bcc9
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf
@@ -0,0 +1,32 @@
+# Define the location of the templates to use. Style sheets and scripts are
+# specified relative to the template directory and will be copied into
+# subdirectories of the output directory.
+
+HTML.templatedir = .
+
+HTML.stylesheets = style/offline.css
+
+HTML.scripts =
+
+# Files not referenced in any qdoc file (last four needed by qtdemo)
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo.png \
+ arrow_down.png \
+ breadcrumb.png \
+ bullet_gt.png \
+ bullet_dn.png \
+ bullet_sq.png \
+ bullet_up.png \
+ horBar.png \
+ sprites-combined.png
+
+# Include the style sheets and scripts used.
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.headerscripts =
+
+HTML.endheader = \
+ "</head>\n" \
+ "<body>\n"
diff --git a/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf b/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf
new file mode 100644
index 0000000000..f915cb4496
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf
@@ -0,0 +1,72 @@
+# Define the location of the templates to use. Style sheets and scripts are
+# specified relative to the template directory and will be copied into
+# subdirectories of the output directory.
+
+HTML.templatedir = .
+
+HTML.stylesheets = style/narrow.css \
+ style/style.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/superfish.css
+
+# Adding jquery and functions - providing online tools and search features
+HTML.scripts = scripts/functions.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ scripts/jquery.js
+
+
+# Files not referenced in any qdoc file.
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo.png \
+ bg_l.png \
+ bg_l_blank.png \
+ bg_ll_blank.png \
+ bg_ul_blank.png \
+ header_bg.png \
+ bg_r.png \
+ box_bg.png \
+ breadcrumb.png \
+ bullet_gt.png \
+ bullet_dn.png \
+ bullet_sq.png \
+ bullet_up.png \
+ arrow_down.png \
+ feedbackground.png \
+ horBar.png \
+ page.png \
+ page_bg.png \
+ sprites-combined.png \
+ spinner.gif
+
+# Include the style sheets and scripts used.
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n" \
+ " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n" \
+ " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />\n" \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n" \
+ " <!--[if IE]>\n" \
+ "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n" \
+ "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if lt IE 7]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if IE 7]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if IE 8]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n" \
+ "<![endif]-->\n\n"
+
+HTML.headerscripts = \
+ "<script src=\"scripts/superfish.js\" type=\"text/javascript\"></script>\n" \
+ "<script src=\"scripts/narrow.js\" type=\"text/javascript\"></script>\n\n"
+
+HTML.endheader = \
+ "</head>\n" \
+ "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"
diff --git a/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf b/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf
new file mode 100644
index 0000000000..cbf8851f45
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf
@@ -0,0 +1,115 @@
+include(qt-html-online-styles.qdocconf)
+
+HTML.postheader = \
+ " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>QDoc Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"></div>\n" \
+ " <div id=\"nav-topright\">\n" \
+ " <ul>\n" \
+ " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
+ " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \
+ " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \
+ " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \
+ " DOC</a></li>\n" \
+ " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrapper\">\n" \
+ " <div class=\"hd\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " <div class=\"bd group\">\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Breadcrumbs go here -->\n"
+
+HTML.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div class=\"toolbuttons toolblock\">\n" \
+ " <ul>\n" \
+ " <li id=\"smallA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"medA\" class=\"t_button active\">A</li>\n" \
+ " <li id=\"bigA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
+ " <span>Print</span></a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"content mainContent\">\n"
+
+HTML.footer = \
+ " </div>\n" \
+ " </div>\n" \
+ " </div> \n" \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " </div> \n" \
+ " <div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2011 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document 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.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n"
+
+
+# Files not referenced in any qdoc file.
+# See also extraimages.HTML
+qhp.QDoc.extraFiles = index.html \
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_ll_blank.png \
+ images/bg_ul_blank.png \
+ images/header_bg.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/arrow_down.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/spinner.gif \
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/narrow.css \
+ style/superfish.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
diff --git a/tools/qdoc3/doc/config/qt-html-templates.qdocconf b/tools/qdoc3/doc/config/qt-html-templates.qdocconf
new file mode 100644
index 0000000000..e0dc87511e
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-templates.qdocconf
@@ -0,0 +1,54 @@
+include(qt-html-default-styles.qdocconf)
+
+HTML.postheader = \
+ "<div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " </div>\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Breadcrumbs go here -->\n"
+
+HTML.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ "</div>\n" \
+ "<div class=\"content mainContent\">\n"
+
+HTML.footer = \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ "</div> \n" \
+ "<div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2011 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document 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.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ "</div>\n" \
+
+# Files not referenced in any qdoc file.
+# See also extraimages.HTML
+qhp.QDoc.extraFiles = index.html \
+ images/arrow_down.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/horBar.png \
+ images/sprites-combined.png \
+ style/offline.css
diff --git a/tools/qdoc3/doc/config/scripts/functions.js b/tools/qdoc3/doc/config/scripts/functions.js
new file mode 100755
index 0000000000..62bc53508e
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/functions.js
@@ -0,0 +1,258 @@
+// Removing search results
+function hideSearchResults() {
+/* hiding search results as the user clicks on the different categories */
+ $('#resultdialog').removeClass('active');
+ $("#resultlist").removeClass().addClass('all');
+ $("#resultlinks").removeClass().addClass('all');
+ $("#searchcount").removeClass().addClass('all');
+}
+/* closing the searhc result dialog */
+$('#resultclose').click(function(e) {
+ e.preventDefault();
+ hideSearchResults();
+});
+
+$(document.body).click(function() {
+});
+
+/* START non link areas where cursor should change to pointing hand */
+$('.t_button').mouseover(function() {
+ $('.t_button').css('cursor','pointer');
+});
+/* END non link areas */
+/* Changing font size to smaller */
+$('#smallA').click(function() {
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','smaller');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+
+/* Reset font size */
+$('#medA').click(function() {
+ $('.mainContent .heading').css('font','600 16px/1 Arial');
+ $('.mainContent h1').css('font','600 18px/1.2 Arial');
+ $('.mainContent h2').css('font','600 16px/1.2 Arial');
+ $('.mainContent h3').css('font','600 14px/1.2 Arial');
+ $('.mainContent p').css('font','13px/20px Verdana');
+ $('.mainContent li').css('font','400 13px/1 Verdana');
+ $('.mainContent li').css('line-height','14px');
+ $('.mainContent .toc li').css('font', 'normal 10px/1.2 Verdana');
+ $('.mainContent table').css('font','13px/1.2 Verdana');
+ $('.mainContent .heading').css('font','600 16px/1 Arial');
+ $('.mainContent .indexboxcont li').css('font','600 13px/1 Verdana');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+/* Changing font size to bigger */
+$('#bigA').click(function() {
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','large');
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('line-height','25px');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+
+/* Show page content after closing feedback box */
+$('.feedclose').click(function() {
+ $('.bd').show();
+ $('.hd').show();
+ $('.footer').show();
+ $('#feedbackBox').hide();
+ $('#blurpage').hide();
+});
+
+/* Hide page content and show feedback box */
+$('.feedback').click(function() {
+ $('.bd').hide();
+ $('.hd').hide();
+ $('.footer').hide();
+ $('#feedbackBox').show();
+ $('#blurpage').show();
+});
+/* Default search URL */
+var qturl = "";
+
+/* The next function handles the response data (in xml) returned by the search engine */
+
+// Process data sent back from the server. The data is structured as a XML.
+/*
+XML structure handled by function processNokiaData()
+<page> - container for each page returned
+<pageWords/> - contains keywords
+<pageTitle/> - contains page title/header content
+<pageUrl/> - contains page URL - URL relative to root
+<pageType> - contains page type - APIPage/Article/Example
+</page>
+*/
+
+
+function processNokiaData(response){
+/* fetch the responce from the server using page as the root element */
+ var propertyTags = response.getElementsByTagName('page');
+ /* reset counters */
+ var apiCount = 0;
+ var articleCount = 0;
+ var exampleCount = 0;
+ var full_li_element;
+
+/* remove any old results */
+ $('#resultlist li').remove();
+
+
+ /* running through the elements in the xml structure */
+ for (var i=0; i<propertyTags.length; i++) {
+ /* for every element named pageWords*/
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++) {
+ /* start a new list element */
+ full_li_element = '<li';
+ /* if the pageType element reads APIPage, add class name api */
+ if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage') {
+ full_li_element += ' class="api"';
+ apiCount++;
+ }
+ /* if the pageType element reads Article, add class name article */
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article') {
+ full_li_element += ' class="article"';
+ articleCount++;
+ }
+ /* if the pageType element reads Example, add class name example */
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example') {
+ full_li_element += ' class="example"';
+ exampleCount++;
+ }
+ /* adding the link element*/
+ full_li_element += '><a href="'+qturl;
+ /* adding the URL attribute*/
+ full_li_element += propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ /* adding the link title and closing the link and list elements */
+ full_li_element += '">' + propertyTags[i].getElementsByTagName('pageWords')[0].firstChild.nodeValue + '</a></li>';
+ /* appending the list element to the #resultlist div*/
+ $('#resultlist').append(full_li_element);
+ }
+ }
+
+ /* if the result is not empty */
+ if (propertyTags.length > 0) {
+ /* add class name active to show the dialog */
+ $('#resultdialog').addClass('active');
+ /* setting number of hits*/
+ $('#resultcount').html(propertyTags.length);
+ $('#apicount').html(apiCount);
+ $('#articlecount').html(articleCount);
+ $('#examplecount').html(exampleCount);
+
+ }
+ else {
+ $('#pageType').addClass('red');
+ }
+
+
+
+ // Filtering results in display
+ $('p#resultlinks a').click(function(e) {
+ e.preventDefault();
+ // Displays API ref pages
+ if (this.id == "showapiresults") {
+ $("#resultlist").removeClass().addClass('api');
+ $("#resultlinks").removeClass().addClass('api');
+ $("#searchcount").removeClass().addClass('api');
+ }
+ // Displays Articles
+ else if (this.id == "showarticleresults") {
+ $("#resultlist").removeClass().addClass('article');
+ $("#resultlinks").removeClass().addClass('article');
+ $("#searchcount").removeClass().addClass('article');
+ }
+ // Displays Examples
+ if (this.id == "showexampleresults") {
+ $("#resultlist").removeClass().addClass('example');
+ $("#resultlinks").removeClass().addClass('example');
+ $("#searchcount").removeClass().addClass('example');
+ }
+ // Displays All
+ if (this.id == "showallresults") {
+ $("#resultlist").removeClass().addClass('all');
+ $("#resultlinks").removeClass().addClass('all');
+ $("#searchcount").removeClass().addClass('all');
+ }
+ });
+}
+
+//build regular expression object to find empty string or any number of blank
+var blankRE=/^\s*$/;
+
+
+function CheckEmptyAndLoadList()
+{
+ /* Start Extracting information for feedback and adding this to the feedback form */
+ var pageUrl = window.location.href;
+ var pageVal = $('title').html();
+ $('#pageType').removeClass('red');
+ $('#feedUrl').remove();
+ $('#pageVal').remove();
+ $('.menuAlert').remove();
+ $('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
+ $('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
+ /* End Extracting information for feedback and adding this to the feedback form */
+
+ /* extracts search query */
+ var value = document.getElementById('pageType').value;
+ /* if the search is less than three chars long remove class names and remove elements from old search*/
+ if((blankRE.test(value)) || (value.length < 3))
+ {
+ $('#resultdialog').removeClass('active');
+ $('#resultlist li').remove();
+ }
+}
+
+// Loads on doc ready - prepares search
+ $(document).ready(function () {
+ /* fetch page title*/
+ var pageTitle = $('title').html();
+ /* getting content from search box */
+ var currentString = $('#pageType').val() ;
+ /* if the search box is not empty run CheckEmptyAndLoadList*/
+ if(currentString.length < 1){
+ CheckEmptyAndLoadList();
+ }
+
+ /* on key-up in the search box execute the following */
+ $('#pageType').keyup(function () {
+ /* extract the search box content */
+ var searchString = $('#pageType').val() ;
+ /* if the string is less than three characters */
+ if ((searchString == null) || (searchString.length < 3)) {
+ /* remove classes and elements*/
+ $('#pageType').removeClass('loading');
+ $('.searching').remove();
+ /* run CheckEmptyAndLoadList */
+ CheckEmptyAndLoadList();
+
+ $('.report').remove();
+ return;
+ }
+ /* if timer checks out */
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ /* add loading image by adding loading class */
+ $('#pageType').addClass('loading');
+ $('.searching').remove();
+
+ /* run the actual search */
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+ /* on success remove loading img */
+ $('.searching').remove();
+ $('#pageType').removeClass('loading');
+
+ processNokiaData(response);
+
+ }
+ });
+ }, 500); /* timer set to 500 ms */
+ });
+ }); \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/scripts/jquery.js b/tools/qdoc3/doc/config/scripts/jquery.js
new file mode 100755
index 0000000000..0c7294c90a
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/jquery.js
@@ -0,0 +1,152 @@
+/*!
+ * jQuery JavaScript Library v1.4.1
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jan 25 19:43:33 2010 -0500
+ */
+(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++)e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);return a}return j?
+e(a[0],b):null}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f,
+a.currentTarget);m=0;for(s=i.length;m<s;m++)for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==n)d.push({elem:n,fn:j})}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function pa(a){return!a||!a.parentNode||a.parentNode.nodeType===
+11}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment();
+c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a});return d}function ua(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,
+va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]],
+[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,
+this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this,
+a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};
+c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];n=e[i];if(a!==n)if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n)}else if(n!==v)a[i]=n}return a};c.extend({noConflict:function(a){z.$=
+Oa;if(a)z.jQuery=Na;return c},isReady:false,ready:function(){if(!c.isReady){if(!r.body)return setTimeout(c.ready,13);c.isReady=true;if(P){for(var a,b=0;a=P[b++];)a.call(r,c);P=null}c.fn.triggerHandler&&c(r).triggerHandler("ready")}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete")return c.ready();if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false)}else if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload",
+c.ready);var a=false;try{a=z.frameElement==null}catch(b){}r.documentElement.doScroll&&a&&la()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===v||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;
+return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]||
+r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(r.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=
+a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Sa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==
+v;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=v}else if(b&&!c.isFunction(b)){d=b;b=v}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
+uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version}if(c.browser.webkit)c.browser.safari=true;if(wa)c.inArray=function(a,b){return wa.call(b,a)};S=c(r);if(r.addEventListener)L=function(){r.removeEventListener("DOMContentLoaded",
+L,false);c.ready()};else if(r.attachEvent)L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support=
+{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
+b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild);
+c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props=
+{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true,
+{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,
+a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);
+return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||
+a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=
+c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(ca),
+d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),n=b,o=
+a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||
+{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());
+if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d);
+f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=
+""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=
+function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a,
+d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+
+s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a,
+"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,
+b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b,
+d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b=
+0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};
+c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b=
+a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,
+"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"||
+d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a=
+a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,
+f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,
+b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+
+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector,
+live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null)}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}l[q]=y}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===
+k){y=l[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(o.filter(h,[t]).length>0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||
+typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u=
+l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&
+y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q,
+h,k);if(l!=null){g=g.replace(m.match[t],"");break}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g}};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter)if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p)p=[];if(m.preFilter[H])if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=u[U])!=null;U++)if(D){I=M(D,t,U,u);var Da=
+l^!!I;if(k&&I!=null)if(Da)y=true;else u[U]=false;else if(Da){p.push(D);y=true}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)o.error(g);else break;q=g}return u};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l)h=h.toLowerCase();l=0;for(var q=g.length,
+p;l<q;l++)if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h}k&&o.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false}}}else{l=0;for(q=g.length;l<q;l++)if(p=g[l])g[l]=k?p.parentNode:p.parentNode===h;k&&o.filter(h,g,true)}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=
+h=h.toLowerCase();q=b}q("parentNode",h,l,g,p,k)},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,l,g,p,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++)h[l].getAttribute("name")===g[1]&&k.push(h[l]);return k.length===0?null:k}},
+TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
+"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
+return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
+g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
+0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++)if(h[k]===g)return false;return true}else o.error("Syntax error, unrecognized expression: "+
+q)},CHILD:function(g,h){var k=h[1],l=g;switch(k){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(k==="first")return true;l=g;case "last":for(;l=l.nextSibling;)if(l.nodeType===1)return false;return true;case "nth":k=h[2];var q=h[3];if(k===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++u;p.sizcache=h}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>=
+0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="?
+k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};
+try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k<l;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var C;if(r.documentElement.compareDocumentPosition)C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===
+h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in r.documentElement)C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(r.createRange)C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,
+l);if(g===0)j=true;return g};(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");
+return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href",
+2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
+0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[],
+l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)o(g,h[q],k);return o.filter(l,k)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,
+function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Qa.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=
+0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ea(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>
+-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),
+a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},
+nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):
+e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==
+b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
+col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)},
+wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?
+d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
+false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&
+!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)||
+["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,
+b,f))});else a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j===
+"string"&&sa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++)d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment)}n&&c.each(n,
+Ma)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this])}this.parentNode&&
+this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j===
+"string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;)i=i.lastChild;if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o)c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o])}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild);
+j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d)}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i,
+Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v)return c.curCSS(d,f);if(typeof e==="number"&&!hb.test(f))e+="px";c.style(d,f,e)})};
+c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(d)<0)d=v;var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":""}if(ga.test(b))b=La;b=b.replace(ha,ia);if(e)f[b]=d;return f[b]},css:function(a,
+b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&
+a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ga.test(b))b=La;if(!d&&e&&e[b])f=e[b];else if(ob){if(ga.test(b))b="float";b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=
+a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var pb=
+J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=
+c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified")i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);d&&i.each(d,[j.responseText,n,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&
+(this.checked||rb.test(this.nodeName)||sb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,
+b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest}:
+function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e])}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}
+function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(m==="GET")N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||
+N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data)e.data=(e.data+"").replace(N,"="+i+"$1");e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i]}catch(p){}A&&A.removeChild(B)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"")}if(e.data&&m==="GET")e.url+=(ja.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&
+c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset)B.charset=e.scriptCharset;if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&&
+A.removeChild(B)}}}A.insertBefore(B,A.firstChild);return v}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType)w.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url])}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",
+e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w)w.onreadystatechange=c.noop}else if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)?
+"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success")try{n=c.httpData(w,e.dataType,e)}catch(u){j="parsererror";p=u}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,w,j,p);d();q==="timeout"&&w.abort();if(e.async)w=null}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort")}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout")},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null)}catch(l){c.handleError(e,
+w,null,l);d()}e.async||g();return w}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=
+f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(j,n){if(c.isArray(n))c.each(n,
+function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m)});else!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m)}):f(j,n)}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n)}var e=[];if(b===v)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var i in a)d(i,a[i]);return e.join("&").replace(vb,"+")}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/,
+W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d])f=ka[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
+ka[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
+c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"),
+o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x))A[x==="toggle"?n?"show":"hide":x](a);
+else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E}if(B[1])x=(B[1]==="-="?-1:1)*x+C;A.custom(C,x,E)}else A.custom(C,x,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",
+1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
+b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
+null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
+"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
+this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
+c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
+null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
+f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
+b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||
+0;m+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft)}return{top:o,left:m}};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"),
+d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
+d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
+bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
+e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
+this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==v)return this.each(function(){if(i=ua(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ua(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
+c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||
+e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});z.jQuery=z.$=c})(window);
diff --git a/tools/qdoc3/doc/config/scripts/narrow.js b/tools/qdoc3/doc/config/scripts/narrow.js
new file mode 100644
index 0000000000..a5e8b97d9e
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/narrow.js
@@ -0,0 +1,133 @@
+/* This function generates menus and search box in narrow/slim fit mode */
+var narrowInit = function() {
+ /* 1: Create search form */
+ var narrowSearch = $('<div id="narrowsearch"></div>');
+ var searchform = $("#qtdocsearch");
+ narrowSearch.append(searchform);
+ $("#qtdocheader .content .qtref").after(narrowSearch);
+
+ /* 2: Create dropdowns */
+ var narrowmenu = $('<ul id="narrowmenu" class="sf-menu"></ul>');
+
+ /* Lookup */
+ var lookuptext = $("#lookup h2").attr("title");
+ $("#lookup ul").removeAttr("id");
+ $("#lookup ul li").removeAttr("class");
+ $("#lookup ul li").removeAttr("style");
+ var lookupul = $("#lookup ul");
+ var lookuplist = $('<li></li>');
+ var lookuplink = $('<a href="#"></a>');
+ lookuplink.append(lookuptext);
+ lookuplist.append(lookuplink);
+ lookuplist.append(lookupul);
+ narrowmenu.append(lookuplist);
+
+ /* Topics */
+ var topicstext = $("#topics h2").attr("title");
+ $("#topics ul").removeAttr("id");
+ $("#topics ul li").removeAttr("class");
+ $("#topics ul li").removeAttr("style");
+ var topicsul = $("#topics ul");
+ var topicslist = $('<li></li>');
+ var topicslink = $('<a href="#"></a>');
+ topicslink.append(topicstext);
+ topicslist.append(topicslink);
+ topicslist.append(topicsul);
+ narrowmenu.append(topicslist);
+
+ /* Examples */
+ var examplestext = $("#examples h2").attr("title");
+ $("#examples ul").removeAttr("id");
+ $("#examples ul li").removeAttr("class");
+ $("#examples ul li").removeAttr("style");
+ var examplesul = $("#examples ul");
+ var exampleslist = $('<li></li>');
+ var exampleslink = $('<a href="#"></a>');
+ exampleslink.append(examplestext);
+ exampleslist.append(exampleslink);
+ exampleslist.append(examplesul);
+ narrowmenu.append(exampleslist);
+
+ $("#shortCut").after(narrowmenu);
+ $('ul#narrowmenu').superfish({
+ delay: 100,
+ autoArrows: false,
+ disableHI: true
+ });
+}
+
+/* Executes on doc ready */
+$(document).ready(function(){
+ /* check if body has the narrow class */
+ if ($('body').hasClass('narrow')) {
+ /* run narrowInit */
+ narrowInit();
+ }
+
+ /* messure window width and add class if it is smaller than 600 px */
+ if($(window).width()<600) {
+ $('body').addClass('narrow');
+ /* if the search box contains */
+ if ($("#narrowsearch").length == 0) {
+ /* run narrowInit */
+ narrowInit();
+ }
+ }
+ else { /* if the window is wider than 600 px, narrow is removed */
+ $('body').removeClass('narrow');
+ if ($("#narrowsearch").length == 0) {
+ }
+ }
+});
+/* binding resize event to this funciton */
+$(window).bind('resize', function () {
+ /* if the window is wider than 600 px, narrow class is added */
+ if($(window).width()<600) {
+ $('body').addClass('narrow');
+ if ($("#narrowsearch").length == 0) {
+ narrowInit();
+ }
+ }
+ else {
+ /* else we remove the narrow class */
+ $('body').removeClass('narrow');
+ }
+});
+
+ $('#narrowsearch').keyup(function () {
+ /* extract the search box content */
+ var searchString = $('#narrowsearch').val();
+ /* if the string is less than three characters */
+ if ((searchString == null) || (searchString.length < 3)) {
+ /* remove classes and elements*/
+ $('#narrowsearch').removeClass('loading');
+ $('.searching').remove();
+ /* run CheckEmptyAndLoadList */
+ CheckEmptyAndLoadList();
+
+ $('.report').remove();
+ return;
+ }
+ /* if timer checks out */
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ /* add loading image by adding loading class */
+ $('#narrowsearch').addClass('loading');
+ $('.searching').remove();
+
+ /* run the actual search */
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+ /* on success remove loading img */
+ $('.searching').remove();
+ $('#narrowsearch').removeClass('loading');
+ processNokiaData(response);
+ }
+ });
+ }, 500); /* timer set to 500 ms */
+ }); \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/scripts/superfish.js b/tools/qdoc3/doc/config/scripts/superfish.js
new file mode 100644
index 0000000000..c6a9c7de04
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/superfish.js
@@ -0,0 +1,121 @@
+
+/*
+ * Superfish v1.4.8 - jQuery menu widget
+ * Copyright (c) 2008 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
+ */
+
+;(function($){
+ $.fn.superfish = function(op){
+
+ var sf = $.fn.superfish,
+ c = sf.c,
+ $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
+ over = function(){
+ var $$ = $(this), menu = getMenu($$);
+ clearTimeout(menu.sfTimer);
+ $$.showSuperfishUl().siblings().hideSuperfishUl();
+ },
+ out = function(){
+ var $$ = $(this), menu = getMenu($$), o = sf.op;
+ clearTimeout(menu.sfTimer);
+ menu.sfTimer=setTimeout(function(){
+ o.retainPath=($.inArray($$[0],o.$path)>-1);
+ $$.hideSuperfishUl();
+ if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
+ },o.delay);
+ },
+ getMenu = function($menu){
+ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
+ sf.op = sf.o[menu.serial];
+ return menu;
+ },
+ addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
+
+ return this.each(function() {
+ var s = this.serial = sf.o.length;
+ var o = $.extend({},sf.defaults,op);
+ o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
+ $(this).addClass([o.hoverClass,c.bcClass].join(' '))
+ .filter('li:has(ul)').removeClass(o.pathClass);
+ });
+ sf.o[s] = sf.op = o;
+
+ $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
+ if (o.autoArrows) addArrow( $('>a:first-child',this) );
+ })
+ .not('.'+c.bcClass)
+ .hideSuperfishUl();
+
+ var $a = $('a',this);
+ $a.each(function(i){
+ var $li = $a.eq(i).parents('li');
+ $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
+ });
+ o.onInit.call(this);
+
+ }).each(function() {
+ var menuClasses = [c.menuClass];
+ if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
+ $(this).addClass(menuClasses.join(' '));
+ });
+ };
+
+ var sf = $.fn.superfish;
+ sf.o = [];
+ sf.op = {};
+ sf.IE7fix = function(){
+ var o = sf.op;
+ if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
+ this.toggleClass(sf.c.shadowClass+'-off');
+ };
+ sf.c = {
+ bcClass : 'sf-breadcrumb',
+ menuClass : 'sf-js-enabled',
+ anchorClass : 'sf-with-ul',
+ arrowClass : 'sf-sub-indicator',
+ shadowClass : 'sf-shadow'
+ };
+ sf.defaults = {
+ hoverClass : 'sfHover',
+ pathClass : 'overideThisToUse',
+ pathLevels : 1,
+ delay : 800,
+ animation : {opacity:'show'},
+ speed : 'normal',
+ autoArrows : true,
+ dropShadows : true,
+ disableHI : false, // true disables hoverIntent detection
+ onInit : function(){}, // callback functions
+ onBeforeShow: function(){},
+ onShow : function(){},
+ onHide : function(){}
+ };
+ $.fn.extend({
+ hideSuperfishUl : function(){
+ var o = sf.op,
+ not = (o.retainPath===true) ? o.$path : '';
+ o.retainPath = false;
+ var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
+ .find('>ul').hide().css('visibility','hidden');
+ o.onHide.call($ul);
+ return this;
+ },
+ showSuperfishUl : function(){
+ var o = sf.op,
+ sh = sf.c.shadowClass+'-off',
+ $ul = this.addClass(o.hoverClass)
+ .find('>ul:hidden').css('visibility','visible');
+ sf.IE7fix.call($ul);
+ o.onBeforeShow.call($ul);
+ $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
+ return this;
+ }
+ });
+
+})(jQuery);
diff --git a/tools/qdoc3/doc/config/style/narrow.css b/tools/qdoc3/doc/config/style/narrow.css
new file mode 100644
index 0000000000..39b47400c9
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/narrow.css
@@ -0,0 +1,271 @@
+ /* start narrow mode */
+
+ body.narrow
+ {
+ background-image: none;
+ }
+
+ .narrow a {
+ color: #00732f;
+ }
+
+ .narrow .header, .narrow .header .content, .narrow .footer, .narrow .wrapper {
+ margin: 0 7px;
+ min-width: 300px;
+ }
+
+ .narrow .footer {
+ margin: 0px;
+ }
+
+ .creator .header, .creator .header .content, .creator .footer, .creator .wrapper {
+ margin: 0px;
+ min-width: 300px;
+ }
+ .narrow .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background: #fff url(../images/header_bg.png) repeat-x 0 100%;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ }
+
+ .narrow .header .content
+ {
+ }
+
+ .narrow .header #nav-logo
+ {
+ display: none;
+ }
+
+ .narrow .header .qtref
+ {
+ width: auto;
+ height: auto;
+ color: #00732f;
+ position: static;
+ float: left;
+ margin-left: 25px;
+ font: bold 18px/1 Arial;
+ }
+
+ .narrow .header .qtref a
+ {
+ color: #00732F;
+ }
+
+ .narrow .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ width: 260px;
+ }
+
+ .narrow .header #nav-topright
+ {
+ display: none;
+ }
+
+ .narrow .header #shortCut
+ {
+ clear: both;
+ font-weight: normal;
+ position: static;
+ float: left;
+ margin: 15px 0 0 25px;
+ overflow: hidden;
+ padding: 0;
+ height: auto;
+ }
+
+ .narrow .header #shortCut ul
+ {
+ float: none;
+ margin: 0;
+ width: auto;
+ font-size: 11px;
+ }
+
+ .narrow .header #shortCut ul li
+ {
+ background-image: none;
+ }
+
+ .narrow .header #shortCut ul .shortCut-topleft-active,
+ .narrow .header #shortCut ul .shortCut-topleft-inactive
+ {
+ background-image: none;
+ height: auto;
+ padding: 0;
+ width: auto;
+ }
+ .narrow .header #shortCut ul li a
+ {
+ color: #00732F;
+ }
+
+ .narrow .wrapper .hd
+ {
+ background: url(../images/bg_ul_blank.png) no-repeat 0 0;
+ }
+
+ .narrow .wrapper .bd
+ {
+ background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ }
+
+ .narrow .wrapper .ft
+ {
+ background: url(../images/bg_ll_blank.png) no-repeat 0 0;
+ }
+
+ .narrow .sidebar
+ {
+ display: none;
+ }
+
+ .narrow .wrap
+ {
+ margin: 0 5px 0 5px;
+ }
+
+ .creator .wrap
+ {
+ margin: 0px;
+ background:#FFFFFF;
+ }
+ .narrow .wrap .toolbar
+ {
+ border-bottom: none;
+ }
+
+ .narrow .wrap .content
+ {
+ padding-top: 15px;
+ }
+ .creator .wrap .content
+ {
+ padding-top: 10px;
+ }
+ .creator .wrap .content .guide
+ {
+ padding-top: 15px;
+ }
+ .narrow .wrap .feedback
+ {
+ display: none;
+ }
+
+ .narrow .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .narrow .wrap .breadcrumb ul li a {
+ color: #00732f;
+ }
+
+ .narrow .wrap .breadcrumb ul li.last a {
+ color: #363534;
+ }
+
+ #narrowsearch {
+ display: none;
+ }
+
+ .narrow #narrowsearch {
+ display: block;
+ float: right;
+ margin-right: 25px;
+ _position: relative;
+ }
+
+ .narrow #narrowsearch fieldset {
+ _position: absolute;
+ _margin-top: -1px;
+ }
+
+ .narrow #narrowsearch {
+ background: url("http://doc.qt.nokia.com/prototype/html/images/sprites-combined.png") no-repeat scroll -6px -348px transparent;
+ height: 21px;
+ padding: 2px 0 0 5px;
+ width: 167px;
+ }
+
+ .narrow #narrowsearch input {
+ border: none;
+ font: 13px/1.2 Verdana;
+ height: 19px;
+ outline: none;
+ padding: 0;
+ width: 158px;
+ *border: 1px solid #fff;
+ *height: 17px;
+ _height: 18px;
+ }
+ .narrow .indexbox .indexIcon {
+ display: none;
+ }
+
+ .narrow .indexboxcont .section {
+ width: 64%;
+ padding-left: 0;
+ }
+
+ .narrow .indexboxcont .sectionlist {
+ width: 32.5%;
+ }
+
+ #narrowmenu {
+ display: none;
+ float: right;
+ margin: 15px 40px 0 0;
+ font-size: 11px;
+ position: relative;
+ }
+
+ .narrow #narrowmenu {
+ display: block;
+ }
+
+ #narrowmenu a {
+ line-height: 1.1;
+ background: url(../images/arrow_down.png) no-repeat 100% 50%;
+ white-space: nowrap;
+ padding: 0 16px 0 5px;
+ }
+
+ #narrowmenu li {
+ margin-left: 20px;
+ }
+
+ #narrowmenu li li {
+ margin: 0 0 5px 0;
+ }
+
+ #narrowmenu li li a {
+ padding: 0;
+ background-image: none;
+ }
+
+ #narrowmenu li,
+ #narrowmenu li ul {
+ background-color: #fff;
+ margin-top:-1px;
+ }
+
+ #narrowmenu li ul {
+ width: auto;
+ padding: 5px;
+ }
+
+ .sf-menu li:hover ul, .sf-menu li.sfHover ul {
+ top: 1.2em;
+ }
+
+ /* end narrow mode */
+ .creator #narrowsearch, .creator #narrowmenu{
+ display:none;
+ }
diff --git a/tools/qdoc3/doc/config/style/offline.css b/tools/qdoc3/doc/config/style/offline.css
new file mode 100644
index 0000000000..3689ee8d40
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/offline.css
@@ -0,0 +1,673 @@
+@media screen
+{
+
+/* basic elements */
+ html
+ {
+ color: #000000;
+ background: #FFFFFF;
+ }
+ table
+ {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+ fieldset, img
+ {
+ border: 0;
+ max-width:100%;
+ }
+ address, caption, cite, code, dfn, em, strong, th, var, optgroup
+ {
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ del, ins
+ {
+ text-decoration: none;
+ }
+ li
+ {
+ list-style: none;
+ }
+ ol li
+ {
+ list-style: decimal;
+ }
+ caption, th
+ {
+ text-align: left;
+ }
+ h1, h2, h3, h4, h5, h6
+ {
+ font-size: 100%;
+ }
+ q:before, q:after
+ {
+ content: '';
+ }
+ abbr, acronym
+ {
+ border: 0;
+ font-variant: normal;
+ }
+ sup, sub
+ {
+ vertical-align: baseline;
+ }
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:0.5em;
+ }
+ legend
+ {
+ color: #000000;
+ }
+ strong
+ {
+ font-weight: bold;
+ }
+ em
+ {
+ font-style: italic;
+ }
+
+ body
+ {
+ margin-left: 0.5em;
+ margin-right: 0.5em;
+ }
+ a
+ {
+ color: #00732F;
+ text-decoration: none;
+ }
+ hr
+ {
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 1.5em 0 1.5em 0;
+ }
+
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ -moz-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ border-radius: 0.7em 0.7em 0.7em 0.7em;
+ margin: 0 1.5em 1em 1em;
+ padding: 1em 1em 1em 1em;
+ overflow-x: auto;
+ }
+ table, pre
+ {
+ -moz-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ border-radius: 0.7em 0.7em 0.7em 0.7em;
+ background-color: #F6F6F6;
+ border: 1px solid #E6E6E6;
+ border-collapse: separate;
+ margin-bottom: 2.5em;
+ }
+ pre {
+ font-size: 90%;
+ display: block;
+ overflow:hidden;
+ }
+ thead
+ {
+ margin-top: 0.5em;
+ font-weight: bold
+ }
+ th
+ {
+ padding: 0.5em 1.5em 0.5em 1.5em;
+ background-color: #E1E1E1;
+ border-left: 1px solid #E6E6E6;
+ }
+ td
+ {
+ padding: 0.25em 1.5em 0.25em 2em;
+ }
+
+ td.rightAlign
+ {
+ padding: 0.25em 0.5em 0.25em 1em;
+ }
+ table tr.odd
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #F6F6F6;
+ color: #66666E;
+ }
+ table tr.even
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #ffffff;
+ color: #66666E;
+ }
+
+ div.float-left
+ {
+ float: left; margin-right: 2em
+ }
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+
+ span.comment
+ {
+ color: #008B00;
+ font-style: italic
+ }
+ span.string, span.char
+ {
+ color: #000084;
+ }
+ span.number
+ {
+ color: #a46200;
+ }
+ span.operator
+ {
+ color: #202020;
+ }
+ span.keyword
+ {
+ color: #840000;
+ }
+ span.name
+ {
+ color: black
+ }
+ span.type
+ {
+ font-weight: bold
+ }
+ span.type a:visited
+ {
+ color: #0F5300;
+ }
+ span.preprocessor
+ {
+ color: #404040
+ }
+/* end basic elements */
+
+/* font style elements */
+ .heading
+ {
+ font-weight: bold;
+ font-size: 125%;
+ }
+ .subtitle
+ {
+ font-size: 110%
+ }
+ .small-subtitle
+ {
+ font-size: 100%
+ }
+ .red
+ {
+ color:red;
+ }
+/* end font style elements */
+
+/* global settings*/
+ .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+/* end global settings*/
+
+/* header elements */
+ .header .qtref
+ {
+ color: #00732F;
+ font-weight: bold;
+ font-size: 130%;
+ }
+
+ .header .content
+ {
+ margin-bottom: 0.5em
+ }
+
+ .naviNextPrevious
+ {
+ display: none
+ }
+ .header .breadcrumb
+ {
+ font-size: 90%;
+ padding: 0.5em 0 0.5em 1em;
+ margin: 0;
+ background-color: #fafafa;
+ height: 1.35em;
+ border-bottom: 1px solid #d1d1d1;
+ }
+
+ .header .breadcrumb ul
+ {
+ margin: 0;
+ padding: 0;
+ }
+
+ .header .content
+ {
+ word-wrap: break-word;
+ }
+
+ .header .breadcrumb ul li
+ {
+ float: left;
+ background: url(../images/breadcrumb.png) no-repeat 0 3px;
+ padding-left: 1.5em;
+ margin-left: 1.5em;
+ }
+
+ .header .breadcrumb ul li.last
+ {
+ font-weight: normal;
+ }
+
+ .header .breadcrumb ul li a
+ {
+ color: #00732F;
+ }
+
+ .header .breadcrumb ul li.first
+ {
+ background-image: none;
+ padding-left: 0;
+ margin-left: 0;
+ }
+
+ .header .content ol li {
+ background: none;
+ margin-bottom: 1.0em;
+ margin-left: 1.2em;
+ padding-left: 0
+ }
+
+ .header .content li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ margin-bottom: 1em;
+ padding-left: 1.2em;
+ }
+
+/* end header elements */
+
+/* content elements */
+ .content h1
+ {
+ font-weight: bold;
+ font-size: 150%
+ }
+
+ .content h2
+ {
+ font-weight: bold;
+ font-size: 135%;
+ width: 100%;
+ }
+ .content h3
+ {
+ font-weight: bold;
+ font-size: 120%;
+ width: 100%;
+ }
+ .content table p
+ {
+ margin: 0
+ }
+ .content ul
+ {
+ padding-left: 2.5em;
+ }
+ .content li
+ {
+ padding-top: 0.25em;
+ padding-bottom: 0.25em;
+ }
+ .content ul img {
+ vertical-align: middle;
+ }
+
+ .content a:visited
+ {
+ color: #4c0033;
+ text-decoration: none;
+ }
+
+ .content a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ a:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+ descr p a
+ {
+ text-decoration: underline;
+ }
+
+ .descr p a:visited
+ {
+ text-decoration: underline;
+ }
+
+ .alphaChar{
+ width:95%;
+ background-color:#F6F6F6;
+ border:1px solid #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ font-size:12pt;
+ padding-left:10px;
+ margin-top:10px;
+ margin-bottom:10px;
+ }
+ .flowList{
+ /*vertical-align:top;*/
+ /*margin:20px auto;*/
+
+ column-count:3;
+ -webkit-column-count:3;
+ -moz-column-count:3;
+/*
+ column-width:100%;
+ -webkit-column-width:200px;
+ -col-column-width:200px;
+*/
+ column-gap:41px;
+ -webkit-column-gap:41px;
+ -moz-column-gap:41px;
+
+ column-rule: 1px dashed #ccc;
+ -webkit-column-rule: 1px dashed #ccc;
+ -moz-column-rule: 1px dashed #ccc;
+ }
+
+ .flowList dl{
+ }
+ .flowList dd{
+ /*display:inline-block;*/
+ margin-left:10px;
+ min-width:250px;
+ line-height: 1.5;
+ min-width:100%;
+ min-height:15px;
+ }
+
+ .flowList dd a{
+ }
+
+ .content .flowList p{
+ padding:0px;
+ }
+
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+
+ .qmltype
+ {
+ text-align: center;
+ font-size: 120%;
+ }
+ .qmlreadonly
+ {
+ padding-left: 5px;
+ float: right;
+ color: #254117;
+ }
+
+ .qmldefault
+ {
+ padding-left: 5px;
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ .generic .alphaChar{
+ margin-top:5px;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .memItemRight{
+ padding: 0.25em 1.5em 0.25em 0;
+ }
+ .highlightedCode
+ {
+ margin: 1.0em;
+ }
+ .annotated td {
+ padding: 0.25em 0.5em 0.25em 0.5em;
+ }
+
+ .header .content .toc ul
+ {
+ padding-left: 0px;
+ }
+
+ .content .toc h3 {
+ border-bottom: 0px;
+ margin-top: 0px;
+ }
+
+ .content .toc h3 a:hover {
+ color: #00732F;
+ text-decoration: none;
+ }
+
+ .content .toc .level2
+ {
+ margin-left: 1.5em;
+ }
+
+ .content .toc .level3
+ {
+ margin-left: 3.0em;
+ }
+
+ .content ul li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 0.7em;
+ padding-left: 1em
+ }
+
+ .content .toc li
+ {
+ background: url(../images/bullet_dn.png) no-repeat 0 5px;
+ padding-left: 1em
+ }
+
+ .relpage
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ padding: 25px 25px;
+ clear: both;
+ }
+ .relpage ul
+ {
+ float: none;
+ padding: 1.5em;
+ }
+
+ h3.fn, span.fn
+ {
+ -moz-border-radius:7px 7px 7px 7px;
+ -webkit-border-radius:7px 7px 7px 7px;
+ border-radius:7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ font-weight: bold;
+ word-spacing:3px;
+ padding:3px 5px;
+ }
+
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ width:100%;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+
+/* end content elements */
+/* footer elements */
+
+ .footer
+ {
+ color: #393735;
+ font-size: 0.75em;
+ text-align: center;
+ padding-top: 1.5em;
+ padding-bottom: 1em;
+ background-color: #E6E7E8;
+ margin: 0;
+ }
+ .footer p
+ {
+ margin: 0.25em
+ }
+ .small
+ {
+ font-size: 0.5em;
+ }
+/* end footer elements */
+
+ .item {
+ float: left;
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+ }
+
+
+ .item .primary {
+ margin-right: 220px;
+ position: relative;
+ }
+
+ .item hr {
+ margin-left: -220px;
+ }
+
+ .item .secondary {
+ float: right;
+ width: 200px;
+ position: relative;
+ }
+
+ .item .cols {
+ clear: both;
+ display: block;
+ }
+
+ .item .cols .col {
+ float: left;
+ margin-left: 1.5%;
+ }
+
+ .item .cols .col.first {
+ margin-left: 0;
+ }
+
+ .item .cols.two .col {
+ width: 45%;
+ }
+
+ .item .box {
+ margin: 0 0 10px 0;
+ }
+
+ .item .box h3 {
+ margin: 0 0 10px 0;
+ }
+
+ .cols.unclear {
+ clear:none;
+ }
+}
+
+/* end of screen media */
+
+/* start of print media */
+
+@media print
+{
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult
+ {
+ display: none;
+ background: none;
+ }
+ .content
+ {
+ background: none;
+ display: block;
+ width: 100%; margin: 0; float: none;
+ }
+}
+/* end of print media */
diff --git a/tools/qdoc3/doc/config/style/style.css b/tools/qdoc3/doc/config/style/style.css
new file mode 100644
index 0000000000..48ecedc8cc
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style.css
@@ -0,0 +1,1733 @@
+@media screen
+{
+
+/* basic elements */
+ html
+ {
+ color: #000000;
+ background: #FFFFFF;
+ }
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
+ {
+ margin: 0;
+ padding: 0;
+ }
+ table
+ {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+ fieldset, img
+ {
+ border: 0;
+ max-width:100%;
+ }
+ address, caption, cite, code, dfn, em, strong, th, var, optgroup
+ {
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ del, ins
+ {
+ text-decoration: none;
+ }
+ li
+ {
+ list-style: none;
+ }
+ ol li
+ {
+ list-style: decimal;
+ }
+ caption, th
+ {
+ text-align: left;
+ }
+ h1, h2, h3, h4, h5, h6
+ {
+ font-size: 100%;
+ }
+ q:before, q:after
+ {
+ content: '';
+ }
+ abbr, acronym
+ {
+ border: 0;
+ font-variant: normal;
+ }
+ sup, sub
+ {
+ vertical-align: baseline;
+ }
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:5px;
+ }
+ legend
+ {
+ color: #000000;
+ }
+ input, button, textarea, select, optgroup, option
+ {
+ font-family: inherit;
+ font-size: inherit;
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ input, button, textarea, select
+ {
+ font-size: 100%;
+ }
+ strong
+ {
+ font-weight: bold;
+ }
+ em
+ {
+ font-style: italic;
+ }
+
+ /* adding Qt theme */
+ html
+ {
+ /* background-color: #e5e5e5;*/
+ }
+ body
+ {
+ background: #e6e7e8 url(../images/page_bg.png) repeat-x 0 0;
+ font: normal 13px/1.2 Verdana;
+ color: #363534;
+ }
+ a
+ {
+ color: #00732F;
+ text-decoration: none;
+ }
+ hr
+ {
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 15px 0px 15px 0px;
+ }
+
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
+ }
+ table, pre
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #E6E6E6;
+ border-collapse: separate;
+ font-size: 11px;
+ margin-bottom: 25px;
+ }
+ pre.highlightedCode {
+ display: block;
+ overflow:hidden;
+ }
+ thead
+ {
+ margin-top: 5px;
+ font:600 12px/1.2 Arial;
+ }
+ th
+ {
+ padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ border-left: 1px solid #E6E6E6;
+ }
+ td
+ {
+ padding: 3px 15px 3px 20px;
+ }
+ tr.odd td:hover, tr.even td:hover {}
+
+ td.rightAlign
+ {
+ padding: 3px 5px 3px 10px;
+ }
+ table tr.odd
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #F6F6F6;
+ color: #66666E;
+ }
+ table tr.even
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #ffffff;
+ color: #66666E;
+ }
+ table tr.odd td:hover, table tr.even td:hover
+ {
+ /* background-color: #E6E6E6;*/ /* disabled until further notice */
+ }
+
+ div.float-left
+ {
+ float: left; margin-right: 2em
+ }
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+
+ span.comment
+ {
+ color: #008B00;
+ font-style: italic
+ }
+ span.string, span.char
+ {
+ color: #000084;
+ }
+ span.number
+ {
+ color: #a46200;
+ }
+ span.operator
+ {
+ color: #202020;
+ }
+ span.keyword
+ {
+ color: #840000;
+ }
+ span.name
+ {
+ color: black
+ }
+ span.type
+ {
+ font-weight: bold
+ }
+ span.type a:visited
+ {
+ color: #0F5300;
+ }
+ span.preprocessor
+ {
+ color: #404040
+ }
+/* end basic elements */
+
+/* font style elements */
+ .heading
+ {
+ font: normal bold 16px/1.2 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
+ .red
+ {
+ color:red;
+ }
+ .figCaption{
+ color:#363534;
+ font:italic 11px/1.2 Verdana;
+ padding-top:0;
+ }
+/* end font style elements */
+
+/* global settings*/
+ .header, .footer, .wrapper
+ {
+ min-width: 600px;
+ max-width: 1500px;
+ margin: 0 30px;
+ }
+ .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+/* end global settings*/
+
+/* header elements */
+ .header
+ {
+ height: 115px;
+ position: relative;
+ }
+ .header .icon
+ {
+ position: absolute;
+ top: 13px;
+ left: 0;
+ }
+ .header .qtref
+ {
+ position: absolute;
+ top: 28px;
+ left: 88px;
+ width: 302px;
+ height: 22px;
+ }
+ .header .qtref span
+ {
+ display: block;
+ width: 302px;
+ height: 22px;
+ text-indent: -999em;
+ background: url(../images/sprites-combined.png) no-repeat -78px -235px;
+ }
+ .content a:visited
+ {
+ color: #4c0033;
+ text-decoration: none;
+ }
+ .content a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ #nav-topright
+ {
+ height: 70px;
+ }
+
+ #nav-topright ul
+ {
+ list-style-type: none;
+ float: right;
+ width: 370px;
+ margin-top: 11px;
+ }
+
+ #nav-topright li
+ {
+ display: inline-block;
+ margin-right: 20px;
+ float: left;
+ }
+
+ #nav-topright li.nav-topright-last
+ {
+ margin-right: 0;
+ }
+
+ #nav-topright li a
+ {
+ background: transparent url(../images/sprites-combined.png) no-repeat;
+ height: 18px;
+ display: block;
+ overflow: hidden;
+ text-indent: -9999px;
+ }
+
+ #nav-topright li.nav-topright-home a
+ {
+ width: 65px;
+ background-position: -2px -91px;
+ }
+
+ #nav-topright li.nav-topright-home a:hover
+ {
+ background-position: -2px -117px;
+ }
+
+ #nav-topright li.nav-topright-dev a
+ {
+ width: 30px;
+ background-position: -76px -91px;
+ }
+
+ #nav-topright li.nav-topright-dev a:hover
+ {
+ background-position: -76px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-labs a
+ {
+ width: 40px;
+ background-position: -114px -91px;
+ }
+
+ #nav-topright li.nav-topright-labs a:hover
+ {
+ background-position: -114px -117px;
+ }
+
+ #nav-topright li.nav-topright-doc a
+ {
+ width: 32px;
+ background-position: -162px -91px;
+ }
+
+ #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
+ {
+ background-position: -162px -117px;
+ }
+
+ #nav-topright li.nav-topright-blog a
+ {
+ width: 40px;
+ background-position: -203px -91px;
+ }
+
+ #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
+ {
+ background-position: -203px -117px;
+ }
+
+ #nav-topright li.nav-topright-shop a
+ {
+ width: 40px;
+ background-position: -252px -91px;
+ }
+
+ #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
+ {
+ background-position: -252px -117px;
+ }
+
+ #nav-logo
+ {
+ background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
+ left: -3px;
+ position: absolute;
+ width: 75px;
+ height: 75px;
+ top: 13px;
+ }
+ #nav-logo a
+ {
+ width: 75px;
+ height: 75px;
+ display: block;
+ text-indent: -9999px;
+ overflow: hidden;
+ }
+
+ .shortCut-topleft-inactive
+ {
+ padding-left: 3px;
+ padding-right: 3px;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ }
+ .shortCut-topleft-inactive span
+ {
+ font-variant: normal;
+ }
+ .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover
+ {
+ text-decoration:none;
+ }
+ #shortCut
+ {
+ padding-top: 10px;
+ font-weight: bolder;
+ color: #b0adab;
+ }
+ #shortCut ul
+ {
+ list-style-type: none;
+ float: left;
+ width: 347px;
+ margin-left: 100px;
+ }
+ #shortCut li
+ {
+ display: inline-block;
+ margin-right: 25px;
+ float: left;
+ white-space: nowrap;
+ }
+ #shortCut li a
+ {
+ color: #b0adab;
+ }
+ #shortCut li a:hover
+ {
+ color: #44a51c;
+ }
+/* end header elements */
+
+/* content and sidebar elements */
+ .wrapper
+ {
+ background: url(../images/bg_r.png) repeat-y 100% 0;
+ }
+
+ .wrapper .hd
+ {
+ padding-left: 16px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0px -15px;
+ overflow: hidden;
+ }
+
+ .wrapper .hd span
+ {
+ height: 15px;
+ display: block;
+ overflow: hidden;
+ background: url(../images/page.png) no-repeat 100% -30px;
+ }
+
+ .wrapper .bd
+ {
+ background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ position: relative;
+ }
+
+ .wrapper .ft
+ {
+ padding-left: 16px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0 -75px;
+ overflow: hidden;
+ }
+
+ .wrapper .ft span
+ {
+ height: 15px;
+ display: block;
+ background: url(../images/page.png) no-repeat 100% -60px;
+ overflow: hidden;
+ }
+ .navTop{
+ float:right;
+ display:block;
+ padding-right:15px;
+ }
+/* end content and sidebar elements */
+
+/* sidebar elements */
+ .sidebar
+ {
+ float: left;
+ margin-left: 5px;
+ width: 200px;
+ font-size: 11px;
+ }
+
+ .sidebar .searchlabel
+ {
+ padding: 0 0 2px 17px;
+ font: normal bold 11px/1.2 Verdana;
+ }
+
+ .sidebar .search
+ {
+ padding: 0 15px 0 16px;
+ }
+
+ .sidebar .search form
+ {
+ background: url(../images/sprites-combined.png) no-repeat -6px -348px;
+ height:21px;
+ padding:2px 0 0 5px;
+ width:167px;
+ }
+
+ .sidebar .search form input#pageType
+ {
+ width: 158px;
+ height: 19px;
+ padding: 0;
+ border: 0px;
+ outline: none;
+ font: 13px/1.2 Verdana;
+ }
+
+ .sidebar .box
+ {
+ padding: 17px 15px 5px 16px;
+ }
+
+ .sidebar .box .first
+ {
+ background-image: none;
+ }
+
+ .sidebar .box h2
+ {
+ font: bold 16px/1.2 Arial;
+ padding: 0;
+ }
+ .sidebar .box h2 span
+ {
+ overflow: hidden;
+ display: inline-block;
+ }
+ .sidebar .box#lookup h2
+ {
+ background-image: none;
+ }
+ .sidebar #lookup.box h2 span
+ {
+ }
+ .sidebar .box#topics h2
+ {
+ background-image: none;
+ }
+ .sidebar #topics.box h2 span
+ {
+ }
+ .sidebar .box#examples h2
+ {
+ background-image: none;
+ }
+ .sidebar #examples.box h2 span
+ {
+ }
+
+ .sidebar .box .list
+ {
+ display: block;
+ max-height:200px;
+ min-height:120px;
+ overflow-y:auto;
+ overflow-x:none;
+ }
+ .list li a:hover
+ {
+ text-decoration: underline;
+ }
+ .sidebar .box ul
+ {
+ padding-bottom:5px;
+ padding-left:10px;
+ padding-top:5px;
+ }
+ .sidebar .box ul li
+ {
+ padding-left: 12px;
+ background: url(../images/bullet_gt.png) no-repeat 0 5px;
+ margin-bottom: 5px;
+ }
+ .sidebar .bottombar
+ {
+ background: url(../images/box_bg.png) repeat-x 0 bottom;
+ }
+ .sidebar .box ul li.noMatch
+ {
+ background: none;
+ color:#FF2A00;
+ font-style:italic;
+ }
+ .sidebar .box ul li.hit
+ {
+ background: none;
+ color:#AAD2F0;
+ font-style:italic;
+ }
+ .sidebar .search form input.loading
+ {
+ background:url("../images/spinner.gif") no-repeat scroll right center transparent;
+ }
+
+ .sidebar .search form {
+ _height: 23px;
+ _width: 169px;
+ }
+
+ #resultdialog {
+ display: none;
+ position: absolute;
+ *left: 30px;
+ _left: 0;
+ *top: 35px;
+ _top: 30px;
+ _zoom: 1;
+ background-color: #fff;
+ border: 1px solid #666;
+ z-index: 4;
+ margin-top: 5px;
+ _margin: 0 0 0 -20px;
+ padding: 10px;
+ width: 30%;
+ _width: 196px;
+ height: 250px;
+ overflow: auto;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ font-size: 11px;
+ }
+
+ #resultdialog a
+ {
+ color: #00732f;
+ }
+
+ #resultdialog.active {
+ display: block;
+ }
+
+ .narrow #resultdialog {
+ width: 60%;
+ _width: 360px;
+ }
+
+ .narrow #resultdialog.active {
+ right: 10px;
+ *left: auto;
+ _left: auto;
+ _right: -20px;
+ }
+
+
+ #resultdialog #resultclose {
+ float: right;
+ }
+
+ #resultdialog p,
+ #resultdialog ul {
+ clear: both;
+ margin: 3px 0;
+ }
+
+ p#searchcount span {
+ display: none;
+ }
+
+ p#searchcount.all span#resultcount,
+ p#searchcount.api span#apicount,
+ p#searchcount.article span#articlecount,
+ p#searchcount.example span#examplecount {
+ display: inline;
+ }
+
+ #resultlist li {
+ display: none;
+ }
+
+ #resultlist.api li.api,
+ #resultlist.article li.article,
+ #resultlist.example li.example,
+ #resultlist.all li {
+ display: block;
+ }
+
+ #resultlinks.api a#showapiresults,
+ #resultlinks.api a#showapiresults:hover,
+ #resultlinks.article a#showarticleresults,
+ #resultlinks.article a#showarticleresults:hover,
+ #resultlinks.example a#showexampleresults,
+ #resultlinks.example a#showexampleresults:hover,
+ #resultlinks.all a#showallresults,
+ #resultlinks.all a#showallresults:hover {
+ color: #B0ADAB;
+ }
+ .floatingResult{
+ z-index:1;
+ position:relative;
+ padding-top:0px;
+ background-color:white;
+ border:solid 1px black;
+ height:250px;
+ width:600px;
+ overflow-x:hidden;
+ overflow-y:auto;
+ }
+
+ .floatingResult:hover{
+ display:block;
+ }
+ .floatingResult:hover{
+ }
+/* end sidebar elements */
+
+/* content elements */
+ .wrap
+ {
+ margin: 0 5px 0 5px;
+ overflow: visible;
+ }
+
+ .wrap .toolbar
+ {
+ background-color: #fafafa;
+ border-bottom: 1px solid #d1d1d1;
+ height: 20px;
+ position: relative;
+ }
+ .wrap .toolbar .toolblock
+ {
+ position: absolute;
+ }
+ .wrap .toolbar .breadcrumb
+ {
+ font-size: 11px;
+ line-height: 1.2;
+ padding: 0 0 10px 21px;
+ height: 10px;
+ }
+ .wrap .toolbar .toolbuttons
+ {
+ padding: 0 0 10px 21px;
+ right: 5px;
+ vertical-align: middle;
+ overflow: hidden;
+ }
+ .wrap .toolbar .toolbuttons .active
+ {
+ color: #00732F;
+ }
+ .wrap .toolbar .toolbuttons ul
+ {
+ float: right;
+ }
+ .wrap .toolbar .toolbuttons li
+ {
+ float: left;
+ text-indent: -10px;
+ margin-top: -5px;
+ margin-right: 15px;
+ font-weight: bold;
+ color: #B0ADAB;
+ font: bold 10px/1.2 Verdana;
+ }
+
+ .toolbuttons #print
+ {
+ border-left: 1px solid #c5c4c4;
+ margin-top: 0;
+ padding-left: 7px;
+ text-indent: 0;
+ }
+ .toolbuttons #print a
+ {
+ width: 16px;
+ height: 16px;
+ }
+
+ .toolbuttons #print a span
+ {
+ width: 16px;
+ height: 16px;
+ text-indent: -999em;
+ display: block;
+ overflow: hidden;
+ background: url(../images/sprites-combined.png) no-repeat -137px -311px;
+ }
+
+ .toolbuttons #smallA
+ {
+ font-size: 10pt;
+ }
+ .toolbuttons #medA
+ {
+ font-size: 12pt;
+ }
+ .toolbuttons #bigA
+ {
+ font-size: 14pt;
+ margin-right: 7px;
+ }
+
+ #smallA:hover, #medA:hover, #bigA:hover
+ {
+ color: #00732F;
+ }
+
+ .wrap .content
+ {
+ padding: 30px;
+ word-wrap:break-word;
+ }
+
+ .wrap .breadcrumb ul
+ {
+ }
+ .wrap .breadcrumb ul li
+ {
+ float: left;
+ background: url(../images/breadcrumb.png) no-repeat 0 3px;
+ padding-left: 15px;
+ margin-left: 15px;
+ font-weight: bold;
+ }
+ .wrap .breadcrumb ul li.last
+ {
+ font-weight: normal;
+ }
+ .wrap .breadcrumb ul li a
+ {
+ color: #363534;
+ }
+ .wrap .breadcrumb ul li.first
+ {
+ background-image: none;
+ padding-left: 0;
+ margin-left: 0;
+ }
+
+ .wrap .content ol li {
+ background:none;
+ font:normal 10pt/1.2 Verdana;
+
+ margin-bottom:10px;
+ margin-left:12px;
+ /*list-style-type:disc;*/
+ }
+
+ .wrap .content ol li
+ {
+ background:none;
+ margin-bottom: 10px;
+ padding-left:0px;
+ margin-left:52px;
+ }
+
+ .wrap .content li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ font: normal 400 10pt/1.2 Verdana;
+ margin-bottom: 10px;
+ padding-left:12px;
+ }
+
+ .content li:hover {}
+
+ .wrap .content h1
+ {
+ font: bold 18px/1.2 Arial;
+ }
+ .wrap .content h2
+ {
+ font:600 16px/1.2 Arial;
+ margin-top:15px;
+ width:100%;
+ }
+ .wrap .content h3
+ {
+ font: bold 14px/1.2 Arial;
+ font:600 16px/1.2 Arial;
+ margin-top:15px;
+ width:100%;
+ }
+ .wrap .content p
+ {
+ line-height: 20px;
+ padding: 5px;
+ }
+ .wrap .content table p
+ {
+ line-height: 20px;
+ }
+ .wrap .content ul
+ {
+ padding-left: 25px;
+ padding-top: 10px;
+ }
+ .wrap .content ul img {
+ vertical-align:middle;
+ }
+ a:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+ descr p a
+ {
+ text-decoration: underline;
+ }
+
+ .descr p a:visited
+ {
+ text-decoration: underline;
+ }
+ .feedback
+ {
+ float: none;
+ position: absolute;
+ right: 15px;
+ bottom: 10px;
+ font: normal 8px/1 Verdana;
+ color: #B0ADAB;
+ }
+ .feedback:hover
+ {
+ float: right;
+ font: normal 8px/1 Verdana;
+ color: #00732F;
+ text-decoration: underline;
+ }
+ .alphaChar{
+ width:95%;
+ background-color:#F6F6F6;
+ border:1px solid #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ font-size:12pt;
+ padding-left:10px;
+ margin-top:10px;
+ margin-bottom:10px;
+ }
+ .flowList{
+ /*vertical-align:top;*/
+ /*margin:20px auto;*/
+
+ column-count:3;
+ -webkit-column-count:3;
+ -moz-column-count:3;
+/*
+ column-width:100%;
+ -webkit-column-width:200px;
+ -col-column-width:200px;
+*/
+ column-gap:41px;
+ -webkit-column-gap:41px;
+ -moz-column-gap:41px;
+
+ column-rule: 1px dashed #ccc;
+ -webkit-column-rule: 1px dashed #ccc;
+ -moz-column-rule: 1px dashed #ccc;
+ }
+
+ .flowList dl{
+ }
+ .flowList dd{
+ /*display:inline-block;*/
+ margin-left:10px;
+ min-width:250px;
+ line-height: 1.5;
+ min-width:100%;
+ min-height:15px;
+ }
+
+ .flowList dd a{
+ }
+
+ .wrap .content .flowList p{
+ padding:0px;
+ }
+
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+
+ .qmltype
+ {
+ text-align: center;
+ font-size: 160%;
+ }
+ .qmlreadonly
+ {
+ padding-left: 5px;
+ float: right;
+ color: #254117;
+ }
+
+ .qmldefault
+ {
+ padding-left: 5px;
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ *.qmlitem p
+ {
+ }
+ #feedbackBox
+ {
+ display: none;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ position: fixed;
+ top: 100px;
+ left: 33%;
+ height: 230px;
+ width: 400px;
+ padding: 5px;
+ background-color: #e6e7e8;
+ z-index: 4;
+ }
+ #feedcloseX
+ {
+ display: inline;
+ padding: 5px 5px 0 0;
+ margin-bottom: 3px;
+ color: #363534;
+ font-weight:bold;
+ float: right;
+ text-decoration: none;
+ }
+
+ #feedbox
+ {
+ display: inline;
+ width: 370px;
+ height: 120px;
+ margin: 0px 25px 10px 15px;
+ }
+ #noteHead
+ {
+ font-weight:bold;
+ padding:10px 10px 10px 20px;
+ }
+ #feedsubmit
+ {
+ display: inline;
+ float: right;
+ margin: 4px 32px 0 0;
+ }
+
+ .note
+ {
+ font-size:7pt;
+ padding-bottom:3px;
+ padding-left:20px;
+ }
+
+ #blurpage
+ {
+ display: none;
+ position: fixed;
+ float: none;
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ bottom: 0px;
+ background: transparent url(../images/feedbackground.png) 0 0;
+ z-index: 3;
+ }
+ .toc
+ {
+ float: right;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ height: auto;
+ width: 200px;
+ }
+
+ .toc h3, .generic a
+ {
+ font: bold 12px/1.2 Arial;
+ }
+
+ .generic{
+ }
+ .generic td{
+ /* padding:5px;*/
+ }
+ .generic .alphaChar{
+ margin-top:5px;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .alignedsummary{}
+ .propsummary{}
+ .memItemLeft{}
+ .memItemRight{
+ padding:3px 15px 3px 0;
+ }
+ .bottomAlign{}
+ .highlightedCode
+ {
+ margin:10px;
+ }
+ .LegaleseLeft{}
+ .valuelist{}
+ .annotated td{
+ padding: 3px 5px 3px 5px;
+ }
+ .obsolete{}
+ .compat{}
+ .flags{}
+ .qmlsummary{}
+ .qmlitem{}
+ .qmlproto{}
+ .qmlname{}
+ .qmlreadonly{}
+ .qmldefault{}
+ .qmldoc{}
+ .qt-style{}
+ .redFont{}
+ code{}
+
+ .wrap .content .toc ul
+ {
+ padding-left: 0px;
+ }
+
+ .wrap .content .toc h3{
+ border-bottom:0px;
+ margin-top:0px;
+ }
+
+ .wrap .content .toc h3 a:hover{
+ color:#00732F;
+ text-decoration:none;
+ }
+
+
+ .wrap .content .toc .level2
+ {
+ margin-left: 15px;
+ }
+
+ .wrap .content .toc .level3
+ {
+ margin-left: 30px;
+ }
+
+ .content .toc li
+ {
+ font: normal 10px/1.2 Verdana;
+ background: url(../images/bullet_dn.png) no-repeat 0 5px;
+ }
+ .relpage
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ padding: 25px 25px;
+ clear: both;
+ }
+ .relpage ul
+ {
+ float: none;
+ padding: 15px;
+ }
+ .content .relpage li
+ {
+ font: normal 11px/1.2 Verdana;
+ }
+ h3.fn, span.fn
+ {
+ -moz-border-radius:7px 7px 7px 7px;
+ -webkit-border-radius:7px 7px 7px 7px;
+ border-radius:7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ font-weight: bold;
+ word-spacing:3px;
+ padding:3px 5px;
+ }
+
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ width:100%;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+/* end content elements */
+
+/* footer elements */
+ .footer
+ {
+ min-height: 100px;
+ color: #797775;
+ font: normal 9px/1 Verdana;
+ text-align: center;
+ padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
+ }
+ .small
+ {
+ font: normal 9px/1 Verdana;
+ }
+/* end footer elements */
+
+ /* start index box */
+ .indexbox
+ {
+ width: 100%;
+ display:inline-block;
+ }
+
+ .indexboxcont
+ {
+ display: block;
+
+ }
+
+ .indexboxbar
+ {
+ background: transparent url(../images/horBar.png ) repeat-x left bottom;
+ margin-bottom: 25px;
+
+
+ }
+
+ .indexboxcont .section
+ {
+ display: inline-block;
+ width: 49%;
+ *width:42%;
+ _width:42%;
+ padding:0 2% 0 1%;
+ vertical-align:top;
+ }
+
+ .indexboxcont .indexIcon
+ {
+ width: 11%;
+ *width:18%;
+ _width:18%;
+ overflow:hidden;
+ }
+
+ .indexboxcont .section {
+ float: left;
+ }
+
+ .indexboxcont .section p
+ {
+ padding-top: 20px;
+ padding-bottom: 20px;
+ }
+ .indexboxcont .sectionlist
+ {
+ display: inline-block;
+ vertical-align:top;
+ width: 32.5%;
+ padding: 0;
+ }
+ .indexboxcont .sectionlist ul
+ {
+ margin-bottom: 20px;
+ }
+
+ .indexboxcont .sectionlist ul li
+ {
+ line-height: 12px;
+ }
+
+ .content .indexboxcont li
+ {
+ font: normal bold 13px/1 Verdana;
+ }
+
+ .indexbox a:hover, .indexbox a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ .indexbox a:visited
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
+
+ .indexbox .indexIcon {
+ width: 11%;
+ }
+
+ .indexbox .indexIcon span
+ {
+ display: block;
+ }
+
+ .indexbox.guide .indexIcon span
+ {
+ width: 96px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -5px -376px;
+ padding: 0;
+ }
+
+ .indexbox.tools .indexIcon span
+ {
+ width: 115px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -111px -376px;
+ padding: 0;
+ }
+ .indexboxcont:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+
+
+
+/* start of creator spec*/
+ .creator
+ {
+ margin-left:0px;
+ margin-right:0px;
+ padding-left:0px;
+ padding-right:0px;
+ }
+ .creator .wrap .content ol li {
+ list-style-type:decimal;
+ }
+ .creator .header .icon,
+ .creator .feedback,
+ .creator .t_button,
+ .creator .feedback,
+ .creator #feedbackBox,
+ .creator #feedback,
+ .creator #blurpage,
+ /* .creator .indexbox .indexIcon span,*/
+ .creator .wrapper .hd,
+ /* .creator .indexbox .indexIcon,*/
+ .creator .header #nav-logo,
+ .creator #offlinemenu,
+ .creator #offlinesearch,
+ .creator .header #nav-topright,
+ .creator .header #shortCut ,
+ .creator .wrapper .hd,
+ .creator .wrapper .ft,
+ .creator .sidebar,
+ .creator .wrap .feedback
+ {
+ display:none;
+ }
+
+ body.creator
+ {
+ background: none;
+
+ font: normal 13px/1.2 Verdana;
+ color: #363534;
+ background-color: #FAFAFA;
+ }
+
+ .wrap .content ol li {
+
+ }
+
+
+ .creator .header, .creator .footer, .creator .wrapper
+ {
+ max-width: 1500px;
+ margin: 0px;
+ }
+
+ .creator .wrapper
+ {
+ position:relative;
+ top:5px;
+ }
+ .creator .wrapper .bd
+ {
+ background:#FFFFFF;
+ }
+
+
+ .creator .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+ .creator .wrap .content p
+
+ {
+ line-height: 20px;
+ padding: 5px;
+ }
+
+ .creator .header .qtref span
+ {
+ background:none;
+ }
+
+ .creator .footer
+ {
+ border-top:1px solid #E5E5E5;
+ height: 50px;
+ margin:0px;
+ padding:10px;
+ }
+
+ .creator .footer p
+ {
+ text-align:justify;
+ max-width:900px;
+ }
+
+ .creator .wrap
+ {
+ padding:0 5px 0 5px;
+ margin: 0px;
+ }
+ .creator .wrap .toolbar
+ {
+ border-bottom:1px solid #E5E5E5;
+ /*width:100%;*/
+ margin-left:-5px;
+ margin-right:-5px;
+ }
+ .creator .wrap .breadcrumb ul li a
+ {
+ /* color: #363534;*/
+ color: #00732F;
+ }
+
+ .creator .wrap .content
+ {
+ padding: 0px;
+ word-wrap:break-word;
+ }
+
+ .creator .wrap .content ol li {
+ background:none;
+ font: inherit;
+ padding-left: 0px;
+ }
+
+ .creator .wrap .content .descr ol li {
+ margin-left: 45px;
+ }
+
+ .creator .content .alignedsummary
+ {
+ margin: 5px;
+ width:100%;
+ }
+ .creator .generic{
+ max-width:75%;
+ }
+ .creator .generic td{
+ /*padding:0;*/
+ }
+ .creator .indexboxbar
+ {
+ border-bottom:1px solid #E5E5E5;
+ margin-bottom: 25px;
+ background: none;
+ }
+
+ .creator .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background-color: #ffffff;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ border-bottom: solid #E5E5E5 1px;
+ z-index:1;
+ /* position:fixed;*/
+ }
+
+ .creator .header .content
+ {
+ }
+ .creator .header .qtref
+ {
+ color: #00732F;
+ position: static;
+ float: left;
+ margin-left: 5px;
+ font: bold 18px/1 Arial;
+ }
+
+ .creator .header .qtref:visited
+ {
+ color: #00732F;
+ }
+ .creator .header .qtref:hover
+ {
+ color: #00732F;
+ text-decoration:none;
+ }
+ .creator .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ text-decoration:none;
+ }
+
+ .creator .wrap .toolbar
+ {
+ display:block;
+ padding-top:0px;
+ }
+
+ .creator .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .creator .wrap .breadcrumb ul li a {
+ /*color: #44a51c;*/
+ }
+
+ .creator .wrap .breadcrumb ul li.last a {
+ /*color: #363534;*/
+ }
+
+ .creator #narrowmenu ul
+ {
+ border-bottom:solid 1px #E5E5E5;
+ border-left:solid 1px #E5E5E5;
+ border-right:solid 1px #E5E5E5;
+ }
+
+ .creator #narrowmenu li ul {
+ margin-top:-15px;
+ }
+
+ .creator .toc {
+ margin:10px 20px 10px 10px;
+ }
+
+ .creator #narrowsearch, .creator #narrowmenu{
+ display:none;
+ }
+/* end of creator spec*/
+
+ .item {
+ float: left;
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+ }
+
+ .item .primary {
+ margin-right: 220px;
+ position: relative;
+ }
+
+ .item hr {
+ margin-left: -220px;
+ }
+
+ .item .secondary {
+ float: right;
+ width: 200px;
+ position: relative;
+ }
+
+ .item .cols {
+ clear: both;
+ display: block;
+ }
+
+ .item .cols .col {
+ float: left;
+ margin-left: 1.5%;
+ }
+
+ .item .cols .col.first {
+ margin-left: 0;
+ }
+
+ .item .cols.two .col {
+ width: 45%;
+ }
+
+ .item .box {
+ margin: 0 0 10px 0;
+ }
+
+ .item .box h3 {
+ margin: 0 0 10px 0;
+ }
+
+ .cols.unclear {
+ clear:none;
+ }
+}
+
+/* end of screen media */
+
+/* start of print media */
+
+@media print
+{
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult
+ {
+ display: none;
+ background: none;
+ }
+ .content
+ {
+ background: none;
+ display: block;
+ width: 100%; margin: 0; float: none;
+ }
+}
+/* end of print media */
diff --git a/tools/qdoc3/doc/config/style/style_ie6.css b/tools/qdoc3/doc/config/style/style_ie6.css
new file mode 100644
index 0000000000..16fb8505df
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie6.css
@@ -0,0 +1,54 @@
+.indexbox, .indexboxcont, .group {
+ zoom: 1;
+ height: 1%;
+}
+
+.sidebar {
+ margin-left: 3px;
+ width: 199px;
+ overflow: hidden;
+}
+
+.sidebar .search form {
+ position: relative;
+}
+
+.sidebar .search form fieldset {
+ position: absolute;
+ margin-top: -1px;
+}
+
+.sidebar .search form input#searchstring {
+ border: 1px solid #fff;
+ height: 18px;
+}
+
+.wrap {
+ zoom: 1;
+}
+
+.content,
+.toolbar {
+ zoom: 1;
+ margin-left: -3px;
+ position: relative;
+}
+
+.indexbox {
+ clear: both;
+}
+
+.indexboxcont .section {
+ zoom: 1;
+ float: left;
+}
+
+.indexboxcont .sectionlist {
+ zoom: 1;
+ float: left;
+}
+
+.wrap .toolbar .toolbuttons li {
+ text-indent: 0;
+ margin-right: 8px;
+} \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/style/style_ie7.css b/tools/qdoc3/doc/config/style/style_ie7.css
new file mode 100644
index 0000000000..afbff5f88e
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie7.css
@@ -0,0 +1,19 @@
+.indexbox, .indexboxcont, .group {
+ min-height: 1px;
+}
+
+.sidebar .search form input#searchstring {
+ border: 1px solid #fff;
+ height: 17px;
+}
+
+
+.indexboxcont .section {
+ zoom: 1;
+ float: left;
+}
+
+.indexboxcont .sectionlist {
+ zoom: 1;
+ float: left;
+}
diff --git a/tools/qdoc3/doc/config/style/style_ie8.css b/tools/qdoc3/doc/config/style/style_ie8.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie8.css
diff --git a/tools/qdoc3/doc/config/style/superfish.css b/tools/qdoc3/doc/config/style/superfish.css
new file mode 100644
index 0000000000..2bdaef4d9c
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/superfish.css
@@ -0,0 +1,51 @@
+.sf-menu, .sf-menu * {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+.sf-menu {
+ line-height: 1.0;
+}
+.sf-menu ul {
+ position: absolute;
+ top: -999em;
+ width: 10em; /* left offset of submenus need to match (see below) */
+}
+.sf-menu ul li {
+ width: 100%;
+}
+.sf-menu li:hover {
+ visibility: inherit; /* fixes IE7 'sticky bug' */
+}
+.sf-menu li {
+ float: left;
+ position: relative;
+}
+.sf-menu a {
+ display: block;
+ position: relative;
+}
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
+ left: 0;
+ top: 2.5em; /* match top ul list item height */
+ z-index: 99;
+}
+ul.sf-menu li:hover li ul,
+ul.sf-menu li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+ul.sf-menu li li:hover li ul,
+ul.sf-menu li li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
diff --git a/tools/qdoc3/doc/files/qt.qdocconf b/tools/qdoc3/doc/files/qt.qdocconf
index 44cfbc1a7c..377f0f14c1 100644
--- a/tools/qdoc3/doc/files/qt.qdocconf
+++ b/tools/qdoc3/doc/files/qt.qdocconf
@@ -22,7 +22,7 @@ edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.472
+qhp.Qt.namespace = com.trolltech.qt.474
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -36,9 +36,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.7.2
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
+qhp.Qt.filterAttributes = qt 4.7.4 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.4
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.4
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc
index 7290c0e91d..0e4055b292 100644
--- a/tools/qdoc3/doc/qdoc-manual.qdoc
+++ b/tools/qdoc3/doc/qdoc-manual.qdoc
@@ -27,727 +27,924 @@
/*!
\page index.html
- \nextpage QDoc Manual
+ \nextpage Introduction to QDoc
- \title QDoc Manual - Table of Contents
+ \title Table of Contents
\list
- \o \l{QDoc Manual}
- \o \l{QDoc Commands}
- \list
- \o \l{Markup Commands}
- \o \l{Text Formatting Commands}
- \o \l{Document Structuring Commands}
- \o \l{Verbatim Code Commands}
- \o \l{Quoting External Code Commands}
- \list
- \o \l{Example File}
- \endlist
- \o \l{Linking Commands}
- \o \l{Graphic Commands}
- \o \l{Container Commands}
- \o \l{Document Contents Commands}
- \o \l{Miscellaneous Commands}
- \list
- \o \l{signalandslots.qdocinc}
- \o \l{objectmodel.qdocinc}
- \o \l{layoutmanagement.qdocinc}
- \endlist
- \o \l{Topical Commands}
- \o \l{Contextual Commands}
- \o \l{Navigation Commands}
- \o \l{Status Commands}
- \o \l{Thread Support Commands}
- \o \l{Relating Commands}
- \o \l{Grouping Commands}
- \o \l{Title Commands}
- \endlist
- \o \l{QDoc Configuration}
- \list
- \o \l{General Configuration Variables}
- \o \l{Creating Help Project Files}
- \o \l{C++ Specific Configuration Variables}
- \o \l{HTML Specific Configuration Variables}
- \o \l{Supporting Derived Projects}
- \o \l{QDoc Compatibility}
- \o \l{qt.qdocconf}
- \o \l{minimum.qdocconf}
- \endlist
- \o \l{QDoc Commands - Alphabetical List}
+ \o \l {Introduction to QDoc}
+ \o \l {Command Index}
+ \o \l {Topic Commands}
+ \o \l {Context Commands}
+ \list
+ \o \l {Document Navigation}
+ \o \l {Reporting Status}
+ \o \l {Thread Support}
+ \o \l {Relating Things}
+ \o \l {Grouping Things}
+ \o \l {Naming Things}
+ \endlist
+ \o \l{Markup Commands}
+ \list
+ \o \l {Text Markup}
+ \o \l {Document Structure}
+ \o \l {Including Code Inline}
+ \o \l {Including External Code}
+ \o \l {Creating Links}
+ \o \l {Including Images}
+ \o \l {Tables and Lists}
+ \o \l {Special Content}
+ \o \l {Miscellaneous}
+ \endlist
+ \o \l {The QDoc Configuration File}
+ \list
+ \o \l {Generic Configuration Variables}
+ \o \l {Creating Help Project Files}
+ \o \l {C++ Specific Configuration Variables}
+ \o \l {HTML Specific Configuration Variables}
+ \o \l {Supporting Derived Projects}
+ \o \l {Compatibility Issues}
+ \o \l {qt.qdocconf}
+ \o \l {minimum.qdocconf}
+ \endlist
\endlist
+
*/
/*!
\page 01-qdoc-manual.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage QDoc Manual - Table of Contents
- \nextpage QDoc Commands
-
- \title QDoc Manual
-
- QDoc is the internal tool used by Qt Development Frameworks for generating
- documentation. This document is a reference for QDoc command syntax and
- configuration.
+ \contentspage Table of Contents
+ \previouspage Table of Contents
+ \nextpage Command Index
+
+ \title Introduction to QDoc
+
+ QDoc is a tool used by Qt Developers to generate documentation for
+ software projects. It works by extracting \e {qdoc comments} from
+ project source files and then formatting these comments as HTML
+ pages or DITA XML documents, etc. QDoc finds qdoc comments in \c
+ {.cpp} files and in \c {.qdoc} files. QDoc does not look for qdoc
+ comments in \c {.h} files. A qdoc comment always begins with an
+ exclamation mark \bold{!} e.g.:
+
+ \code
+ / *!
+ \class QObject
+ \brief The QObject class is the base class of all Qt objects.
+
+ \ingroup objectmodel
+
+ \reentrant
+
+ QObject is the heart of the Qt \l{Object Model}. The
+ central feature in this model is a very powerful mechanism
+ for seamless object communication called \l{signals and
+ slots}. You can connect a signal to a slot with connect()
+ and destroy the connection with disconnect(). To avoid
+ never ending notification loops you can temporarily block
+ signals with blockSignals(). The protected functions
+ connectNotify() and disconnectNotify() make it possible to
+ track connections.
+
+ QObjects organize themselves in \l {Object Trees &
+ Ownership} {object trees}. When you create a QObject with
+ another object as parent, the object will automatically
+ add itself to the parent's children() list. The parent
+ takes ownership of the object; i.e., it will automatically
+ delete its children in its destructor. You can look for an
+ object by name and optionally type using findChild() or
+ findChildren().
+
+ Every object has an objectName() and its class name can be
+ found via the corresponding metaObject() (see
+ QMetaObject::className()). You can determine whether the
+ object's class inherits another class in the QObject
+ inheritance hierarchy by using the inherits() function.
+
+ ....
+ * /
+ \endcode
- \section1 Overview
+ From the qdoc comment above, QDoc generates the now famous HTML
+ page \l {http://doc.trolltech.com/4.7/qobject.html#details}
+ {QObject Class Reference}.
+
+ This manual explains how to use the QDoc commands in qdoc comments
+ to embed good documentation in your source files. It also explains
+ how to make a \l {The QDoc Configuration File} {QDoc configuration
+ file}, which you will pass to QDoc on the command line.
- \list I
- \o \section2 \l {QDoc Commands}
+ \section1 Running QDoc
- \l {QDoc Commands - Alphabetical List}{A complete alphabetical
- list}.
+ The current name of the QDoc program is \c {qdoc3}. To run qdoc3
+ from the command line, give it the name of a configuration file:
- There are two main categories of commands for QDoc: markup
- commands and meta-commands.
+ \quotation
+ \c {$ ../../bin/qdoc3 ./config.qdocconf}
+ \endquotation
- The markup commands indicate the generated documentation's
- appearance and logical structure. The meta-commands provide
- information about the document as well as the documented
- item. The meta-commands can be further categorized as topical
- commands and contextual commands.
+ QDoc recognizes the \c {.qdocconf} suffix as a \l{The QDoc
+ Configuration File} {QDoc configuration file}. The configuration
+ file is where you tell QDoc where to find the project source
+ files, header files, and \c {.qdoc} files. It is also where you
+ tell QDoc what kind of output to generate (HTML, DITA XML,...),
+ and where to put the generated documentation. The configuration
+ file also contains other information for QDoc.
+
+ See \l{The QDoc Configuration File} for a instructions on how to
+ build a Qdoc configuration file.
+
+ \section1 How QDoc Works
+
+ QDoc begins by reading the configuarion file you specified on the
+ command line. It stores all the variables from the configuration
+ file for later use. One of the first variables it uses is \c
+ {outputformats}. This variable tells QDoc which output generators
+ it will run. The default value is \e {HTML}, so if you don't set
+ \c {outputformats} in your configuration file, QDoc will generate
+ HTML output. That's usually what you will want anyway, but you can
+ also specify \e {DITAXML} to get DITA XML output instead.
+
+ Next, QDoc uses the values of the \l
+ {22-qdoc-configuration-generalvariables.html#headerdirs-variable}
+ {headerdirs} variable and/or the \l
+ {22-qdoc-configuration-generalvariables.html#headers-variable}
+ {headers} variable to find and parse all the header files for your
+ project. QDoc does \e not scan header files for qdoc comments. It
+ parses the header files to build a master tree of all the items
+ that should be documented (i.e. the items that QDoc should find
+ qdoc comments for).
+
+ After parsing all the header files and building the master tree of
+ items to be documented, QDoc uses the value of the \l
+ {22-qdoc-configuration-generalvariables.html#sourcedirs-variable}
+ {sourcedirs} variable and/or the value of the \l
+ {22-qdoc-configuration-generalvariables.html#sources-variable}
+ {sources} variable to find and parse all the \c {.cpp} and \c
+ {.qdoc} files for your project. These are the files QDoc scans for
+ \e {qdoc comments}. Remember that a qdoc comment begins with
+ an exclamation mark, i.e. \bold {/*!} .
+
+ For each qdoc comment it finds, it searches the master tree for
+ the item where the documentation belongs. The it interprets the
+ qdoc commands in the comment and stores the interpreted commands
+ and the comment text in the tree node for the item.
+
+ Finally, QDoc traverses the master tree. For each node, if the
+ node has stored documentation, QDoc calls the output generator
+ specified by the \c {outputformats} variable to format and write
+ the documentation in the directory specified in the configuration
+ file in the \l
+ {22-qdoc-configuration-generalvariables.html#outputdir-variable}
+ {outputdir} variable.
+
+ \section1 Command Types
+
+ QDoc interprets three types of commands:
- \list
- \o \l {Markup Commands}
- \list
- \o \l {Text Formatting Commands}{Text Formatting}
- \o \l {Document Structuring Commands}{Document Structuring}
- \o \l {Verbatim Code Commands}{Verbatim Code}
- \o \l {Quoting External Code Commands}{Quoting External Code}
- \o \l {Linking Commands}{Linking}
- \o \l {Graphic Commands}{Graphic}
- \o \l {Container Commands}{Container}
- \o \l {Document Contents Commands}{Document Contents}
- \o \l {Miscellaneous Commands}{Miscellaneous}
- \endlist
- \o \l {Topical Commands}
- \o \l {Contextual Commands}
- \list
- \o \l {Navigation Commands}{Navigation}
- \o \l {Status Commands}{Status}
- \o \l {Thread Support Commands}{Thread Support}
- \o \l {Relating Commands}{Relating}
- \o \l {Grouping Commands}{Grouping}
- \o \l {Title Commands}{Title}
- \endlist
- \endlist
+ \list
+ \o \l {Topic Commands}
+ \o \l {Context Commands}
+ \o \l {Markup Commands}
\endlist
- \list II
- \o \section2 \l {QDoc Configuration}
-
- When running QDoc to generate the documentation, you must
- specify a configuration file on the command line. The
- configuration file is a list of entries of entries of the form
- "variable = value".
-
- \list
- \o \l {Configuration Variables}
- \o \l {Configuration File Examples}
- \endlist
-
- Some particular configuration variables allow you to use QDoc
- to support Qt-based projects; i.e to make projects, such as Qt
- Solutions, contain references to the online Qt documentation.
-
- \list
- \o \l {Supporting Derived Projects}
- \endlist
-
- QDoc is a tool that constantly evolves to suit our needs, for
- that reason there are some compatibility issues between old and
- new practices.
-
- \list
- \o \l {QDoc Compatibility}
- \endlist
- \endlist
+ Topic commands identify the elememt you are documenting, e.g. a C++
+ class, function, or type, an example, or an extra page of text
+ that doesn't map to an underlying C++ elememnt.
+
+ Context commands tell QDoc how the element being documented
+ relates to other documented elememnts, e.g. next and previous page
+ links or inclusion in page groups or library modules. Context
+ commands can also provide information about the documented element
+ that QDoc can't get from the source files, e.g. whether the
+ element is thread-safe, an overloaded or reimplemented function,
+ or that it has been deprecated.
+
+ Markup commands tell QDoc how text and image elements in the
+ document should be rendered, or about the document's outline
+ structure.
*/
/*!
- \page 02-qdoc-commands.html
- \previouspage QDoc Manual
- \contentspage QDoc Manual - Table of Contents
- \nextpage Markup Commands
-
- \title QDoc Commands
+ \page 03-qdoc-commands-markup.html
+ \contentspage Table of Contents
+ \previouspage Naming Things
+ \nextpage Text Markup
- There are two main categories of commands for QDoc: markup
- commands and meta-commands.
+ \title Markup Commands
The markup commands indicate the generated documentation's visual
- appearance and logical structure. The meta-commands provide
- information about the documentation unit as well as the documented
- item. The meta-commands can be further categorized as topical
- commands and contextual commands.
-
- \section1 Alphabetical List
-
- A complete \l{QDoc Commands - Alphabetical List }
- {alphabetical list of the QDoc commands}.
-
- \section1 Categories
+ appearance and logical structure.
\list
- \o \l {Markup Commands}
- \o \l {Topical Commands}
- \o \l {Contextual Commands}
+ \o \l {04-qdoc-commands-textmarkup.html#a-command} {\\a}
+ \o \l {11-qdoc-commands-specialcontent.html#abstract-command} {\\abstract}
+ \o \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
+ \o \l {04-qdoc-commands-textmarkup.html#bold-command} {\\bold}
+ \o \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
+ \o \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
+ \o \l {09-qdoc-commands-includingimages.html#caption-command} {\\caption}
+ \o \l {05-qdoc-commands-documentstructure.html#chapter-command} {\\chapter}
+ \o \l {06-qdoc-commands-includecodeinline.html#code-command} {\\code}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#codeline-command} {\\codeline}
+ \o \l {04-qdoc-commands-textmarkup.html#div-command} {\\div} \span {class="newStuff"} {(new)}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#dots-command} {\\dots}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#else-command} {\\else}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire}
+ \o \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist-command} {\\generatelist}
+ \o \l {10-qdoc-commands-tablesandlists.html#header-command} {\\header}
+ \o \l {04-qdoc-commands-textmarkup.html#i-command} {\\i}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#if-command} {\\if}
+ \o \l {09-qdoc-commands-includingimages.html#image-command} {\\image}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include-command} {\\include}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include-command} {\\input}
+ \o \l {09-qdoc-commands-includingimages.html#inlineimage-command} {\\inlineimage}
+ \o \l {08-qdoc-commands-creatinglinks.html#keyword-command} {\\keyword}
+ \o \l {08-qdoc-commands-creatinglinks.html#l-command} {\\l}
+ \o \l {11-qdoc-commands-specialcontent.html#legalese-command} {\\legalese}
+ \o \l {10-qdoc-commands-tablesandlists.html#list-command} {\\list}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#meta-command} {\\meta}
+ \o \l {06-qdoc-commands-includecodeinline.html#newcode-command} {\\newcode}
+ \o \l {10-qdoc-commands-tablesandlists.html#o-command} {\\o}
+ \o \l {06-qdoc-commands-includecodeinline.html#oldcode-command} {\\oldcode}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#omit-command} {\\omit}
+ \o \l {05-qdoc-commands-documentstructure.html#part-command} {\\part}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printline-command} {\\printline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printto-command} {\\printto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printuntil-command} {\\printuntil}
+ \o \l {11-qdoc-commands-specialcontent.html#quotation-command} {\\quotation}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefile-command} {\\quotefile}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command} {\\quotefromfile}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\raw} \span {class="newStuff"} {(deprecated)}
+ \o \l {10-qdoc-commands-tablesandlists.html#row-command} {\\row}
+ \o \l {08-qdoc-commands-creatinglinks.html#sa-command} {\\sa}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionOne-command} {\\section1}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionTwo-command} {\\section2}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionThree-command} {\\section3}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionFour-command} {\\section4}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipline-command} {\\skipline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipto-command} {\\skipto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipuntil-command} {\\skipuntil}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#snippet-command} {\\snippet}
+ \o \l {04-qdoc-commands-textmarkup.html#span-command} {\\span} \span {class="newStuff"} {(new)}
+ \o \l {04-qdoc-commands-textmarkup.html#sub-command} {\\sub}
+ \o \l {04-qdoc-commands-textmarkup.html#sup-command} {\\sup}
+ \o \l {10-qdoc-commands-tablesandlists.html#table-command} {\\table}
+ \o \l {11-qdoc-commands-specialcontent.html#tableofcontents-command} {\\tableofcontents}
+ \o \l {08-qdoc-commands-creatinglinks.html#target-command} {\\target}
+ \o \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
+ \o \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\unicode}
+ \o \l {11-qdoc-commands-specialcontent.html#warning-command} {\\warning}
+ \o \l {04-qdoc-commands-textmarkup.html#backslash-command} {\\\\}
\endlist
*/
/*!
- \page 03-qdoc-commands-markup.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage QDoc Commands
- \nextpage Text Formatting Commands
+ \page 04-qdoc-commands-textmarkup.html
+ \contentspage Table of Contents
+ \previouspage Markup Commands
+ \nextpage Document Structure
- \title Markup Commands
+ \title Text Markup
- The markup commands indicate the generated documentation's visual
- appearance and logical structure.
+ The text formatting commands indicate how text is to be rendered.
- \section1 Alphabetical List
-
- \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
- \l {04-qdoc-commands-textformatting.html#a}{\\a},
- \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
- \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
- \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
- \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
- \l {04-qdoc-commands-textformatting.html#c}{\\c},
- \l {09-qdoc-commands-graphic.html#caption}{\\caption},
- \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
- \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
- \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
- \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
- \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
- \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
- \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
- \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
- \l {10-qdoc-commands-container.html#header}{\\header},
- \l {04-qdoc-commands-textformatting.html#i}{\\i},
- \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
- \l {09-qdoc-commands-graphic.html#image}{\\image},
- \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
- \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage},
- \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
- \l {08-qdoc-commands-linking.html#l}{\\l},
- \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
- \l {10-qdoc-commands-container.html#list}{\\list},
- \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
- \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
- \l {10-qdoc-commands-container.html#o}{\\o},
- \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode},
- \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
- \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
- \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
- \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
- \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
- \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
- \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
- \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
- \l {10-qdoc-commands-container.html#row}{\\row},
- \l {08-qdoc-commands-linking.html#sa}{\\sa},
- \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
- \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
- \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
- \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4},
- \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
- \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
- \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
- \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
- \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
- \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
- \l {10-qdoc-commands-container.html#table}{\\table},
- \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents},
- \l {08-qdoc-commands-linking.html#target}{\\target},
- \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
- \l {04-qdoc-commands-textformatting.html#underline}{\\underline},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode},
- \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+ \target a-command
+ \section1 \\a (parameter marker)
- \section1 Categories
- \list
- \o \l {Text Formatting Commands}
- \o \l {Document Structuring Commands}
- \o \l {Verbatim Code Commands}
- \o \l {Quoting External Code Commands}
- \o \l {Linking Commands}
- \o \l {Graphic Commands}
- \o \l {Container Commands}
- \o \l {Document Contents Commands}
- \o \l {Miscellaneous Commands}
- \endlist
+ The \\a command tells QDoc the next word is a formal parameter name.
-*/
+ A warning is emitted when a formal parameter is not documented or
+ is misspelled, so when you document a function you should mention
+ each formal parameter by name in the function description,
+ preceded by the \\a command. The parameter name is then rendered
+ in italics.
-/*!
- \page 04-qdoc-commands-textformatting.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage Markup Commands
- \nextpage Document Structuring Commands
+ \code
+ / *!
+ Constructs a line edit containing the text
+ \a contents. The \a parent parameter is sent
+ to the QWidget constructor.
+ * /
- \title Text Formatting Commands
+ QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)
+ {
+ ...
+ }
- The text formatting commands indicate how the regular text in the
- documentation is rendered.
+ \endcode
- \section1 Alphabetical List
+ QDoc renders this as:
- \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
- \l {04-qdoc-commands-textformatting.html#a}{\\a},
- \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
- \l {04-qdoc-commands-textformatting.html#c}{\\c},
- \l {04-qdoc-commands-textformatting.html#i}{\\i},
- \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
- \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
- \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
- \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
+ \quotation
+ \bold {QLineEdit::QLineEdit ( const QString &
+ contents, QWidget *parent )}
- \section1 Command Descriptions
+ Constructs a line edit containing the text \a contents.
+ The \a parent parameter is sent to the QWidget constructor.
+ \endquotation
- \table
- \header
- \o Command
- \o Description
+ You can enclose the formal parameter name in curly brackets, if
+ you want to, but it isn't necessary.
- \row
+ \target c-command
+ \section1 \\c (code font)
+
+ The \\c command is used for rendering variable names, user-defined
+ class names, and C++ keywords (e.g. \c int and \c for) in the code
+ font.
- \o \bold \\\\ \target backslash
- \o \bold {The \\\\ command expands to a single backslash.}
+ The command renders its argument using a typewriter font. For
+ example:
- QDoc commands always start with a backslash alone. To
- display an actual backslash in the text you need to type
- two of the kind. If you want to display two backslashes,
- you need to type four, and so forth. For example:
+ \code
+ / *!
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ * /
+ \endcode
- \code
- / *!
- The \\\\ command is useful if you want a
- backslash to appear verbatim, for example,
- writing C:\\windows\\home\\.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ \endquotation
- \quotation
- The \\\\ command is useful if you want a
- backslash to appear verbatim, for example,
- writing C:\\windows\\home\\.
- \endquotation
+ If the text to be rendered in the code font contains spaces, enclose the
+ entire text in curly brackets.
- However, if you want your text to appear in a typewriter
- font as well, you can use the \l {c}{\\c} command instead,
- which accepts and renders the backslash as any other
- character. For example:
+ \code
+ \c {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endcode
- \code
- / *!
- The \\c command is useful if you want a
- backslash to appear verbatim, and the word
- that contains it written in a typewriter font,
- like this: \c {C:\windows\home\}.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ \c {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endquotation
- \quotation
- The \\c command is useful if you want a
- backslash to appear verbatim, and the word
- that contains it written in a typewriter font,
- like this: \c {C:\windows\home\}.
- \endquotation
+ The \\c command accepts the special character \c \ within its
+ argument, i.e. it renders it as a normal character. So if you want
+ to use nested commands, you must use the \l {tt-command} {teletype
+ (\\tt)} command instead.
- \row
- \o \bold \\a \target a
- \o \bold {The \\a command indicates that the next word
- is a parameter when documenting functions.}
+ See also \l {tt-command} {\\tt} and \l {code-command} {\\code}.
+
+ \target div-command
+ \section1 \\div \span {class="newStuff"} {(new)}
+
+ The \\div and \\enddiv commands delimit a large or small block of
+ text (which may include other QDoc commands) to which special
+ formatting attributes should be applied.
- Warnings are emitted when function parameters are
- undocumented or misspelled, so whenever you write
- documentation for functions you should make sure you
- mention all the parameters and precede each of these by the
- \\a command. The parameter is then rendered in italic. For
- example:
+ An argument must be provided in curly braces, as in the qdoc
+ comment shown below. The argument is not interpreted but is used
+ as attribute(s) of the tag that is ultimately output by qdoc.
- \code
- / *!
- Constructs a line edit containing the text
- \a contents.
+ For example, we might want to render an inline image so that it
+ floats to the right of the current block of text:
- The \a parent parameter is sent to the
- QWidget constructor.
- * /
+ \code
+ / *!
+ \div {class="float-right"}
+ \inlineimage qml-column.png
+ \enddiv
- QLineEdit::QLineEdit(const QString &contents, QWidget *parent)
- :QWidget(parent)
- {
- ...
- }
+ * /
+ \endcode
- \endcode
+ If qdoc is generating HTML, it will translate these commands to:
- will be rendered as
+ \code
+ <div class="float-right"><p><img src="images/qml-column.png" /></p></div>
+ \endcode
- \quotation
- \bold {QLineEdit::QLineEdit ( const QString &
- contents, QWidget *parent )}
+ For HTML, the attribute value \e {float-right} then will refer to
+ a clause in the style.css file. which in this case could be:
- Constructs a line edit containing the text \a contents.
+ \code
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+ \endcode
- The \a parent parameter is sent to the QWidget
- constructor.
+ If qdoc is generating DITA XML, it will translate the commands to:
- \endquotation
+ \code
+ <sectiondiv outputclass="float-right">
+ <p>
+ <fig>
+ <image href="images/qml-column.png" placement="inline"/>
+ </fig>
+ </p>
+ </sectiondiv>
+ \endcode
- The \\a command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument. However, a parameter
- is always a single word, so braces are rarely
- necessary. And for the same reason, parentheses seldom
- occur.
+ Your DITA XML publishing program must then recognize the \e
+ {outputclass} attribute value.
- \row
- \o \bold \\c \target c
- \o \bold {The \\c command can be used to render variables,
- user-defined classes and C++ keywords like \c int,
- \c for, etc.}
+ \note The \bold {\\div} command can be nested.
+
+ Below is an example taken from the index.qdoc file used to
+ generate index.html for Qt 4.7:
- The command renders its argument using a typewriter font. For
- example:
+ \code
+ \div {class="indexbox guide"}
+ \div {class="heading"}
+ Qt Developer Guide
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="section indexIcon"} \emptyspan
+ \enddiv
+ \div {class="section"}
+ Qt is a cross-platform application and UI
+ framework. Using Qt, you can write web-enabled
+ applications once and deploy them across desktop,
+ mobile and embedded operating systems without
+ rewriting the source code.
+ \enddiv
+ \div {class="section sectionlist"}
+ \list
+ \o \l{Getting Started Guides} {Getting started}
+ \o \l{Installation} {Installation}
+ \o \l{how-to-learn-qt.html} {How to learn Qt}
+ \o \l{tutorials.html} {Tutorials}
+ \o \l{Qt Examples} {Examples}
+ \o \l{qt4-7-intro.html} {What's new in Qt 4.7}
+ \endlist
+ \enddiv
+ \enddiv
+ \enddiv
+ \endcode
- \code
- / *!
- The \c AnalogClock class provides a clock widget with hour
- and minute hands that is automatically updated every
- few seconds.
- * /
- \endcode
+ When all the class attribute values are defined as they are in the
+ style.css file that is used for rendering the Qt 4.7 documentation,
+ the above example is rendered as:
+
+ \div {class="indexbox guide"}
+ \div {class="heading"}
+ Qt Developer Guide
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="section indexIcon"} \emptyspan
+ \enddiv
+ \div {class="section"}
+ Qt is a cross-platform application and UI
+ framework. Using Qt, you can write web-enabled
+ applications once and deploy them across desktop,
+ mobile and embedded operating systems without
+ rewriting the source code.
+ \enddiv
+ \div {class="section sectionlist"}
+ \list
+ \o \l{Getting Started Guides} {Getting started}
+ \o \l{Installation} {Installation}
+ \o \l{how-to-learn-qt.html} {How to learn Qt}
+ \o \l{tutorials.html} {Tutorials}
+ \o \l{Qt Examples} {Examples}
+ \o \l{qt4-7-intro.html} {What's new in Qt 4.7}
+ \endlist
+ \enddiv
+ \enddiv
+ \enddiv
+
+ When generating DITA XML, qdoc outputs the nested \e {div} commands as:
- will be rendered as
+ \code
+ <sectiondiv outputclass="indexbox guide">
+ <sectiondiv outputclass="heading">
+ <p>Qt Developer Guide</p>
+ </sectiondiv>
+ <sectiondiv outputclass="indexboxcont indexboxbar">
+ <sectiondiv outputclass="section indexIcon"/>
+ <sectiondiv outputclass="section">
+ <p>Qt is a cross-platform application and UI
+ framework. Using Qt, you can write
+ web-enabled applications once and deploy
+ them across desktop, mobile and embedded
+ operating systems without rewriting the
+ source code.
+ </p>
+ </sectiondiv>
+ <sectiondiv outputclass="section sectionlist">
+ <ul>
+ <li>
+ <xref href="gettingstarted.xml#id-606ee7a8-219b-47b7-8f94-91bc8c76e54c">Getting started</xref>
+ </li>
+ <li>
+ <xref href="installation.xml#id-075c20e2-aa1e-4f88-a316-a46517e50443">Installation</xref>
+ </li>
+ <li>
+ <xref href="how-to-learn-qt.xml#id-49f509b5-52f9-4cd9-9921-74217b9a5182">How to learn Qt</xref>
+ </li>
+ <li>
+ <xref href="tutorials.xml#id-a737f955-a904-455f-b4aa-0dc69ed5a64f">Tutorials</xref>
+ </li>
+ <li>
+ <xref href="all-examples.xml#id-98d95159-d65b-4706-b08f-13d80080448d">Examples</xref>
+ </li>
+ <li>
+ <xref href="qt4-7-intro.xml#id-519ae0e3-4242-4c2a-b2be-e05d1e95f177">What's new in Qt 4.7</xref>
+ </li>
+ </ul>
+ </sectiondiv>
+ </sectiondiv>
+ </sectiondiv>
+ \endcode
- \quotation
- The \c AnalogClock class provides a clock widget with hour
- and minute hands that is automatically updated every
- few seconds.
- \endquotation
+ Your DITA XML publishing program must recognize the values of the
+ \e {outputclass} attribute.
+
+ See also \l {span-command} {\\span}.
- The \\c command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ \target span -command
+ \section1 \\span \span {class="newStuff"} {(new)}
+
+ The \\span command is for applying special formatting
+ attributes to a small block of text.
+
+ Two arguments must be provided, each argument in curly braces, as
+ shown in the qdoc comment below. The first argument is not
+ interpreted but is used as the formatting attribute(s) of the tag
+ that is ultimately output by qdoc. The second argument is the text
+ to be rendered with the special formatting attributes.
+
+ For example, we might want to render the first word of each
+ element in a numeric list in blue.
- The \\c command accepts the special character \c \ within
- its argument, i.e. it renders it as a normal character. So
- if you want to use nested commands, you must use the \l
- {tt}{teletype (\\tt)} command instead.
+ \code
+ / *!
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
+ * /
+ \endcode
- See also \l {tt}{\\tt} and \l {code}{\\code}.
+ Class \e {variableName} refers to a clause in your style.css.
- \row
- \o \bold \\tt \target tt
- \o \bold {The \\tt command can be used to render variables,
- user-defined classes and C++ keywords like \c int, \c
- for, etc.}
+ \code
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ \endcode
- The \\tt command behaves just like the \l {c}{\\c} command,
- except that \\tt parses QDoc commands (like \l {i}{\\i}, \l
- {bold}{\\bold} and \l {underline}{\\underline}) contained
- within its argument.
+ Using the \e {variableName} clause shown above, the example is rendered as:
- The command renders its argument using a monospace
- font. For example:
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
- \code
- / *!
- After \c setupUi() populates the main container with
- child widgets it scans the main container's list of
- slots for names with the form
- \tt{on_\i{objectName}_\i{signalName}().}
- * /
- \endcode
+ \note The \bold span command does not cause a new paragraph to be
+ started.
- will be rendered as
+ See also \l {div-command} {\\div}.
+
+ \target tt-command
+ \section1 \\tt (teletype font)
- \quotation
- After \c setupUi() populates the main container with
- child widgets it scans the main container's list of
- slots for names with the form
- \tt{on_\i{objectName}_\i{signalName}().}
- \endquotation
+ The \\tt command renders its argument in a monospace font. This
+ command behaves just like the \l {c-command} {\\c} command, except
+ that \\tt allows you to nest QDoc commands within the argument
+ (e.g. \l {i-command} {\\i}, \l {bold-command} {\\bold} and \l
+ {underline-command} {\\underline}).
- The \\tt command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ \code
+ / *!
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\e{objectName}_\e{signalName}().}
+ * /
+ \endcode
- See also \l {c}{\\c}.
+ QDoc renders this as:
- \row
- \o \bold \\bold \target bold
- \o \bold {The \\bold command renders its argument using
- a bold font.}
+ \quotation
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\e{objectName}_\e{signalName}().}
+ \endquotation
- For example:
+ If the text to be rendered in the code font contains spaces, enclose the
+ entire text in curly brackets.
- \code
- / *!
- This is regular text; \bold {this text is
- rendered using the \\bold command}.
- * /
- \endcode
+ \code
+ \tt {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- This is regular text; \bold {this text is rendered using
- the \\bold command}.
- \endquotation
+ \quotation
+ \tt {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endquotation
- The command follows the same conventions as the \l {i}{\\i}
- command for \l {argument}{punctuation, parentheses and use
- of braces} for the argument.
+ See also \l {c-command} {\\c}.
- \row
- \o \bold \\i \target i
- \o \bold {The \\i command renders its argument in italic.}
+ \target bold-command
+ \section1 \\bold
- \warning This is preliminary functionality. For
- more information, see the \l
- {26-qdoc-commands-compatibility.html#i-versus-e}{compatibility}
- section.
+ The \\bold command renders its argument in bold font.
- \target argument
- Normally, a command argument ends at the next whitespace [1],
- but braces can be used to group words [2]. For example:
+ \code
+ / *!
+ This is regular text; \bold {this text is
+ rendered using the \\bold command}.
+ * /
+ \endcode
- \code
- / *!
- Here, we render \i {a few words} in italic.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ This is regular text; \bold {this text is rendered using
+ the \\bold command}.
+ \endquotation
- \quotation
- Here, we render \i {a few words} in italic.
- \endquotation
+ \target i-command
+ \section1 \\i (italics)
- If you want to use other QDoc commands within an argument
- that contains spaces, you always need to enclose the
- argument with braces. But QDoc is smart enough to count
- parentheses [3], so you don't need braces in cases like this:
+ The \\i command renders its argument in italics.
- \code
- / *!
- An argument can sometimes contain whitespaces,
- for example: \i QPushButton(tr("A Brand New Button"))
- * /
- \endcode
+ \warning If \\i doesn't work and you get some strange error
+ meesages from qdoc3 about using \\o outside of tables and lists,
+ use \bold{\\e} for italics instead of \\i. For more information,
+ see the relevant explanation in the section on \l
+ {26-qdoc-commands-compatibility.html#i-versus-e} {compatibility
+ issues}.
- will be rendered as
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- \quotation
- An argument can sometimes contain whitespaces,
- for example: \i QPushButton(tr("A Brand New Button"))
- \endquotation
+ \code
+ / *!
+ Here, we render \i {a few words} in italic.
+ * /
+ \endcode
- Finally, trailing punctuation is not included in an
- argument [4], nor is 's [5]
+ QDoc renders this as:
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
- <tr valign="top" bgcolor="#a2c511">
- <th></th>
- <th>QDoc Syntax</th>
- <th>Generated Documentation</th>
- </tr>
+ \quotation
+ Here, we render \e {a few words} in italic.
+ \endquotation
- <tr valign="top" bgcolor="#d0d0d0">
- <td>1</td>
- <td>A variation of a command button is a \i menu
- button.</td>
- <td>A variation of a command button is a <i>menu</i>
- button.</td>
- </tr>
+ If you want to use other QDoc commands within an argument that
+ contains spaces, you always need to enclose the argument with
+ braces. But QDoc is smart enough to count parentheses [3], so you
+ don't need braces in cases like this:
- <tr valign="top" bgcolor="#c0c0c0">
- <td>2</td>
- <td>The QPushButton widget provides a
- \i {command button}.</td>
- <td>The QPushButton widget provides a
- <i>command button</i>.</td>
- </tr>
+ \code
+ / *!
+ An argument can sometimes contain whitespaces,
+ for example: \i QPushButton(tr("A Brand New Button"))
+ * /
+ \endcode
- <tr valign="top" bgcolor="#d0d0d0">
- <td>3</td>
- <td>Another class of buttons are option buttons
- \i (see QRadioButton).</td>
- <td>Another class of buttons are option buttons
- <i> (see QRadioButton)</i>.</td>
- </tr>
+ QDoc renders this as:
- <tr valign="top" bgcolor="#c0c0c0">
- <td>4</td>
- <td>A push button emits the signal \i clicked().</td>
- <td>A push button emits the signal <i>clicked</i>().</td>
- </tr>
+ \quotation
+ An argument can sometimes contain whitespaces,
+ for example: \e QPushButton(tr("A Brand New Button"))
+ \endquotation
- <tr valign="top" bgcolor="#d0d0d0">
- <td>5</td>
- <td>The \i QPushButton's checked property is
- false by default.</td>
- <td>The <i>QPushButton</i>'s checked property is
- false by default.</td>
- </tr>
+ Finally, trailing punctuation is not included in an argument [4],
+ nor is 's [5]
- </table>
- \endraw
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th></th>
+ <th>QDoc Syntax</th>
+ <th>Generated Documentation</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>1</td>
+ <td>A variation of a command button is a \e menu
+ button.</td>
+ <td>A variation of a command button is a <i>menu</i>
+ button.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>2</td>
+ <td>The QPushButton widget provides a
+ \e {command button}.</td>
+ <td>The QPushButton widget provides a
+ <i>command button</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>3</td>
+ <td>Another class of buttons are option buttons
+ \e (see QRadioButton).</td>
+ <td>Another class of buttons are option buttons
+ <i> (see QRadioButton)</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>4</td>
+ <td>A push button emits the signal \e clicked().</td>
+ <td>A push button emits the signal <i>clicked</i>().</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>5</td>
+ <td>The \e QPushButton's checked property is
+ false by default.</td>
+ <td>The <i>QPushButton</i>'s checked property is
+ false by default.</td>
+ </tr>
- \row
- \o \bold \\sub \target sub
- \o \bold {The \\sub command renders its argument lower
- than the baseline of the regular text, using a smaller font.}
+ </table>
+ \endraw
- For example:
+ \target sub-command
+ \section1 \\sub
- \code
- / *!
- Definition (Range): Consider the sequence
- {x\sub n}\sub {n > 1} . The set
+ The \\sub command renders its argument lower than the baseline of
+ the regular text, using a smaller font.
- {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+ \code
+ / *!
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
- is called the range of the sequence.
- * /
- \endcode
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
- will be rendered as
+ is called the range of the sequence.
+ * /
+ \endcode
- \quotation
- Definition (Range): Consider the sequence
- {x\sub n}\sub {n > 1} . The set
+ QDoc renders this as:
- {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+ \quotation
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
- is called the range of the sequence.
- \endquotation
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
- The \\sub command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ is called the range of the sequence.
+ \endquotation
- \row
- \o \bold \\sup \target sup
- \o \bold {The \\sup command renders its argument higher than
- the baseline of the regular text, using a smaller font.}
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- For example:
+ \target sup-command
+ \section1 \\sup
- \code
- / *!
- The series
+ The \\sup command renders its argument higher than
+ the baseline of the regular text, using a smaller font.
- 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+ \code
+ / *!
+ The series
- is called the \i {geometric series}.
- * /
- \endcode
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
- will be rendered as
+ is called the \i {geometric series}.
+ * /
+ \endcode
- \quotation
- The series
+ QDoc renders this as:
- 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+ \quotation
+ The series
- is called the \i {geometric series}.
- \endquotation
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
- The \\sup command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ is called the \e {geometric series}.
+ \endquotation
- \row
- \o \bold \\underline \target underline
- \o \bold {The \\underline command renders its argument underlined.}
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- For example:
+ \target underline-command
+ \section1 \\underline
- \code
- / *!
- The \underline {F}ile menu gives the users the possibility
- to open, and edit, an existing file, save a new or modified
- file, and exit the application.
- * /
- \endcode
+ The \\underline command renders its argument underlined.
- will be rendered as
+ \code
+ / *!
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ * /
+ \endcode
- \quotation
- The \underline {F}ile menu gives the users the possibility
- to open, and edit, an existing file, save a new or modified
- file, and exit the application.
- \endquotation
+ QDoc renders this as:
- The \\underline command follows the same conventions as the
- \l {i}{\\i} command for \l {argument}{punctuation,
- parentheses and use of braces} for the argument. \endtable
-*/
+ \quotation
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ \endquotation
-/*!
- \page 05-qdoc-commands-documentstructuring.html
- \previouspage Text Formatting Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Verbatim Code Commands
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- \title Document Structuring Commands
+ \target backslash-command
+ \section1 \\\\ (double backslash)
- The document structuring commands divide the documentation into
- sections. In total, there are six levels of sections in QDoc: \c
- \part, \c \chapter, \c \section1, \c \section2, \c \section3 and
- \c \section4. \c \section1 to \c \section4 correspond to the
- traditional section, subsection, subsubsection and
- subsubsubsection.
+ The \\\\ command expands to a single backslash.
- \section1 Alphabetical List
+ QDoc commands always start with a backslash alone. To display an
+ actual backslash in the text you need to type two of the kind. If
+ you want to display two backslashes, you need to type four, and so
+ forth.
- \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
- \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
- \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
- \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
- \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
- \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
+ \code
+ / *!
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ * /
+ \endcode
- \section1 Command Descriptions
+ QDoc renders this as:
- \table
- \header
- \o Command
- \o Description
+ \quotation
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ \endquotation
- \row
- \o \bold \\part \target part
- \o \bold {The \\part command is intended for use in
- larger documents, and divides the document into parts.}
+ However, if you want your text to appear in a typewriter font as
+ well, you can use the \l {c-command} {\\c} command instead, which
+ accepts and renders the backslash as any other character. For
+ example:
+
+ \code
+ / *!
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ * /
+ \endcode
- In general a document structuring command considers
- everything that follows it until the first line break as
- its argument. The argument is rendered as the unit's
- title. If the title needs to be spanned over several lines,
- make sure that each line (except the last one) is ended
- with a backslash.
+ QDoc renders this as:
- In total, there are six levels of sections in QDoc: \c
- \part, \c \chapter, \c \section1, \c \section2, \c
- \section3 and \c \section4. \c \section1 to \c \section4
- correspond to the traditional section, subsection,
- subsubsection and subsubsubsection.
+ \quotation
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ \endquotation
- There is a strict ordering of the section units:
+*/
+
+/*!
+ \page 05-qdoc-commands-documentstructure.html
+ \previouspage Text Markup
+ \contentspage Table of Contents
+ \nextpage Including Code Inline
+
+ \title Document Structure
+
+ The document structuring commands are for dividing your document
+ into sections. QDoc supports six kinds of sections: \c \part, \c
+ \chapter, \c \section1, \c \section2, \c \section3 and \c
+ \section4. The \c \section1..4 commands are the most useful. The
+ correspond to the traditional section, subsection, etc used in
+ outlining.
+
+ \target part-command
+ \section1 \\part
+
+ The \\part command is intended for use in a large document, like a
+ book.
+
+ In general a document structuring command considers everything
+ that follows it until the first line break as its argument. The
+ argument is rendered as the unit's title. If the title needs to be
+ spanned over several lines, make sure that each line (except the
+ last one) is ended with a backslash.
+
+ In total, there are six levels of sections in QDoc: \c \part, \c
+ \chapter, \c \section1, \c \section2, \c \section3 and \c
+ \section4. \c \section1 to \c \section4 correspond to the
+ traditional section, subsection, subsubsection and
+ subsubsubsection.
+
+ There is a strict ordering of the section units:
\code
part
@@ -763,13 +960,12 @@
section4
\endcode
- For example, a \c section1 unit can only appear as the top
- level section or inside a \c chapter unit. Skipping a
- section unit, for example from \c part to \c section1, is
- not allowed.
+ For example, a \c section1 unit can only appear as the top level
+ section or inside a \c chapter unit. Skipping a section unit, for
+ example from \c part to \c section1, is not allowed.
- You can \i begin with either of the three: \c part, \c
- chapter or \c section1. For example:
+ You can \e begin with either of the three: \c part, \c chapter or
+ \c section1.
\code
@@ -829,7 +1025,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -890,154 +1086,96 @@
\endraw
\endquotation
- Each section level is a logical unit within the
- document. Its title will appear on the table of contents
- generated by the \l
- {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents} command. For example:
+ Each section is a logical unit in the document. The section
+ heading appears in the automatically generated table of contents
+ that normally appears in the upper righthand corner of the page.
- \code
- / *!
- Contents:
+ \target chapter-command
+ \section1 \\chapter
+
+ The \\chapter command is intended for use in
+ larger documents, and divides the document into chapters.
- \tableofcontents
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- ...
- * /
- \endcode
+ \target sectionOne-command
+ \section1 \\section1
- will expand to
+ The \\section1 command starts a new section.
- \quotation
- \raw HTML
- <p>Contents:</p>
-
- <ul>
- <li><a href="#Basic Qt">Basic Qt</a></li>
- <ul>
- <li><a href="#Getting Started">Getting Started</a></li>
- <ul>
- <li><a href="#Hello Qt">Hello Qt</a></li>
- <li><a href="#Making Connections">
- Making Connections</a></li>
- <li><a href="#Using the Reference Documentation">
- Using the Reference Documentation</a></li>
- </ul>
- <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
- <ul>
- <li><a href="#Subclassing QDialog">
- Subclassing QDialog</a></li>
- </ul>
- </ul>
- <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
- <ul>
- <li><a href="#Layout Management">
- Layout Management</a></li>
- <ul>
- <li><a href="#Basic Layouts">Basic Layouts</a></li>
- </ul>
- </ul>
- </ul>
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- ...
- \endraw
- \endquotation
-
- \row
- \o \bold \\chapter \target chapter
- \o \bold {The \\chapter command is intended for use in
- larger documents, and divides the document into chapters.}
+ \target sectionTwo-command
+ \section1 \\section2
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ The \\section2 command starts a new section.
- \row
- \o \bold \\section1 \target sectionOne
- \o \bold {The \\section1 command starts a new section.}
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
- \row
- \o \bold \\section2 \target sectionTwo
- \o \bold {The \\section2 command starts a new section.}
+ \target sectionThree-command
+ \section1 \\section3
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ The \\section3 command starts a new section.
- \row
- \o \bold \\section3 \target sectionThree
- \o \bold {The \\section3 command starts a new section.}
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ \target sectionFour-command
+ \section1 \\section4
- \row
- \o \bold \\section4 \target sectionFour
- \o \bold {The \\section4 command starts a new section.}
+ The \\section4 command starts a new section.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- \endtable
*/
/*!
- \page 06-qdoc-commands-verbatimcode.html
- \previouspage Document Structuring Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Quoting External Code Commands
-
- \title Verbatim Code Commands
-
- The following commands are used to render verbatim code within the
- documentation. The code is rendered on a new line, using a
- typewriter font and the standard indentation.
+ \page 06-qdoc-commands-includecodeinline.html
+ \previouspage Document Structure
+ \contentspage Table of Contents
+ \nextpage Including External Code
+
+ \title Including Code Inline
+
+ The following commands are used to render source code without
+ formatting. The source code begins on a new line, rendered in the
+ code.
+
+ \bold{Note:} Although all these commands are for rendering C++
+ code, the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands are preferred over the others. These
+ commands allow equivalent code snippets for other Qt language
+ bindings to be substituted for the C++ snippets in the
+ documentation.
- \bold{Note:} Although all of these commands can be used to present
- C++ code, the \l{07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
- and \l{07-0-qdoc-commands-quoting.html#codeline}{\\codeline} commands
- should be used in preference to
- the others when presenting valid code. This allows auxilliary tools
- for Qt language bindings to substitute the relevant code snippets in
- place of the C++ ones.
+ \target code-command
+ \section1 \\code
- \section1 Alphabetical List
+ The \\code and \\endcode commands enclose a snippet of source code.
- \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
- \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
- \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
- \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
+ \note The \l {c-command} {\\c} command can be used for short code
+ fragments within a sentence. The \\code command is for longer code
+ snippets. It renders the code verbatim in a separate paragraph in
+ the code font.
- \section1 Command Descriptions
+ When processing any of the \\code, \l {badcode-command}
+ {\\badcode}, \l {newcode-command} {\\newcode} or \l
+ {oldcode-command} {\\oldcode} commands, QDoc removes all
+ indentation that is common for the verbatim code blocks within a
+ \c{/}\c{*!} ... \c{*}\c{/} comment before it adds the standard
+ indentation. For that reason the recommended style is to use 8
+ spaces for the verbatim code contained within these commands
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\code \target code
- \o \bold {The \\code command and the corresponding
- \\endcode command delimit a piece of verbatim code.}
-
- Whereas the \l {c}{\\c} command can be used for short code
- fragments within a sentence, the \\code command is for
- longer code snippets and renders the code verbatim in a
- separate paragraph using a typewriter font and the standard
- indentation.
-
- When processing any of the \\code, \l {badcode}{\\badcode},
- \l {newcode}{\\newcode} and \l {oldcode}{\\oldcode}
- commands, QDoc basically removes all indentation that is
- common for the verbatim code blocks within a \c{/}\c{*!} ...
- \c{*}\c{/} comment before it adds the standard
- indentation. For that reason the recommended style is to
- use 8 spaces for the verbatim code contained within these
- commands (note that this doesn't apply to externally
- quoted code using the \l {quotefromfile}{\\quotefromfile}
- or \l {quotefile}{\\quotefile} command).
-
- For example:
+ \note This doesn't apply to externally quoted code using the \l
+ {quotefromfile-command} {\\quotefromfile} or \l
+ {quotefile-command} {\\quotefile} command.
\code
/ *!
@@ -1053,7 +1191,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\code
#include <QApplication>
@@ -1065,34 +1203,35 @@
}
\endcode
- Other QDoc commands are disabled within
- \\code... \\endcode, and the special character '\\' is
- accepted and rendered like the rest of the code.
+ Other QDoc commands are disabled within \\code... \\endcode, and
+ the special character '\\' is accepted and rendered like the rest
+ of the code.
- You need to type the code manually between the \\code and
- \\endcode commands. If you want to include code snippets
- from a particular file, use the \l
- {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
- command instead.
+ To include code snippets from an external file, use the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands.
- See also \l {c}{\\c}, \l
- {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {badcode}{\\badcode}, \l {newcode}{\\newcode} and \l
- {oldcode}{\\oldcode}.
+ See also \l {c-command} {\\c}, \l
+ {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command}
+ {\\quotefromfile}, \l {badcode-command} {\\badcode}, \l
+ {newcode-command} {\\newcode} and \l {oldcode-command}
+ {\\oldcode}.
- \row
- \o \bold \\badcode \target badcode
- \o \bold {The \\badcode command and the corresponding
- \\endcode command delimit a piece of code that doesn't
- compile or is wrong for some other reason.}
+ \target badcode-command
+ \section1 \\badcode
- The \\badcode command is similar the \l {code}{\\code}
- command, but renders the code using a grey font instead of
- black (the default).
+ The \\badcode and \\endcode commands delimit a snippet of code
+ that doesn't compile or is wrong for some other reason.
- Like the \l {code}{\\code} command, it renders its code on
- a new line in the documentation using a typewriter font and
- the standard indentation. For example:
+ The \\badcode command is similar to the \l {code-command} {\\code}
+ command, but it renders the code snippet using a grey font instead
+ of black.
+
+ Like the \l {code-command} {\\code} command, this command begins
+ its code snippet on a new line rendered in the code font and with
+ the standard indentation.
\code
/ *!
@@ -1112,7 +1251,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The statement below is rendered using the
@@ -1130,30 +1269,29 @@
\endcode
\endquotation
- Other QDoc commands are disabled within
- \\badcode... \\endcode, and the special character '\\' is
- accepted and rendered like the rest of the code.
+ Other QDoc commands are disabled within \\badcode... \\endcode,
+ and the special character '\\' is accepted and rendered like the
+ rest of the code.
- See also \l {code}{\\code}, \l {newcode}{\\newcode} and \l
- {oldcode}{\\oldcode}.
+ See also \l {code-command} {\\code}, \l {newcode-command}
+ {\\newcode} and \l {oldcode-command} {\\oldcode}.
- \row
- \o \bold \\newcode \target newcode
- \o \bold {The \\newcode command, and the associated \\oldcode
- and \\endcode commands, indicate how to port a piece of
- code to a new version of an API.}
-
- The \\newcode command, and its companion the \\oldcode
- command, is a convenience combination of the \l
- {code}{\\code} and \l {badcode}{\\badcode} commands: The
- combination provides a text relating the two code snippets
- to each other. The command requires a preceding \\oldcode
- statement.
-
- Like the \l {code}{\\code} and \l {badcode}{\\badcode}
- commands, the \\newcode command renders its code on a new
- line in the documentation using a typewriter font and the
- standard indentation. For example:
+ \target newcode-command
+ \section1 \\newcode
+
+ The \\newcode, \\oldcode, and \\endcode commands enable you to
+ show how to port a snippet of code to a new version of an API.
+
+ The \\newcode command, and its companion the \\oldcode command, is
+ a convenience combination of the \l {code-command} {\\code} and \l
+ {badcode-command} {\\badcode} commands: The combination provides a
+ text relating the two code snippets to each other. The command
+ requires a preceding \\oldcode statement.
+
+ Like the \l {code-command} {\\code} and \l {badcode-command}
+ {\\badcode} commands, the \\newcode command renders its code on a
+ new line in the documentation using a typewriter font and the
+ standard indentation.
\code
/ *!
@@ -1168,7 +1306,7 @@
* /
\endcode
- is rendered like this:
+ QDoc renders this as:
\quotation
\oldcode
@@ -1181,76 +1319,102 @@
\endcode
\endquotation
- Other QDoc commands are disabled within
- \\oldcode ... \\endcode, and the '\\' character doesn't need
- to be escaped.
+ Other QDoc commands are disabled within \\oldcode ... \\endcode,
+ and the '\\' character doesn't need to be escaped.
- \row
- \o \bold \\oldcode \target oldcode
- \o \bold {The \\oldcode command requires a corresponding
- \\newcode statement; otherwise QDoc fails to parse the command
- and emits a warning.}
+ \target oldcode-command
+ \section1 \\oldcode
- See also \l {newcode}{\\newcode} and \l {badcode}{\\badcode}.
- \endtable
+ The \\oldcode command requires a corresponding
+ \\newcode statement; otherwise QDoc fails to parse the command
+ and emits a warning.
+
+ See also \l {newcode-command} {\\newcode} and \l {badcode-command} {\\badcode}.
+
+ \target qml-command
+ \section1 \\qml \span {class="newStuff"} {(new)}
+
+ The \\qml and \\endqml commands enclose a snippet of QML source
+ code. Currently, QDoc handles \\qml and \\endqml exactly the same
+ as \\code and \\endcode.
+
+ \code
+ / *!
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
+ * /
+ \endcode
+
+ QDoc renders this as:
+
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
*/
/*!
- \page 07-0-qdoc-commands-quoting.html
- \previouspage Verbatim Code Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Linking Commands
+ \page 07-0-qdoc-commands-includingexternalcode.html
+ \previouspage Including Code Inline
+ \contentspage Table of Contents
+ \nextpage Creating Links
- \title Quoting External Code Commands
+ \title Including External Code
- The following commands enable quoting from files in the
- documentation: You can make QDoc include the complete contents of
+ The following commands enable you to include code snippets from
+ external files. You can make QDoc include the complete contents of
a file, or you can quote specific parts of the file and skip
others. The typical use of the latter is to quote a file chunk by
chunk.
- \bold{Note:} Although all of these commands can be used to present
- C++ code, the \l{#snippet}{\\snippet} and \l{#codeline}{\\codeline}
- commands should be used in preference to
- the others when presenting valid code. This allows auxilliary tools
- for Qt language bindings to substitute the relevant code snippets in
- place of the C++ ones.
-
- \section1 Alphabetical List
-
- \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
- \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
- \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
- \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
- \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
- \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
- \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
- \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
- \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
-
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
+ \bold{Note:} Although all these commands are for rendering C++
+ code, the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands are preferred over the others. These
+ commands allow equivalent code snippets for other Qt language
+ bindings to be substituted for the C++ snippets in the
+ documentation.
- \row
- \o \bold \\quotefile \target quotefile
- \o \bold {The \\quotefile command expands to the complete
- contents of the file given as argument.}
+ \target quotefile-command
+ \section1 \\quotefile
- The command considers the rest of the line as part of its
- argument, make sure to follow the file name with a line
- break.
+ The \\quotefile command expands to the complete contents of the
+ file given as argument.
- The file's contents is rendered in a separate paragraph,
- using a typewriter font and the standard indentation. The
- code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line break.
- For example:
+ The file's contents is rendered in a separate paragraph, using a
+ typewriter font and the standard indentation. The code is shown
+ verbatim.
\code
/ *!
@@ -1263,7 +1427,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
This is a simple "Hello world" example:
@@ -1274,29 +1438,26 @@
application up and running.
\endquotation
- \warning If you use the \l {QDoc
- Compatibility}{compat.qdocconf} file this command is called
- \\include.
+ See also \l {quotefromfile-command} {\\quotefromfile} and
+ \l {code-command} {\\code}.
- See also \l {quotefromfile}{\\quotefromfile} and \l
- {code}{\\code}.
- \row
- \o \bold \\quotefromfile \target quotefromfile
- \o \bold {The \\quotefromfile command opens the file
- given as argument for quoting.}
-
- The command considers the rest of the line as part of its
- argument, make sure to follow the file name with a line
- break.
-
- The command is intended for use when quoting parts from
- file with the walkthrough commands: \l
- {printline}{\\printline}, \l {printto}{\\printto}, \l
- {printuntil}{\\printuntil}, \l {skipline}{\\skipline}, \l
- {skipto}{\\skipto}, \l {skipuntil}{\\skipuntil}. This
- enables you to quote specific portions of a file. For
- example:
+ \target quotefromfile-command
+ \section1 \\quotefromfile
+
+ The \\quotefromfile command opens the file given as argument for
+ quoting.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line break.
+
+ The command is intended for use when quoting parts from file with
+ the walkthrough commands: \l {printline-command} {\\printline}, \l
+ {printto-command} {\\printto}, \l {printuntil-command}
+ {\\printuntil}, \l {skipline-command} {\\skipline}, \l
+ {skipto-command} {\\skipto}, \l {skipuntil-command}
+ {\\skipuntil}. This enables you to quote specific portions of a
+ file.
\code
/ *!
@@ -1321,7 +1482,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within
@@ -1344,38 +1505,35 @@
...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- QDoc remembers which file it's quoting, and the current
- position within that file (see \l {file}{\\printline} for
- more information). There is no need to "close" the file.
+ QDoc remembers which file it's quoting, and the current position
+ within that file (see \l {file} {\\printline} for more
+ information). There is no need to "close" the file.
- Earlier we called this command \\quotefile. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#quotefromfile-versus-quotefile}
- {compatibility} section.
+ Earlier we called this command \\quotefile. For more information,
+ see the \l
+ {26-qdoc-commands-compatibility.html#quotefromfile-versus-quotefile}
+ {compatibility} section.
- See also \l {quotefile}{\\quotefile}, \l {code}{\\code} and
- \l {dots}{\\dots}.
+ See also \l {quotefile-command} {\\quotefile}, \l {code-command}
+ {\\code} and \l {dots} {\\dots}.
- \row
- \o \bold \\printline \target printline
- \o \bold {The \\printline command expands to the line
- from the current position to the next non-blank line of
- the current souce file.}
+ \target printline-command
+ \section1 \\printline
- To ensure that the documentation always is synchronized
- with the source file, a substring of the line must be
- specified as an argument to the command. Note that the
- command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ The \\printline command expands to the line from the current
+ position to the next non-blank line of the current souce file.
- The line from the source file is rendered as a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ To ensure that the documentation remains synchronized with the
+ source file, a substring of the line must be specified as an
+ argument to the command. Note that the command considers the rest
+ of the line as part of its argument, make sure to follow the
+ substring with a line break.
- For example:
+ The line from the source file is rendered as a separate paragraph,
+ using a typewriter font and the standard indentation. The code is
+ shown verbatim.
\code
/ *!
@@ -1403,7 +1561,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
There has to be exactly one QApplication object
@@ -1430,22 +1588,20 @@
The main function...
\endquotation
- (\l {Example File}{The complete example file...})
-
- \target file
+ (\l {Example File} {The complete example file...})
- QDoc reads the file sequentially. To move the current
- position forward you can use either of the \l
- {skipline}{\\skip...} commands. To move the current
- position backward, you can use the \l
- {quotefromfile}{\\quotefromfile} command again.
+ \target file
- \target substring
+ QDoc reads the file sequentially. To move the current position
+ forward you can use either of the \l {skipline-command}
+ {\\skip...} commands. To move the current position backward, you
+ can use the \l {quotefromfile-command} {\\quotefromfile} command
+ again.
- If the substring argument is surrounded by slashes it is
- interpreted as a \l {regular expression}.
+ \target substring
- For example:
+ If the substring argument is surrounded by slashes it is
+ interpreted as a \l {regular expression}.
\code
/ *!
@@ -1462,7 +1618,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\quotefromfile widgets/scribble/mainwindow.cpp
@@ -1477,39 +1633,36 @@
application.
\endquotation
- (\l {widgets/scribble}{The complete example file...})
+ (\l {widgets/scribble} {The complete example file...})
- The regular expression \c /^\}/ makes QDoc print until the
- first '}' character occurring at the beginning of the line
- without indentation. /.../ encloses the regular expression,
- and '^' means the beginning of the line. The '}' character
- must be escaped since it is a special character in regular
- expressions.
+ The regular expression \c /^\}/ makes QDoc print until the first
+ '}' character occurring at the beginning of the line without
+ indentation. /.../ encloses the regular expression, and '^' means
+ the beginning of the line. The '}' character must be escaped since
+ it is a special character in regular expressions.
- QDoc will emit a warning if the specified substring or
- regular expression cannot be located, i.e. if the source
- code has changed.
+ QDoc will emit a warning if the specified substring or regular
+ expression cannot be located, i.e. if the source code has changed.
- See also \l {printto}{\\printto} and \l
- {printuntil}{\\printuntil}.
+ See also \l {printto-command} {\\printto} and \l
+ {printuntil-command} {\\printuntil}.
- \row
- \o \bold \\printto \target printto
- \o \bold {The \\printto command expands to all the lines
- from the current position up to and \i excluding the
- next line containing a given substring.}
+ \target printto-command
+ \section1 \\printto
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {file}{positioning} and \l {substring}{argument} as the \l
- {printline}{\\printline} command.
+ The \\printto command expands to all the lines from the current
+ position up to and \e excluding the next line containing a given
+ substring.
- The lines from the source file are rendered in a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {file}
+ {positioning} and \l {substring} {argument} as the \l
+ {printline-command} {\\printline} command.
- For example:
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
\code
/ *!
@@ -1524,7 +1677,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within the
@@ -1538,28 +1691,27 @@
and \c argv parameters...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {printline}{\\printline} and \l
- {printuntil}{\\printuntil}.
+ See also \l {printline-command} {\\printline} and \l
+ {printuntil-command} {\\printuntil}.
- \row
- \o \bold \\printuntil \target printuntil
- \o \bold {The \\printuntil command expands to all the lines
- from the current position up to and \i including the next line
- containing a given substring.}
+ \target printuntil-command
+ \section1 \\printuntil
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {file}{positioning} and \l {substring}{argument} as the \l
- {printline}{\\printline} command.
+ The \\printuntil command expands to all the lines from the current
+ position up to and \e including the next line containing a given
+ substring.
- The lines from the source file are rendered in a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {file}
+ {positioning} and \l {substring} {argument} as the \l
+ {printline-command} {\\printline} command.
- For example:
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
\code
/ *!
@@ -1576,7 +1728,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within the
@@ -1587,33 +1739,33 @@
\printuntil hello
First we create a \l
- {http://qt.nokia.com/doc/4.0/qapplication}{QApplication}
+ {http://qt.nokia.com/doc/4.0/qapplication} {QApplication}
object using the \c argc and \c argv parameters, then we
create a \l
- {http://qt.nokia.com/doc/4.0/qpushbutton}{QPushButton}.
+ {http://qt.nokia.com/doc/4.0/qpushbutton} {QPushButton}.
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {printline}{\\printline} and \l
- {printto}{\\printto}.
+ See also \l {printline-command} {\\printline} and \l
+ {printto-command} {\\printto}.
- \row
- \o \bold \\skipline \target skipline
- \o \bold {The \\skipline command ignores the next non-blank
- line in the current source file.}
-
- Doc reads the file sequentially, and the \\skipline command
- is used to move the current position (omitting a line of
- the source file). See the remark about \l {file}{file
- positioning} above.
-
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ \target skipline-command
+ \section1 \\skipline
+
+ The \\skipline command ignores the next non-blank line in the
+ current source file.
+
+ Doc reads the file sequentially, and the \\skipline command is
+ used to move the current position (omitting a line of the source
+ file). See the remark about \l {file} {file positioning} above.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1631,7 +1783,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\l
@@ -1649,30 +1801,30 @@
that contains its definition.
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipto}{\\skipto}, \l
- {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+ See also \l {skipto-command} {\\skipto}, \l {skipuntil-command}
+ {\\skipuntil} and \l {dots} {\\dots}.
- \row
- \o \bold \\skipto \target skipto
- \o \bold {The \\skipto command ignores all the lines from the
- current position up to and \i excluding the next line
- containing a given substring.}
+ \target skipto-command
+ \section1 \\skipto
- QDoc reads the file sequentially, and the \\skipto command
- is used to move the current position (omitting one or
- several lines of the source file). See the remark about \l
- {file}{file positioning} above.
+ The \\skipto command ignores all the lines from the current
+ position up to and \e excluding the next line containing a given
+ substring.
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ QDoc reads the file sequentially, and the \\skipto command is used
+ to move the current position (omitting one or several lines of the
+ source file). See the remark about \l {file} {file positioning}
+ above.
- The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break.
+
+ The command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1691,7 +1843,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within
@@ -1707,30 +1859,30 @@
reasonable size ...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipline}{\\skipline}, \l
- {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+ See also \l {skipline-command} {\\skipline}, \l
+ {skipuntil-command} {\\skipuntil} and \l {dots} {\\dots}.
- \row
- \o \bold \\skipuntil \target skipuntil
- \o \bold {The \\skipuntil command ignores all the lines from
- the current position up to and \i including the next line
- containing a given substring.}
+ \target skipuntil-command
+ \section1 \\skipuntil
- QDoc reads the file sequentially, and the \\skipuntil
- command is used to move the current position (omitting one
- or several lines of the source file). See the remark about
- \l {file}{file positioning} above.
+ The \\skipuntil command ignores all the lines from the current
+ position up to and \e including the next line containing a given
+ substring.
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ QDoc reads the file sequentially, and the \\skipuntil command is
+ used to move the current position (omitting one or several lines
+ of the source file). See the remark about \l {file} {file
+ positioning} above.
- The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break.
+
+ The command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1748,7 +1900,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The first thing we did in the \c main() function was to
@@ -1764,20 +1916,21 @@
will return when the application exits...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipline}{\\skipline}, \l {skipto}{\\skipto}
- and \l {dots}{\\dots}.
+ See also \l {skipline-command} {\\skipline}, \l {skipto-command}
+ {\\skipto} and \l {dots} {\\dots}.
- \row
- \o \bold \\dots \target dots
- \o \bold {The \\dots command indicates that parts of the
- source file have been omitted when quoting a file.}
+ \target dots-command
+ \section1 \\dots
- The command is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command, and should be
- stated on its own line. The dots are rendered on a new
- line, using a typewriter font. For example:
+ The \\dots command indicates that parts of the source file have
+ been omitted when quoting a file.
+
+ The command is used in conjunction with the \l
+ {quotefromfile-command} {\\quotefromfile} command, and should be
+ stated on its own line. The dots are rendered on a new line, using
+ a typewriter font.
\code
/ *!
@@ -1790,7 +1943,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotefromfile examples/main.cpp
\skipto main
@@ -1799,54 +1952,54 @@
\skipuntil exec
\printline }
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- The default indentation is 4 spaces, but this can be
- adjusted using the command's optional argument. For
- example:
+ The default indentation is 4 spaces, but this can be adjusted
+ using the command's optional argument.
- \code
- / *!
- \dots 0
- \dots
- \dots 8
- \dots 12
- \dots 16
- * /
- \endcode
+ \code
+ / *!
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \dots 0
- \dots
- \dots 8
- \dots 12
- \dots 16
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
- See also \l {skipline}{\\skipline}, \l
- {skipto}{\\skipto} and \l {skipuntil}{\\skipuntil}.
+ See also \l {skipline-command} {\\skipline}, \l {skipto-command}
+ {\\skipto} and \l {skipuntil-command} {\\skipuntil}.
- \row
- \o \bold \\snippet \target snippet
- \o \bold {The \\snippet command causes a code snippet to be included
- verbatim as preformatted text, which may be syntax highlighted.}
-
- Each code snippet are referenced by the file that holds it and by
- a unique identifier for that file. Snippet files are typically
- stored in a \c{snippets} directory inside the documentation
- directory (e.g., \c{$QTDIR/doc/src/snippets}).
+ \target snippet-command
+ \section1 \\snippet
+
+ The \\snippet command causes a code snippet to be included
+ verbatim as preformatted text, which may be syntax highlighted.
- For example, the following documentation references a snippet in
- a file residing in a subdirectory of the documentation directory:
+ Each code snippet are referenced by the file that holds it and by
+ a unique identifier for that file. Snippet files are typically
+ stored in a \c{snippets} directory inside the documentation
+ directory (e.g., \c{$QTDIR/doc/src/snippets}).
+
+ For example, the following documentation references a snippet in a
+ file residing in a subdirectory of the documentation directory:
\code
\snippet snippets/textdocument-resources/main.cpp Adding a resource
\endcode
- The text following the file name is the unique identifier for the
- snippet. This is used to delimit the quoted code in the relevant
- snippet file as shown in the following example that corresponds to
- the above \c{\\snippet} command:
+ The text following the file name is the unique identifier for the
+ snippet. This is used to delimit the quoted code in the relevant
+ snippet file as shown in the following example that corresponds to
+ the above \c{\\snippet} command:
\dots
\code
@@ -1859,18 +2012,20 @@
//! [Adding a resource]
\endcode
\dots
- \row
- \o \bold \\codeline \target codeline
- \o \bold{The \\codeline command inserts a blank line of preformatted
- text. It is used to insert gaps between snippets without closing
- the current preformatted text area and opening a new one.}
- \endtable
+
+ \target codeline-command
+ \section1 \\codeline
+
+ The \\codeline command inserts a blank line of preformatted
+ text. It is used to insert gaps between snippets without closing
+ the current preformatted text area and opening a new one.
+
*/
/*!
\page 07-1-example.html
- \previouspage Quoting External Code Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Including External Code
+ \contentspage Table of Contents
\title Example File
@@ -1878,541 +2033,528 @@
*/
/*!
- \page 08-qdoc-commands-linking.html
- \previouspage Quoting External Code Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Graphic Commands
+ \page 08-qdoc-commands-creatinglinks.html
+ \previouspage Including External Code
+ \contentspage Table of Contents
+ \nextpage Including Images
- \title Linking Commands
+ \title Creating Links
- The linking commands make it possible to create hyperlinks to
- classes, functions, header files and examples. They also make it
- possible to link to targets within a document, as well as to other
- documents and URLs.
+ These commands are for creating hyperlinks to classes, functions,
+ examples, and other targets.
- \section1 Alphabetical List
+ \target l-command
+ \section1 \\l (link)
- \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
- \l {08-qdoc-commands-linking.html#l}{\\l},
- \l {08-qdoc-commands-linking.html#sa}{\\sa},
- \l {08-qdoc-commands-linking.html#target}{\\target}
+ The \\l link command is used to create a hyperlink to many
+ different kinds of targets. The command's general syntax is:
- \section1 Command Descriptions
+ \code
+ \l {link target} {link text}
+ \endcode
- \table
- \header
- \o Command
- \o Description
+ \code
+ / *!
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ * /
+ \endcode
- \row
- \o \bold \\l \target l
- \o \bold {The \\l command is used to create hyperlinks. }
+ QDoc renders this as:
- The command's general syntax is
+ \quotation
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ \endquotation
- \code
- \l {link target}{link text}
- \endcode
+ If the link target is equivalent to the link text, the second
+ argument can be omitted.
- For example:
+ For example, if you have documentation like:
- \code
- / *!
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
- * /
- \endcode
+ \code
+ / *!
+ \target assertions
- will be rendered as
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
- \quotation
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
- \endquotation
+ ...
- If the link target is equivalent to the link text, the
- second argument can be omitted.
+ Regexps are built up from expressions, quantifiers, and
+ \l {assertions} {assertions}.
+ * /
+ \endcode
- For example, if you have documentation like:
+ You can simplify this as follows:
- \code
- / *!
- \target assertions
+ \code
+ / *!
+ \target assertions
- Assertions make some statement about the text at the
- point where they occur in the regexp but they do not
- match any characters.
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
- ...
+ ...
- Regexps are built up from expressions, quantifiers, and
- \l {assertions}{assertions}.
- * /
- \endcode
+ Regexps are built up from expressions, quantifiers, and
+ \l assertions.
+ * /
+ \endcode
- you can rewrite it as
+ For the one-parameter version the braces can often be omitted.
+ The \\l command supports several kinds of links:
- \code
- / *!
- \target assertions
+ \list
- Assertions make some statement about the text at the
- point where they occur in the regexp but they do not
- match any characters.
+ \o \c {\l QWidget} - The name of a class documented with the \l
+ {class-command} {\\class} command.
- ...
+ \o \c {\l QWidget::sizeHint()} - The name of a member function,
+ documented with or without an \l {fn-command} {\\fn} command.
- Regexps are built up from expressions, quantifiers, and
- \l assertions.
- * /
- \endcode
+ \o \c {\l <QtGlobal>} - The subject of a \l {headerfile-command}
+ {\\headerfile} command.
- For the one-parameter version the braces can often
- be omitted. See the \l {i}{\\i} command for the \l
- {argument}{argument conventions}.
+ \o \c {\l widgets/wiggly} - The relative path used in an \l
+ {example-command} {\\example} command.
- The \\l command supports several kinds of links:
+ \o \c {\l {QWidget Class Reference}} - The title used in a
+ \l {title-command} {\\title} command.
- \list
- \o \c {\l QWidget} - a defined \l {class}{\\class}
- \o \c {\l QWidget::sizeHint()} - a defined member
- function (\l {fn}{\\fn})
- \o \c {\l <QtGlobal>} - a defined \l {headerfile}{\\headerfile}
- \o \c {\l widgets/wiggly} - a defined
- \l {example-command}{\\example}
- \o \c {\l {QWidget Class Reference}} - a defined \l {title}{\\title}
- \o \c {\l {Introduction}}- a defined \l{part}{\\part},
- \l{chapter}{\\chapter} or \l {sectionOne}{\\section...}
- \o \c {\l fontmatching} - a defined \l {target}{\\target}
- \o \c {\l {Shared Classes}} - a defined \l {keyword}{\\keyword}
- \o \c {\l network.html} - a defined \l {page}{\\page}
- \o \c {\l http://www.trolltech.com/} - a URL
- \endlist
+ \o \c {\l {Introduction to QDoc}}- The text from one of the
+ \l{part-command} {\\part}, \l{chapter} {\\chapter} or \l
+ {sectionOne-command} {\\section} commands.
- QDoc also tries to make a link out of any words that don't
- resemble any normal English words, for example Qt class
- names or functions, like QWidget or QWidget::sizeHint(). In
- these cases, the \\l command can actually be omitted, but
- by using the command, you ensure that QDoc will emit a
- warning if it cannot find the link target. In addition, if
- you only want the function name to appear in the link, you
- can use the following syntax:
+ \o \c {\l fontmatching} - The argument of a \l {target-command}
+ {\\target} command.
- \list
- \o \c {\l {QWidget::}{sizeHint()}}
- \endlist
+ \o \c {\l {Shared Classes}} - A keyword named in a \l
+ {keyword-command} {\\keyword} command.
- See also \l {sa}{\\sa}, \l {target}{\\target} and \l
- {keyword}{\\keyword}.
+ \o \c {\l network.html} - The file name used in a \l
+ {page-command} {\\page} command.
- \row
- \o \bold \\sa \target sa
- \o \bold {The \\sa command defines a list of links that will
- be rendered in a separate "See also" section at the bottom
- of the documentation.}
+ \o \c {\l http://www.trolltech.com/} - A URL.
- The command takes a comma-separated list of links as its
- argument. If the line ends with a comma, you can continue
- on a second line. The general syntax is:
+ \endlist
- \code
- \sa {the first link}, {the second link},
- {the third link}, ...
- \endcode
+ QDoc also tries to make a link out of any words that don't
+ resemble any normal English words, for example Qt class names or
+ functions, like QWidget or QWidget::sizeHint(). In these cases,
+ the \\l command can actually be omitted, but by using the command,
+ you ensure that QDoc will emit a warning if it cannot find the
+ link target. In addition, if you only want the function name to
+ appear in the link, you can use the following syntax:
- QDoc will automatically try to generate "See also" links
- interconnecting a property's various functions. For
- example, an setVisible() function will automatically get a
- link to visible() and vice versa.
+ \list
+ \o \c {\l {QWidget::} {sizeHint()}}
+ \endlist
- In general, QDoc will generate "See also" links that
- interconnect the functions that access the same
- property. It recognizes four different syntax versions:
+ QDoc renders this as:
- \list
- \o \c property()
- \o \c setProperty()
- \o \c isProperty()
- \o \c hasProperty()
- \endlist
+ \quotation
+ \l {QWidget::} {sizeHint()}
+ \endquotation
- The \\sa command supports the same kind
- of links as the \l {l}{\\l} command. For example:
+ See also \l {sa-command} {\\sa}, \l {target-command} {\\target}
+ and \l {keyword-command} {\\keyword}.
- \code
- / *!
- Appends the actions \a actions to this widget's
- list of actions.
- \sa removeAction(), QMenu, addAction()
- * /
- void QWidget::addActions(QList<QAction *> actions)
- {
- ...
- }
- \endcode
+ \target sa-command
+ \section1 \\sa (see also)
- will be rendered as
+ The \\sa command defines a list of links that will be rendered in
+ a separate "See also" section at the bottom of the documentation
+ unit.
- \quotation
- \bold {void QWidget::addActions ( QList<QAction*>
- \i actions )}
+ The command takes a comma-separated list of links as its
+ argument. If the line ends with a comma, you can continue
+ the list on the next line. The general syntax is:
- Appends the actions \i actions to this widget's
- list of actions.
+ \code
+ \sa {the first link}, {the second link},
+ {the third link}, ...
+ \endcode
- See also \l {QWidget::removeAction()}{removeAction()},
- \l QMenu, and \l {QWidget::addAction()}{addAction()}.
- \endquotation
+ QDoc will automatically try to generate "See also" links
+ interconnecting a property's various functions. For example, a
+ setVisible() function will automatically get a link to visible()
+ and vice versa.
- See also \l {l}{\\l}, \l {target}{\\target} and \l
- {keyword}{\\keyword}.
+ In general, QDoc will generate "See also" links that interconnect
+ the functions that access the same property. It recognizes four
+ different syntax versions:
- \row
- \o \bold \\target \target target
- \o \bold {The \\target command defines an explicit point in the
- documentation that you can later link to using the \l {l}{\\l}
- and \l {sa}{\\sa} commands.}
+ \list
+ \o \c property()
+ \o \c setProperty()
+ \o \c isProperty()
+ \o \c hasProperty()
+ \endlist
- The command considers the rest of the line as part of its
- argument, make sure to follow the target name with a line
- break.
+ The \\sa command supports the same kind of links as the \l
+ {l-command} {\\l} command.
- For example:
+ \code
+ / *!
+ Appends the actions \a actions to this widget's
+ list of actions.
+
+ \sa removeAction(), QMenu, addAction()
+ * /
+ void QWidget::addActions(QList<QAction *> actions)
+ {
+ ...
+ }
+ \endcode
- \code
- / *!
- \target capturing parentheses
- \section1 Capturing Text
+ QDoc renders this as:
- Parentheses allow us to group elements together so that
- we can quantify and capture them.
+ \quotation
+ \bold {void QWidget::addActions ( QList<QAction*>
+ \e actions )}
- ...
- * /
- \endcode
+ Appends the actions \e actions to this widget's list of
+ actions.
- can be referenced with
+ See also \l {QWidget::removeAction()} {removeAction()},
+ \l QMenu, and \l {QWidget::addAction()} {addAction()}.
+ \endquotation
- \list
- \o \c {\l {capturing parentheses}}
- (from elsewhere in the same comment)
- \o \c {\l qregexp.html#capturing-parentheses}
- (from anywhere else)
- \endlist
+ See also \l {l-command} {\\l}, \l {target-command} {\\target} and
+ \l {keyword-command} {\\keyword}.
- within a documentation unit, and with
- \list
- \o \c {\l http://www.trolltech.com/4.0/doc/html/qregexp.html#capturing-parentheses}
- \endlist
+ \target target-command
+ \section1 \\target
- on a more global scale.
+ The \\target command names a place in the documentation that you
+ can link to using the \l {l-command} {\\l (link)} and \l
+ {sa-command} {\\sa (see also)} commands.
- If the target name does't contain any spaces, the brackets can
- be omitted as well.
+ The text up to the line break becomes the target name. Be sure to
+ follow the target name with a line break. Curly brackets are not
+ required around the target name, but they may be required when the
+ target name is used in a link cammand. See below.
- See also \l {l}{\\l}, \l {sa}{\\sa} and \l
- {keyword}{\\keyword}.
+ \code
+ / *!
+ \target capturing parentheses
+ \section1 Capturing Text
- \row
- \o \bold \\keyword \target keyword
- \o \bold {The \\keyword command defines an explicit point in the
- documentation that you can later link to using the \l {l}{\\l}
- and \l {sa}{\\sa} commands.}
+ Parentheses allow us to group elements together so that
+ we can quantify and capture them.
- Keywords must be unique within the entire set of
- documentation processed in on QDoc run. The command
- considers the rest of the line as part of its argument,
- make sure to follow the keyword with a line break.
+ ...
+ * /
+ \endcode
- The \\keyword command is similar to \l {target}{\\target},
- but stronger. A keyword can be referenced from anywhere
- using a simple syntax. For example:
+ The target name \e{capturing parentheses} can be linked from
+ within the same document containing the target in two ways:
- \code
- / *!
- \class QRegExp
- \reentrant
- \brief The QRegExp class provides pattern
- matching using regular expressions.
- \ingroup tools
- \ingroup misc
- \ingroup shared
- \mainclass
+ \list
+ \o \c {\l {capturing parentheses}} (from within the same qdoc comment)
+ \o \c {\l qregexp.html#capturing-parentheses} (from elsewhere in the same document)
+ \endlist
- \keyword regular expression
+ \note The brackets in the link example are required because the
+ target name contains spaces.
- Regular expressions, or "regexps", provide a way to
- find patterns within text.
+ From other documents, the target name can be linked this way:
- ...
- * /
- \endcode
+ \list
+ \o \c {\l http://www.trolltech.com/4.0/doc/html/qregexp.html#capturing-parentheses}
+ \endlist
- can be referenced like this
+ See also \l {l-command} {\\l}, \l {sa-command} {\\sa} and \l
+ {keyword-command} {\\keyword}.
- \code
- / *!
- When a string is surrounded by slashes, it's
- interpreted as a \l regular expression.
- * /
- \endcode
+ \target keyword-command
+ \section1 \\keyword
- which will be rendered as
+ The \\keyword command names a place in the documentation that you
+ can link to using the \l {l-command} {\\l (link)} and \l
+ {sa-command} {\\sa (see also)} commands.
- \quotation
- When a string is surrounded by slashes, it's
- interpreted as a \l {regular expression}.
- \endquotation
+ The \\keyword command is like the \l {target-command} {\\target}
+ command, but stronger. A keyword can be linked from anywhere using
+ a simple syntax.
- If the keyword does't contain any spaces, the brackets can
- be omitted as well.
+ Keywords must be unique over all the documents processed during
+ the QDoc run. The command uses the rest of the line as its
+ argument. Be sure to follow the keyword with a line break.
- See also \l {l}{\\l}, \l {sa}{\\sa} and \l
- {target}{\\target}.
- \endtable
-*/
-/*!
- \page 09-qdoc-commands-graphic.html
- \previouspage Linking Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Container Commands
+ \code
+ / *!
+ \class QRegExp
+ \reentrant
+ \brief The QRegExp class provides pattern
+ matching using regular expressions.
+ \ingroup tools
+ \ingroup misc
+ \ingroup shared
+ \mainclass
- \title Graphic Commands
+ \keyword regular expression
- The graphic commands makes it possible to include images in the
- documentation. The images can be rendered as separate paragraphs,
- or within running text.
+ Regular expressions, or "regexps", provide a way to
+ find patterns within text.
- \section1 Alphabetical List
+ ...
+ * /
+ \endcode
- \l {09-qdoc-commands-graphic.html#caption}{\\caption},
- \l {09-qdoc-commands-graphic.html#image}{\\image},
- \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
+ The location marked with the keyword can be linked with:
- \section1 Command Descriptions
+ \code
+ / *!
+ When a string is surrounded by slashes, it is
+ interpreted as a \l {regular expression}.
+ * /
+ \endcode
- \table
- \header
- \o Command
- \o Description
+ QDoc renders this as:
- \row
- \o \bold \\image \target image
- \o \bold {The \\image command expands to the image specified by its
- argument, and renders it centered as a separate paragraph.}
+ \quotation
+ When a string is surrounded by slashes, it's
+ interpreted as a \l {regular expression}.
+ \endquotation
- The \\image command replaces the old \\img command. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#image-versus-img}
- {compatibility} section.
+ If the keyword text contains spaces, the brackets are required.
- The command takes two arguments. The first is the name of
- the image file. The second argument is optional and is a
- simple description of the image equivalent to the HTML
- alt="" in an image tag. The description is used for
- tooltips, and when a browser doesn't support images like
- the Lynx text browser.
+ See also \l {l-command} {\\l (link)}, \l {sa-command} {\\sa (see
+ also)} and \l {target-command} {\\target}.
- The command considers the rest of the line after the file
- name its second argument, make sure that you follow the
- filename or description with a line break. Braces are only
- necessary if the description spans several lines.
+*/
- For example:
+/*!
+ \page 09-qdoc-commands-includingimages.html
+ \previouspage Creating Links
+ \contentspage Table of Contents
+ \nextpage Tables and Lists
- \code
- / *!
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development.
+ \title Including Images
- \image happyguy.jpg "Happy guy"
+ The graphic commands makes it possible to include images in the
+ documentation. The images can be rendered as separate paragraphs,
+ or within running text.
- Qt provides single-source portability across Microsoft
- Windows, Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded devices.
- * /
- \endcode
+ \target image-command
+ \section1 \\image
- will be rendered as
+ The \\image command expands to the image specified by its first
+ argument, and renders it centered as a separate paragraph.
- \quotation
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development.
+ The \\image command replaces the old \\img command. For more
+ information, see the \l
+ {26-qdoc-commands-compatibility.html#image-versus-img}
+ {compatibility} section.
- \image happyguy.jpg image "Happy guy"
+ The command takes two arguments. The first argument is the name of
+ the image file. The second argument is optional and is a simple
+ description of the image, equivalent to the HTML alt="" in an image
+ tag. The description is used for tooltips, and for when a browser
+ doesn't support images, like the Lynx text browser.
- Qt provides single-source portability across Microsoft
- Windows, Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded devices.
- \endquotation
+ The remaining text \e{after} the file name is the optional,
+ description argument. Be sure to follow the file name or the
+ description with a line break. Curly brackets are required if the
+ description argument spans multiple lines.
- See also \l {inlineimage}{\\inlineimage} and \l
- {caption}{\\caption}.
+ \code
+ / *!
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
- \row
- \o \bold \\inlineimage \target inlineimage
- \o \bold {The \\inlineimage command expands to the image
- specified by its argument; the image is rendered inline
- with the rest of the text.}
+ \image happyguy.jpg "Happy guy"
- The command takes two arguments. The first is the name of
- the image file. The second argument is optional and is a
- simple description of the image equivalent to the HTML
- alt="" in an image tag. The description is used for
- tooltips, and when a browser doesn't support images like
- the Lynx text browser.
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ * /
+ \endcode
- The most common use of the \\inlineimage command is in
- lists and tables. For example:
+ QDoc renders this as:
- \code
- / *!
- \list 1
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endlist
- * /
- \endcode
+ \quotation
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
- will be rendered as
+ \image happyguy.jpg image "Happy guy"
- \list 1
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endlist
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ \endquotation
- And
+ See also \l {inlineimage-command} {\\inlineimage} and \l
+ {caption-command} {\\caption}.
- \code
- / *!
- \table
- \header
- \o Trolltech
- \o Trolltech
- \row
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \row
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endtable
- * /
- \endcode
+ \target inlineimage-command
+ \section1 \\inlineimage
- will be rendered as
+ The \\inlineimage command expands to the image specified by its
+ argument. The image is rendered inline with the rest of the text.
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
- <tr valign="top" bgcolor="#a2c511">
- <th>Trolltech</th>
- <th>Trolltech</th>
- </tr>
+ The command takes two arguments. The first argument is the name of
+ the image file. The second argument is optional and is a simple
+ description of the image, equivalent to the HTML alt="" in an image
+ tag. The description is used for tooltips, and for when a browser
+ doesn't support images, like the Lynx text browser.
- <tr valign="top" bgcolor="#f0f0f0">
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- </tr>
+ The most common use of the \\inlineimage command is in lists and
+ tables. Here is an example of including inline images in a list:
- <tr valign="top" bgcolor="#f0f0f0">
- <td><img src="images/happy.gif" alt="Oh so happy!"/>
- </td>
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- </tr>
+ \code
+ / *!
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
+ * /
+ \endcode
- </table>
- \endraw
+ QDoc renders this as:
- The command can also be used to insert an image
- inline with the regular text. For example:
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
- \code
- / *!
- \inlineimage training.jpg Training by Trolltech
- The Qt Programming course is offered as a
- five day Open Enrollment Course. The classes
- are open to the public.While the course is open
- to anyone who wants to learn, attendees should
- have significant experience in C++ development
- to derive maximum benefit from the course.
- * /
- \endcode
+ Her eis an example of including inline images in a table:
- will be rendered as
+ \code
+ / *!
+ \table
+ \header
+ \o Trolltech
+ \o Trolltech
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endtable
+ * /
+ \endcode
- \quotation
- \inlineimage training.jpg Training by Trolltech
- The Qt Programming course is offered as a
- five day Open Enrollment Course. The classes
- are open to the public.While the course is open
- to anyone who wants to learn, attendees should
- have significant experience in C++ development
- to derive maximum benefit from the course.
- \endquotation
+ QDoc renders this as:
- See also \l {image}{\\image} and \l {caption}{\\caption}.
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Trolltech</th>
+ <th>Trolltech</th>
+ </tr>
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!"/>
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+ </table>
+ \endraw
- \row
- \o \bold \\caption \target caption
- \o \bold {The \\caption command provides a caption for an image.}
+ The command can also be used to insert an image inline with the
+ text.
- The command follows the same conventions for parentheses and use
- of braces for its \l argument as the \l {i}{\\i} command.
+ \code
+ / *!
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ * /
+ \endcode
- \warning This is preliminary functionality. The
- command is not fully implemented.
+ QDoc renders this as:
- See also \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage}
+ \quotation
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ \endquotation
- \endtable
-*/
+ See also \l {image-command} {\\image} and \l {caption-command} {\\caption}.
-/*!
- \page 10-qdoc-commands-container.html
- \previouspage Graphic Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Document Contents Commands
+ \target caption-command
+ \section1 \\caption
- \title Container Commands
+ The \\caption command provides a caption for an image.
- The container commands create tables and lists with associated
- items and contents. A list is rendered left aligned as a separate
- paragraph. A table is rendered centered as a separate paragraph,
- and its width depends on its content.
+ The command takes all the text up to the end of the paragraph to
+ be the caption. Experiment until you get the effect you want.
- \section1 Alphabetical List
+ \code
+ / *!
+ \table 100%
+ \row
+ \o \image windowsvista-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+ \o \image windowsvista-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+ \endtable
+ * /
+ \endcode
- \l {10-qdoc-commands-container.html#header}{\\header},
- \l {10-qdoc-commands-container.html#list}{\\list},
- \l {10-qdoc-commands-container.html#o}{\\o},
- \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue},
- \l {10-qdoc-commands-container.html#row}{\\row},
- \l {10-qdoc-commands-container.html#table}{\\table},
- \l {10-qdoc-commands-container.html#value}{\\value}
+ QDoc renders this as:
- \section1 Command Descriptions
+ \table 100%
+ \row
+ \o \image windowsvista-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+ \o \image windowsvista-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+ \endtable
- \table
- \header
- \o Command
- \o Description
+ See also \l {image-command} {\\image} and \l {inlineimage-command}
+ {\\inlineimage}
+*/
- \row
- \o \bold \\table \target table
- \o \bold {The \\table command and the corresponding \\endtable
- command delimit the contents of a table.}
+/*!
+ \page 10-qdoc-commands-tablesandlists.html
+ \previouspage Including Images
+ \contentspage Table of Contents
+ \nextpage Special Content
+
+ \title Tables and Lists
- The command accepts a single argument specifying the
- table's width in percentage:
+ These commands enable creating lists and tables. A list is
+ rendered left aligned as a separate paragraph. A table is rendered
+ centered as a separate paragraph. The table width depends on the
+ width of its contents.
+
+ \target table-command
+ \section1 \\table
+
+ The \\table and \\endtable commands delimit the contents of a
+ table.
+
+ The command accepts a single argument specifying the table's width
+ as a percentage of the page width:
\code
/ *!
@@ -2424,15 +2566,15 @@
* /
\endcode
- The code above ensures that the table will fill all
- available space. If the table's width is smaller than 100 %,
- the table will be centered in the generated documentation.
+ The code above ensures that the table will fill all available
+ space. If the table's width is smaller than 100 %, the table will
+ be centered in the generated documentation.
- A table can contain headers, rows and columns. A row starts
- with a \l {row}{\\row} command and consists of cells, which
- starts with a \l {o}{\\o} command. There is also a \l
- {header}{\\header} command which is a special kind of row
- with a special formatting. For example:
+ A table can contain headers, rows and columns. A row starts with a
+ \l {row-command} {\\row} command and consists of cells, which
+ starts with a \l {o-command} {\\o} command. There is also a \l
+ {header-command} {\\header} command which is a special kind of row
+ with a special formatting.
\code
/ *!
@@ -2458,7 +2600,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2498,8 +2640,8 @@
</table>
\endraw
- You can also make cells span several rows and columns. For
- example:
+ You can also make cells span several rows and columns. For
+ example:
\code
/ *!
@@ -2519,7 +2661,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2" cellspacing="1"
@@ -2548,20 +2690,20 @@
</table>
\endraw
- See also \l {header}{\\header}, \l {row}{\\row} and \l {o}{\\o}.
+ See also \l {header-command} {\\header}, \l {row-command} {\\row} and \l {o-command} {\\o}.
- \row
- \o \bold \\header \target header
- \o \bold {The \\header command indicates that the following
- table cells are the current table's column headers.}
+ \target header-command
+ \section1 \\header
- The command can only be used within the \l{table}
- {\\table...\\endtable} commands. A header can contain
- several cells. A cell is created with the \l {o}{\\o}
- command.
+ The \\header command indicates that the following table cells are
+ the current table's column headers.
- A header cell's text is centered within the table cell and
- rendered using a bold font. For example:
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} commands. A header can contain several
+ cells. A cell is created with the \l {o-command} {\\o} command.
+
+ A header cell's text is centered within the table cell and
+ rendered using a bold font.
\code
/ *!
@@ -2577,7 +2719,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2598,23 +2740,22 @@
</table>
\endraw
- See also \l {table}{\\table}, \l {row}{\\row} and \l {o}{\\o}.
+ See also \l {table-command} {\\table}, \l {row-command} {\\row} and \l {o-command} {\\o}.
- \row
- \o \bold \\row \target row
- \o \bold {The \\row command indicates that the following table
- cells belong to the same row in the current table.}
+ \target row-command
+ \section1 \\row
- The command can only be used within the \l{table}
- {\\table...\\endtable} commands. A row can contain
- several cells. A cell is created with the \l {o}{\\o}
- command.
+ The \\row command begins a new row in a table. The \l {o-command}
+ {\\o items} that belong in the new row will immediately follow the
+ \\row.
- The background cell color of each row alternate between two
- shades of grey, making it easier to distinguish the rows
- from each other. The cells' contents is left aligned.
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} commands. A row can contain several
+ cells. A cell is created with the \l {o-command} {\\o} command.
- For example:
+ The background cell color of each row alternates between two
+ shades of grey, making it easier to distinguish the rows from each
+ other. The cells' contents is left aligned.
\code
/ *!
@@ -2640,7 +2781,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2680,44 +2821,45 @@
</table>
\endraw
- See also \l {table}{\\table}, \l {header}{\\header} and \l
- {o}{\\o}.
+ See also \l {table-command} {\\table}, \l {header-command}
+ {\\header} and \l {o-command} {\\o}.
- \row
- \o \bold \\value \target value
- \o \bold {The \\value command starts the documentation of a C++ enum
- item}.
+ \target value-command
+ \section1 \\value
- The command's first argument is the enum item. Then follows
- its associated description. The description argument ends
- at the next blank line or \\value. The arguments are
- rendered within a table.
+ The \\value command starts the documentation of a C++ enum item.
- The documentation will be located in the associated class,
- header file or namespace documentation. See the \l
- {enum}{\\enum} documentation for an example.
+ The command's first argument is the enum item. Then follows its
+ associated description. The description argument ends at the next
+ blank line or \\value. The arguments are rendered within a table.
- See also \l {enum}{\\enum} and \l {omitvalue}{\\omitvalue}.
+ The documentation will be located in the associated class, header
+ file or namespace documentation. See the \l {enum-command}
+ {\\enum} documentation for an example.
- \row
- \o \bold \\omitvalue \target omitvalue
- \o \bold {The \\omitvalue command excludes a C++ enum item
- from the documentation}.
+ See also \l {enum-command} {\\enum} and \l {omitvalue-command} {\\omitvalue}.
- The command's only argument is the name of the enum item
- that will be omitted. See the \l {enum}{\\enum}
- documentation for an example.
+ \target omitvalue-command
+ \section1 \\omitvalue
- See also \l {enum}{\\enum} and \l {value}{\\value}.
+ The \\omitvalue command excludes a C++ enum item from the
+ documentation.
- \row
- \o \bold \\list \target list
- \o \bold {The \\list command and the corresponding \\endlist
- command delimit a list of items.}
+ The command's only argument is the name of the enum item that will
+ be omitted. See the \l {enum-command} {\\enum} documentation for
+ an example.
+
+ See also \l {enum-command} {\\enum} and \l {value-command}
+ {\\value}.
+
+ \target list-command
+ \section1 \\list
- You need to create each list item explicitly using the \l
- {o}{\\o} command. A list can contain one or more items; it
- can also be nested. For example:
+ The \\list and \\endlist commands delimit a list of items.
+
+ Create each list item with the \l {o-command} {\\o} command. A
+ list always contains one or more items. Lists can be nested. For
+ example:
\code
/ *!
@@ -2738,7 +2880,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\list
\o Qt Reference Documentation: Getting Started
@@ -2755,8 +2897,8 @@
\endlist
\endlist
- The \\list command takes an optional argument providing
- alternative appearances for the list items. For example:
+ The \\list command takes an optional argument providing
+ alternative appearances for the list items.
\code
/ *!
@@ -2768,7 +2910,7 @@
* /
\endcode
- will render the list items with bullets (the default):
+ QDoc renders the list items with bullets (the default):
\list
\o How to Learn Qt
@@ -2776,9 +2918,12 @@
\o Tutorial and Examples
\endlist
- If you provide 'A' as an argument to the \\list command,
- the bullets are replaced with characters following in
- alphabetical order:
+ \warning There appears to be a bug in qdoc3 here. If you include
+ any of the argument types, you get a numeric list. We're looking
+ into it.
+
+ If you provide 'A' as an argument to the \\list command, the
+ bullets are replaced with characters in alphabetical order:
\list A
\o How to Learn Qt
@@ -2786,8 +2931,8 @@
\o Tutorial and Examples
\endlist
- If you replace 'A' with '1', the list items are rendered
- with numbers following in ascending order:
+ If you replace 'A' with '1', the list items are numbered in
+ ascending order:
\list 1
\o How to Learn Qt
@@ -2796,8 +2941,8 @@
\endlist
- If you provide 'i' as the argument, the default bullets are
- replaced with roman numerals:
+ If you provide 'i' as the argument, the bullets are replaced with
+ roman numerals:
\list i
\o How to Learn Qt
@@ -2805,9 +2950,9 @@
\o Tutorial and Examples
\endlist
- Or finally, you can make the list items appear with roman
- numbers following in ascending order if you provide 'I' as
- the optional argument:
+ Finally, you can make the list items appear with roman numbers
+ following in ascending order if you provide 'I' as the optional
+ argument:
\list I
\o How to Learn Qt
@@ -2815,9 +2960,9 @@
\o Tutorial and Examples
\endlist
- You can also make the listing start at any character or
- number by simply provide the number or character you want
- to start at. For example:
+ You can also make the listing start at any character or number by
+ simply provide the number or character you want to start at. For
+ example:
\code
/ *!
@@ -2829,7 +2974,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\list G
\o How to Learn Qt
@@ -2837,30 +2982,30 @@
\o Tutorial and Examples
\endlist
- See also \l {o}{\\o}.
+ See also \l {o-command} {\\o}.
- \row
- \o \bold \\o \target o
- \o \bold {The \\o command announce a table or list item.}
+ \target o-command
+ \section1 \\o (cell, item)
+
+ The \\o command announce a table or list item.
- Earlier we used the \l {i}{\\i} command for this purpose. For more
- information see the \l
- {26-qdoc-commands-compatibility.html#o-versus-i}{compatibility}
- section.
+ Earlier we used the \l {i-command} {\\i} command for this
+ purpose. For more information see the \l
+ {26-qdoc-commands-compatibility.html#o-versus-i} {compatibility}
+ section.
- The command can only be used within the \l{table}
- {\\table...\\endtable} or \l{list}{\\list... \\endlist}
- commands.
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} or \l{list-command} {\\list... \\endlist}
+ commands.
- It considers everything until the next occurrence
- of the \\o command, or the currently applicable \l
- {table}{\\endtable} or \l {list}{\\endlist} command, as its
- argument. For examples, see \l {table}{\\table} and \l
- {list}{\\list}.
+ It considers everything until the next occurrence of the \\o
+ command, or the currently applicable \l {table-command}
+ {\\endtable} or \l {list-command} {\\endlist} command, as its
+ argument. For examples, see \l {table-command} {\\table} and \l
+ {list-command} {\\list}.
- If the command is used within a table, you can in addition
- specify how many rows or columns the item should span. For
- example:
+ If the command is used within a table, you can in addition specify
+ how many rows or columns the item should span.
\code
/ *!
@@ -2880,7 +3025,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2" cellspacing="1"
@@ -2909,333 +3054,133 @@
</table>
\endraw
- If not specified, the item will span one column and one row.
+ If not specified, the item will span one column and one row.
+
+ See also \l {table-command} {\\table}, \l {header-command}
+ {\\header}, \l {list-command} {\\list} and \l {o-command} {\\o}.
- See also \l {table}{\\table}, \l {header}{\\header},
- \l {list}{\\list} and \l {o}{\\o}.
- \endtable
*/
/*!
- \page 11-qdoc-commands-documentcontents.html
- \previouspage Container Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Miscellaneous Commands
+ \page 11-qdoc-commands-specialcontent.html
+ \previouspage Tables and Lists
+ \contentspage Table of Contents
+ \nextpage Miscellaneous
- \title Document Contents Commands
+ \title Special Content
The document contents commands identify parts of the documentation,
i.e. parts with a special rendering, conceptual meaning or
function.
- \section1 Alphabetical List
-
- \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
- \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
- \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
- \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
- \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents},
- \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
- \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
-
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\abstract \target abstract
- \o \bold {The \\abstract command and the corresponding \\endabstract
- command delimit a document's abstract section.}
-
- The abstract section is rendered as an indented italicized
- paragraph.
+ \target abstract-command
+ \section1 \\abstract
- \warning This is preliminary funcionality. The
- command is not fully implemented. Currently, the abstract
- section is rendered as a regular HTML paragraph. For
- example:
+ The \\abstract and \\endabstract commands delimit a
+ document's abstract section.
- \code
- / *!
- \abstract
- Qt by Trolltech is a C++ toolkit for cross-platform
- GUI application development. Qt provides
- single-source portability across Microsoft Windows,
- Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded
- devices.
- \endabstract
- * /
- \endcode
+ The abstract section is rendered as an indented italicized
+ paragraph.
- will be rendered as
-
- \abstract
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development. Qt provides single-source
- portability across Microsoft Windows, Mac OS X, Linux,
- and all major commercial Unix variants. It is also
- available for embedded devices.
- \endabstract
-
- \row
- \o \bold \\quotation \target quotation
- \o \bold { The \\quotation command and the corresponding
- \\endquotation command delimit a quotation remark.}
-
- This command replaces the old \\quote command. For more
- information see the \l
- {26-qdoc-commands-compatibility.html#quotation-versus-quote}
- {compatibility} section.
-
- The remark is rendered as a separate centered
- paragraph. For example:
-
- \code
- / *!
- While the prospect of a significantly broader market is
- good news for Firstlogic, the notion also posed some
- challenges. Dave Dobson, director of technology for the La
- Crosse, Wisconsin-based company, said:
-
-
- \quotation
- As our solutions were being adopted into new
- environments, we saw an escalating need for easier
- integration with a wider range of enterprise
- applications.
- \endquotation
- * /
- \endcode
-
- will be rendered as
-
- While the prospect of a significantly broader market is
- good news for Firstlogic, the notion also posed some
- challenges. Dave Dobson, director of technology for the La
- Crosse, Wisconsin-based company, said:
-
- \quotation
- As our solutions were being adopted into new
- environments, we saw an escalating need for easier
- integration with a wider range of enterprise
- applications.
- \endquotation
-
- \row
- \o \bold \\footnote \target footnote
- \o \bold {The \\footnote command and the corresponding
- \\endfootnote command delimit a footnote.}
-
- The footnote follows the standard conventions, rendered at the
- bottom of the page.
-
- \warning This is preliminary funcionality. The
- command is not fully implemented.
-
- For example:
-
- \code
- / *!
- In Qt 4 we have tried to simplify the constructors of
- QObject/QWidget subclasses. This makes subclassing
- easier, at the same time as it helps make the Qt
- library more efficient.
-
- \footnote
- Constructors no longer take a "const char *name"
- parameter. If you want to specify a name for a QObject,
- you must call QObject::setObjectName() after
- construction. The object name is now a QString.
- \endfootnote
-
- QWidget's WFlags data type has been split in two:
- Qt::WindowFlags specifies low-level window flags (the
- type of window and the frame style), whereas
- Qt::WidgetAttribute specifies various higher-level
- attributes about the widget (e.g.,
- WA_StaticContents).
- * /
- \endcode
-
- will be rendered as
-
- \quotation
- In Qt 4 we have tried to simplify the constructors of
- QObject/QWidget subclasses. This makes subclassing
- easier, at the same time as it helps make the Qt
- library more efficient.
-
- \footnote
- Constructors no longer take a "const char *name"
- parameter. If you want to specify a name for a QObject,
- you must call QObject::setObjectName() after
- construction. The object name is now a QString.
- \endfootnote
-
- QWidget's WFlags data type has been split in two:
- Qt::WindowFlags specifies low-level window flags (the
- type of window and the frame style), whereas
- Qt::WidgetAttribute specifies various higher-level
- attributes about the widget (e.g.,
- WA_StaticContents).
- \endquotation
-
- \row
- \o \bold \\tableofcontents \target tableofcontents
- \o \bold {The \\tableofcontents command generates a
- table displaying the titles of the current documentation
- unit's parts, chapters, sections, etc.}
-
- The command accepts a single optional argument:
-
- \code
- \tableofcontents sectionN
- \endcode
-
- where \c sectionN is the deepest section to include (by
- default all sections are included).
-
- For example, it the documentation unit's structure looks
- something like this:
-
- \quotation
- \raw HTML
- <a name="Basic Qt">
- <h1>Basic Qt</h1>
- </a>
- <p>This is the first part.</p>
-
- <a name="Getting started">
- <h2>Getting Started</h2>
- </a>
- This is the first part's first chapter.</p>
-
- <a name="Hello Qt">
- <h3>Hello Qt</h3>
- </a>
- <p>This is the first chapter's first section.</p>
-
- <a name="Making Connections">
- <h3>Making Connections</h3>
- </a>
- <p>This is the first chapter's second section.</p>
+ \warning The \bold{\\abstract} and \bold{\\endabstract} commands
+ have not been implemented. The abstract section is rendered as a
+ regular HTML paragraph.
- <a name="Using the Reference Documentation">
- <h3>Using the Reference Documentation</h3>
- </a>
- <p>This is the first chapter's third section.</p>
+ \target quotation-command
+ \section1 \\quotation
- <a name="Creating Dialogs">
- <h2>Creating Dialogs</h2>
- </a>
- <p>This is the first part's second chapter.</p>
+ The \\quotation and \\endquotation commands delimit a long quotation.
- <a name="Subclassing QDialog">
- <h3>Subclassing QDialog</h3>
- </a>
- <p>This is the second chapter's first section.</p>
+ The text in the delimited block is surrounded by
+ \bold{<blockquote>} and \bold{</blockquote>} in the html output,
+ e.g.:
- ...
+ \code
+ / *!
+ While the prospect of a significantly broader market is
+ good news for Firstlogic, the notion also posed some
+ challenges. Dave Dobson, director of technology for the La
+ Crosse, Wisconsin-based company, said:
+
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
+ * /
+ \endcode
- <a name="Intermediate Qt">
- <h1>Intermediate Qt</h1>
- </a>
- <p>This is the second part.</p>
+ The text in the \bold{\\quotation} block will appear in the generated HTML as:
- <a name="Layout Management">
- <h2>Layout Management</h2>
- </a>
- <p>This is the second part's first chapter.</p>
+ \code
+ <blockquote>
+ <p>As our solutions were being adopted into new environments,
+ we saw an escalating need for easier integration with a wider
+ range of enterprise applications.</p>
+ </blockquote>
+ \endcode
- <a name="Basic Layouts">
- <h3>Basic Layouts</h3>
- </a>
- <p>This is the first chapter's first section.</p>
+ The built-in style sheet for most browsers will render the
+ contents of the <blockquote> tag with left and right
+ indentations. The example above would be rendered as:
- ...
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
- \endraw
- \endquotation
+ But you can redefine the \bold{<blockquote>} tag in your style.css file.
- Then
+ This command replaces the old \\quote command. For more
+ information see the \l
+ {26-qdoc-commands-compatibility.html#quotation-versus-quote}
+ {compatibility} section.
- \code
- / *!
- Contents:
+ \target footnote-command
+ \section1 \\footnote
- \tableofcontents
+ The \\footnote and \\endfootnote commands delimit a footnote.
- ...
- * /
- \endcode
+ The footnote is rendered at the bottom of the page.
- will expand to
+ \warning The \bold{\\footnote} and \bold{\\endfootnote} commands
+ have not been implemented. The footnote is rendered as a regular
+ HTML paragraph.
- \quotation
- \raw HTML
- <p>Contents:</p>
+ \target tableofcontents-command
+ \section1 \\tableofcontents
- <ul>
- <li><a href="#Basic Qt">Basic Qt</a></li>
- <ul>
- <li><a href="#Getting Started">Getting Started</a></li>
- <ul>
- <li><a href="#Hello Qt">Hello Qt</a></li>
- <li><a href="#Making Connections">
- Making Connections</a></li>
- <li><a href="#Using the Reference Documentation">
- Using the Reference Documentation</a></li>
- </ul>
- <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
- <ul>
- <li><a href="#Subclassing QDialog">
- Subclassing QDialog</a></li>
- </ul>
- </ul>
- <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
- <ul>
- <li><a href="#Layout Management">Layout Management</a></li>
- <ul>
- <li><a href="#Basic Layouts">Basic Layouts</a></li>
- </ul>
- </ul>
- </ul>
+ The \\tableofcontents command has been disabled because QDoc
+ now generates a table of contents automatically.
- ...
- \endraw
- \endquotation
+ The automatically generated table of contents appears in the upper
+ righthand corner of the page.
- Each table entry becomes a link to the corresponding part,
- chapter or section.
+ \target brief-command
+ \section1 \\brief
- \row
- \o \bold \\brief \target brief
- \o \bold {The \\brief command introduces a one-sentence
- description of a class, namespace, header file, property
- or variable.}
+ The \\brief command introduces a one-sentence description of a
+ class, namespace, header file, property or variable.
- The brief text is used to introduce the documentation of
- the associated object, and in lists generated using the \l
- {generatelist}{\\generatelist} command.
+ The brief text is used to introduce the documentation of the
+ associated object, and in lists generated using the \l
+ {generatelist-command} {\\generatelist} command.
- The \\brief command can be used in two significant
- different ways: \l {brief class}{One for classes,
- namespaces and header files}, and \l {brief property}{one
- for properties and variables}.
+ The \\brief command can be used in two significant different ways:
+ \l {brief class} {One for classes, namespaces and header files},
+ and \l {brief-property} {one for properties and variables}.
- \target brief property
+ \target brief-property
- When the \\brief command is used to describe a property or
- a variable, the brief text must only be a sentence fragment
- and start with "whether" (for boolean properties and
- variables) or "the" (for any other property or variable).
+ When the \\brief command is used to describe a property or a
+ variable, the brief text must be a sentence fragment starting with
+ "whether" (for a boolean property or variable) or starting with
+ "the" (for any other property or variable).
- For example the boolean QWidget::isWindow property:
+ For example the boolean QWidget::isWindow property:
\code
/ *!
@@ -3270,7 +3215,7 @@
* /
\endcode
- The latter will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -3292,28 +3237,21 @@
\endlist
See also \l
- {QWidget::frameGeometry()}{frameGeometry()}, \l
- {QWidget::rect()}{rect()}, ...
+ {QWidget::frameGeometry()} {frameGeometry()}, \l
+ {QWidget::rect()} {rect()}, ...
\endquotation
- \target brief class
+ \target brief class
- When the \\brief command is used to describe a class, the
- brief text should be a complete sentence and must start
- like this:
+ When the \\brief command is used to describe a class, the brief
+ text should be a complete sentence and must start like this:
\code
The <classname> class is|provides|contains|specifies...
\endcode
- and likewise when the command is used for namespaces or
- header files.
-
- \warning The brief statement is used as the first
- paragraph of the detailed description. Do not repeat the
- sentence.
-
- For example:
+ \warning The brief statement is used as the first paragraph of the
+ detailed description. Do not repeat the sentence.
\code
/ *!
@@ -3333,7 +3271,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -3342,7 +3280,7 @@
The PreviewWindow class is a custom widget displaying
the names of its currently set window flags in a
- read-only text editor. \l {preview window}{More...}
+ read-only text editor. \l {preview window} {More...}
\raw HTML
<h3>Properties</h3>
@@ -3358,8 +3296,8 @@
\endraw
\list
- \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
- \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
+ \o \l {constructor} {PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function} {setWindowFlags}(Qt::WindowFlags flags)
\endlist
\list
@@ -3395,13 +3333,14 @@
<hr />
<h2>Detailed Description</h2>
\endraw
+
The PreviewWindow class is a custom widget displaying
the names of its currently set window flags in a
read-only text editor.
The PreviewWindow class inherits QWidget. The widget
displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
+ {function} {setWindowFlags()} function. It is also
provided with a QPushButton that closes the window.
...
@@ -3418,7 +3357,7 @@
<h3>PreviewWindow(QWidget *parent = 0)</h3>
\endraw
- Constructs a preview window widget with \i parent.
+ Constructs a preview window widget with \e parent.
\target function
\raw HTML
@@ -3434,7 +3373,7 @@
the text in the widgets text editor.
\endquotation
- Using \\brief with a namespace can for example look like this:
+ Using \\brief in a \l{namespace-command}{\\namespace}:
\code
/ *!
@@ -3445,8 +3384,7 @@
* /
\endcode
- and finally using \\brief with a header file can look
- something like this:
+ Using \\brief in a \l{headerfile-command}{\\headerfile}:
\code
/ *!
@@ -3460,107 +3398,83 @@
* /
\endcode
- See also \l{property}{\\property}, \l{class}{\\class},
- \l{namespace}{\\namespace} and \l{headerfile}{\\headerfile}.
-
- \row
- \o \bold \\legalese \target legalese
- \o \bold {The \\legalese command, and the corresponding \\endlegalese
- command, delimit a licence agreement.}
-
- If the \\endlegalese command is omitted, QDoc will still
- process the \\legalese command but considers the rest of
- the documentation page as the license agreement.
-
- Ideally, the license documentation is located where the
- licensed code is used.
-
- Later the documentation identified by the \\legalese
- command can be accumulated into a list using the \l
- {generatelist}{\\generatelist} command with the \c legalese
- argument. This is useful to generate an overview of all the
- licenses associated with the source code.
-
- For example:
-
- \code
- \ * !
- ...
-
- On X11, Qt also supports drops via the Motif Drag \&
- Drop Protocol. The implementation incorporates some
- code that was originally written by Daniel Dardailler,
- and adapted for Qt by Matt Koss \<koss@napri.sk\> and
- Trolltech. Here is the original copyright notice:
-
- \legalese
- \code
-
- Copyright 1996 Daniel Dardailler.
-
- Permission to use, copy, modify, distribute, and sell
- this software for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in
- all copies and that both that copyright notice and this
- permission notice appear in supporting documentation,
- and that the name of Daniel Dardailler not be used in
- advertising or publicity pertaining to distribution of
- the software without specific, written prior
- permission. Daniel Dardailler makes no representations
- about the suitability of this software for any
- purpose. It is provided "as is" without express or
- implied warranty.
-
- Modifications Copyright 1999 Matt Koss, under the same
- license as above.
-
- \ endcode
- \endlegalese
- * /
- \endcode
-
- will be rendered as
+ See also \l{property-command} {\\property}, \l{class-command}
+ {\\class}, \l{namespace-command} {\\namespace} and
+ \l{headerfile-command} {\\headerfile}.
- \quotation
- ...
+ \target legalese-command
+ \section1 \\legalese
- On X11, Qt also supports drops via the Motif Drag \&
- Drop Protocol. The implementation incorporates some
- code that was originally written by Daniel Dardailler,
- and adapted for Qt by Matt Koss \<koss@napri.sk\> and
- Trolltech. Here is the original copyright notice:
+ The \\legalese and \\endlegalese commands delimit a licence agreement.
- \legalese
- \code
-
- Copyright 1996 Daniel Dardailler.
+ In the generated HTML, the delimited text is surrounded by a \bold
+ {<div class="LegaleseLeft">} and \bold {</div>} tags.
- Permission to use, copy, modify, distribute, and sell
- this software for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in
- all copies and that both that copyright notice and this
- permission notice appear in supporting documentation,
- and that the name of Daniel Dardailler not be used in
- advertising or publicity pertaining to distribution of
- the software without specific, written prior
- permission. Daniel Dardailler makes no representations
- about the suitability of this software for any
- purpose. It is provided "as is" without express or
- implied warranty.
+ For example, here is a license agreement enclosed in \\legalese
+ and \\endlegalese:
- Modifications Copyright 1999 Matt Koss, under the same
- license as above.
-
- \endcode
- \endlegalese
- \endquotation
-
- \row
- \o \bold \\warning \target warning
- \o \bold {The \\warning command renders a "Warning:" prefix to
- the command's argument.}
+ \code
+ / *!
+ \legalese
+ Copyright 1996 Daniel Dardailler.
+
+ Permission to use, copy, modify, distribute, and sell this
+ software for any purpose is hereby granted without fee,
+ provided that the above copyright notice appear in all
+ copies and that both that copyright notice and this
+ permission notice appear in supporting documentation, and
+ that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission. Daniel
+ Dardailler makes no representations about the suitability of
+ this software for any purpose. It is provided "as is"
+ without express or implied warranty.
+
+ Modifications Copyright 1999 Matt Koss, under the same
+ license as above.
+ \endlegalese
+ * /
+ \endcode
- For example:
+ It will appear in the generated HTML as:
+
+ \code
+ <div class="LegaleseLeft">
+ <p>Copyright 1996 Daniel Dardailler.</p>
+ <p>Permission to use, copy, modify, distribute, and sell
+ this software for any purpose is hereby granted without fee,
+ provided that the above copyright notice appear in all
+ copies and that both that copyright notice and this
+ permission notice appear in supporting documentation, and
+ that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission. Daniel
+ Dardailler makes no representations about the suitability of
+ this software for any purpose. It is provided "as is"
+ without express or implied warranty.</p>
+
+ <p>Modifications Copyright 1999 Matt Koss, under the same
+ license as above.</p>
+ </div>
+ \endcode
+
+ If the \\endlegalese command is omitted, QDoc will process the
+ \\legalese command but considers the rest of the documentation
+ page as the license agreement.
+
+ Ideally, the license text is located with the licensed code.
+
+ Elsewhere, the documentation identified as \e{\\legalese} command
+ can be accumulated using \l {generatelist-command} {\\generatelist}
+ with \c {legalese-command} as the argument. This is useful for
+ generating an overview of the license agreements associated with
+ the source code.
+
+ \target warning-command
+ \section1 \\warning
+
+ The \\warning command prepends "Warning:" to the command's
+ argument, in bold font.
\code
/ *!
@@ -3573,7 +3487,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
Qt::HANDLE is a platform-specific handle type
@@ -3583,50 +3497,31 @@
\warning Using this type is not portable.
\endquotation
- \endtable
+
*/
/*!
\page 12-0-qdoc-commands-miscellaneous.html
- \previouspage Document Contents Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Topical Commands
+ \previouspage Special Content
+ \contentspage Table of Contents
+ \nextpage The QDoc Configuration File
- \title Miscellaneous Commands
+ \title Miscellaneous
- These commands provide miscellaneous functions
- connected to the visual appearance of the documentation, and to the
- process of generating the documentation.
+ These commands provide miscellaneous functions connected to the
+ visual appearance of the documentation, and to the process of
+ generating the documentation.
- \section1 Alphabetical List
+ \target expire-command
+ \section1 \\expire
- \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
- \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
- \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
- \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
- \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
- \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
- \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
- \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode}
+ The \\expire command allows you to define an expiration
+ date for your documentation.
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\expire \target expire
- \o \bold {The \\expire command allows you to define an expiration
- date for your documentation.}
-
- When using the \\expire command, QDoc will emit a warning
- when the current date is larger than the specified
- date. The command accepts one argument; the argument's
- format is yyyy-mm-dd. For example:
+ When using the \\expire command, QDoc will emit a warning when the
+ current date is larger than the specified date. The command
+ accepts one argument; the argument's format is yyyy-mm-dd. For
+ example:
\code
/ *!
@@ -3645,23 +3540,24 @@
* /
\endcode
- If you run QDoc on 4 July 2005, it will emit the warning
+ If you run QDoc on 4 July 2005, it will emit the warning
\quotation
porting.qdoc:6: Documentation expired 185 days ago
\endquotation
- \row
- \o \bold \\generatelist \target generatelist
- \o \bold {The \\generatelist command expands to a list of
- various documentation or links to documentation.}
- For example in the Qt Reference Documentation:
+ \target generatelist-command
+ \section1 \\generatelist
+
+ The \\generatelist command expands to a list of various
+ documentation or links to documentation. Below is an example from
+ the Qt Reference Documentation:
\code
/ *!
\page classes.html
- \title All Qt Classes (main index)
+ \title All Classes
For a shorter list that only includes the most
frequently used classes, see \l{Qt's Main Classes}. For
@@ -3672,434 +3568,308 @@
* /
\endcode
- is used to generate \l {All Qt Classes (main index)}.
-
- The command accepts the following arguments:
-
- \target table example
-
- \list
- \o \c annotatedclasses
-
- The \c annotatedclasses argument provides a table
- containing the names of all the classes, and a
- description of each class. Each class name is a link to
- the class's reference documentation.
-
- For example:
-
- \quotation
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdial.html">
- QDial</a>
- </td>
- <td>Rounded range control (like a speedometer
- or potentiometer)</td>
- </tr>
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdialog.html">
- QDialog</a>
- </td>
- <td>The base class of dialog windows</td>
- </tr>
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdir.html">
- QDir</a>
- </td>
- <td>Access to directory structures and their
- contents</td>
- </tr>
- </table>
- \endraw
- \endquotation
-
- A class is identified within the documentation by the
- the \l {class}{\\class} command, and the descriptions
- are based on the argument of the \l {brief}{\\brief}
- commands in the class documentation.
-
- \target list example
-
- \o \c classes
-
- The \c classes argument provides a complete alphabetical
- list of the classes. Each class name is a link to the
- class's reference documentation.
-
- For example:
-
- \quotation
- \raw HTML
- <p><table width="100%">
-
- <tr>
- <td align="right"><b>A&nbsp;</b></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractbutton.html">QAbstractButton</a></td>
+ This generates the \l {All Classes} page. The command accepts the
+ following arguments:
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionmanager.html">QAbstractExtensionManager</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemmodel.html">QAbstractItemModel</a></td>
- </tr>
-
- <tr>
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstracteventdispatcher.html">QAbstractEventDispatcher</a></td>
+ \target table example
+ \section2 \c annotatedclasses
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractformbuilder.html">QAbstractFormBuilder</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemview.html">QAbstractItemView</a></td>
- </tr>
+ The \c annotatedclasses argument provides a table containing the
+ names of all the classes, and a description of each class. Each
+ class name is a link to the class's reference documentation. For
+ example:
- <tr>
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionfactory.html">QAbstractExtensionFactory</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemdelegate.html">QAbstractItemDelegate</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractlistmodel.html">QAbstractListModel</a></td>
- </tr>
- </table></p>
- \endraw
- \endquotation
-
- A class is identified within the documentation by the
- the \l {class}{\\class} command.
-
- \o \c classesbymodule
+ \table
+ \row
+ \o QDial
+ \o Rounded range control (like a speedometer or potentiometer)
+ \row
+ \o QDialog
+ \o The base class of dialog windows
+ \row
+ \o QDir
+ \o Access to directory structures and their contents
+ \endtable
- This particular argument requests an additional argument,
- i.e. a specification of the module.
+ A C++ class is documented with the \l {class-command} {\\class}
+ command. The annotation for the class is taken from the argument
+ of the class comment's \l {brief-command} {\\brief} command.
- For example:
+ \target list example
+ \section2 \c classes
- \code
- / *!
- \page qtgui.html
- \contentspage Qt Classes by Module
- \previouspage QtCore Classes
- \nextpage QtNetwork Classes
+ The \c classes argument provides a complete alphabetical list of
+ the classes. Each class name is a link to the class's reference
+ documentation. This command is uded to generate the \l
+ {classes.html} {All Classes} page this way:
- \title QtGui Classes
+ \code
+ / *!
+ \page classes.html
+ \title All Classes
+ \ingroup classlists
- \keyword QtGui
+ \brief If you know the name of the class you want, find it here.
- \generatelist {classesbymodule QtGui}
- * /
- \endcode
+ This is a list of all Qt classes. For a list of the classes
+ provided for compatibility with Qt3, see \l{Qt3 Support
+ Classes}. For classes that have been deprecated, see the
+ \l{Obsolete Classes} list.
- Together, these arguments provide a table containing the
- classes considered members of the specified module,
- accompanied with a brief description. Each class name is
- a link to the class's reference documentation.
+ \generatelist classes
+ * /
+ \endcode
- The generated table is rendered similarily to the one
- generated when using the \l {table example}{\c
- annotatedclasses} argument.
+ A C++ class is documented with the \l {class-command} {\\class}
+ command.
- For the basic classes in Qt, a class's module is
- determined by its location, i.e. its directory. However,
- for extensions, like ActiveQt and Qt Designer, a class
- is related to a module with the \l
- {inmodule}{\\inmodule} command.
+ \section2 \c classesbymodule
- \o \c classesbyedition
+ When this argument is used, a second argument is required, which
+ specifies the module whose classes are to be listed. QDoc
+ generates a table containing those classes. Each class is listed
+ with the text of its \l{brief-command} {\\brief} command.
- This particular argument requests an additional argument,
- i.e. a specification of the edition.
+ This command is used to generate the \l {phonon-module.html}
+ {Phonon Module} page this way.
- For example:
+ \code
+ / *!
+ \page phonon-module.html
+ \module Phonon
+ \title Phonon Module
+ \ingroup modules
- \code
- / *!
- \page console-edition-classes.html
- \title Qt Console Edition Classes
+ \brief The Phonon module contains namespaces and classes for multimedia functionality.
- \generatelist{classesbyedition Console}
- * /
- \endcode
+ \generatelist{classesbymodule Phonon}
- Together, these arguments provide a table containing the
- classes considered members of the specified edition,
- accompanied with a brief description. Each class name is
- a link to the class's reference documentation.
+ ...
- The edition a given class can be found in is determined by
- the module it belongs to.
+ * /
+ \endcode
- \o \c compatclasses
+ Each class that is a member of the specified module must be marked
+ with the \l {inmodule-command} {\\inmodule} command in its \\class
+ comment.
- The \c compatclasses argument provides a complete and
- alphabetical list of the support classes. A support
- class is identified within the documentation by the \l
- {compat}{\\compat} command. Each class name is a link to
- the class's reference documentation. The list is
- rendered similarily to the list generated by the \l
- {list example}{\c classes} argument.
+ \section2 \c compatclasses
- \warning The \c classesbymodule argument will at some
- point replace the this argument.
+ The \c compatclasses argument generates a list in alphabetical
+ order of the support classes. It is normally used only to
+ generate the \l {compatclasses.html} {Qt3 Support Classes} page
+ this way:
- \o \c functionindex
+ \code
+ / *!
+ \page compatclasses.html
+ \title Qt3 Support Classes
+ \ingroup classlists
- The \c functionindex argument provides a complete
- alphabetical list of all the documented member
- functions.
+ \brief These classes ease the porting of code from Qt 3 to Qt 4.
- For example:
+ These are the classes that Qt provides for compatibility with Qt
+ 3. Most of these are provided by the Qt3Support module.
- \quotation
- \raw HTML
- <p><center><font size="+1"><b><a href="#a">A</a>&nbsp;<a href="#b">B</a>&nbsp;<a href="#c">C</a>&nbsp;<a href="#d">D</a>&nbsp;<a href="#e">E</a>&nbsp;<a href="#f">F</a>&nbsp;<a href="#g">G</a>&nbsp;<a href="#h">H</a>&nbsp;<a href="#i">I</a>&nbsp;<a href="#j">J</a>&nbsp;<a href="#k">K</a>&nbsp;<a href="#l">L</a>&nbsp;<a href="#m">M</a>&nbsp;<a href="#n">N</a>&nbsp;<a href="#o">O</a>&nbsp;<a href="#p">P</a>&nbsp;<a href="#q">Q</a>&nbsp;<a href="#r">R</a>&nbsp;<a href="#s">S</a>&nbsp;<a href="#t">T</a>&nbsp;<a href="#u">U</a>&nbsp;<a href="#v">V</a>&nbsp;<a href="#w">W</a>&nbsp;<a href="#x">X</a>&nbsp;<a href="#y">Y</a>&nbsp;<a href="#z">Z</a>&nbsp;</b></font></center></p>
+ \generatelist compatclasses
+ * /
+ \endcode
- <p>DTDHandler: <a href="http://qt.nokia.com/doc/4.0/qxmlreader.html#DTDHandler">QXmlReader</a></p>
+ A support class is identified in the \\class comment with the \l
+ {compat-command} {\\compat} command.
- <p>QAXCLASS: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXCLASS">global</a></p>
+ \section2 \c functionindex
- <p>QAXFACTORY_BEGIN: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_BEGIN">global</a></p>
+ The \c functionindex argument provides a complete alphabetical
+ list of all the documented member functions. It is normally used
+ only to generate the \l {functions.html} {Qt function index} page
+ this way:
- <p>QAXFACTORY_DEFAULT: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_DEFAULT">global</a></p>
+ \code
+ / *!
+ \page functions.html
+ \title All Functions
+ \ingroup funclists
- <p>QAXFACTORY_END: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_END">global</a></p>
+ \brief All documented Qt functions listed alphabetically with a
+ link to where each one is declared.
- \endraw
+ This is the list of all documented member functions and global
+ functions in the Qt API. Each function has a link to the
+ class or header file where it is declared and documented.
- ...
- \endquotation
-
- \o \c legalese
-
- The \c legalese argument provides a complete list of all
- the licenses. The licenses are identified within the
- documentation using the \l {legalese}{\\legalese}
- command.
-
- For example:
-
- \quotation
- \raw HTML
- <hr />
- <p>
- Copyright (c) 1989 The Regents of the
- University of California. All rights reserved.
- </p>
-
- <p>
- Redistribution and use in source and binary
- forms are permitted provided that the above
- copyright notice and this paragraph are
- duplicated in all such forms and that any
- documentation, advertising materials, and other
- materials related to such distribution and use
- acknowledge that the software was developed by
- the University of California, Berkeley...
- </p>
-
- <ul>
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qdate.html#weekNumber">QDate::weekNumber()</a>
- </li>
- </ul>
-
- <hr />
- <p>
- Copyright (c) 1991 by AT&amp;T.
- </p>
-
- <p>
- Permission to use, copy, modify, and distribute
- this software for any purpose without fee is
- hereby granted, provided that this entire notice
- is included in all copies of any software which
- is or includes a copy or modification of this
- software and in all copies of the supporting
- documentation for such software...
- </p>
-
- <ul>
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qlocale.html">QLocale</a>
- </li>
- </ul>
- <hr />
- \endraw
- ...
- \endquotation
+ \generatelist functionindex
+ * /
+ \endcode
- \o \c mainclasses
+ \section2 \c legalese
- The \c mainclasses argument provides a complete
- alphabetical list of the main classes. Each class name
- is a link to the class's reference documentation. A
- class is related to the group of main classes by using
- the \l {mainclass}{\\mainclass} command.
+ The \c legalese argument tells QDoc to generate a complete list of
+ licenses in the documentation. Each license is identified using
+ the \l {legalese-command} {\\legalese} command. This command is
+ used to generate the \l {licenses.html} {Qt license information}
+ page this way:
- The list is rendered similarily to the list generated by
- the \l {list example}{\c classes} argument.
+ \code
+ / *!
+ \page licenses.html
+ \title Other Licenses Used in Qt
+ \ingroup licensing
+ \brief Information about other licenses used for Qt components and third-party code.
+
+ Qt contains some code that is not provided under the
+ \l{GNU General Public License (GPL)},
+ \l{GNU Lesser General Public License (LGPL)} or the
+ \l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
+ specific licenses from the original authors. Some pieces of code were developed
+ by Nokia and others originated from third parties.
+ This page lists the licenses used, names the authors, and links
+ to the places where it is used.
+
+ Nokia gratefully acknowledges these and other contributions
+ to Qt. We recommend that programs that use Qt also acknowledge
+ these contributions, and quote these license statements in an
+ appendix to the documentation.
+
+ See also: \l{Licenses for Fonts Used in Qt for Embedded Linux}
+
+ \generatelist legalese
+ * /
+ \endcode
- \o \c overviews
+ \section2 \c mainclasses
- The \c overviews argument provides a complete
- alphabetical overview of the documentation. Each list
- entry is a link to the respective documentation page.
+ The \c mainclasses argument tells QDoc to generate an alphabetical
+ list of the main classes. A class is marked as a main class by
+ including a \l {mainclass-command} {\\mainclass} command in the
+ \\class comment.
- The list includes pages declared using commands like \l
- {page}{\\page} and \l {group}{\\group}. The list omits
- examples and classes, and only lists the first page of
- documentation that contains two or more pages using
- commands like \l {nextpage}{\\nextpage}.
+ \note The Qt documentation no longer includes a main classes page,
+ but you can generate one for your main classes if you want it.
- For example:
+ \section2 \c overviews
- \quotation
- \raw HTML
- <ul>
+ The \c overviews argument is used to tell QDoc to generate a list
+ by concatenating the contents of all the \l {group-command}
+ {\\group} pages. Qt uses it to generate the \l {overviews.html}
+ {overviews} page this way:
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qtalgorithms.html">
- &lt;QtAlgorithms&gt; - Generic Algorithms
- </a>
- </li>
+ \code
+ / *!
+ \page overviews.html
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qtglobal.html">
- &lt;QtGlobal&gt; - Global Qt Declarations
- </a>
- </li>
+ \title All Overviews and HOWTOs
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qaxserver-demo-simple.html">
- A standard ActiveX and the &quot;simple&quot; ActiveQt widget
- </a>
- </li>
+ \generatelist overviews
+ * /
+ \endcode
- <li>
- <a href="http://qt.nokia.com/doc/4.0/aboutqt.html">
- About Qt
- </a>
- </li>
+ \section2 \c related
- <li>
- <a href="http://qt.nokia.com/doc/4.0/trolltech.html">
- About Trolltech
- </a>
- </li>
+ The \c related argument is used in combination with the \l
+ {group-command} {\\group} and \l {ingroup-command} {\\ingroup}
+ commands to list all the overviews related to a specified
+ group. For example, the page for the \l {Programming with Qt}
+ {Programming with Qt} page is generated this way:
- <li>
- <a href="http://qt.nokia.com/doc/4.0/abstractwidgets.html">
- Abstract Widget Classes
- </a>
- </li>
+ \code
+ / *!
+ \group qt-basic-concepts
+ \title Programming with Qt
- <li>
- <a href="http://qt.nokia.com/doc/4.0/accessibility.html">
- Accessibility Classes
- </a>
- </li>
- ...
- </ul>
- \endraw
- \endquotation
+ \brief The basic architecture of the Qt cross-platform application and UI framework.
- \o \c related
+ Qt is a cross-platform application and UI framework for
+ writing web-enabled applications for desktop, mobile, and
+ embedded operating systems. This page contains links to
+ articles and overviews explaining key components and
+ techniuqes used in Qt development.
- The \c related argument is used in combination with the
- \l {group}{\\group} command to list all the overviews
- related to the given group. Each list entry is a link to
- the respective documentation page.
+ \generatelist {related}
+ * /
+ \endcode
- \o \c relatedinline
+ Each page listed on this group page contains the command:
- The \c related argument is used in combination with the
- \l {group}{\\group} command to collect all documentation
- related to the given group. The various documentation
- snippets are copied directly into the group page.
+ \code
+ \ingroup qt-basic-concepts
+ \endcode
- \o \c service
+ \section2 \c service
- The \c service argument provides a complete alphabetical
- list of the services. Each service name is a link to the
- service's reference documentation.
+ The \c service argument tells QDoc to generate an alphabetical
+ list of the services. Each service name is a link to the service's
+ reference documentation.
- A service is identified within the documentation by the
- \l {service}{\\service} command.
+ A service is identified with the \l {service-command} {\\service}
+ command.
- \endlist
+ \note This command and the \l {service-command} {\\service}
+ command are not used in the Qt documentation.
+ \target if-command
+ \section1 \\if
- \row
- \o \bold \\if \target if
- \o \bold {The \\if command and the corresponding \\endif command
- enclose parts of a QDoc comment that only will be included if
- the condition specified by the command's argument is true.}
+ The \\if command and the corresponding \\endif command
+ enclose parts of a QDoc comment that only will be included if
+ the condition specified by the command's argument is true.
- The command reads the rest of the line and parses it as an
- C++ #if statement. For example:
+ The command reads the rest of the line and parses it as an C++ #if
+ statement.
\code
/ *!
\if defined(opensourceedition)
\bold{Note:} This edition is for the development of
- \l{Qt Open Source Edition}{Free and Open Source}
+ \l{Qt Open Source Edition} {Free and Open Source}
software only; see \l{Qt Commercial Editions}.
\endif
* /
\endcode
- This QDoc comment will only be rendered if the \c
- opensourceedition preprocessor symbol is defined, and
- specified in the \l {definesvariable}{defines} variable in
- the configuration file to make QDoc process
- the code within #ifdef and #endif:
+ This QDoc comment will only be rendered if the \c
+ opensourceedition preprocessor symbol is defined, and specified in
+ the \l {defines-variable} {defines} variable in the configuration
+ file to make QDoc process the code within #ifdef and #endif:
\code
defines = opensourceedition
\endcode
- You can also define the preprocessor symbol manually on the
- command line. For more information see the documentation of
- the \l {definesvariable}{defines} variable.
+ You can also define the preprocessor symbol manually on the
+ command line. For more information see the documentation of the \l
+ {defines-variable} {defines} variable.
- See also \l{endif}{\\endif}, \l{else}{\\else}, \l
- {definesvariable}{defines} and \l falsehoods.
+ See also \l{endif-command} {\\endif}, \l{else-command} {\\else},
+ \l {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
- \row
- \o \bold \\endif \target endif
- \o \bold {The \\endif command and the corresponding \\if command
- enclose parts of a QDoc comment that will be included if
- the condition specified by the \l {if}{\\if} command's
- argument is true.}
+ \target endif-command
+ \section1 \\endif
- For more information, see the documentation of the \l
- {if}{\\if} command.
+ The \\endif command and the corresponding \\if command
+ enclose parts of a QDoc comment that will be included if
+ the condition specified by the \l {if-command} {\\if} command's
+ argument is true.
- See also \l{if}{\\if}, \l{else}{\\else}, \l
- {definesvariable}{defines} and \l falsehoods.
+ For more information, see the documentation of the \l {if-command}
+ {\\if} command.
- \row
- \o \bold \\else \target else
- \o \bold {The \\else command specifies an alternative if the
- condition in the \l {if}{\\if} command is false.}
+ See also \l{if-command} {\\if}, \l{else-command} {\\else}, \l
+ {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
+
+ \target else-command
+ \section1 \\else
+
+ The \\else command specifies an alternative if the
+ condition in the \l {if-command} {\\if} command is false.
- The \\else command can only be used within \l
- {if}{\\if...\\endif} commands, but is useful when there is
- only two alternatives. For example:
+ The \\else command can only be used within \l {if-command}
+ {\\if...\\endif} commands, but is useful when there is only two
+ alternatives.
\code
/ *!
@@ -4134,8 +3904,8 @@
* /
\endcode
- If the \c QT3_SUPPORT is defined, the comment will be rendered
- as
+ If the \c QT3_SUPPORT is defined, the comment will be rendered
+ like this:
\quotation
The Qt 3 support library is provided to keep old source
@@ -4146,8 +3916,8 @@
API to cohabit with the new one.
\endquotation
- If \c QT3_SUPPORT isn't defined but \c QT3_SUPPORT_WARNINGS
- is, the comment will be rendered as
+ If \c QT3_SUPPORT is not defined but \c QT3_SUPPORT_WARNINGS is
+ defined, the comment will be rendered like this:
\quotation
The Qt 3 support library is provided to keep old source
@@ -4186,32 +3956,35 @@
GCC 3.2+ and MSVC 7.)
\endquotation
- See also \l{if}{\\if}, \l{endif}{\\endif}, \l
- {definesvariable}{defines} and \l falsehoods.
-
- \row
- \o \bold \\include \target include
- \o \bold {The \\include command expands to the contents of the
- file specified by the command's argument.}
-
- \warning This is preliminary functionality. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#include-versus-input}
- {compatibility} section.
-
- The command takes a file name as an argument, and is
- useful when some piece of the documentation is used
- repeatedly: Move the repetetive text into a separate file,
- and use the \\include command whenever you want to insert
- the separate documentation.
-
- The contents of such a file should follow QDoc syntax,
- excluding the enclosing \c{/}\c{*!} ... \c{*}\c{/} marks.
- To ensure that QDoc won't attempt to read the file as a
- stand-alone piece of documentation, we recommend that you
- use the \c .qdocinc extension.
-
- For example:
+ See also \l{if-command} {\\if}, \l{endif-command} {\\endif}, \l
+ {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
+
+ \target include-command
+ \section1 \\include
+
+ The \\include command sends all or part of the file specified by
+ its first argument to the QDoc input stream to be processed as a
+ qdoc comment snippet. This command is often assigned the alias,
+ \e {input}, in the QDoc configuration file, e.g. \e {alias.include
+ = input}.
+
+ The command is useful when some snippet of commands and text is to
+ be used in multiple places in the documentation. In that case,
+ move the snippet into a separate file and use the \\include
+ command wherever you want to insert the snippet into the
+ documentation. To prevent QDoc from reading the file as a
+ stand-alone page of documentation, we recommend that you use the
+ \c .qdocinc extension for these \e {include} files.
+
+ The command can have either one or two arguments. The first
+ argument is always a file name. The contents of the file must be
+ QDoc input, i.e. a sequence of QDoc commands and text, but without
+ the enclosing qdoc comment \c{/}\c{*!} ... \c{*}\c{/} delimeters.
+ If you want to include the entire named file, don't use the second
+ argument. If you want to include only part of the file, see the
+ \l{2-argument-form}{two argument form} below. Here is an example
+ of the one argument form:
\code
/ *!
@@ -4224,33 +3997,65 @@
* /
\endcode
- will be rendered as
+ Here are links to the \c .qdocinc files used above:
+ \l{signalandslots.qdocinc}, \l{objectmodel.qdocinc},
+ \l{layoutmanagement.qdocinc}. QDoc renders this page as:
\quotation
\raw HTML
<h1>Core Features</h1>
\endraw
- \include examples/signalandslots.qdocinc
- \include examples/objectmodel.qdocinc
- \include examples/layoutmanagement.qdocinc
+ \input examples/signalandslots.qdocinc
+ \input examples/objectmodel.qdocinc
+ \input examples/layoutmanagement.qdocinc
\endquotation
- Here is the actual \c .qdocinc files: \l
- signalandslots.qdocinc, \l objectmodel.qdocinc, \l
- layoutmanagement.qdocinc
+ \target 2-argument-form}
+ \section2 \\include filename snippet-identifier
- \row
- \o \bold \\meta \target meta
- \o \bold {The \\meta command is the QDoc equivalent to the HTML
- \c meta tag.}
+ It is kind of a pain to make a separate \c .qdocinc file for every
+ QDoc include snippet you want to use in multiple places in the
+ documentation, especially given that you probably have to put the
+ copyright/license notice in every one of these files. So if you
+ have lots of these include snippets, you can put them all in a
+ single file if you want, and surround each one with:
+ \code
+ //! [snippet-id1]
+
+ QDoc commands and text...
+
+ //! [snippet-id1]
+
+ //! [snippet-id2]
+
+ More QDoc commands and text...
+
+ //! [snippet-id2]
+ \endcode
+
+ Then you can use the two-argument form of the command:
+
+ \code
+ \input examples/signalandslots.qdocinc snippet-id2
+ \input examples/objectmodel.qdocinc another-snippet-id
+ \endcode
+
+ It works as expected. The sequence of QDoc commands and text found
+ between the two tags with the same name as the second argument is
+ sent to the QDoc input stream. You can even nest these snippets,
+ although it's not clear why you would want to do that.
- The command accepts two arguments: The first argument (the
- following word) is equivalent to the HTML meta tag's \i
- name variable, and the second argument (the rest of the
- line) is equivalent to the tag's \i contents variable.
+ \target meta-command
+ \section1 \\meta
- For example:
+ The \\meta command is the QDoc equivalent to the HTML
+ \c meta tag.
+
+ The command accepts two arguments: The first argument (the
+ following word) is equivalent to the HTML meta tag's \e name
+ variable, and the second argument (the rest of the line) is
+ equivalent to the tag's \e contents variable.
\code
/ *!
@@ -4274,7 +4079,7 @@
* /
\endcode
- will be included in the generated HTML page as
+ QDoc renders this as:
\code
<head>
@@ -4284,13 +4089,12 @@
</head>
\endcode
- \row
- \o \bold \\omit \target omit
- \o \bold {The \\omit command and the correspondning \\endomit
- command delimit parts of the documentation that
- you want QDoc to skip.}
+ \target omit-command
+ \section1 \\omit
- For example:
+ The \\omit command and the correspondning \\endomit command
+ delimit parts of the documentation that you want QDoc to skip. For
+ example:
\code
/ *!
@@ -4314,7 +4118,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -4333,94 +4137,115 @@
</table>
\endraw
+ \target raw-command
+ \section1 \\raw \span {class="newStuff"} {(avoid)}
- \row
- \o \bold \\raw \target raw
- \o \bold {The \\raw command and the corresponding
- \\endraw command delimit a block of raw mark-up language code.}
+ The \\raw command and the corresponding
+ \\endraw command delimit a block of raw mark-up language code.
- The command takes an argument specifying the code's format;
- currently the only supported format is HTML.
+ \note Avoid using this command if possible, because it generates
+ DITA XML code that causes problems. If you are trying to generate
+ special table or list behavior, try to get the behavior you want
+ using the \l {span-command} {\\span} and \l {div-command} {\\div}
+ commands in your \l {table-command} {\\table} or \l {list-command}
+ {\\list}.
+
+ The command takes an argument specifying the code's format;
+ currently the only supported format is HTML.
- The \\raw command is useful if you want some special HTML
- effects in your documentation. For example:
+ The \\raw command is useful if you want some special HTML effects
+ in your documentation.
\code
/ *!
- Qt has some predefined QColor objects. For example:
+ Qt has some predefined QColor objects.
\raw HTML
<style type="text/css" id="colorstyles">
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
+ #color-blue { background-color: #0000ff; color: #ffffff }
+ #color-darkBlue { background-color: #000080; color: #ffffff }
+ #color-cyan { background-color: #00ffff; color: #000000 }
</style>
<p>
- <tt id="blue">Blue(#0000ff)</tt>,
- <tt id="darkBlue">dark blue(#000080)</tt> and
- <tt id="cyan">cyan(#00ffff)</tt>.
+ <tt id="color-blue">Blue(#0000ff)</tt>,
+ <tt id="color-darkBlue">dark blue(#000080)</tt> and
+ <tt id="color-cyan">cyan(#00ffff)</tt>.
+ </p>
\endraw
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
- Qt has some predefined QColor objects. For example:
+ Qt has some predefined QColor objects.
\raw HTML
<style type="text/css" id="colorstyles">
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
+ #color-blue { background-color: #0000ff; color: #ffffff }
+ #color-darkBlue { background-color: #000080; color: #ffffff }
+ #color-cyan { background-color: #00ffff; color: #000000 }
</style>
<p>
- <tt id="blue">Blue(#0000ff)</tt>,
- <tt id="darkBlue">dark blue(#000080)</tt> and
- <tt id="cyan">cyan(#00ffff)</tt>.
+ <tt id="color-blue">Blue(#0000ff)</tt>,
+ <tt id="color-darkBlue">dark blue(#000080)</tt> and
+ <tt id="color-cyan">cyan(#00ffff)</tt>.
+ </p>
\endraw
\endquotation
- \row
- \o \bold \\unicode \target unicode
- \o \bold {The \\unicode command allows you to insert an
- arbitrary Unicode character in the document.}
+ \note But you can achieve the exact same thing using qdoc
+ commands. In this case, all you have to do is include the color
+ styles in your style.css file. Then you can write:
+
+ \code
+ \tt {\span {id="color-blue"} {Blue(#0000ff)}},
+ \tt {\span {id="color-darkBlue"} {dark blue(#000080)}} and
+ \tt {\span {id="color-cyan"} {cyan(#00ffff)}}.
+ \endcode
+
+ ...which is rendered again as:
- The command takes an argument specifying the character as
- an integer. By default, base 10 is assumed, unless a '0x'
- or '0' prefix is specified (for base 16 and 8,
- respectively). For example:
+ \tt {\span {id="color-blue"} {Blue(#0000ff)}},
+ \tt {\span {id="color-darkBlue"} {dark blue(#000080)}} and
+ \tt {\span {id="color-cyan"} {cyan(#00ffff)}}.
+
+ \target unicode-command
+ \section1 \\unicode
+
+ The \\unicode command allows you to insert an arbitrary Unicode
+ character in the document.
+
+ The command takes an argument specifying the character as an
+ integer. By default, base 10 is assumed, unless a '0x' or '0'
+ prefix is specified (for base 16 and 8, respectively). For
+ example:
\code
O G\unicode{0xEA}nio e as Rosas
\unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
- \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \unicode 0x3A3 \e{a}\sub{\e{i}}
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
O G\unicode{0xEA}nio e as Rosas
\unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
- \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \unicode 0x3A3 \e{a}\sub{\e{i}}
\endquotation
-
- The \\raw command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation and use of
- braces} for the argument.
- \endtable
*/
/*!
\page 12-1-signalandslots.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title signalandslots.qdocinc
@@ -4429,8 +4254,8 @@
/*!
\page 12-2-objectmodel.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title objectmodel.qdocinc
@@ -4439,8 +4264,8 @@
/*!
\page 12-3-layoutmanagement.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title layoutmanagement.qdocinc
@@ -4448,71 +4273,54 @@
*/
/*!
- \page 13-qdoc-commands-topical.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Contextual Commands
-
- \title Topical Commands
-
- The topical commands tell QDoc what is being documented
- (i.e. existing units like classes, functions and examples), and
- some of the commands allows you to create extra pages.
-
- \section1 Alphabetical List
-
- \l {13-qdoc-commands-topical.html#class}{\\class},
- \l {13-qdoc-commands-topical.html#enum}{\\enum},
- \l {13-qdoc-commands-topical.html#example-command}{\\example},
- \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage},
- \l {13-qdoc-commands-topical.html#fn}{\\fn},
- \l {13-qdoc-commands-topical.html#group}{\\group},
- \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile},
- \l {13-qdoc-commands-topical.html#macro}{\\macro},
- \l {13-qdoc-commands-topical.html#module}{\\module},
- \l {13-qdoc-commands-topical.html#namespace}{\\namespace},
- \l {13-qdoc-commands-topical.html#page}{\\page},
- \l {13-qdoc-commands-topical.html#property}{\\property},
- \l {13-qdoc-commands-topical.html#service}{\\service},
- \l {13-qdoc-commands-topical.html#typedef}{\\typedef},
- \l {13-qdoc-commands-topical.html#variable}{\\variable},
+ \page 13-qdoc-commands-topics.html
+ \previouspage Command Index
+ \contentspage Table of Contents
+ \nextpage Context Commands
- \section1 General Description
+ \title Topic Commands
- When QDoc is processing a comment, it will try to connect the
- documentation to the source code. For that reason it will first
- look for the topical commands. If there is no such command, it
- will try to tie the documentation to the immediately following
- code. If there is no topical command, and the documentation cannot
- be tied to following code, the documentation is simply lost.
+ A topic command tells QDoc which source code element is being
+ documented. Some topic commands allow you to create documentation
+ pages that aren't tied to any underlying source code element.
- \target topical argument
+ When QDoc processes a QDoc comment, it tries to connect the
+ comment to an element in the source code by first looking for a
+ topic command that names the source code element. If there is no
+ topic command, QDoc tries to connect the comment to the source
+ code element that immediately follows the comment. If it can't do
+ either of these and if there is no topic command that indicates
+ the comment does not have an underlying source code element (e.g.
+ \l{page-command} {\\page}), then the comment is discarded.
- The documented unit's name is passed as the unique argument for
- all the topical commands. The argument's naming convention is the
- documented unit's complete name. For example:
+ \target topic argument
+
+ The name of the thing being documented is the unique argument for
+ each topic command. The naming convention is to use the complete
+ name.
\code
\enum QComboBox::InsertPolicy
\endcode
- Functions is a special case, the argument's naming convention for
- the \l {fn}{\\fn} command is that of the function's definition
- outside the class definition. For example:
+ The \l {fn-command} {\\fn} command is a special case. For the \l
+ {fn-command} {\\fn} command, use the function's signature
+ including the class qualifier.
\code
- \fn void PreviewWindow::setWindowFlags()
+ \fn void QGraphicsWidget::setWindowFlags(Qt::WindowFlags wFlags)
\endcode
- A topical command can appear anywhere in a comment, but must stand
- alone on its own line. If the argument spans several lines, make
- sure that each line (except the last one) is ended with a
+ A topic command can appear anywhere in a comment but must stand
+ alone on its own line. Best practice is to put the topic commend
+ at the top of the comment. If the argument spans several lines,
+ make sure that each line (except the last one) is ended with a
backslash. In addition QDoc counts parentheses, which means that
if it encounters a '(' it considers everything until the closing
')' as its argument.
- If a topical command is repeated with different arguments, the
- same documentation will appear for both the units. For example:
+ If a topic command is repeated with different arguments, the
+ same documentation will appear for both the units.
\code
/ *!
@@ -4532,232 +4340,224 @@
ControllerWindow::setWindowFlags() functions will get the same
documentation.
- \section1 Command Descriptions
+ \target class-command
+ \section1 \\class
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\class \target class
- \o \bold {The \\class command tells QDoc that a class is
- part of the public API, and lets you enter a detailed
- description.}
+ The \\class command is for documenting a C++ class. The argument
+ is the complete name of the class. The command tells QDoc that a
+ class is part of the public API, and lets you enter a detailed
+ description.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument, and supports
- nested classes, for example:
-
- \code
- / *!
- \class QMap::iterator
+ \code
+ / *!
+ \class QMap::iterator
- \brief The QMap::iterator class provides an STL-style
- non-const iterator for QMap and QMultiMap.
+ \brief The QMap::iterator class provides an STL-style
+ non-const iterator for QMap and QMultiMap.
- QMap features both \l{STL-style iterators} and
- \l{Java-style iterators}. The STL-style iterators ...
- * /
- \endcode
+ QMap features both \l{STL-style iterators} and
+ \l{Java-style iterators}. The STL-style iterators ...
+ * /
+ \endcode
- The generated HTML documentation for the specified class is
- put in \c <lower-case>classname.html. For example, the
- documentation for the \c PreviewWindow class is located in
- \c previewwindow.html.
+ The HTML documentation for the named class is written to a
+ \c{.html} file named from the class name, in lower case, and with
+ the double colon qulifier(s) replaced with '-'. For example, the
+ documentation for the \c QMap::Iterator class is written to \c
+ qmap-iterator.html.
- \target framework
+ \target framework
- In addition to render the detailed description, the \\class
- comand will generate the documentation framework, i.e. a
- list of the class's types, properties, functions, signals
- and slots with empty documentation.
+ The file contains the class description from the \\class comment,
+ plus the documentation generated from QDoc comments for all the
+ class members, i.e. a list of the class's types, properties,
+ functions, signals, and slots.
- The command is typically accompanied with a \l
- {brief}{\\brief} command, a \l {mainclass}{\\mainclass}
- command, an \l {ingroup}{\\ingroup} command and a \l
- {sa}{\\sa} command. For example:
+ In addition to the detailed description of the class, the \\class
+ comment typically contains a \l {brief-command} {\\brief} command
+ and one or more \l{Markup Commands}. See the \\class command for
+ any of the Qt class for examples. Here is a very simple example:
- \code
- / *!
- \class PreviewWindow
- \brief The PreviewWindow class is a custom widget
- displaying the names of its currently set
- window flags in a read-only text editor.
+ \code
+ / *!
+ \class PreviewWindow
+ \brief The PreviewWindow class is a custom widget
+ displaying the names of its currently set
+ window flags in a read-only text editor.
- \mainclass
- \ingroup miscellaneous
+ \ingroup miscellaneous
- The PreviewWindow class inherits QWidget. The widget
- displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
- provided with a QPushButton that closes the window.
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function} {setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
- ...
+ ...
- \sa QWidget
- * /
- \endcode
+ \sa QWidget
+ * /
+ \endcode
- will be rendered as
+ The way QDoc renders this \\class will depend a lot on your \c
+ {style.css} file, but the general outline of the class reference
+ page will look like this:
- \quotation
- \raw HTML
- <h1>PreviewWindow Class Reference</h1>
- \endraw
-
- The PreviewWindow class is a custom widget displaying
- the names of its currently set window flags in a
- read-only text editor. \l {preview window}{More...}
+ \quotation
+ \raw HTML
+ <h1>PreviewWindow Class Reference</h1>
+ \endraw
- \raw HTML
- <h3>Properties</h3>
- \endraw
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor. \l {preview window} {More...}
- \list
- \o 52 properties inherited from QWidget
- \o 1 property inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Properties</h3>
+ \endraw
- \raw HTML
- <h3>Public Functions</h3>
- \endraw
+ \list
+ \o 52 properties inherited from QWidget
+ \o 1 property inherited from QObject
+ \endlist
- \list
- \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
- \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
- \endlist
+ \raw HTML
+ <h3>Public Functions</h3>
+ \endraw
- \list
- \o 183 public functions inherited from QWidget
- \o 28 public functions inherited from QObject
- \endlist
+ \list
+ \o \l {constructor} {PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function} {setWindowFlags}(Qt::WindowFlags flags)
+ \endlist
- \raw HTML
- <h3>Public Slots</h3>
- \endraw
+ \list
+ \o 183 public functions inherited from QWidget
+ \o 28 public functions inherited from QObject
+ \endlist
- \list
- \o 17 public slots inherited from QWidget
- \o 1 public slot inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Public Slots</h3>
+ \endraw
- \raw HTML
- <h3>Additional Inherited Members</h3>
- \endraw
+ \list
+ \o 17 public slots inherited from QWidget
+ \o 1 public slot inherited from QObject
+ \endlist
- \list
- \o 1 signal inherited from QWidget
- \o 1 signal inherited from QObject
- \o 4 static public members inherited from QWidget
- \o 4 static public members inherited from QObject
- \o 39 protected functions inherited from QWidget
- \o 7 protected functions inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Additional Inherited Members</h3>
+ \endraw
- \target preview window
+ \list
+ \o 1 signal inherited from QWidget
+ \o 1 signal inherited from QObject
+ \o 4 static public members inherited from QWidget
+ \o 4 static public members inherited from QObject
+ \o 39 protected functions inherited from QWidget
+ \o 7 protected functions inherited from QObject
+ \endlist
- \raw HTML
- <hr />
- <h2>Detailed Description</h2>
- \endraw
+ \target preview window
- The PreviewWindow class is a custom widget displaying
- the names of its currently set window flags in a
- read-only text editor.
+ \raw HTML
+ <hr />
+ <h2>Detailed Description</h2>
+ \endraw
- The PreviewWindow class inherits QWidget. The widget
- displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
- provided with a QPushButton that closes the window.
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor.
- ...
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function} {setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
- See also QWidget.
+ ...
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- \endraw
+ See also QWidget.
- \target constructor
- \raw HTML
- <h3>PreviewWindow(QWidget *parent = 0)</h3>
- \endraw
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ \endraw
- Constructs a preview window widget with \i parent.
+ \target constructor
+ \raw HTML
+ <h3>PreviewWindow(QWidget *parent = 0)</h3>
+ \endraw
- \target function
- \raw HTML
- <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
- \endraw
+ Constructs a preview window widget with \e parent.
- Sets the widgets flags using the
- QWidget::setWindowFlags() function.
+ \target function
+ \raw HTML
+ <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
+ \endraw
- Then runs through the available window flags,
- creating a text that contains the names of the flags
- that matches the flags parameter, displaying
- the text in the widgets text editor.
- \endquotation
+ Sets the widgets flags using the
+ QWidget::setWindowFlags() function.
- \row
- \o \bold \\enum \target enum
- \o \bold {The \\enum command allows you to document a C++ enum.}
+ Then runs through the available window flags,
+ creating a text that contains the names of the flags
+ that matches the flags parameter, displaying
+ the text in the widgets text editor.
+ \endquotation
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ \target enum-command
+ \section1 \\enum
- The enum items are documented using the \l {value}{\\value}
- command. If an item isn't documented, QDoc will emit a
- warning. This can be avoided using the \l
- {omitvalue}{\\omitvalue} command excluding an item from the
- documentation. The enum documentation will be located in
- the associated class, header file or namespace
- documentation.
+ The \\enum command is for documenting a C++ enum type. The
+ argument is the full name of the enum type.
- For example:
+ The enum values are documented in the \\enum comment using the \l
+ {value-command} {\\value} command. If an enum value is not
+ documented with \\value, QDoc emits a warning. These warnings can
+ be avoided using the \l {omitvalue-command} {\\omitvalue} command
+ to tell QDoc that an enum value should not be documented. The enum
+ documentation will be included on the class reference page, header
+ file page, or namespace page where the enum type is defined. For
+ example, consider the enum type \c {Corner} in the Qt namespace:
- \code
- enum Corner {
- TopLeftCorner = 0x00000,
- TopRightCorner = 0x00001,
- BottomLeftCorner = 0x00002,
- BottomRightCorner = 0x00003
- #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
- ,TopLeft = TopLeftCorner,
- TopRight = TopRightCorner,
- BottomLeft = BottomLeftCorner,
- BottomRight = BottomRightCorner
- #endif
- };
- \endcode
+ \code
+ enum Corner {
+ TopLeftCorner = 0x00000,
+ TopRightCorner = 0x00001,
+ BottomLeftCorner = 0x00002,
+ BottomRightCorner = 0x00003
+ #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
+ ,TopLeft = TopLeftCorner,
+ TopRight = TopRightCorner,
+ BottomLeft = BottomLeftCorner,
+ BottomRight = BottomRightCorner
+ #endif
+ };
+ \endcode
- In case of the Qt::Corner enum,
+ This enum can be cocumented this way:
- \code
- / *!
- \enum Qt::Corner
-
- This enum type specifies a corner in a rectangle:
-
- \value TopLeftCorner
- The top-left corner of the rectangle.
- \value TopRightCorner
- The top-right corner of the rectangle.
- \value BottomLeftCorner
- The bottom-left corner of the rectangle.
- \value BottomRightCorner
- The bottom-right corner of the rectangle.
-
- \omitvalue TopLeft
- \omitvalue TopRight
- \omitvalue BottomLeft
- \omitvalue BottomRight
- * /
- \endcode
+ \code
+ / *!
+ \enum Qt::Corner
+
+ This enum type specifies a corner in a rectangle:
+
+ \value TopLeftCorner
+ The top-left corner of the rectangle.
+ \value TopRightCorner
+ The top-right corner of the rectangle.
+ \value BottomLeftCorner
+ The bottom-left corner of the rectangle.
+ \value BottomRightCorner
+ The bottom-right corner of the rectangle.
+
+ \omitvalue TopLeft
+ \omitvalue TopRight
+ \omitvalue BottomLeft
+ \omitvalue BottomRight
+ * /
+ \endcode
- this associated QDoc comment will be rendered as
+ Note the inclusion of the namespace qualifier. QDoc will render
+ this enum type in \c {qt.html} like this:
\quotation
\raw HTML
@@ -4800,231 +4600,258 @@
\endraw
\endquotation
- in qt.html.
+ See also \l {value-command} {\\value} and \l {omitvalue-command} {\\omitvalue}.
- See also \l {value}{\\value} and \l {omitvalue}{\\omitvalue}.
+ \target example-command
+ \section1 \\example
- \row
- \o \bold \\example \target example-command
- \o \bold {The \\example command allows you to document an
- example.}
+ The \\example command is for documenting an example. The argument
+ is the example's path relative to omne of the paths listed in the
+ \l {exampledirs-variable} {exampledirs} variable in the QDoc
+ configuration file.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. In particular
- the command's argument is the example's path relative to
- the paths listed in the \l exampledirs configuration
- variable.
+ The documentation page will be output to \c {path-to-example}.html.
+ QDoc will add a list of all the example's source files at the top
+ of the page.
- The documentation will be located in \i
- {path-to-example}.html, and QDoc will add a list of all the
- example files at the top of this documentation page.
+ For example, if \l {exampledirs-variable} {exampledirs} contains
+ \c $QTDIR/examples/widgets/imageviewer, then
- For example, if \l exampledirs contain \c
- $QTDIR/examples/widgets/imageviewer, then
+ \code
+ / *!
+ \example widgets/imageviewer
+ \title ImageViewer Example
+ \subtitle
- \code
- / *!
- \example widgets/imageviewer
- \title ImageViewer Example
- \subtitle
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
- The example shows how to combine QLabel and QScrollArea
- to display an image.
+ ...
+ * /
+ \endcode
- ...
- * /
- \endcode
+ QDoc renders this example in widgets-imageviewer.html:
- will be rendered as
+ \quotation
+ \raw HTML
+ <center><h1>Image Viewer Example</h1></center>
+ \endraw
- \quotation
- \raw HTML
- <center><h1>Image Viewer Example</h1></center>
- \endraw
+ Files:
+ \list
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
+ {widgets/imageviewer/imageviewer.cpp}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
+ {widgets/imageviewer/imageviewer.h}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
+ {widgets/imageviewer/main.cpp}
+ \endlist
- Files:
- \list
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
- {widgets/imageviewer/imageviewer.cpp}
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
- {widgets/imageviewer/imageviewer.h}
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
- {widgets/imageviewer/main.cpp}
- \endlist
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
- The example shows how to combine QLabel and QScrollArea
- to display an image.
+ ...
+ \endquotation
- ...
- \endquotation
+ \target externalpage-command
+ \section1 \\externalpage
- in widgets-imageviewer.html.
+ The \\externalpage command assigns a title to an external URL.
- \row
- \o \bold \\fn \target fn
- \o \bold {The \\fn command allows you to document a function.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. In particular
- it is important that the return type of the function,
- whether it is \c const or not and the complete set of
- arguments with type are included in the argument. If the
- referenced function doesn't exist, QDoc will emit a
- warning.
-
- Also, the \\fn command is QDoc's default command, i.e. when
- no topical command can be found within a QDoc comment, QDoc
- tries to tie the documentation to the following code as if
- it was function documentation.
-
- This means that the command normally isn't necessary since
- the recommended style is to write the function
- documentation directly before the function implementation
- in the \c .cpp file. In fact, it should only be used for
- inline functions implemented in the \c .h file.
-
- For example:
+ \code
+ / *!
+ \externalpage http://doc.trolltech.com/4.3/qtopiacore.html
+ \title Qtopia Core
+ * /
+ \endcode
- \code
- / *!
- \fn bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+ This allows you to include a link to the external page in your
+ documentation this way:
- Returns true if this toolbar is dockable in the given
- \a area; otherwise returns false.
- * /
- \endcode
+ \code
+ / *!
+ The broad scope of the \l {Qtopia Core} API enables it to
+ be used across a wide variety of development projects.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- \raw HTML
- <h3>bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
- </h3>
- \endraw
+ \quotation
+ The broad scope of the \l
+ {http://doc.trolltech.com/4.3/qtopiacore.html} {Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ \endquotation
- Returns true if this toolbar is dockable in the given
- \a area; otherwise returns false.
- \endquotation
+ To achieve the same result without using the \\externalpage
+ command, you would have to hard code the adress into your
+ documentation:
- See also \l {overload}{\\overload}.
+ \code
+ / *!
+ The broad scope of the \l
+ {http://doc.trolltech.com/4.3/qtopiacore.html} {Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ * /
+ \endcode
- \row
- \o \bold \\group \target group
- \o \bold {The \\group command creates a separate page that
- lists the classes belonging to the group specified by the
- command's argument.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. The \\group
- command is typically followed by a \l {title}{\\title}
- command and a short introduction to the group. The
- generated HTML documentation for the specified group is put
- in <lower-case>\i{group}.html.
-
- A class can be related to a group by using the \l
- {ingroup}{\\ingroup} command. In addition, overviews can be
- related to a group using the same command, but these must
- be listed explicitly using the \l
- {generatelist}{\\generatelist} command (see example below).
-
- Each class is listed with a link to the class reference
- page and a brief description based on the classes' \l
- {brief}{\\brief} texts. For example:
+ The \\externalpage command makes it easier to maintain the
+ documentation. If the adress changes, you only need to change the
+ argument of the \\externalpage command.
- \code
- / *!
- \group io
+ \target fn-command
+ \section1 \\fn (function)
- \title Input/Output and Networking
+ The \\fn command is for documenting a function. The argument is
+ the function's signature, including its return type, const-ness,
+ and list of formal arguments with types. If the named function
+ doesn't exist, QDoc emits a warning.
- These classes are used to handle input and output to
- and from external devices, processes, files etc. as
- well as manipulating files and directories.
- * /
- \endcode
+ \note The \\fn command is QDoc's default command, i.e. when no
+ topic command can be found in a QDoc comment, QDoc tries to tie
+ the documentation to the following code as if it is the
+ documentation for a function. Hence, it is normally not necessary
+ to include this command when documenting a function, if the
+ function's QDoc comment is written immediately above the function
+ implementation in the \c .cpp file. But it must be present when
+ documenting an inline function in the \c .cpp file that is
+ implemented in the \c .h file.
- will be rendered as
+ \code
+ / *!
+ \fn bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
- \quotation
- \raw HTML
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ * /
+ \endcode
- <h1>Input/Output and Networking</h1>
-
- <p>These classes are used to handle input and output
- to and from external devices, processes, files etc. as
- well as manipulating files and directories.</p>
-
- <p>
- <table width="100%">
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
- </b></td>
- <td>
- The base functionality common to all socket types
- </td></tr>
-
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
- </b></td>
- <td>
- QIODevice interface for a QByteArray
- </td></tr>
-
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
- </b></td>
- <td>
- Access to the window system clipboard
- </td></tr>
- </table>
- \endraw
- \endquotation
+ QDoc renders this as:
- in io.html.
+ \quotation
+ \raw HTML
+ <h3>bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+ </h3>
+ \endraw
- Note that overviews related to the given group, must be
- listed explicitly using the \l
- {generatelist}{\\generatelist} command with the \c related
- argument. For example:
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ \endquotation
- \code
- / *!
- \group architecture
+ See also \l {overload-command} {\\overload}.
- \title Architecture
+ \target group-command
+ \section1 \\group
- These documents describe aspects of Qt's architecture
- and design, including overviews of core Qt features and
- technologies.
+ The \\group command creates a separate page that lists the classes
+ belonging to the group. The argument is the group name.
- \generatelist{related}
- * /
- \endcode
+ A class is included in a group by using the \l {ingroup-command}
+ {\\ingroup} command. Overview pages can also be related to a group
+ using the same command, but the list of overview pages must be
+ requested explicitly using the \l {generatelist-command}
+ {\\generatelist} command (see example below).
- See also \l {ingroup}{\\ingroup} and \l
- {generatelist}{\\generatelist}.
+ The \\group command is typically followed by a \l {title-command}
+ {\\title} command and a short introduction to the group. The
+ HTML page for the group is written to a \c {.html} file put in
+ <lower-case>\e{group}.html.
- \row
- \o \bold \\headerfile \target headerfile
- \o \bold {The \\headerfile command allows you to document
- global functions, types and macros declared in a header file.}
+ Each class name is listed as a link to the class reference page
+ followed by the text from the class's \l {brief-command} {\\brief}
+ texts.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument, and the
- generated HTML documentation for the specified header file
- is put in <lower-case>\i{headerfilename}.html.
+ \code
+ / *!
+ \group io
- A function, type or macro can be associated with a
- headerfile using the \l {relates}{\\relates} command.
+ \title Input/Output and Networking
- If the referenced header file doesn't exist, the
- \\headerfile command will still create a documentation page
- for a header file with the referenced file's name.
+ These classes are used to handle input and output to
+ and from external devices, processes, files etc. as
+ well as manipulating files and directories.
+ * /
+ \endcode
- For example:
+ QDoc generates a group page in \c{io.html} that will look
+ like this:
+
+ \quotation
+ \raw HTML
+
+ <h1>Input/Output and Networking</h1>
+
+ <p>These classes are used to handle input and output
+ to and from external devices, processes, files etc. as
+ well as manipulating files and directories.</p>
+
+ <p>
+ <table width="100%">
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ </b></td>
+ <td>
+ The base functionality common to all socket types
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
+ </b></td>
+ <td>
+ QIODevice interface for a QByteArray
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
+ </b></td>
+ <td>
+ Access to the window system clipboard
+ </td></tr>
+ </table>
+ \endraw
+ \endquotation
+
+ Note that overview pages related to the group, must be listed
+ explicitly using the \l {generatelist-command} {\\generatelist}
+ command with the \c related argument.
+
+ \code
+ / *!
+ \group architecture
+
+ \title Architecture
+
+ These documents describe aspects of Qt's architecture
+ and design, including overviews of core Qt features and
+ technologies.
+
+ \generatelist{related}
+ * /
+ \endcode
+
+ See also \l {ingroup-command} {\\ingroup} and \l
+ {generatelist-command} {\\generatelist}.
+
+ \target headerfile-command
+ \section1 \\headerfile
+
+ The \\headerfile command is for documenting the global functions,
+ types and macros that are declared in a header file but not in a
+ namespace. The argument is the name of the header file. The HTML
+ page is written to a \c {.html} file constructed from the header
+ file aregument.
+
+ The documentation for a function, type, or macro that is declared
+ in the header file being documented is included in the header file
+ page using the \l {relates-command} {\\relates} command.
+
+ If the argument doesn't exist as a header file, the \\headerfile
+ command creates a documentation page for the header file anyway.
\code
/ *!
@@ -5041,7 +4868,8 @@
* /
\endcode
- will be rendered as
+ QDoc generates a header file page \c{qtalgorithms.html} that looks
+ like this:
\quotation
\raw HTML
@@ -5049,7 +4877,7 @@
Generic Algorithms</h1></center>
<p>The <QtAlgorithms> header file provides generic
template-based algorithms.
- <a href="13-qdoc-commands-topical.html#header">More...</a>
+ <a href="13-qdoc-commands-topics.html#header-command">More...</a>
</p>
<h3>Functions</h3>
@@ -5077,163 +4905,139 @@
...
\endquotation
- in qtalgorithms.html.
-
- \row
- \o \bold \\macro \target macro
- \o \bold {The \\macro command allows you to document a C++ macro.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
-
- QDoc recognizes three different macro syntax: function-like
- macros like Q_ASSERT(), declaration-style macros like
- Q_PROPERTY() and macros without parentheses like Q_OBJECT.
-
- The \\macro command must be followed by a \l
- {relates}{\\relates} command which attaches the
- documentation to that of a related class, header file. or
- namespace. Otherwise the documentation will be lost.
-
- For example:
-
- \code
- / *!
- \macro void Q_ASSERT(bool test)
- \relates <QtGlobal>
-
- Prints a warning message containing the source code
- file name and line number if \a test is false.
-
- ...
-
- \sa Q_ASSERT_X(), qFatal(), {Debugging Techniques}
- * /
- \endcode
-
- will be rendered as
-
- \quotation
- \raw HTML
- <h3>void Q_ASSERT ( bool <i>test</i> )</h3>
- \endraw
+ \target macro-command
+ \section1 \\macro
- Prints a warning message containing the source code
- file name and line number if \a test is false.
+ The \\macro command is for documententin a C++ macro. The argument
+ is the macro in one of three styles: function-like macros like
+ Q_ASSERT(), declaration-style macros like Q_PROPERTY(), and macros
+ without parentheses like Q_OBJECT.
- ...
+ The \\macro comment must contain a \l {relates-command}
+ {\\relates} command that attaches the macro comment to a class,
+ header file, or namespace. Otherwise, the documentation will be
+ lost. Here are three example macro comments followed by what they
+ might look like in \c {qtglobal.html} or \c {qobject.html}:
- See also Q_ASSERT_X(), qFatal() and \l {Debugging
- Techniques}.
- \endquotation
+ \code
+ / *!
+ \macro void Q_ASSERT(bool test)
+ \relates <QtGlobal>
- in qtglobal.html. And
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
- \code
- / *!
- \macro Q_PROPERTY(...)
- \relates QObject
+ ...
- This macro declares a QObject property. The syntax is:
+ \sa Q_ASSERT_X(), qFatal(), {Debugging Techniques}
+ * /
+ \endcode
- ...
+ \quotation
+ \raw HTML
+ <h3>void Q_ASSERT ( bool <i>test</i> )</h3>
+ \endraw
- \sa {Qt's Property System}
- * /
- \endcode
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
- will be rendered as
+ ...
- \quotation
- \raw HTML
- <h3>Q_PROPERTY ( ... )</h3>
- \endraw
+ See also Q_ASSERT_X(), qFatal() and \l {Debugging Techniques}.
+
+ \endquotation
- This macro declares a QObject property. The syntax is:
+ \code
+ / *!
+ \macro Q_PROPERTY(...)
+ \relates QObject
- ...
+ This macro declares a QObject property. The syntax is:
- See also \l {Qt's Property System}.
- \endquotation
+ ...
- in qobject.html. And
+ \sa {Qt's Property System}
+ * /
+ \endcode
- \code
- / *!
- \macro Q_OBJECT
- \relates QObject
+ \quotation
+ \raw HTML
+ <h3>Q_PROPERTY ( ... )</h3>
+ \endraw
- The Q_OBJECT macro must appear in the private section
- of a class definition that declares its own signals and
- slots or that uses other services provided by Qt's
- meta-object system.
+ This macro declares a QObject property. The syntax is:
- ...
+ ...
- \sa {Meta-Object System}, {Signals and Slots}, {Qt's
- Property System}
- * /
- \endcode
+ See also \l {Qt's Property System}.
+ \endquotation
- will be rendered as
+ \code
+ / *!
+ \macro Q_OBJECT
+ \relates QObject
- \quotation
- \raw HTML
- <h3>Q_OBJECT</h3>
- \endraw
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
- The Q_OBJECT macro must appear in the private section
- of a class definition that declares its own signals and
- slots or that uses other services provided by Qt's
- meta-object system.
+ ...
- ...
+ \sa {Meta-Object System}, {Signals and Slots}, {Qt's
+ Property System}
+ * /
+ \endcode
- See also \l {Meta-Object System}, \l {Signals and
- Slots} and \l {Qt's Property System}.
- \endquotation
+ \quotation
+ \raw HTML
+ <h3>Q_OBJECT</h3>
+ \endraw
- in qobject.html.
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
- \row
- \o \bold \\module \target module
- \o \bold {The \\module creates a separate page that lists the
- classes belonging to the module specified by the command's
- argument.}
+ ...
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ See also \l {Meta-Object System}, \l {Signals &
+ Slots} and \l {Qt's Property System}.
+ \endquotation
- A class can be related to a module using the \l
- {inmodule}{\\inmodule} command.
+ \target module-command
+ \section1 \\module
- The \\module command is typically followed by the \l
- {title}{\\title} and \l {brief}{\\brief} commands. Each
- class is listed with a link to the class reference page and
- a brief description based on the classes' \l
- {brief}{\\brief} texts.
+ The \\module creates a page that lists the classes belonging to
+ the module specified by the command's argument. A class included
+ in the module by including the \l {inmodule-command} {\\inmodule}
+ command in the \\class comment.
- For example:
+ The \\module command is typically followed by a \l {title-command}
+ {\\title} and a \l {brief-command} {\\brief} command. Each class
+ is listed as a link to the class reference page followed by the
+ text from the class's \l {brief-command} {\\brief} command. For
+ example:
- \code
- / *!
- \module QtNetwork
+ \code
+ / *!
+ \module QtNetwork
- \title QtNetwork Module
+ \title QtNetwork Module
- \brief The QtNetwork module offers classes that allow
- you to write TCP/IP clients and servers.
+ \brief The QtNetwork module offers classes that allow
+ you to write TCP/IP clients and servers.
- The network module provides classes to make network
- programming easier and portable. It offers both
- high-level classes such as QHttp and QFtp that
- implement specific application-level protocols, and
- lower-level classes such as QTcpSocket, QTcpServer, and
- QUdpSocket.
- * /
- \endcode
+ The network module provides classes to make network
+ programming easier and portable. It offers both
+ high-level classes such as QHttp and QFtp that
+ implement specific application-level protocols, and
+ lower-level classes such as QTcpSocket, QTcpServer, and
+ QUdpSocket.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this in \c {qtnetwork.html} like this:
\quotation
\raw HTML
@@ -5242,7 +5046,7 @@
The QtNetwork module offers classes that allow you to
write TCP/IP clients and servers.\l {module
- details}{More...}
+ details} {More...}
\raw HTML
<p>
@@ -5296,43 +5100,33 @@
\endquotation
- in qtnetwork.html.
+ See also \l {inmodule-command} {\\inmodule}
- See also \l {inmodule}{\\inmodule}
+ \target namespace-command
+ \section1 \\namespace
- \row
- \o \bold \\namespace \target namespace
- \o \bold {The \\namespace command allows you to document a C++
- namespace.}
+ The \\namespace command is for documenting the contents of the C++
+ namespace named as its argument. The documentation outline QDoc
+ generates for a namespace is similar to the outline it generates
+ for a C++ class.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
-
- QDoc will generate the same additional links and
- documentation for all the members of the namespace as it
- does for \l {framework}{classes}. The documentation for
- the specified namespace is put in <lower-case>\i
- {namespace}.html.
-
- For example:
-
- \code
- / *!
- \namespace Qt
+ \code
+ / *!
+ \namespace Qt
- \brief The Qt namespace contains miscellaneous
- identifiers used throughout the Qt library.
- * /
- \endcode
+ \brief The Qt namespace contains miscellaneous
+ identifiers used throughout the Qt library.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this in \c{qt.html} like this:
\quotation
\raw HTML
<center><h1>Qt Namespace Reference</h1></center>
<p>The Qt namespace contains miscellaneous
identifiers used throughout the Qt library.
- <a href="13-qdoc-commands-topical.html#name">More...</a>
+ <a href="13-qdoc-commands-topics.html#name">More...</a>
</p>
<pre>#include &lt;Qt&gt;</pre>
@@ -5362,18 +5156,13 @@
...
\endquotation
- in qt.html.
-
- \row
- \o \bold \\page \target page
- \o \bold {The \\page command allows you to create a stand-alone
- documentation page.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ \target page-command
+ \section1 \\page
- The page's title can be set using the \l {title}{\\title}
- command. For example:
+ The \\page command is for creating a stand-alone documentation
+ page. The argument is the name of the file where QDoc should
+ store the page. The page title is set using the \l {title-command}
+ {\\title} command.
\code
/ *!
@@ -5398,470 +5187,587 @@
* /
\endcode
- will be rendered in its own HTML file: \l{About Qt}.
+ QDoc renders this page in \c {aboutqt.html}.
- \row
- \o \bold {\\externalpage} \target externalpage
- \o \bold {The \\externalpage command gives a title to
- an external URL.}
+ \target property-command
+ \section1 \\property
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ The \\property command is for documenting a Qt property. The
+ argument is the full property name.
- For example:
+ A property is defined using the Q_PROPERTY() macro. The macro
+ takes as arguments the property's name and its set, reset and get
+ functions.
- \code
- / *!
- \externalpage http://www.trolltech.com/products/embedded/index.html
- \title Qtopia Core
- * /
- \endcode
+ \code
+ Q_PROPERTY(QString state READ state WRITE setState)
+ \endcode
- The QDoc comment above allows you to link to the Qtopia
- Core webpage by simply linking to the given title. For
- example:
+ The set, reset and get functions don't need to be documented,
+ documenting the property is sufficient. QDoc will generate a list
+ of the access function that will appear in the property
+ documentation which in turn will be located in the documentation
+ of the class that defines the property.
- \code
- / *!
- The broad scope of the \l {Qtopia Core} API enables it to
- be used across a wide variety of development projects.
- * /
- \endcode
+ The \\property command comment typically includes a \l
+ {brief-command} {\\brief} command. Forproperties the \l
+ {brief-command} {\\brief} command's argument is a sentence
+ fragment that will be included in a one line description of the
+ property. The command follows the same rules for the \l
+ {brief-property} {description} as the \l {variable-command}
+ {\\variable} command.
- will be rendered as
+ \code
+ / *!
+ \property QPushButton::flat
+ \brief whether the border is disabled
- \quotation
- The broad scope of the \l
- {http://www.trolltech.com/products/embedded/index.html}{Qtopia
- Core} API enables it to be used across a wide variety
- of development projects.
- \endquotation
+ This property's default is false.
+ * /
+ \endcode
- To achieve the same result without using the
- \\externalpage command, you would have to hard code the
- adress into your documentation:
+ QDoc includes this in \c {qpushbutton.html} like this:
- \code
- / *!
- The broad scope of the \l
- {http://www.trolltech.com/products/embedded/index.html}{Qtopia
- Core} API enables it to be used across a wide variety
- of development projects.
- * /
- \endcode
+ \quotation
+ \raw HTML
+ <h3>flat : bool</h3>
+ \endraw
- The \\externalpage command makes it easier to maintain the
- documentation. If the adress changes, you only need to change the
- argument of the \\externalpage command.
+ This property holds whether the border is disabled.
- \row
- \o \bold \\property \target property
- \o \bold {The \\property command allows you to document a Qt
- property.}
+ This property's default is false.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ Access functions:
- A property is defined using the Q_PROPERTY() macro. The
- macro takes as arguments the property's name and its set,
- reset and get functions. For example:
+ \list
+ \o \bold { bool isFlat () const}
+ \o \bold { void setFlat ( bool )}
+ \endlist
- \code
- Q_PROPERTY(QString state READ state WRITE setState)
- \endcode
+ \endquotation
- The set, reset and get functions don't need to be
- documented, documenting the property is sufficient. QDoc
- will generate a list of the access function that will
- appear in the property documentation which in turn will be
- located in the documentation of the class that defines the
- property.
+ \code
+ / *!
+ \property QWidget::width
+ \brief the width of the widget excluding any window frame
- The \\property command is typically accompanied with a \l
- {brief}{\\brief} command. In the case of a property, the
- \l {brief}{\\brief} command's argument is a sentence
- fragment that will be included in a one-sentence
- description of the property generated by QDoc. The command
- follows the same rules for the \l {brief
- property}{description} as the \l {variable}{\\variable}
- command.
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
- For example:
+ \sa geometry, height, size
+ * /
+ \endcode
- \code
- / *!
- \property QPushButton::flat
- \brief whether the border is disabled
+ QDoc includes this in \c {qwidget.html} like this:
- This property's default is false.
- * /
- \endcode
+ \quotation
+ \raw HTML
+ <h3>width : const int</h3>
+ \endraw
- will be rendered as
+ This property holds the width of the widget excluding
+ any window frame.
- \quotation
- \raw HTML
- <h3>flat : bool</h3>
- \endraw
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
- This property holds whether the border is disabled.
+ Access functions:
- This property's default is false.
+ \list
+ \o \bold { int width () const}
+ \endlist
- Access functions:
+ See also \l{QWidget::geometry} {geometry},
+ \l{QWidget::height} {height}, and \l{QWidget::size} {size}.
+ \endquotation
- \list
- \o \bold { bool isFlat () const}
- \o \bold { void setFlat ( bool )}
- \endlist
+ \target service-command
+ \section1 \\service
+
+ The \\service command tells QDoc that a class is a service class
+ and names the service. The command takes two arguments, the name
+ of the class and the name of the service. Currently, this command
+ is not used in the Qt documentation.
+
+ \code
+ / *!
+ \service TimeService Time
+ ...
+ * /
+ class TimeService : public QCopObjectService
+ {
+ ...
+ }
+ \endcode
+
+ See also \l {class-command} {\\class} and \l
+ {generatelist-command} {\\generatelist}.
+
+ \target qmlattachedproperty-command
+ \section1 \\qmlattachedproperty \span {class="newStuff"} {(new)}
+
+ The \\qmlattachedproperty command is for documenting a QML
+ property that will be attached to some QML element type. See
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#attached-properties}
+ {Attached Properties}. The argument is the rest of the line. The
+ argument text should be the property type, followed by the QML
+ element name where the property is being declared, the \c{::}
+ qualifier, and finally the property name. If we have a QML
+ attached property named \c isCurrentItem in QML element \c ListView,
+ and the property has type \c {bool}, the \\qmlattachedproperty for
+ it would look like this:
- \endquotation
+ \code
+ / *!
+ \qmlattachedproperty bool ListView::isCurrentItem
+ This attached property is true if this delegate is the current
+ item; otherwise false.
- in qpushbutton.html. And
+ It is attached to each instance of the delegate.
- \code
- / *!
- \property QWidget::width
- \brief the width of the widget excluding any window frame
+ This property may be used to adjust the appearance of the current
+ item, for example:
- See the \l {Window Geometry} documentation for an
- overview of window geometry.
+ \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem
+ * /
+ \endcode
- \sa geometry, height, size
- * /
- \endcode
+ QDoc includes this attached property on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-listview.html#isCurrentItem-prop}
+ {ListView} element.
- will be rendered as
+ \target qmlattachedsignal-command
+ \section1 \\qmlattachedsignal \span {class="newStuff"} {(new)}
- \quotation
- \raw HTML
- <h3>width : const int</h3>
- \endraw
+ The \\qmlattachedsignal command is for documenting an attachable
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#signal-handlers}
+ {signal handler}. The \\qmlattachedsignal command is used just like
+ the \l{qmlsignal-command} {\\qmlsignal} command.
- This property holds the width of the widget excluding
- any window frame.
+ The argument is the rest of the line. It should be the name of the
+ QML element where the signal handler is declared, the \c{::}
+ qualifier, and finally the signal handler name. If we have a QML
+ attached signal handler named \c onAdd() in the \c GridView
+ element, the \\qmlattachedsignal for it would look like this:
- See the \l {Window Geometry} documentation for an
- overview of window geometry.
+ \code
+ / *!
+ \qmlattachedsignal GridView::onAdd()
+ This attached handler is called immediately after an item is
+ added to the view.
+ * /
+ \endcode
- Access functions:
+ QDoc includes this documentation on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-gridview.html#onAdd-signal}
+ {GridView} element.
- \list
- \o \bold { int width () const}
- \endlist
+ \target qmlbasictype-command
+ \section1 \\qmlbasictype \span {class="newStuff"} {(new)}
- See also \l{QWidget::geometry}{geometry},
- \l{QWidget::height}{height}, and \l{QWidget::size}{size}.
- \endquotation
+ The \\qmlbasictype command is for documenting a basic type for QML.
+ The argument is the type name. The type must be included in the
+ QML basic types group using the \l{ingroup-command}{\\ingroup}
+ command as shown below. This will cause QDoc to include the
+ documentation for the type on the
+ \l{http://doc.trolltech.com/4.7/qdeclarativebasictypes.html}
+ {QML Basic Types} page. The \l{brief-command} {\\brief} command
+ is also required, because it appears on the
+ \l{http://doc.trolltech.com/4.7/qdeclarativebasictypes.html}
+ {QML Basic Types} page as well.
- in qwidget.html.
+ \code
+ / *!
+ \qmlbasictype int
+ \ingroup qmlbasictypes
- \row
- \o \bold \\service \target service
+ \brief An integer is a whole number, e.g. 0, 10, or -20.
- \o \bold {The \\service command tells QDoc that a class is a
- service class and specifies its alias, i.e. the associated
- service's name.}
+ An integer is a whole number, e.g. 0, 10, or -20. The possible
+ \c int values range from around -2000000000 to around
+ 2000000000, although most elements will only accept a reduced
+ range (which they mention in their documentation).
- The command takes two arguments, the service class's name
- and the associated alias. For example:
+ Example:
+ \qml
+ Item { width: 100; height: 200 }
+ \endqml
- \code
- / *!
- \service TimeService Time
- ...
- * /
- class TimeService : public QCopObjectService
- {
- ...
- }
- \endcode
+ \sa {QML Basic Types}
+ * /
+ \endcode
- See also \l {class}{\\class} and \l
- {generatelist}{\\generatelist}.
+ QDoc outputs this as \l{http://doc.trolltech.com/4.7/qml-int.html}
+ {qml-int.html}.
- \row
- \o \bold \\typedef \target typedef
- \o \bold {The \\typedef command allows you to document a C++ type
- definition.}
+ \target qmlclass-command
+ \section1 \\qmlclass \span {class="newStuff"} {(new)}
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ The \\qmlclass command is for documenting a QML element that is
+ instantiated by a C++ class. The command has two arguments. The
+ first argument is the name of the QML element. The second argument
+ is the name of the C++ class that instantiates the QML element.
- The documentation will be located in the associated class,
- header file or namespace documentation. When documenting a
- global type definition, the \\typedef command must be
- accompanied with a \l {relates}{\\relates} command. For
- example:
+ \code
+ / *!
+ \qmlclass Transform QGraphicsTransform
+ \ingroup qml-transform-elements
+ \since 4.7
+ \brief The Transform elements provide a way of building
+ advanced transformations on Items.
- \code
- / *!
- \typedef QObjectList
- \relates QObject
+ The Transform element is a base type which cannot be
+ instantiated directly. The following concrete Transform types
+ are available:
- Synonym for QList<QObject>.
- * /
- \endcode
+ \list
+ \o \l Rotation
+ \o \l Scale
+ \o \l Translate
+ \endlist
- will be rendered as
+ The Transform elements let you create and control advanced
+ transformations that can be configured independently using
+ specialized properties.
- \quotation
- \raw HTML
- <h3>typedef QObjectList</h3>
- \endraw
+ You can assign any number of Transform elements to an \l
+ Item. Each Transform is applied in order, one at a time.
- Synonym for QList<QObject>.
- \endquotation
+ * /
+ \endcode
- in qobject.html. Another, although more rare, example is
+ This example generates the
+ \l {http://doc.trolltech.com/4.7/qml-transform.html} {QML Trasform
+ Element} page. The \\qmlclass comment should include the \l
+ {since-command} {\\since} command, because all QML elements are
+ new. It should also include the \l{brief-command} {\\brief}
+ command. And since every QML element is a member of a group of QML
+ elements, it should also include one or more \l{ingroup-command}
+ {\\ingroup} commands.
- \code
- / *!
- \typedef QMsgHandler
- \relates QtGlobal
+ \target qmlmethod-command
+ \section1 \\qmlmethod \span {class="newStuff"} {(new)}
- This is a typedef for a pointer to a function with the
- following signature:
+ The \\qmlmethod command is for documenting a QML method. The
+ argument is the complete method signature, including return
+ type and parameter names and types.
- \code
- void myMsgHandler(QtMsgType, const char *);
- \ endcode
+ \code
+ / *!
+ \qmlmethod void TextInput::select(int start, int end)
- \sa QtMsgType, qInstallMsgHandler()
- * /
- \endcode
+ Causes the text from \a start to \a end to be selected.
- will be rendered as
+ If either start or end is out of range, the selection is not changed.
- \quotation
- \raw HTML
- <h3>typedef QtMsgHandler</h3>
- \endraw
+ After calling this, selectionStart will become the lesser and
+ selectionEnd will become the greater (regardless of the order
+ passed to this method).
+
+ \sa selectionStart, selectionEnd
+ * /
+ \endcode
- This is a typedef for a pointer to a function with the
- following signature:
+ QDoc includes this documentation on the element refence page for the
+ \l{http://doc.trolltech.com/4.7/qml-textinput.html#select-method}
+ {TextInput} element.
- \raw HTML
- <tt>
- <pre> void myMsgHandler(QtMsgType, const char *);</pre>
- </tt>
- \endraw
+ \target qmlproperty-command
+ \section1 \\qmlproperty \span {class="newStuff"} {(new)}
- See also QtMsgType and qInstallMsgHandler().
+ The \\qmlproperty command is for documenting a QML property. The
+ argument is the rest of the line. The argument text should be the
+ property type, followed by the QML element name, the \c{::}
+ qualifier, and finally the property name. If we have a QML
+ property named \c x in QML element \c Translate, and the property
+ has type \c {real}, the \\qmlproperty for it would look like this:
- \endquotation
+ \code
+ / *!
+ \qmlproperty real Translate::x
- in qtglobal.html. Other type definitions are located in the
- documentation of the class that defines it, for example:
+ The translation along the X axis.
+ * /
+ \endcode
- \code
- / *!
- \typedef QLinkedList::Iterator
+ QDoc includes this QML property on the QML reference page for the
+ \l {http://doc.trolltech.com/4.7/qml-translate.html} {Translate}
+ element.
- Qt-style synonym for QList::iterator.
- * /
- \endcode
+ \target qmlsignal-command
+ \section1 \\qmlsignal \span {class="newStuff"} {(new)}
- will be rendered as
+ The \\qmlsignal command is for documenting a
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#signal-handlers}
+ {signal handler}.
+ The argument is the rest of the line. It should be the QML element where the
+ signal handler is declared, the \c{::} qualifier, and finally the signal
+ handler name. If we have a QML signal handler named \c onAdd() in QML
+ element \c MouseArea, the \\qmlsignal for it would look like this:
- \quotation
- \raw HTML
- <h3>typedef QLinkedList::Iterator</h3>
- \endraw
+ \code
+ / *!
+ \qmlsignal MouseArea::onEntered()
- Qt-style synonym for QList::iterator.
- \endquotation
+ This handler is called when the mouse enters the mouse area.
- in qlinkedlist.html.
+ By default the onEntered handler is only called while a button is
+ pressed. Setting hoverEnabled to true enables handling of
+ onEntered when no mouse button is pressed.
- \row
- \o \bold \\variable \target variable
- \o \bold {The \\variable command allows you to document a
- member variable or a constant.}
+ \sa hoverEnabled
+ * /
+ \endcode
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ QDoc includes this documentation on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-mousearea.html#onEntered-signal}
+ {MouseArea} element.
- The \\variable command is typically followed by a \l
- {brief}{\\brief} command; QDoc will generate the
- documentation for the variable based on the brief
- description. The command follows the same rules for the \l
- {brief property}{description} as the \l
- {property}{\\property} command.
+ \target typedef-command
+ \section1 \\typedef
- The documentation will be located in the in the associated
- class, header file or namespace documentation.
+ The \\typedef command is for documenting a C++ typedef. The
+ argument is the name of the typedef. The documentation for
+ the typedef will be included in the refernece documentation
+ for the class, namespace, or header file in which the typedef
+ is declared. To relat the \\typedef to a class, namespace, or
+ header file, the \\typedef comment must contain a
+ \l {relates-command} {\\relates} command.
- In case of a member variable:
+ \code
+ / *!
+ \typedef QObjectList
+ \relates QObject
- \code
- / *!
- \variable QStyleOption::palette
- \brief the palette that should be used when painting
- the control
- * /
- \endcode
+ Synonym for QList<QObject>.
+ * /
+ \endcode
- will be rendered as
+ QDoc includes this in \c {qobject.html} as:
- \quotation
- \raw HTML
- <h3>
- <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
- QPalette
- </a>
- QStyleOption::palette
- </h3>
- \endraw
+ \quotation
+ \raw HTML
+ <h3>typedef QObjectList</h3>
+ \endraw
- This variable holds the palette that should be used
- when painting the control.
- \endquotation
+ Synonym for QList<QObject>.
+ \endquotation
- in qstyleoption.html.
+ Another, although more rare, example:
- But you can also use the \\variable command to document
- constants like for example the \c Type and \c UserType
- constants in the QTreeWidgetItem class:
+ \code
+ / *!
+ \typedef QMsgHandler
+ \relates QtGlobal
- \code
- enum { Type = 0, UserType = 1000 };
- \endcode
+ This is a typedef for a pointer to a function with the
+ following signature:
- Then
+ \code
+ void myMsgHandler(QtMsgType, const char *);
+ \ endcode
- \code
- / *!
- \variable QTreeWidgetItem::Type
+ \sa QtMsgType, qInstallMsgHandler()
+ * /
+ \endcode
- The default type for tree widget items.
+ QDoc includes this in \c {qtglobal.html} as:
- \sa UserType, type()
- * /
- \endcode
+ \quotation
+ \raw HTML
+ <h3>typedef QtMsgHandler</h3>
+ \endraw
- and
+ This is a typedef for a pointer to a function with the
+ following signature:
- \code
- / *!
- \variable QTreeWidgetItem::UserType
+ \raw HTML
+ <tt>
+ <pre> void myMsgHandler(QtMsgType, const char *);</pre>
+ </tt>
+ \endraw
- The minimum value for custom types. Values below
- UserType are reserved by Qt.
+ See also QtMsgType and qInstallMsgHandler().
+ \endquotation
- \sa Type, type()
- * /
- \endcode
+ Other typedefs are located on the reference page for the class
+ that defines them.
- will be rendered as
+ \code
+ / *!
+ \typedef QLinkedList::Iterator
- \quotation
- \raw HTML
- <h3>
- const int QTreeWidgetItem::Type
- </h3>
- \endraw
+ Qt-style synonym for QList::iterator.
+ * /
+ \endcode
- The default type for tree widget items.
+ QDoc includes this one on the reference page for class QLinkedList as:
- See also \l {QTreeWidgetItem::UserType}{UserType} and
- \l {QTreeWidgetItem::type()}{type()}.
+ \quotation
+ \raw HTML
+ <h3>typedef QLinkedList::Iterator</h3>
+ \endraw
- \raw HTML
- <h3>
- const int QTreeWidgetItem::UserType
- </h3>
- \endraw
+ Qt-style synonym for QList::iterator.
+ \endquotation
- The minimum value for custom types. Values below
- UserType are reserved by Qt.
+ \target variable-command
+ \section1 \\variable
- See also \l {QTreeWidgetItem::Type}{Type} and
- \l{QTreeWidgetItem::type()}{type()}.
+ The \\variable command is for documenting a class member variable
+ or a constant. The argument is the variable or constant name. The
+ \\variable command comment includes a \l {brief-command} {\\brief}
+ command. QDoc generates the documentation based on the text from
+ \\brief command.
- \endquotation
+ The documentation will be located in the in the associated class,
+ header file or namespace documentation.
- in qtreewidget.html.
- \endtable
+ In case of a member variable:
+
+ \code
+ / *!
+ \variable QStyleOption::palette
+ \brief the palette that should be used when painting
+ the control
+ * /
+ \endcode
+
+ QDoc includes this in qstyleoption.html as:
+
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
+ QPalette
+ </a>
+ QStyleOption::palette
+ </h3>
+ \endraw
+
+ This variable holds the palette that should be used
+ when painting the control.
+ \endquotation
+
+ You can also document constants with the \\variable command. For
+ example, suppose you have the \c Type and \c UserType constants in
+ the QTreeWidgetItem class:
+
+ \code
+ enum { Type = 0, UserType = 1000 };
+ \endcode
+
+ For these, the \\vaqriable command can be used this way:
+
+ \code
+ / *!
+ \variable QTreeWidgetItem::Type
+
+ The default type for tree widget items.
+
+ \sa UserType, type()
+ * /
+ \endcode
+ \code
+ / *!
+ \variable QTreeWidgetItem::UserType
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ \sa Type, type()
+ * /
+ \endcode
+
+ QDoc includes these in qtreewidget.html as:
+
+ \quotation
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::Type
+ </h3>
+ \endraw
+
+ The default type for tree widget items.
+
+ See also \l {QTreeWidgetItem::UserType} {UserType} and \l
+ {QTreeWidgetItem::type()} {type()}.
+
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::UserType
+ </h3>
+ \endraw
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ See also \l {QTreeWidgetItem::Type} {Type} and
+ \l{QTreeWidgetItem::type()} {type()}.
+
+ \endquotation
*/
/*!
- \page 14-qdoc-commands-contextualcommands.html
- \previouspage Topical Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Navigation Commands
-
- \title Contextual Commands
-
- The contextual commands provide QDoc with information, that it
- wouldn't figure out otherwise, about the documented object. For
- example whether a class is thread-safe or not.
-
- These commands can appear anywhere within a QDoc comment.
-
- \section1 Alphabetical List
-
- \l {16-qdoc-commands-status.html#compat}{\\compat},
- \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
- \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
- \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
- \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
- \l {16-qdoc-commands-status.html#internal}{\\internal},
- \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
- \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
- \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
- \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
- \l {18-qdoc-commands-relating.html#overload}{\\overload},
- \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
- \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
- \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
- \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
- \l {18-qdoc-commands-relating.html#relates}{\\relates},
- \l {15-qdoc-commands-navigation.html#startpage}{\\startpage},
- \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe},
- \l {20-qdoc-commands-title.html#title}{\\title}
+ \page 14-qdoc-commands-contextcommands.html
+ \previouspage Topic Commands
+ \contentspage Table of Contents
+ \nextpage Document Navigation
+
+ \title Context Commands
+
+ The context commands provide information about the element being
+ documented that QDoc can't deduce on its own. e.g. Is a class
+ thread-safe? Is a function reentrant? Which module is the class a
+ member of? Context commands can appear anywhere in a QDoc comment,
+ but they are normally placed near the top of the comment, just
+ below the \l {Topic Commands} {topic} command.
- \section1 Categories
\list
- \o \l {Navigation Commands}
- \o \l {Status Commands}
- \o \l {Thread Support Commands}
- \o \l {Relating Commands}
- \o \l {Grouping Commands}
- \o \l {Title Commands}
+ \o \l {16-qdoc-commands-status.html#compat-command}{\\compat},
+ \o \l {15-qdoc-commands-navigation.html#contentspage-command}{\\contentspage},
+ \o \l {15-qdoc-commands-navigation.html#indexpage-command}{\\indexpage},
+ \o \l {19-qdoc-commands-grouping.html#ingroup-command}{\\ingroup},
+ \o \l {18-qdoc-commands-relating.html#inherits-command}{\\inherits},
+ \o \l {19-qdoc-commands-grouping.html#inmodule-command}{\\inmodule},
+ \o \l {16-qdoc-commands-status.html#internal-command}{\\internal},
+ \o \l {19-qdoc-commands-grouping.html#mainclass-command}{\\mainclass},
+ \o \l {15-qdoc-commands-navigation.html#nextpage-command}{\\nextpage},
+ \o \l {17-qdoc-commands-thread.html#nonreentrant-command}{\\nonreentrant},
+ \o \l {16-qdoc-commands-status.html#obsolete-command}{\\obsolete},
+ \o \l {18-qdoc-commands-relating.html#overload-command}{\\overload},
+ \o \l {16-qdoc-commands-status.html#preliminary-command}{\\preliminary},
+ \o \l {15-qdoc-commands-navigation.html#previouspage-command}{\\previouspage},
+ \o \l {17-qdoc-commands-thread.html#reentrant-command}{\\reentrant},
+ \o \l {18-qdoc-commands-relating.html#reimp-command}{\\reimp},
+ \o \l {18-qdoc-commands-relating.html#relates-command}{\\relates},
+ \o \l {16-qdoc-commands-status.html#since-command}{\\since},
+ \o \l {15-qdoc-commands-navigation.html#startpage-command}{\\startpage},
+ \o \l {20-qdoc-commands-namingthings.html#subtitle-command}{\\subtitle}
+ \o \l {17-qdoc-commands-thread.html#threadsafe-command}{\\threadsafe},
+ \o \l {20-qdoc-commands-namingthings.html#title-command}{\\title}
\endlist
+
*/
/*!
\page 15-qdoc-commands-navigation.html
- \previouspage Contextual Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Status Commands
-
- \title Navigation Commands
-
- The navigation commands allow you to link the pages of a multipage
- document together. They provide the components of a navigation bar
- at the top and bottom of the document. They also provide browser
- and search engine support.
+ \previouspage Context Commands
+ \contentspage Table of Contents
+ \nextpage Reporting Status
- \section1 Alphabetical List
+ \title Document Navigation
- \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
- \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
- \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
- \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
- \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
+ The navigation commands are for linking the pages of a document in
+ a meaningful sequence. Below is a sequence of QDoc comments that
+ shows a typical use of the navigation commands.
- \section1 General Description
-
- The QDoc comments below shows a typical example using the
- navigation commands.
+ \section1 Example
\code
/ *!
\page basicqt.html
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\nextpage Getting Started
\indexpage Index
@@ -5885,7 +5791,7 @@
/ *!
\page gettingstarted.html
\previouspage Basic Qt
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\nextpage Creating Dialogs
\indexpage Index
@@ -5901,7 +5807,7 @@
/ *!
\page creatingdialogs.html
\previouspage Getting Started
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\indexpage Index
\startpage Basic Qt
@@ -5927,8 +5833,7 @@
* /
\endcode
- The second page of this multipage document, "Getting Started",
- will be rendered as
+ QDoc renders the "Getting Started" page in \c{creatingdialogs.html}:
\quotation
\raw HTML
@@ -5963,18 +5868,16 @@
\endraw
\endquotation
- in creatingdialogs.html.
-
- In addition, the \l {indexpage}{\\indexpage} and \l
- {startpage}{\\startpage} commands specifies links to the page's
- index page and start page. These links are used by browsers and
- search engines.
+ The \l {indexpage-command} {\\indexpage} and \l
+ {startpage-command} {\\startpage} commands create links to the
+ page's index page and start page. These links can be used by
+ browsers and search engines.
The index page is typically an alphabetical list of the document's
titles and topics, while the start page is the page considered by
the author to be the starting point of a multipage document.
- The links are included in the generated HTML source code but has
+ The links are included in the generated HTML source code but have
no visual effect on the documentation:
\code
@@ -5986,414 +5889,377 @@
</head>
\endcode
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\previouspage \target previouspage
- \o \bold {The \\previouspage command links the current page
- to the previous one in an ordered series of documents}.
-
- The command has two arguments, each enclosed by curly
- braces: The first is the link target, i.e. the title of the
- previous page, the second is the link text. If the page's
- title is equivalent to the link text, the second argument
- can be omitted.
-
- The command must stand alone on its own line.
-
- In the end, the link is rendered at the top and bottom of
- the current page. For an example, see the \l {General
- Description} section.
+ \section1 Commands
- \row
- \o \bold \\nextpage \target nextpage
- \o \bold {The \\nextpage command links the current
- page to the next page in an ordered series of documents}.
+ \target previouspage-command
+ \section2 \\previouspage
- The command follows the same syntax and argument convention
- as the \l {previouspage}{\\previouspage} command.
+ The \\previouspage command links the current page to the previous
+ page in a sequence.a The command has two arguments, each enclosed
+ by curly braces: The first is the link target, i.e. the title of
+ the previous page, the second is the link text. If the page's
+ title is equivalent to the link text, the second argument can be
+ omitted.
- For an example, see the \l {General Description} section.
+ The command must stand alone on its own line.
- \row
- \o \bold \\startpage \target startpage
- \o \bold {The \\startpage command specifies the first document
- in a collection of documents.}
+ \target nextpage-command
+ \section2 \\nextpage
- The command must stand alone on its own line, and its
- unique argument is the title of the first document.
+ The \\nextpage command links the current page to the next page in
+ a sequence. The command follows the same syntax and argument
+ convention as the \l {previouspage-command} {\\previouspage}
+ command.
- QDoc will generate a link to the specified document which
- is included in the HTML file but has no visual effect on
- the documentation. The generated link type tells browsers
- and search engines which document is considered by the
- author to be the starting point of the collection.
+ \target startpage-command
+ \section2 \\startpage
- For an example, see the \l {General Description} section.
+ The \\startpage command specifies the first page of a sequence of
+ pages. The command must stand alone on its own line, and its
+ unique argument is the title of the first document.
- \row
- \o \bold \\contentspage \target contentspage
- \o \bold {The \\contentspage command links the current
- page to a contents page}.
+ QDoc will generate a link to the start page and include it in the
+ generated HTML file, but this has no visual effect on the
+ documentation. The generated link type tells browsers and search
+ engines which document is considered by the author to be the
+ starting point of the collection.
- The command follows the same syntax and argument convention
- as the \l {previouspage}{\\previouspage} command.
+ \target contentspage-command
+ \section2 \\contentspage
- For an example, see the \l {General Description} section.
-
- \row
- \o \bold \\indexpage \target indexpage
- \o \bold {The \\indexpage command specifies a document providing
- an index for the current document}.
+ The \\contentspage command links the current page to a table of
+ contents page. The command follows the same syntax and argument
+ convention as the \l {previouspage-command} {\\previouspage}
+ command.
- The command must stand alone on its own line, and its
- unique argument is the title of the index document.
+ \target indexpage-command
+ \section2 \\indexpage
- QDoc will generate a link to the specified document which
- is included in the HTML file but has no visual effect on
- the documentation. The generated link type tells browsers
- and search engines which document is considered by the
- author to be the index page for the current document.
+ The \\indexpage command specifies an index page for the current
+ document. The command must stand alone on its own line, and its
+ unique argument is the title of the index document.
- For an example, see the \l {General Description} section.
-
- \endtable
+ QDoc will generate a link to the index page and include it in the
+ generated HTML file, but this has no visual effect on the
+ documentation. The generated link type tells browsers and search
+ engines which document is considered by the author to be the
+ index page of the collection.
*/
/*!
\page 16-qdoc-commands-status.html
- \previouspage Navigation Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Thread Support Commands
+ \previouspage Document Navigation
+ \contentspage Table of Contents
+ \nextpage Thread Support
- \title Status Commands
+ \title Reporting Status
- The usage commands can indicate whether a documented object is
- under development, becoming obsolete, provided for compatibility
- reasons or simply not part of the public interface. They can
- describe the history of minor versions. And they can also describe
- a documented object's ability to handle multithreaded programming.
+ These commands are for indicating that a documented element is
+ still under development, is becoming obsolete, is provided for
+ compatibility reasons, or is simply not to be included in the
+ public interface. The \l {since-command}{\\since} command is for
+ including information about the version when a function or class
+ first appeared.
- \section1 Alphabetical List
+ \target compat-command
+ \section1 \\compat
- \l {16-qdoc-commands-status.html#compat}{\\compat},
- \l {16-qdoc-commands-status.html#internal}{\\internal},
- \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
- \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
- \l {16-qdoc-commands-status.html#since}{\\since}
+ The \\compat command is for indicating that a class or function is
+ part of the support library provided to keep old source code
+ working.
- \section1 Command Description
+ The command must stand on its own line.
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\preliminary \target preliminary
- \o \bold {The \\preliminary command indicates that the
- referenced function is under development.}
-
- The command must stand on its own line.
+ Usually an equivalent function or class is provided as an
+ alternative.
- The \\preliminary command expands to a notification in the
- function documentation, and marks the function as
- preliminary when it appears in lists. For example:
+ If the command is used in the documentation of a class, the
+ command expands to a warning that the referenced class is part of
+ the support library. The warning is located at the top of the
+ documentation page.
- \code
- / *!
- \preliminary
-
- Returns information about the joining properties of the
- character (needed for certain languages such as
- Arabic).
- * /
- QChar::Joining QChar::joining() const
- {
- return ::joining(*this);
- }
- \endcode
+ \code
+ / *!
+ \class MyQt3SupportClass
+ \compat
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this at the top of the MyQt3SupportClass class
+ reference page.
- \quotation
- \raw HTML
- <h3>
- <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
- QChar::joining () const</h3>
- \endraw
+ \quotation
+ \bold {This class is part of the Qt 3 support
+ library.} It is provided to keep old source code
+ working. We strongly advise against using it in new
+ code. See the \l
+ {http://qt.nokia.com/doc/4.0/porting4.html} {Porting
+ Guide} for more information.
+ \endquotation
- \bold {This function is under development and
- is subject to change.}
+ If the command is used when documenting a function, QDoc will
+ create and link to a separate page documenting Qt 3 support
+ members when generating the reference documentation for the
+ associated class.
- Returns information about the joining properties of the
- character (needed for certain languages such as
- Arabic).
- \endquotation
+ \code
+ / *!
+ \fn MyClass::MyQt3SupportMemberFunction
+ \compat
- And the function's entry in QChar's list of functions will
- be rendered as
+ Use MyNewFunction() instead.
+ * /
+ \endcode
- \quotation
- \list
- \o ...
- \o Joining
- \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
- {joining}()
- const \c (preliminary)
- \o ...
- \endlist
- \endquotation
+ QDoc renders this in \c{myclass-qt3.html} as:
- \row
- \o \bold \\obsolete \target obsolete
- \o \bold {The \\obsolete command indicates that the referenced
- function no longer should be used in new code;
- there is no guarantee for how long it will remain in
- the library.}
-
- The command must stand on its own line.
+ \quotation
+ \raw HTML
+ <h1>Qt 3 Support Members for MyClass</h1>
+ \endraw
- When generating the reference documentation for a class,
- QDoc will create and link to a separate page documenting
- its obsolete functions. Usually an equivalent function is
- provided as an alternative.
+ \bold {The following class members are part of the Qt 3
+ support layer.} They are provided to help you port old code to
+ Qt 4. We advise against using them in new code.
- For example:
+ ...
- \code
- / *!
- \fn MyClass::MyObsoleteFunction
- \obsolete
+ \list
+ \o void MyQt3SupportMemberFunction()
+ \o ...
+ \endlist
- Use MyNewFunction() instead.
- * /
- \endcode
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyQt3SupportMemberFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+ ...
+ \endquotation
- will be rendered as
+ \target default-command
+ \section1 \\default \span {class="newStuff"} {(new)}
- \quotation
- \raw HTML
- <h1>Obsolete Members for MyClass</h1>
- \endraw
+ The \\default command is for marking a QML property as the
+ \l {http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#default-properties}
+ {default property}. The word \span {class="newStuff"} {default} is shown in red in
+ the documentation of the property.
- \bold {The following class members are obsolete.} They
- are provided to keep old source code working. We
- strongly advise against using them in new code.
+ \code
+ / *!
+ \qmlproperty list<Change> State::changes
+ This property holds the changes to apply for this state
+ \default
- ...
+ By default these changes are applied against the default state. If the state
+ extends another state, then the changes are applied against the state being
+ extended.
+ * /
+ \endcode
- \list
- \o void MyObsoleteFunction() \c (obsolete)
- \o ...
- \endlist
+ See how QDoc renders this property on the reference page for the
+ \l {http://doc.trolltech.com/4.7/qml-state.html#changes-prop} {State}
+ element.
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- <h3>void MyObsoleteFunction ()</h3>
- <p>Use MyNewFunction() instead.</p>
- \endraw
+ \target obsolete-command
+ \section1 \\obsolete
- ...
- \endquotation
+ The \\obsolete command is for indicating that a function is being
+ deprecated, and it should no longer be used in new code. There is
+ no guarantee for how long it will remain in the library.
- in myclass-obsolete.html
+ The command must stand on its own line.
+ When generating the reference documentation for a class, QDoc will
+ create and link to a separate page documenting its obsolete
+ functions. Usually an equivalent function is provided as an
+ alternative.
- \row
- \o \bold \\compat \target compat
- \o \bold {The \\compat command indicates that the referenced class
- or function is part of the support library provided to keep
- old source code working.}
+ \code
+ / *!
+ \fn MyClass::MyObsoleteFunction
+ \obsolete
- The command must stand on its own line.
+ Use MyNewFunction() instead.
+ * /
+ \endcode
- Usually an equivalent function or class is provided as an
- alternative.
+ QDoc renders this in \c{myclass-obsolete.html} as:
- If the command is used within the documentation of a class,
- the command expands to a warning that the referenced class
- is part of the support library. The warning is located on
- top of the associated documentation. For example:
+ \quotation
+ \raw HTML
+ <h1>Obsolete Members for MyClass</h1>
+ \endraw
- \code
- / *!
- \class MyQt3SupportClass
- \compat
- * /
- \endcode
+ \bold {The following class members are obsolete.} They are
+ provided to keep old source code working. We strongly advise
+ against using them in new code.
- will be rendered as
+ ...
- \quotation
- \bold {This class is part of the Qt 3 support
- library.} It is provided to keep old source code
- working. We strongly advise against using it in new
- code. See the \l
- {http://qt.nokia.com/doc/4.0/porting4.html}{Porting
- Guide} for more information.
- \endquotation
+ \list
+ \o void MyObsoleteFunction() \c (obsolete)
+ \o ...
+ \endlist
- on the top of the MyQt3SupportClass class reference.
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyObsoleteFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+ ...
+ \endquotation
- If the command is used when documenting a function, QDoc
- will create and link to a separate page documenting Qt 3
- support members when generating the reference documentation
- for the associated class. For example:
+ \target internal-command
+ \section1 \\internal
- \code
- / *!
- \fn MyClass::MyQt3SupportMemberFunction
- \compat
+ The \\internal command indicates that the referenced
+ function is not part of the public interface.
- Use MyNewFunction() instead.
- * /
- \endcode
+ The command must stand on its own line.
- will be rendered as
+ QDoc ignores the documentation as well as the documented item,
+ when generating the associated class reference documenation.
- \quotation
- \raw HTML
- <h1>Qt 3 Support Members for MyClass</h1>
- \endraw
+ \code
+ / *!
+ \internal
- \bold {The following class members are part of the Qt
- 3 support layer.} They are provided to help you port
- old code to Qt 4. We advise against using them in new
- code.
+ Tries to find the decimal separator. If it can't find
+ it and the thousand delimiter is != '.' it will try to
+ find a '.';
+ * /
+ int QDoubleSpinBoxPrivate::findDelimiter
+ (const QString &str, int index) const
+ {
+ int dotindex = str.indexOf(delimiter, index);
+ if (dotindex == -1 && thousand != dot && delimiter != dot)
+ dotindex = str.indexOf(dot, index);
+ return dotindex;
+ }
+ \endcode
- ...
+ This function will not be included in the documentation.
- \list
- \o void MyQt3SupportMemberFunction()
- \o ...
- \endlist
+ \target preliminary-command
+ \section1 \\preliminary
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- <h3>void MyQt3SupportMemberFunction ()</h3>
- <p>Use MyNewFunction() instead.</p>
- \endraw
+ The \\preliminary command is for indicating that a referenced
+ function is still under development.
- ...
- \endquotation
+ The command must stand on its own line.
- in myclass-qt3.html
+ The \\preliminary command expands to a notification in the
+ function documentation, and marks the function as preliminary when
+ it appears in lists.
+ \code
+ / *!
+ \preliminary
- \row
- \o \bold \\internal \target internal
- \o \bold {The \\internal command indicates that the referenced
- function is not part of the public interface.}
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ * /
+ QChar::Joining QChar::joining() const
+ {
+ return ::joining(*this);
+ }
+ \endcode
- The command must stand on its own line.
+ QDoc renders this as:
- QDoc ignores the documentation as well as the documented
- item, when generating the associated class reference
- documenation. For example:
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
+ QChar::joining () const</h3>
+ \endraw
- \code
- / *!
- \internal
+ \bold {This function is under development and
+ subject to change.}
- Tries to find the decimal separator. If it can't find
- it and the thousand delimiter is != '.' it will try to
- find a '.';
- * /
- int QDoubleSpinBoxPrivate::findDelimiter
- (const QString &str, int index) const
- {
- int dotindex = str.indexOf(delimiter, index);
- if (dotindex == -1 && thousand != dot && delimiter != dot)
- dotindex = str.indexOf(dot, index);
- return dotindex;
- }
- \endcode
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ \endquotation
- in qspinbox.cpp, will not be rendered at all.
+ And the function's entry in QChar's list of functions will be
+ rendered as:
- \row
- \o \bold \\since \target since
- \o \bold {The \\since command tells in which minor release
- the associated functionality was added.}
+ \quotation
+ \list
+ \o ...
+ \o Joining
+ \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
+ {joining}()
+ const \c (preliminary)
+ \o ...
+ \endlist
+ \endquotation
- For example:
+ \target since-command
+ \section1 \\since
- \code
- / *!
- \since 4.1
+ The \\since command tells in which minor release
+ the associated functionality was added.
- Returns an icon for \a standardIcon.
+ \code
+ / *!
+ \since 4.1
- ...
+ Returns an icon for \a standardIcon.
- \sa standardIconImplementation(), standardPixmap()
- * /
- QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
- {
- }
- \endcode
+ ...
- will be rendered as
+ \sa standardIconImplementation(), standardPixmap()
+ * /
+ QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
+ {
+ }
+ \endcode
- \quotation
- \raw HTML
- <h3>QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const</h3>
- \endraw
+ QDoc renders this as:
- This function was introduced in Qt version 4.1
+ \quotation
+ \raw HTML
+ <h3>QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const</h3>
+ \endraw
- Returns an icon for \a standardIcon.
+ This function was introduced in Qt version 4.1
- ...
+ Returns an icon for \a standardIcon.
- See also \l
- {QStyle::standardIconImplementation()}{standardIconImplementation()}
- and \l {QStyle::standardPixmap()}{standardPixmap()}.
- \endquotation
+ ...
- QDoc generates the "Qt" reference from the \l
- {25-qdoc-configuration-derivedprojects.html#project}{\c
- project} configuration variable. For that reason this
- reference will change according to the current
- documentation project.
+ See also \l {QStyle::standardIconImplementation()}
+ {standardIconImplementation()} and \l
+ {QStyle::standardPixmap()} {standardPixmap()}.
+ \endquotation
- See also \l
- {25-qdoc-configuration-derivedprojects.html#project}{\c
- project}.
+ QDoc generates the "Qt" reference from the \l
+ {25-qdoc-configuration-derivedprojects.html#project} {\c project}
+ configuration variable. For that reason this reference will change
+ according to the current documentation project.
- \endtable
+ See also \l {25-qdoc-configuration-derivedprojects.html#project}
+ {\c project}.
*/
/*!
\page 17-qdoc-commands-thread.html
- \previouspage Status Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Relating Commands
-
- \title Thread Support Commands
-
- The thread support commands specify the level of support for
- multithreaded programming of a class or function.
-
- \section1 Alphabetical List
+ \previouspage Reporting Status
+ \contentspage Table of Contents
+ \nextpage Relating Things
- \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
- \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
- \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
+ \title Thread Support
- \section1 General Description
-
- There are three levels of support for multithreaded programming of
- a class or function: \c threadsafe, \c reentrant and \c
- nonreentrant.
+ The thread support commands are for specifying the level of
+ support for multithreaded programming in a class or function.
+ There are three levels of support: \c threadsafe, \c reentrant and
+ \c nonreentrant.
The default is \c nonreentrant which means that the associated
class or function cannot be called by multiple threads. \c
@@ -6406,15 +6272,14 @@
can be called simultaneously by multiple threads even when each
invocation references shared data.
- When a class is declared \c reentrant or \c threadsafe, using the
- \l {reentrant}{\\reentrant} and \l {threadsafe}{\\threadsafe}
- commands respectively, functions in the referenced class can be
- declared \c nonreentrant, using the \l
- {nonreentrant}{\\nonreentrant} command, excluding the functions
- from the general view.
+ When a class is marked \l {reentrant-command} {\\reentrant} or \l
+ {threadsafe-command} {\\threadsafe}, functions in that class can
+ be marked \c nonreentrant using the \l {nonreentrant-command}
+ {\\nonreentrant} command.
- For example:
+ \section1 Example
+ \target reentrant-example
\code
/ *!
\class QLocale
@@ -6453,7 +6318,7 @@
}
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -6468,8 +6333,8 @@
\endcode
\bold {Note:} All the functions in this class are \l
- {threads.html#reentrant}{reentrant}, except \l
- {QLocale::setDefault()}{setDefault()}.
+ {threads.html#reentrant} {reentrant}, except \l
+ {QLocale::setDefault()} {setDefault()}.
...
@@ -6495,8 +6360,8 @@
\warning This function is not reentrant.
- See also \l {QLocale::system()}{system()} and \l
- {QLocale::c()}{c()}.
+ See also \l {QLocale::system()} {system()} and \l
+ {QLocale::c()} {c()}.
...
\endquotation
@@ -6504,7 +6369,7 @@
As shown above, QDoc generates a notification when a class is
declared reentrant, and lists the exceptions (the declared
nonreentrant functions). A link to the general documentation on \l
- {threads.html#reentrant}{reentrancy and thread-safety} is
+ {threads.html#reentrant} {reentrancy and thread-safety} is
included. In addition a warning, "\bold Warning: This function is
not reentrant.", is generated in the nonreentrant functions'
documentation.
@@ -6513,514 +6378,488 @@
is declared threadsafe.
For more information see the general documentation on \l
- {threads.html#reentrant}{reentrancy and thread-safety}.
+ {threads.html#reentrant} {reentrancy and thread-safety}.
- \section1 Command Descriptions
+ \section1 Commands
- \table
- \header
- \o Command
- \o Description
+ \target threadsafe-command
+ \section2 \\threadsafe
- \row
- \o \bold \\threadsafe \target threadsafe
- \o \bold {The \\threadsafe command indicates that the
- associated class or function can be called simultaneously by
- multiple threads even when each invocation references
- shared data.}
+ The \\threadsafe command includes a line in the documentation to
+ indicate that the associated class or function is \e threadsafe
+ and can be called simultaneously by multiple threads, even when
+ separate invocations reference shared data.
- The command must stand on its own line.
+ The command must stand on its own line.
- The generated documentation resulting from using the
- \\threadsafe command is similar to the result of using the
- \l {reentrant}{\\reentrant} command. For an example, see
- the \l {General Description} section.
+ The documentation generated from this command will be similar to
+ the what is generated for the \l {reentrant-command} {\\reentrant}
+ command. See the example above in the \l {reentrant-example}
+ {introduction}.
- See also \l{reentrant}{\\reentrant} and
- \l{nonreentrant}{\\nonreentrant}.
+ See also \l{reentrant-command} {\\reentrant} and
+ \l{nonreentrant-command} {\\nonreentrant}.
- \row
- \o \bold \\reentrant \target reentrant
- \o \bold {The \\reentrant command indicates that the associated
- class or function can be called simultaneously
- by multiple threads, provided that each invocation of the
- functions reference unique data.}
+ \target reentrant-command
+ \section2 \\reentrant
- The command must stand on its own line.
+ The \\reentrant command indicates that the associated class or
+ function can be called simultaneously by multiple threads,
+ provided that each invocation references its own data. See the \l
+ {reentrant-example} {example} above.
- For an example, see the \l {General Description} section.
+ The command must stand on its own line.
- See also \l{nonreentrant}{\\nonreentrant} and
- \l{threadsafe}{\\threadsafe}.
+ See also \l{nonreentrant-command} {\\nonreentrant} and
+ \l{threadsafe-command} {\\threadsafe}.
- \row
- \o \bold \\nonreentrant \target nonreentrant
- \o \bold {The \\nonreentrant command indicates that the
- associated class or function cannot be called by
- multiple threads.}
+ \target nonreentrant-command
+ \section2 \\nonreentrant
- The command must stand on its own line.
+ The \\nonreentrant command indicates that the associated class or
+ function cannot be called by multiple threads. Nonreentrant is the
+ default case.
- For an example, see the \l {General Description} section.
+ The command must stand on its own line.
- See also \l{reentrant}{\\reentrant} and
- \l{threadsafe}{\\threadsafe}.
+ When a class is marked \l {reentrant-command} {\\reentrant} or \l
+ {threadsafe-command} {\\threadsafe}, functions in that class can
+ be marked \c nonreentrant using this command in the \l{fn-command}
+ {\\fn} comment of the functions to be excluded.
- \endtable
+ See also \l{reentrant-command} {\\reentrant} and
+ \l{threadsafe-command} {\\threadsafe}.
*/
/*!
\page 18-qdoc-commands-relating.html
- \previouspage Thread Support Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Grouping Commands
+ \previouspage Thread Support
+ \contentspage Table of Contents
+ \nextpage Grouping Things
- \title Relating Commands
+ \title Relating Things
- The relation commands discribe how the documented object relates
- to its context: Whether it is an overloaded function, a
- reimplemented function or a global function related to a specified
- class or header file.
+ The relating commands are for specifying how one documented
+ element relates to another documented element. e.g., This function
+ is an overload of another function, or this function is a
+ reimplementation of another function, or this typedef is \e
+ related to some class or header file. There is also a command
+ for documenting that a QML element inherits some other QML
+ element.
- \section1 Alphabetical List
+ \section1 Commands
- \l {18-qdoc-commands-relating.html#overload}{\\overload},
- \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
- \l {18-qdoc-commands-relating.html#relates}{\\relates},
+ \target inherits-command
+ \section2 \\inherits \span {class="newStuff"} {(new)}
- \section1 Command Descriptions
+ The \\inherits command is for documenting that one QML element
+ inherits some other QML element. It must be included in the
+ inheriting element's \l{qmlclass-command}{\\qmlclass} comment.
+ The argument is the name of the inherited QML element.
- \table
- \header
- \o Command
- \o Description
+ \code
+ / *!
+ \qmlclass PauseAnimation QDeclarativePauseAnimation
+ \ingroup qml-animation-transition
+ \since 4.7
+ \inherits Animation
+ \brief The PauseAnimation element provides a pause for an animation.
- \row
- \o \bold \\overload \target overload
- \o \bold {The \\overload command indicates that the
- function is a secondary overload of its name.}
+ When used in a SequentialAnimation, PauseAnimation is a step
+ when nothing happens, for a specified duration.
- The command must stand on its own line.
+ A 500ms animation sequence, with a 100ms pause between two animations:
- For any overloaded function (except constructors), QDoc
- expects one primary version of the function and all the
- the overloads marked with the \bold{\\overload command}.
- The primary version should be fully documented. Each
- overload can have whatever extra documentation you want
- to add for just that overload.
+ SequentialAnimation {
+ NumberAnimation { ... duration: 200 }
+ PauseAnimation { duration: 100 }
+ NumberAnimation { ... duration: 200 }
+ }
- From Qt 4.5, you can include the function name plus '()'
- as a parameter to the \bold{\\overload} command, which
- will include a standard \i{This function overloads...}
- line of text with a link to the documentation for the
- primary version of the function.
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
+ * /
+ \endcode
- For example:
+ QDoc includes this line on the reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-pauseanimation.html} {PauseAnimation}
+ element:
- \code
- / *!
- \overload addAction()
+ \quotation
+ Inherits \l{http://doc.trolltech.com/4.7/qml-animation.html} {Animation}
+ \endquotation
- This convenience function creates a new action with an
- \a icon and some \a text. The function adds the newly
- created action to the menu's list of actions, and
- returns it.
+ \target overload-command
+ \section2 \\overload
- \sa QWidget::addAction()
- * /
- QAction *QMenu::addAction(const QIcon &icon, const QString &text)
- {
- QAction *ret = new QAction(icon, text, this);
- addAction(ret);
- return ret;
- }
- \endcode
+ The \\overload command is for indicating that a function is a
+ secondary overload of its name.
- will be rendered as
+ The command must stand on its own line.
- \quotation
- \raw HTML
- <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
- * QMenu::addAction ( const QIcon & <i>icon</i>,
- const QString & <i>text</i> )
- </h3>
- \endraw
+ For a function name that is overloaded (except constructors), QDoc
+ expects one primary version of the function, and all the others
+ marked with the \bold {\\overload command}. The primary version
+ should be fully documented. Each overload can have whatever extra
+ documentation you want to add for just that overloaded version.
- This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}{addAction()}
+ From Qt 4.5, you can include the function name plus '()' as a
+ parameter to the \bold{\\overload} command, which will include a
+ standard \e{This function overloads...} line of text with a link
+ to the documentation for the primary version of the function.
- This convenience function creates a new action with an
- \i icon and some \i text. The function adds the newly
- created action to the menu's list of actions, and
- returns it.
+ \code
+ / *!
+ \overload addAction()
- See also
- \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
- {QWidget::addAction}().
- \endquotation
+ This convenience function creates a new action with an
+ \a icon and some \a text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
- If you don't include the function name with the
- \bold{\\overlaod} command, then instead of the "This
- function overloads..." line with the link to the
- documentation for the primary version, you get the old
- standard line:
+ \sa QWidget::addAction()
+ * /
+ QAction *QMenu::addAction(const QIcon &icon, const QString &text)
+ {
+ QAction *ret = new QAction(icon, text, this);
+ addAction(ret);
+ return ret;
+ }
+ \endcode
- \quotation
- This is an overloaded member function, provided for
- convenience.
- \endquotation.
+ QDoc renders this as:
- \row
- \o \bold \\reimp \target reimp
- \o \bold {The \\reimp command indicates that the
- referenced function is a reimplementation of a virtual function,
- where the reimplementation has no effect on the interface.}
+ \quotation
+ \raw HTML
+ <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
+ * QMenu::addAction ( const QIcon & <i>icon</i>,
+ const QString & <i>text</i> )
+ </h3>
+ \endraw
- The command must stand on its own line.
+ This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction} {addAction()}
- QDoc will omit the reimplemented function from the class
- reference. For example:
+ This convenience function creates a new action with an
+ \e icon and some \e text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
- \code
- / *!
- \reimp
- * /
- void QToolButton::nextCheckState()
- {
- Q_D(QToolButton);
- if (!d->defaultAction)
- QAbstractButton::nextCheckState();
- else
- d->defaultAction->trigger();
- }
- \endcode
+ See also
+ \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
+ {QWidget::addAction}().
+ \endquotation
- will not be rendered at all; only a link to the inherited
- QAbstractButton::nextCheckState() will appear in the
- documentation.
+ If you don't include the function name with the \bold{\\overlaod}
+ command, then instead of the "This function overloads..." line
+ with the link to the documentation for the primary version, you
+ get the old standard line:
- \row
- \o \bold \\relates \target relates
- \o \bold {The \\relates command attaches the documentation of
- a global function to that of a related class or header file.}
+ \quotation
+ This is an overloaded member function, provided for
+ convenience.
+ \endquotation.
- The command's argument is a class name, an the command (and
- its argument) must stand on its own line.
+ \target reimp-command
+ \section2 \\reimp
- \code
- / *!
- \relates QChar
+ The \\reimp command is for indicating that a function is a
+ reimplementation of a virtual function.
- Reads a char from the stream \a in into char \a chr.
+ The command must stand on its own line.
- \sa {Format of the QDataStream operators}
- * /
- QDataStream &operator>>(QDataStream &in, QChar &chr)
- {
- quint16 u;
- in >> u;
- chr.unicode() = ushort(u);
- return in;
- }
- \endcode
+ QDoc will omit the reimplemented function from the class
+ reference.
- will be rendered with the QChar documentation.
+ \code
+ / *!
+ \reimp
+ * /
+ void QToolButton::nextCheckState()
+ {
+ Q_D(QToolButton);
+ if (!d->defaultAction)
+ QAbstractButton::nextCheckState();
+ else
+ d->defaultAction->trigger();
+ }
+ \endcode
- \endtable
+ This function will not be included in the documentation. Instead,
+ a link to the base function QAbstractButton::nextCheckState() will
+ appear in the documentation.
+
+ \target relates-command
+ \section2 \\relates
+
+ The \\relates command is for including the documentation of a
+ global element to some class or header file. The argument is a
+ class name or header file.
+
+ \code
+ / *!
+ \relates QChar
+
+ Reads a char from the stream \a in into char \a chr.
+
+ \sa {Format of the QDataStream operators}
+ * /
+ QDataStream &operator>>(QDataStream &in, QChar &chr)
+ {
+ quint16 u;
+ in >> u;
+ chr.unicode() = ushort(u);
+ return in;
+ }
+ \endcode
+
+ The documentation for this function will be included on the reference page
+ for class QChra.
*/
/*!
\page 19-qdoc-commands-grouping.html
- \previouspage Relating Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Title Commands
+ \previouspage Relating Things
+ \contentspage Table of Contents
+ \nextpage Naming Things
- \title Grouping Commands
+ \title Grouping Things
The grouping commands relate classes to defined groups and
modules. The groups are used when generating lists of related
classes in the documentation, while the modules are elements of
Qt's structure.
- \section1 Alphabetical List
+ \section1 Commands
- \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
- \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
- \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
+ \target mainclass-command
+ \section2 \\mainclass
- \section1 Command Descriptions
+ The \\mainclass command relates the documented class to
+ a group called mainclasses.
- \table
- \header
- \o Command
- \o Description
+ The command must stand on its own line.
- \row
- \o \bold \\mainclass \target mainclass
- \o \bold {The \\mainclass command relates the documented class to
- a group called mainclasses.}
+ \code
+ / *!
+ \class QWidget qwidget.h
+ \brief The QWidget class is the base class of
+ all user interface objects.
- The command must stand on its own line.
+ \mainclass
- For example:
+ ...
+ * /
+ \endcode
- \code
- / *!
- \class QWidget qwidget.h
- \brief The QWidget class is the base class of
- all user interface objects.
+ This will include the QWidget class in the \e mainclasses
+ group, which means, for example, that the class will appear on the
+ list created by calling the \l {generatelist-command}
+ {\\generatelist} command with the \c mainclasses argument:
- \mainclass
+ \l http://qt.nokia.com/doc/4.0/mainclasses.html
- ...
- * /
- \endcode
+ \note The Qt documentation no longer includes the \e mainclasses
+ page.
- will ensure that the QWidget class is included in the \c
- mainclasses group, which means, for example, that the class
- will appear on the list created by calling the \l
- {generatelist}{\\generatelist} command with the \c
- mainclasses argument:
+ See also \l {generatelist-command} {\\generatelist}.
- \l http://qt.nokia.com/doc/4.0/mainclasses.html
+ \target ingroup-command
+ \section2 \\ingroup
- See also \l {generatelist}{\\generatelist}.
+ The \\ingroup command indicates that the given
+ overview or documented class belongs to a certain group of
+ related docmentation.
- \row
- \o \bold \\ingroup \target ingroup
+ A class or overview may belong to many groups.
- \o \bold {The \\ingroup command indicates that the given
- overview or documented class belongs to a certain group of
- related docmentation.}
+ The \\ingroup command's argument is a group name, but note
+ that the command considers the rest of the line as part of
+ its argument. Make sure that the group name is followed by
+ a linebreak.
- A class or overview may belong to many groups.
+ \code
+ / *!
+ \class QDir
+ \brief The QDir class provides access to directory
+ structures and their contents.
- The \\ingroup command's argument is a group name, but note
- that the command considers the rest of the line as part of
- its argument. Make sure that the group name is followed by
- a linebreak. For example:
+ \ingroup io
+ ...
+ * /
+ \endcode
- \code
- / *!
- \class QDir
- \brief The QDir class provides access to directory
- structures and their contents.
+ This will include the QDir class in the \c io group, which means,
+ for example, that QDir will appear on the list created by calling
+ the \l {group-command} {\\group} command with the \c io argument.
- \ingroup io
- ...
- * /
- \endcode
+ To list overviews that are related to a certain group, you must
+ generate the list explicitly using the \l {generatelist-command}
+ {\\generatelist} command with the \c related argument.
- will ensure that the QDir class is included in the \c io
- group, which means, for example, that QDir will appear on
- the list created by calling the \l {group}{\\group} command
- with the \c io argument.
+ See also \l {group-command} {\\group}.
- Note that to list overviews that are related to a given
- group, you must generate the list exlicitly by using the \l
- {generatelist}{\\generatelist} command with the \c related
- argument.
+ \target inmodule-command
+ \section2 \\inmodule
- See also \l {group}{\\group}.
- \row
- \o \bold \\inmodule \target inmodule
- \o \bold {The \\inmodule command relates the documented class
- to the module specified by the command's argument.}
+ The \\inmodule command relates a class to the module specified by
+ the command's argument.
- For the basic classes in Qt, a class's module is determined
- by its location, i.e. its directory. However, for
- extensions, like ActiveQt and Qt Designer, a class needs to
- be related to a module explicitly.
+ For the basic classes in Qt, a class's module is determined by its
+ location, i.e. its directory. However, for extensions, like
+ ActiveQt and Qt Designer, a class must be related to a module
+ explicitly.
- The command's argument is a module name, but note that the
- command considers the rest of the line as part of its
- argument. Make sure that the module name is followed by a
- linebreak. For example:
+ The command's argument is a module name, but note that the command
+ considers the rest of the line as part of its argument. Make sure
+ that the module name is followed by a linebreak.
- \code
- /*!
- \class QDesignerTaskMenuExtension
- \inmodule QtDesigner
- * /
- \endcode
+ \code
+ /*!
+ \class QDesignerTaskMenuExtension
+ \inmodule QtDesigner
+ * /
+ \endcode
- will ensure that the QDesignerTaskMenuExtension class is
- included in the \c QtDesigner module, which means, for
- example, that the class will appear on the list created by
- calling the \l {generatelist}{\\generatelist} command with
- the \c {{classesbymodule QtDesigner}} argument.
+ This ensures that the QDesignerTaskMenuExtension class is included
+ in the \c QtDesigner module, which means, for example, that the
+ class will appear on the list created by calling the \l
+ {generatelist-command} {\\generatelist} command with the \c
+ {{classesbymodule QtDesigner}} argument.
- See also \l {module}{\\module} and \l
- {generatelist}{\\generatelist}.
- \endtable
+ See also \l {module-command} {\\module} and \l
+ {generatelist-command} {\\generatelist}.
*/
/*!
- \page 20-qdoc-commands-title.html
- \previouspage Grouping Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Configuration
-
- \title Title Commands
-
- In general a title command considers everything that follows it
- until the first line break as its argument. If the title needs to
- be spanned over several lines, make sure to end each line (except
- the last one) with a backslash.
-
- \section1 Alphabetical List
-
- \l {20-qdoc-commands-title.html#title}{\\title},
- \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
-
- \section1 Command Descriptions
+ \page 20-qdoc-commands-namingthings.html
+ \previouspage Grouping Things
+ \contentspage Table of Contents
+ \nextpage Markup Commands
- \table
- \header
- \o Command
- \o Description
+ \title Naming Things
- \row
- \o \bold \\title \target title
- \o \bold {The \\title command sets the title for a
- documentation page, or allows you to override it.}
+ In general, a title command considers everything that follows it
+ until the first line break as its argument. If the title is so
+ long it must span multiple lines, end each line (except the last
+ one) with a backslash.
- For example:
+ \section1 Commands
- \code
- / *!
- \page signalandslots.html
+ \target title-command
+ \section2 \\title
- \title Signals and Slots
+ The \\title command sets the title for a documentation page, or
+ allows you to override it.
- Signals and slots are used for communication between
- objects. The signals and slots mechanism is a central
- feature of Qt and probably the part that differs most
- from the features provided by other frameworks.
+ \code
+ / *!
+ \page signalandslots.html
- ...
- * /
- \endcode
+ \title Signals & Slots
- will be rendered as
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
- \quotation
- \raw HTML
- <h1><center>Signal and Slots</center></h1>
- \endraw
+ ...
+ * /
+ \endcode
- Signals and slots are used for communication between
- objects. The signals and slots mechanism is a central
- feature of Qt and probably the part that differs most
- from the features provided by other frameworks.
+ QDoc renders this as:
- ...
- \endquotation
- See also \l {subtitle}{\\subtitle}.
+ \quotation
+ \raw HTML
+ <h1><center>Signal and Slots</center></h1>
+ \endraw
- \row
- \o \bold \\subtitle \target subtitle
- \o \bold {The \\subtitle command sets a subtitle for a
- documentation page.}
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
+ ...
+ \endquotation
+ See also \l {subtitle-command} {\\subtitle}.
- For example:
+ \target subtitle-command
+ \section2 \\subtitle
- \code
- / *!
- \page qtopiacore-overview.html
+ The \\subtitle command sets a subtitle for a documentation page.
- \title Qtopia Core
- \subtitle Qt for Embedded Linux
+ \code
+ / *!
+ \page qtopiacore-overview.html
- Qt/Embedded, the embedded Linux port of Qt, is a
- complete and self-contained C++ GUI and platform
- development tool for Linux-based embedded development.
+ \title Qtopia Core
+ \subtitle Qt for Embedded Linux
- ...
- * /
- \endcode
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+ ...
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- \raw HTML
- <h1><center>Qtopia Core</center></h1>
- <h2><center>Qt for Embedded Linux</center></h2>
- \endraw
+ \quotation
+ \raw HTML
+ <h1><center>Qtopia Core</center></h1>
+ <h2><center>Qt for Embedded Linux</center></h2>
+ \endraw
- Qt/Embedded, the embedded Linux port of Qt, is a
- complete and self-contained C++ GUI and platform
- development tool for Linux-based embedded development.
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+ ...
+ \endquotation
- ...
- \endquotation
+ See also \l {title-command} {\\title}.
- See also \l {title}{\\title}.
- \endtable
*/
/*!
\page 21-0-qdoc-configuration.html
- \previouspage Title Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage General Configuration Variables
-
- \title QDoc Configuration
-
- \tableofcontents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
+ \nextpage Generic Configuration Variables
- \list
- \o \l {Supporting Derived Projects}
- \o \l {QDoc Compatibility}
- \endlist
+ \title The QDoc Configuration File
- When running QDoc to generate the documentation, you must specify
- a configuration file on the command line:
+ Before running QDoc, you must create a QDoc configuration file to
+ tell QDoc where to find the source files that contain the QDoc
+ comments. The pathname to your configuration file is passed to
+ QDoc on the command line:
\quotation
- \bold {/currentdirectory$ qdoc3 my-documentation.qdocconf}
+ \c {/current/dir$ ../../bin/qdoc3 ./config.qdocconf}
\endquotation
\section1 General Description
- The configuration file is a list of entries of entries of the form
- \i {"variable = value"}. Using the configuration variables, you
- can define where QDoc should find the various source files, images
- and examples, where to put generated documentation etc. The
+ The configuration file is a list of entries of the form \e
+ {"variable = value"}. Using the configuration variables, you can
+ define where QDoc should find the various source files, images and
+ examples, where to put generated documentation etc. The
configuration file can also contain directives like \c
include. For an example, see the \l minimum.qdocconf file.
- In addition, you can use some particular configuration variables
- to make QDoc support derived projects, i.e make the projects, for
- example Qt Solutions, contain links to the online Qt
- documentation. These variables are documented in the \l
- {Supporting Derived projects} section. In this section you can
- also find out how to use these variables to support your derived
- projects.
-
- If some of the variable keys have the same values, they can be set
- at the same time. For example:
-
- \code
- {header, source}dirs = kernel
- \endcode
-
- is equivalent to
-
- \code
- headerdirs = kernel
- sourcedirs = kernel
- \endcode
+ You can also use configuration variables to get QDoc to support
+ \l{Supporting Derived Projects} {derived projects}, i.e QDoc can
+ generate links in your project's documentation to elements in the
+ Qt online documentation. See the \l {Supporting Derived projects}
+ section.
- A variable's value can be set using either '=' or '+='. The
- difference is that '=' overrides any previously set value, while
- '+=' only adds the value to the previously set ones.
+ The value of a configuration variable can be set using either '='
+ or '+='. The difference is that '=' overrides the previous value,
+ while '+=' adds a new value to the current one.
- In general, some of the variables accepts a list of strings as
- their value, while others only accept a single string. If you
- provide a variable of the latter type with several strings they
- will simply be concatenated. The quotes around the value string
- are optional. But applying them allows you to use special
- characters like '=' and ' \" ' within the string. For example:
+ Some configuration variables accept a list of strings as their
+ value, e.g.
+ \l {22-qdoc-configuration-generalvariables.html#sourcedirs-variable}
+ {\c{sourcedirs}}, while others accept only a single string. Double
+ quotes around a value string are optional, but including them allows
+ you to use special characters like '=' and ' \" ' within the valuem
+ string, e.g.:
\code
HTML.postheader = "<a href=\"index.html\">Home</a>"
@@ -7037,54 +6876,46 @@
\section1 Configuration Variables
- \section2 Alphabetical List
-
- \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
- {Cpp.ignoredirectives},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
- {Cpp.ignoretokens},
- \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
- \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
- \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
- \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
- \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
- {examples.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
- \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
- \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
- \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
- \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
- {headers.fileextensions},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
- {HTML.postheader},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
- \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
- \l {22-qdoc-configuration-generalvariables.html#images}{images},
- \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
- {images.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#language}{language},
- \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
- \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
- \l {22-qdoc-configuration-generalvariables.html#outputformats}
- {outputformats},
- \l {22-qdoc-configuration-generalvariables.html#outputprefixes}
- {outputprefixes},
- \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
- \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
- \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
- \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
- {sources.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
- \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
- \l {22-qdoc-configuration-generalvariables.html#version}{version},
- \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
-
- \section2 Categories
+ \section1 Variable List
+
+ \list
+ \o \l {22-qdoc-configuration-generalvariables.html#alias-variable} {alias}
+ \o \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives-variable} {Cpp.ignoredirectives}
+ \o \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretokens-variable} {Cpp.ignoretokens}
+ \o \l {22-qdoc-configuration-generalvariables.html#defines-variable} {defines}
+ \o \l {22-qdoc-configuration-generalvariables.html#edition-variable} {edition}
+ \o \l {22-qdoc-configuration-generalvariables.html#exampledirs-variable} {exampledirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#examples-variable} {examples}
+ \o \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions-variable} {examples.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#extraimages-variable} {extraimages}
+ \o \l {22-qdoc-configuration-generalvariables.html#falsehoods-variable} {falsehoods}
+ \o \l {22-qdoc-configuration-generalvariables.html#headerdirs-variable} {headerdirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#headers-variable} {headers}
+ \o \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions-variable} {headers.fileextensions}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.footer-variable} {HTML.footer}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader-variable} {HTML.postheader}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.style-variable} {HTML.style}
+ \o \l {22-qdoc-configuration-generalvariables.html#imagedirs-variable} {imagedirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#images-variable} {images}
+ \o \l {22-qdoc-configuration-generalvariables.html#images.fileextensions-variable} {images.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#language-variable} {language}
+ \o \l {22-qdoc-configuration-generalvariables.html#macro-variable} {macro}
+ \o \l {22-qdoc-configuration-generalvariables.html#outputdir-variable} {outputdir}
+ \o \l {22-qdoc-configuration-generalvariables.html#outputformats-variable} {outputformats}
+ \o \l {22-qdoc-configuration-generalvariables.html#slow-variable} {slow}
+ \o \l {22-qdoc-configuration-generalvariables.html#sourcedirs-variable} {sourcedirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#sources-variable} {sources}
+ \o \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions-variable} {sources.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#spurious-variable} {spurious}
+ \o \l {22-qdoc-configuration-generalvariables.html#tabsize-variable} {tabsize}
+ \o \l {22-qdoc-configuration-generalvariables.html#version-variable} {version}
+ \o \l {22-qdoc-configuration-generalvariables.html#versionsym-variable} {versionsym}
+ \endlist
+
+ \section1 Categories
\list
- \o \l {General Configuration Variables}
+ \o \l {Generic Configuration Variables}
\o \l {C++ Specific Configuration Variables}
\o \l {HTML Specific Configuration Variables}
\endlist
@@ -7099,8 +6930,9 @@
/*!
\page 21-1-minimum-qdocconf.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage qt.qdocconf
+ \contentspage Table of Contents
+ \nextpage Table of Contents
\title minimum.qdocconf
@@ -7109,8 +6941,9 @@
/*!
\page 21-2-qt-qdocconf.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Compatibility Issues
+ \contentspage Table of Contents
+ \nextpage minimum.qdocconf
\title qt.qdocconf
@@ -7119,11 +6952,11 @@
/*!
\page 22-qdoc-configuration-generalvariables.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage The QDoc Configuration File
+ \contentspage Table of Contents
\nextpage Creating Help Project Files
- \title General Configuration Variables
+ \title Generic Configuration Variables
With the general QDoc configuration variables, you can define
where QDoc will find the various source files it needs to generate
@@ -7131,938 +6964,877 @@
documentation. You can also do some minor manipulation of QDoc
itself, controlling its output and processing behavior.
- \section1 Alphabetical List
-
- \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
- \l {22-qdoc-configuration-generalvariables.html#codeindent}{codeindent},
- \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
- \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
- \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
- \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
- \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
- {examples.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
- \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
- \l {22-qdoc-configuration-generalvariables.html#generateindex}{generateindex},
- \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
- \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
- \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
- {headers.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
- \l {22-qdoc-configuration-generalvariables.html#images}{images},
- \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
- {images.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#language}{language},
- \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
- \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
- \l {22-qdoc-configuration-generalvariables.html#outputformats}
- {outputformats},
- \l {22-qdoc-configuration-generalvariables.html#outputprefixes}
- {outputprefixes},
- \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
- \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
- \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
- \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
- {sources.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
- \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
- \l {22-qdoc-configuration-generalvariables.html#tagfile}{tagfile},
- \l {22-qdoc-configuration-generalvariables.html#version}{version},
- \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
-
- \section1 Variable Descriptions
+ \target alias-variable
+ \section1 alias
- \table
+ The \c alias variable renames a QDoc command.
- \header
- \o Variable
- \o Description
+ The general syntax is \tt {alias.\e{original-command-name} = \e
+ temporary-command-name}.
- \row
- \o \bold alias \target alias
- \o \bold {The \c alias variable renames a QDoc command.}
+ \code
+ alias.i = e
+ \endcode
- The general syntax is \tt {alias.\i{original-command-name}
- = \i temporary-command-name}.
+ This renames the built-in command \\i (italics) to \\e. The \c
+ alias variable is often used for compatibility reasons; for more
+ information see the \l {Compatibility Issues} {compatibility
+ section}.
- For example:
+ See also \l {macro-command} {macro}.
- \code
- alias.i = e
- \endcode
+ \target codeindent-variable
+ \section1 codeindent
- renames the built-in command \\i (italics) to \\e.
+ The \c codeindent variable specifies the level of indentation that
+ QDoc uses when writing code snippets.
- The \c alias variable is often used for compatibility
- reasons; for more information see the \l {QDoc
- Compatibility}{compatibility section}.
+ QDoc originally used a hard-coded value of four spaces for code
+ indentation to ensure that code snippets could be easily
+ distinguished from surrounding text. Since we can use \l{HTML
+ Specific Configuration Variables#HTML.stylesheets} {stylesheets}
+ to adjust the appearance of certain types of HTML elements, this
+ level of indentation is not always required.
- See also \l macro.
+ \target defines-variable
+ \section1 defines
- \row
- \o \bold codeindent \target codeindent
- \o \bold {The \c codeindent variable specifies the level of
- indentation that QDoc uses when writing code snippets.}
+ The \c defines variable specifies the C++ preprocessor symbols
+ that QDoc will recognize and respond to.
- QDoc originally used a hard-coded value of four spaces for
- code indentation to ensure that code snippets could be easily
- distinguished from surrounding text. Since we can use
- \l{HTML Specific Configuration Variables#HTML.stylesheets}{stylesheets} to
- adjust the appearance of certain types of HTML elements, this
- level of indentation is not always required.
+ When a preprocessor symbol is specified using the \c defines
+ variable, you can also use the \l {if-command} {\\if} command to
+ enclose documentation that only will be included if the
+ preprocessor symbol is defined.
- \row
- \o \bold defines \target definesvariable
- \o \bold {The \c defines variable specifies the C++ preprocessor
- symbols that QDoc will recognize and respond to.}
+ The values of the variable are regular expressions (see QRegExp
+ for details). By default, no symbol is defined, meaning that code
+ protected with #ifdef...#endif will be ignored.
- When a preprocessor symbol is specified using the \c
- defines variable, you can also use the \l {if}{\\if}
- command to enclose documentation that only will be included
- if the preprocessor symbol is defined.
+ \code
+ defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ __cplusplus
+ \endcode
- The values of the variable are regular expressions (see
- QRegExp for details). By default, no symbol is defined,
- meaning that code protected with #ifdef...#endif will be
- ignored.
+ This ensures that QDoc will process the code that requires these
+ symbols to be defined. For example:
- For example:
+ \code
+ #ifdef Q_WS_WIN
+ HDC getDC() const;
+ void releaseDC(HDC) const;
+ #endif
+ \endcode
- \code
- defines = Q_QDOC \
- QT_.*_SUPPORT \
- QT_.*_LIB \
- QT_COMPAT \
- QT3_SUPPORT \
- Q_WS_.* \
- Q_OS_.* \
- Q_BYTE_ORDER \
- __cplusplus
- \endcode
+ Since the Q_WS_.* regular expression (specified using the \c
+ defines variable) matches Q_WS_WIN, QDoc will process the code
+ within #ifdef and #endif in our example.
- ensures that QDoc will process the code that requires these
- symbols to be defined. For example:
+ You can also define preprocessor symbols manually on the command
+ line using the -D option. For example:
- \code
- #ifdef Q_WS_WIN
- HDC getDC() const;
- void releaseDC(HDC) const;
- #endif
- \endcode
+ \code
+ currentdirectory$ qdoc3 -Dconsoleedition qt.qdocconf
+ \endcode
- Since the Q_WS_.* regular expression (specified using the
- \c defines variable) matches Q_WS_WIN, QDoc will process
- the code within #ifdef and #endif in our example.
+ In this case the -D option ensures that the \c consoleedition
+ preprocessor symbol is defined when QDoc processes the source
+ files defined in the qt.qdocconf file.
- You can also define preprocessor symbols manually on the
- command line using the -D option. For example:
+ See also \l {falsehoods-variable} {falsehoods} and \l {if-command} {\\if}.
- \code
- currentdirectory$ qdoc3 -Dconsoleedition qt.qdocconf
- \endcode
+ \target edition-variable
+ \section1 edition
- In this case the -D option ensures that the \c
- consoleedition preprocessor symbol is defined when QDoc
- processes the source files defined in the qt.qdocconf file.
+ The \c edition variable specifies which modules are included in
+ each edition of a package, and provides QDoc with information to
+ provide class lists for each edition.
- See also \l falsehoods and \l {if}{\\if}.
+ This feature is mostly used when providing documentation for Qt
+ packages.
- \row
- \o \bold edition \target edition
- \o \bold {The \c edition variable specifies which modules are
- included in each edition of a package, and provides QDoc
- with information to provide class lists for each edition.}
+ The \c edition variable is always used with a particular edition
+ name to define the modules for that edition:
- This feature is mostly used when providing documentation
- for Qt packages.
+ \code
+ edition.Console = QtCore QtNetwork QtSql QtXml
+ edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtXml \
+ QtDesigner QtAssistant Qt3Support QAxContainer \
+ QAxServer
+ edition.DesktopLight = QtCore QtGui Qt3SupportLight
+ \endcode
- The \c edition variable is always used with a particular
- edition name to define the modules for that edition:
+ In the above examples, the \c Console edition only includes the
+ contents of four modules. Only the classes from these modules will
+ be used when the \l{Miscellaneous#generatelist-command}
+ {generatelist} command is used to generate a list of classes for
+ this edition:
- \code
- edition.Console = QtCore QtNetwork QtSql QtXml
- edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtXml \
- QtDesigner QtAssistant Qt3Support QAxContainer \
- QAxServer
- edition.DesktopLight = QtCore QtGui Qt3SupportLight
- \endcode
+ \code
+ \generatelist{classesbyedition Console}
+ \endcode
- In the above examples, the \c Console edition only includes
- the contents of four modules. Only the classes from these
- modules will be used when the
- \l{Miscellaneous Commands#generatelist}{generatelist} command
- is used to generate a list of classes for this edition:
+ \target exampledirs-variable
+ \section1 exampledirs
- \code
- \generatelist{classesbyedition Console}
- \endcode
+ The \c exampledirs variable specifies the directories containing
+ the source code of the example files.
- \row
- \o \bold exampledirs \target exampledirs
- \o \bold {The \c exampledirs variable specifies the directories
- containing the source code of the example files.}
+ The \l {examples-variable} {examples} {examples} and \l
+ {exampledirs-variable} {exampledirs} variables are used by the \l
+ {quotefromfile-command} {\\quotefromfile}, \l {quotefile-command}
+ {\\quotefile} and \l {example-command} {\\example} commands. If
+ both the \l {examples-variable} {examples} and \l
+ {exampledirs-variable} {exampledirs} variables are defined, QDoc
+ will search in both, first in \l {examples-variable} {examples}
+ then in \l {exampledirs-variable} {exampledirs}.
- The \l {examples}{\c examples} and \c exampledirs variables
- are used by the \l {quotefromfile}{\\quotefromfile}, \l
- {quotefile}{\\quotefile} and \l {example}{\\example}
- commands. If both the \l {examples}{\c examples} and \c
- exampledirs variables are defined, QDoc will search in
- both, first in \l {examples}{\c examples} then in \c
- exampledirs.
+ QDoc will search through the directories in the specified order,
+ and accept the first matching file it finds. It will only search
+ in the specified directories, \e not in subdirectories.
- QDoc will search through the directories in the specified
- order, and accept the first matching file it finds. It will
- only search in the specified directories, \i not in
- subdirectories.
+ \code
+ exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR \
+ $QTDIR/qmake/examples
- For example:
+ examples = $QTDIR/examples/widgets/analogclock/analogclock.cpp
+ \endcode
- \code
- exampledirs = $QTDIR/doc/src \
- $QTDIR/examples \
- $QTDIR \
- $QTDIR/qmake/examples
+ When processing
- examples = $QTDIR/examples/widgets/analogclock/analogclock.cpp
- \endcode
+ \code
+ \quotefromfile widgets/calculator/calculator.cpp
+ \endcode
- When processing
+ QDoc will then see if there exists a file called \c calculator.cpp
+ listed as a value in the \l {examples} {\c examples} variable. If
+ it doesn't, it will search in the \c exampledirs variable, and
+ first see if there exists a file called
- \code
- \quotefromfile widgets/calculator/calculator.cpp
- \endcode
+ \code
+ $QTDIR/doc/src/widgets/calculator/calculator.cpp
+ \endcode
- QDoc will then see if there exists a file called \c
- calculator.cpp listed as a value in the \l {examples}{\c
- examples} variable. If it doesn't, it will search in the \c
- exampledirs variable, and first see if there exists a file
- called
+ If it doesn't, QDoc will continue looking for a file called
- \code
- $QTDIR/doc/src/widgets/calculator/calculator.cpp
- \endcode
+ \code
+ $QTDIR/examples/widgets/calculator/calculator.cpp
+ \endcode
- If it doesn't, QDoc will continue looking for a file
- called
+ and so forth.
- \code
- $QTDIR/examples/widgets/calculator/calculator.cpp
- \endcode
+ See also \l examples.
- and so forth.
+ \target examples-variable
+ \section1 examples
- See also \l examples.
+ The \c examples variable allows you to specify individual example
+ files in addition to those located in the directories specified by
+ the \l {exampledirs-variable} {\c exampledirs} variable.
- \row
- \o \bold examples \target examples
- \o \bold {The \c examples variable allows you to specify individual
- example files in addition to those located in the directories
- specified by the \l {exampledirs}{\c exampledirs} variable.}
-
- The \c examples and \l {exampledirs}{\c exampledirs}
- variables are used by the \l
- {quotefromfile}{\\quotefromfile}, \l
- {quotefile}{\\quotefile} and \l {example}{\\example}
- commands. If both the \c examples and \l {exampledirs}{\c
- exampledirs} variables are defined, QDoc will search in
- both, first in \c examples then in \l {exampledirs}{\c
- exampledirs}.
-
- QDoc will search through the values listed for the \c
- examples variable, in the specified order, and accept
- the first one it finds.
-
- For an extensive example, see the \l {exampledirs}{\c
- exampledirs} command. But note that if you know the file is
- listed in the \c examples variable, you don't need to
- specify its path:
+ The \c examples and \l {exampledirs-variable} {\c exampledirs}
+ variables are used by the \l {quotefromfile-command}
+ {\\quotefromfile}, \l {quotefile-command} {\\quotefile} and \l
+ {example} {\\example} commands. If both the \c examples and \l
+ {exampledirs-variable} {\c exampledirs} variables are defined,
+ QDoc will search in both, first in \c examples then in \l
+ {exampledirs-variable} {\c exampledirs}.
- \code
- \quotefromfile calculator.cpp
- \endcode
+ QDoc will search through the values listed for the \c examples
+ variable, in the specified order, and accept the first one it
+ finds.
- See also \l exampledirs.
+ For an extensive example, see the \l {exampledirs-variable} {\c
+ exampledirs} command. But note that if you know the file is listed
+ in the \c examples variable, you don't need to specify its path:
- \row
- \o \bold examples.fileextensions \target examples.fileextensions
- \o \bold {The \c examples.fileextensions variable specifies the
- file extensions that qdoc will look for when collecting example
- files for display in the documentation.}
+ \code
+ \quotefromfile calculator.cpp
+ \endcode
- The default extensions are *.cpp, *.h, *.js, *.xq, *.svg, *.xml
- and *.ui. However, if
+ See also \l {exampledirs-variable} {exampledirs}.
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ \target examples.fileextensions-variable
+ \section1 examples.fileextensions
- \code
- examples.fileextensions += *.qrc
- \endcode
+ The \c examples.fileextensions variable specifies the file
+ extensions that qdoc will look for when collecting example files
+ for display in the documentation.
- See also \l{headers.fileextensions}.
+ The default extensions are *.cpp, *.h, *.js, *.xq, *.svg, *.xml
+ and *.ui. However, if
- \row
- \o \bold extraimages \target extraimages
- \o \bold {The \c extraimages variable tells QDoc to incorporate
- specific images in the generated documentation.}
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- QDoc will not recognize images used within HTML (or any
- other markup language). If we want the images to be copied
- from the directories specified by \l {imagedirs}{\c
- imagedirs} (the images in question must be located in these
- directories) to the output directory, we must specify the
- images using the \c extraimages variable.
+ \code
+ examples.fileextensions += *.qrc
+ \endcode
- The general syntax is \tt {extraimages.\i{format} = \i
- image}. The file extension is optional.
+ See also \l{headers.fileextensions}.
- For example, in \l qt.qdocconf we use a couple of images
- within the HTML.postheader variable which value is pure
- HTML. For that reason, these images are specified using the
- \c extraimages variable:
+ \target extraimages-variable
+ \section1 extraimages
- \code
- extraimages.HTML = qt-logo
- \endcode
+ The \c extraimages variable tells QDoc to incorporate specific
+ images in the generated documentation.
- See also \l images and \l imagedirs.
+ QDoc will not recognize images used within HTML (or any other
+ markup language). If we want the images to be copied from the
+ directories specified by \l {imagedirs} {\c imagedirs} (the images
+ in question must be located in these directories) to the output
+ directory, we must specify the images using the \c extraimages
+ variable.
- \row
- \o \bold falsehoods \target falsehoods
- \o \bold {The \c falsehoods variable defines the truth value of
- specified preprocessor symbols as false.}
+ The general syntax is \tt {extraimages.\e{format} = \e image}. The
+ file extension is optional.
- If this variable is not set for a preprocessor symbol, QDoc
- assumes its truth value is true. The exception is '0',
- which value always is false.
+ For example, in \l qt.qdocconf we use a couple of images within
+ the HTML.postheader variable which value is pure HTML. For that
+ reason, these images are specified using the \c extraimages
+ variable:
- QDoc will recognize, and is able to evaluate, the following
- preprocessor syntax:
+ \code
+ extraimages.HTML = qt-logo
+ \endcode
- \code
- #ifdef NOTYET
- ...
- #endif
+ See also \l images and \l imagedirs.
- #if defined (NOTYET)
- ...
- #end if
- \endcode
+ \target falsehoods-variable
+ \section1 falsehoods
- However, faced with unknown syntax like
+ The \c falsehoods variable defines the truth value of specified
+ preprocessor symbols as false.
- \code
- #if NOTYET
- ...
- #endif
- \endcode
+ If this variable is not set for a preprocessor symbol, QDoc
+ assumes its truth value is true. The exception is '0', which value
+ always is false.
- QDoc will evaluate it as true by default, \i unless the
- preprocessor symbol is specified within the \c falsehoods
- variable entry:
+ QDoc will recognize, and is able to evaluate, the following
+ preprocessor syntax:
- \code
- falsehoods = NOTYET
- \endcode
+ \code
+ #ifdef NOTYET
+ ...
+ #endif
- See also \l defines.
+ #if defined (NOTYET)
+ ...
+ #end if
+ \endcode
- \row
- \o \bold generateindex \target generateindex
- \o \bold{The \c generateindex variable contains a boolean value that
- specifies whether to generate an index file when HTML documentation
- is generated.}
-
- By default, an index file is always generated with HTML documentation,
- so this variable is typically only used when disabling this feature
- (by setting the value to \c false) or when enabling index generation
- for the WebXML output (by setting the value to \c true).
- \row
- \o \bold headerdirs \target headerdirs
- \o \bold {The \c headerdirs variable specifies the directories
- containing the header files associated with the \c .cpp source
- files used in the documentation.}
+ However, faced with unknown syntax like
- For example:
+ \code
+ #if NOTYET
+ ...
+ #endif
+ \endcode
- \code
- headerdirs = $QTDIR/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/extensions/motif \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib
- \endcode
+ QDoc will evaluate it as true by default, \e unless the
+ preprocessor symbol is specified within the \c falsehoods variable
+ entry:
- When executed, the first QDoc will do is to read through
- the headers specified in the \l {headers}{\c headers}
- variable, and the ones located in the directories specified
- in the \c headerdir variable (including all
- subdirectories), building an internal structure of the
- classes and their functions.
-
- Then it will read through the sources specified in the \l
- {sources}{\c sources}, and the ones located in the
- directories specified in the \l {sourcedirs}{\c sourcedirs}
- varible (including all subdirectories), merging the
- documentation with the structure it retrieved from the
- header files.
-
- If both the \c headers and \c headerdirs variables are
- defined, QDoc will read through both, first \l {headers}{\c
- headers} then \c headerdirs.
-
- In the specified directories, QDoc will only read the files
- with the fileextensions specified in the \l
- {headers.fileextensions}{\c headers.fileextensions}
- variable. The default extensions are *.ch, *.h, *.h++,
- *.hh, *.hpp and *.hxx". The files specified by \l
- {headers}{\c headers} will be read independent of their
- fileextensions.
-
- See also \l headers and \l headers.fileextensions.
+ \code
+ falsehoods = NOTYET
+ \endcode
- \row
- \o \bold headers \target headers
- \o \bold {The \c headers variable allows you to specify individual
- header files in addition to those located in the directories
- specified by the \l {headerdirs}{\c headerdirs} variable.}
+ See also \l defines.
- For example:
+ \target generateindex-variable
+ \section1 generateindex
- \code
- headers = $QTDIR/src/gui/widgets/qlineedit.h \
- $QTDIR/src/gui/widgets/qpushbutton.h
- \endcode
+ The \c generateindex variable contains a boolean value that
+ specifies whether to generate an index file when HTML
+ documentation is generated.
- When processing the \c headers variable, QDoc behaves in the
- same way as it does when processing the \l {headerdirs}{\c
- headerdirs} variable. For more information, see the \l
- {headerdirs}{\c headerdirs} variable.
+ By default, an index file is always generated with HTML
+ documentation, so this variable is typically only used when
+ disabling this feature (by setting the value to \c false) or when
+ enabling index generation for the WebXML output (by setting the
+ value to \c true).
- See also \l headerdirs.
+ \target headerdirs-variable
+ \section1 headerdirs
- \row
- \o \bold headers.fileextensions \target headers.fileextensions
- \o \bold {The \c headers.fileextensions variable specify the
- extension used by the headers.}
+ The \c headerdirs variable specifies the directories containing
+ the header files associated with the \c .cpp source files used in
+ the documentation.
- When processing the header files specified in the \l
- {headerdirs}{\c headerdirs} variable, QDoc will only read
- the files with the fileextensions specified in the \c
- headers.fileextensions variable. In this way QDoc avoid
- spending time reading irrelevant files.
+ \code
+ headerdirs = $QTDIR/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
- The default extensions are *.ch, *.h, *.h++, *.hh, *.hpp
- and *.hxx.
+ When executed, the first QDoc will do is to read through the
+ headers specified in the \l {headers} {\c headers} variable, and
+ the ones located in the directories specified in the \c headerdir
+ variable (including all subdirectories), building an internal
+ structure of the classes and their functions.
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ Then it will read through the sources specified in the \l
+ {sources-variable} {\c sources}, and the ones located in the
+ directories specified in the \l {sourcedirs-variable} {\c
+ sourcedirs} varible (including all subdirectories), merging the
+ documentation with the structure it retrieved from the header
+ files.
- \code
- header.fileextensions += *.H
- \endcode
+ If both the \c headers and \c headerdirs variables are defined,
+ QDoc will read through both, first \l {headers} {\c headers} then
+ \c headerdirs.
- \warning The above assignment may not work as described.
+ In the specified directories, QDoc will only read the files with
+ the fileextensions specified in the \l {headers.fileextensions}
+ {\c headers.fileextensions} variable. The default extensions are
+ *.ch, *.h, *.h++, *.hh, *.hpp and *.hxx". The files specified by
+ \l {headers} {\c headers} will be read independent of their
+ fileextensions.
- See also \l headerdirs.
+ See also \l headers and \l headers.fileextensions.
- \row
- \o \bold imagedirs \target imagedirs
- \o \bold {The \c imagedirs variable specifies the directories
- containing the images used in the documentation.}
+ \target headers-variable
+ \section1 headers
- The \l {images}{\c images} and \c imagedirs variables are
- used by the \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage} commands. If both the \l
- {images}{\c images} and \c imagedirs variables are defined,
- QDoc will search in both, first in \l {images}{\c images}
- then in \c imagedirs.
+ The \c headers variable allows you to specify individual header
+ files in addition to those located in the directories specified by
+ the \l {headerdirs} {\c headerdirs} variable.
- QDoc will search through the directories in the specified
- order, and accept the first matching file it finds. It will
- only search in the specified directories, \i not in
- subdirectories.
+ \code
+ headers = $QTDIR/src/gui/widgets/qlineedit.h \
+ $QTDIR/src/gui/widgets/qpushbutton.h
+ \endcode
- For example:
+ When processing the \c headers variable, QDoc behaves in the same
+ way as it does when processing the \l {headerdirs} {\c headerdirs}
+ variable. For more information, see the \l {headerdirs} {\c
+ headerdirs} variable.
- \code
- imagedirs = $QTDIR/doc/src/images \
- $QTDIR/examples
+ See also \l headerdirs.
- images = $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ \target headers.fileextensions-variable
+ \section1 headers.fileextensions
- When processing
+ The \c headers.fileextensions variable specify the extension used
+ by the headers.
- \code
- \image calculator-example.png
- \endcode
+ When processing the header files specified in the \l {headerdirs}
+ {\c headerdirs} variable, QDoc will only read the files with the
+ fileextensions specified in the \c headers.fileextensions
+ variable. In this way QDoc avoid spending time reading irrelevant
+ files.
- QDoc will then see if there exists a file called
- calculator-example.png listed as a value in the \c images
- variable. If it doesn't, it will search in the \c imagedirs
- variable, and first see if there exists a file called
+ The default extensions are *.ch, *.h, *.h++, *.hh, *.hpp and
+ *.hxx.
- \code
- $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- If it doesn't, QDoc will look for a file called
+ \code
+ header.fileextensions += *.H
+ \endcode
- \code
- $QTDIR/examples/calculator-example.png
- \endcode
+ \warning The above assignment may not work as described.
- You can filter the images in an image directory using the
- \l {images.fileextensions}{\c images.fileextensions}
- variable. The general idea behind the \l
- {images.fileextensions}{\c images.fileextensions} variable
- is to enable different image format for different output
- format.
+ See also \l headerdirs.
- \warning The \l {images.fileextensions}{\c
- images.fileextensions} variable's functionality is
- preliminay since QDoc at this point only support HTML.
+ \target imagedirs-variable
+ \section1 imagedirs
- See also \l images and \l images.fileextensions.
+ The \c imagedirs variable specifies the directories containing the
+ images used in the documentation.
- \row
- \o \bold images \target images
- \o \bold {The \c images variable allows you to specify individual
- image files in addition to those located in the directories
- specified by the \l {imagedirs}{\c imagedirs} variable.}
+ The \l {images} {\c images} and \c imagedirs variables are used by
+ the \l {image-command} {\\image} and \l {inlineimage-command}
+ {\\inlineimage} commands. If both the \l {images} {\c images} and
+ \c imagedirs variables are defined, QDoc will search in both,
+ first in \l {images} {\c images} then in \c imagedirs.
- For example:
+ QDoc will search through the directories in the specified order,
+ and accept the first matching file it finds. It will only search
+ in the specified directories, \e not in subdirectories.
- \code
- images = $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ \code
+ imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
- When processing the \c images variable, QDoc behaves in the
- same way as it does when processing the \l {imagedirs}{\c
- imagedirs} variable. For more information, see the \l
- {imagedirs}{\c imagedirs} variable.
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- See also \l imagedirs and \l images.fileextensions.
+ When processing
- \row
- \o \bold images.fileextensions \target images.fileextensions
- \o \bold {The images.fileextensions variable filters the files within
- an image directory.}
+ \code
+ \image calculator-example.png
+ \endcode
- The variable's values (the extensions) are given as
- standard wildcard expressions. The general syntax is: \tt
- {images.fileextensions.\i{format} = *.\i{extension}}.
+ QDoc will then see if there exists a file called
+ calculator-example.png listed as a value in the \c images
+ variable. If it doesn't, it will search in the \c imagedirs
+ variable, and first see if there exists a file called
- The idea is to enable different image format for different
- output format. For example:
+ \code
+ $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- \code
- images.fileextensions.HTML = *.png
- images.fileextensions.LOUT = *.eps
- \endcode
+ If it doesn't, QDoc will look for a file called
- Then, when processing the \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage} commands, QDoc will only
- search for files with extensions specified in the output
- format's associated image extension variable.
+ \code
+ $QTDIR/examples/calculator-example.png
+ \endcode
- \warning This is preliminary functionality since QDoc at
- this point only support HTML.
+ You can filter the images in an image directory using the \l
+ {images.fileextensions} {\c images.fileextensions} variable. The
+ general idea behind the \l {images.fileextensions} {\c images.fileextensions}
+ variable is to enable different image format for different output format.
- The default extensions for HTML are *.png, *.jpg, *.jpeg
- and *.gif.
+ \warning The \l {images.fileextensions} {\c images.fileextensions}
+ variable's functionality is preliminay since QDoc at this point
+ only support HTML.
- You can add a file extension to the filter using '+='. For
- example:
+ See also \l images and \l images.fileextensions.
- \code
- images.fileextensions.HTML += *.eps
- \endcode
+ \target images-variable
+ \section1 images
- See also \l imagedirs and \l images.
+ The \c images variable allows you to specify individual image
+ files in addition to those located in the directories specified by
+ the \l {imagedirs} {\c imagedirs} variable.
- \row
- \o \bold language \target language
- \o \bold {The \c language variable specifies the language of the
- source code that is used in the documentation.}
+ \code
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- Currently, C++ is the only language that QDoc
- understands. It is also the default language, and doesn't
- really need to be specified. But for example in \l
- qt.qdocconf:
+ When processing the \c images variable, QDoc behaves in the same
+ way as it does when processing the \l {imagedirs} {\c imagedirs}
+ variable. For more information, see the \l {imagedirs} {\c
+ imagedirs} variable.
- \code
- language = Cpp
- \endcode
+ See also \l imagedirs and \l images.fileextensions.
- identifies the language of the Qt source code as C++.
+ \target images.fileextensions-variable
+ \section1 images.fileextensions
- \row
- \o \bold macro \target macro
- \o \bold {The \c macro variable can be used to create your
- own QDoc commands.}
+ The images.fileextensions variable filters the files within an
+ image directory.
- The general syntax is \tt {macro.\i{command} =
- "\i{definition}}". The definition can be described using
- QDoc syntax. In addition it is possible to provide an HTML
- definition by appending .HTML to the variable.
+ The variable's values (the extensions) are given as standard
+ wildcard expressions. The general syntax is: \tt
+ {images.fileextensions.\e{format} = *.\e{extension}}.
- For example in \l qt.qdocconf:
+ The idea is to enable different image format for different output
+ format.
- \code
- macro.gui = "\\bold"
- macro.raisedaster.HTML = "<sup>*</sup>"
- \endcode
+ \code
+ images.fileextensions.HTML = *.png
+ images.fileextensions.LOUT = *.eps
+ \endcode
- makes sure that the \\gui command renders its argument using a
- bold font, and that \\raisedaster renders a '*'.
+ Then, when processing the \l {image-command} {\\image} and \l
+ {inlineimage-command} {\\inlineimage} commands, QDoc will only
+ search for files with extensions specified in the output format's
+ associated image extension variable.
- \row
- \o \bold naturallanguage \target naturallanguage
- \o \bold {The \c naturallanguage variable specifies the natural
- language used for the documentation generated by qdoc.}
+ \warning This is preliminary functionality since QDoc at this
+ point only support HTML.
- For example:
+ The default extensions for HTML are *.png, *.jpg, *.jpeg and
+ *.gif.
- \code
- naturallanguage = zh-Hans
- \endcode
+ You can add a file extension to the filter using '+='. For
+ example:
- By default, the natural language is \c en for compatibility
- with legacy documentation.
+ \code
+ images.fileextensions.HTML += *.eps
+ \endcode
- qdoc will add the natural language information to the HTML
- it generates, using the \c lang and \c xml:lang attributes.
+ See also \l imagedirs and \l images.
- See also \l sourceencoding, \l outputencoding,
- \l{http://www.w3.org/TR/xhtml1/#C_7}{C.7. The lang and xml:lang Attributes} and
- \l{http://www.w3.org/TR/i18n-html-tech-lang/#ri20040429.113217290}{Best Practice 13: Using Hans and Hant codes}.
+ \target language-variable
+ \section1 language
- \row
- \o \bold outputdir \target outputdir
- \o \bold {The \c outputdir variable specifies the directory
- where QDoc will put the generated documentation.}
+ The \c language variable specifies the language of the source code
+ that is used in the documentation.
- In qt.qdocconf:
+ Currently, C++ is the only language that QDoc understands. It is
+ also the default language, and doesn't really need to be
+ specified. But for example in \l qt.qdocconf:
- \code
- outputdir = $QTDIR/doc/html
- \endcode
+ \code
+ language = Cpp
+ \endcode
- locates the generated Qt reference documentation in
- $QTDIR/doc/html. For example, the documentation of the
- QWidget class is located in
+ identifies the language of the Qt source code as C++.
- \code
- $QTDIR/doc/html/qwidget.html
- \endcode
+ \target macro-variable
+ \section1 macro
- The associated images will be put in an \c images subdirectory.
+ The \c macro variable can be used to create your own QDoc
+ commands.
- \warning When running QDoc multiple times using the same output
- directory, all files from the previous run will be lost.
+ The general syntax is \tt {macro.\e{command} =
+ "\e{definition}}". The definition can be described using QDoc
+ syntax. In addition it is possible to provide an HTML definition
+ by appending .HTML to the variable.
- \row
- \o \bold outputencoding \target outputencoding
- \o \bold {The \c outputencoding variable specifies the encoding
- used for the documentation generated by qdoc.}
+ For example in \l qt.qdocconf:
- For example:
+ \code
+ macro.gui = "\\bold"
+ macro.raisedaster.HTML = "<sup>*</sup>"
+ \endcode
- \code
- outputencoding = UTF-8
- \endcode
+ makes sure that the \\gui command renders its argument using a
+ bold font, and that \\raisedaster renders a '*'.
- By default, the output encoding is \c ISO-8859-1 (Latin1) for
- compatibility with legacy documentation. When generating
- documentation for some languages, particularly non-European
- languages, this is not sufficient and an encoding such as UTF-8
- is required.
+ \target naturallanguage-variable
+ \section1 naturallanguage
- qdoc will encode HTML using this encoding and generate the
- correct declarations to indicate to browsers which encoding
- is being used. The \l naturallanguage configuration variable
- should also be specified to provide browsers with a complete
- set of character encoding and language information.
+ The \c naturallanguage variable specifies the natural language
+ used for the documentation generated by qdoc.
- See also \l outputencoding and \l naturallanguage.
+ \code
+ naturallanguage = zh-Hans
+ \endcode
- \row
- \o \bold outputformats \target outputformats
- \o \bold {The \c outputformats variable specifies the format of
- the generated documentation.}
+ By default, the natural language is \c en for compatibility with
+ legacy documentation.
- Currently, QDoc only supports the HTML format. It is also
- the default format, and doesn't need to be specified.
+ qdoc will add the natural language information to the HTML it
+ generates, using the \c lang and \c xml:lang attributes.
- \row
- \o \bold outputprefixes \target outputprefixes
- \o \bold {The \c outputprefixes variable specifies a mapping between
- types of files and the prefixes to prepend to the HTML file names
- in the generated documentation.}
+ See also \l {sourceencoding-variable} {sourceencoding},
+ \l {outputencoding-variable} {outputencoding},
+ \l{http://www.w3.org/TR/xhtml1/#C_7}
+ {C.7. The lang and xml:lang Attributes} and
+ \l{http://www.w3.org/TR/i18n-html-tech-lang/#ri20040429.113217290}
+ {Best Practice 13: Using Hans and Hant codes}.
- For example:
+ \target outputdir-variable
+ \section1 outputdir
- \code
- outputprefixes = QML
- outputprefixes.QML = qt-components-
- \endcode
+ The \c outputdir variable specifies the directory where QDoc will
+ put the generated documentation.
- Be default, files containing the API documentation for QML elements
- or components are prefixed with "qml-". In the above example, the
- prefix "qt-components-" is used instead.
+ In qt.qdocconf:
- \row
- \o \bold qhp \target qhp
- \o \bold{The \c qhp variable is used to define the information to be
- written out to Qt Help Project (\c{qhp}) files.}
+ \code
+ outputdir = $QTDIR/doc/html
+ \endcode
- See the \l{Creating Help Project Files} chapter for information
- about this process.
+ locates the generated Qt reference documentation in
+ $QTDIR/doc/html. For example, the documentation of the QWidget
+ class is located in
- \row
- \o \bold slow (removed) \target slow
- \o \bold {The \c slow variable previously specified whether QDoc should
- do time-consuming processing, such as syntax highlighting.}
+ \code
+ $QTDIR/doc/html/qwidget.html
+ \endcode
- This option has been replaced by the \l{syntaxhighlighing} option.
+ The associated images will be put in an \c images subdirectory.
- For compatibility, the \c -slow command-line option has been
- retained. This has the effect of enabling syntax highlighting.
+ \warning When running QDoc multiple times using the same output
+ directory, all files from the previous run will be lost.
- \row
- \o \bold sourcedirs \target sourcedirs
- \o \bold {The \c sourcedirs variable specifies the directories
- containing the \c .cpp or \c .qdoc files used in
- the documentation.}
+ \target outputencoding-variable
+ \section1 outputencoding
- For example in \l qt.qdocconf
+ The \c outputencoding variable specifies the encoding used for the
+ documentation generated by qdoc.
- \code
- sourcedirs = $QTDIR/src \
- $QTDIR/doc/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/extensions/motif \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib
- \endcode
+ \code
+ outputencoding = UTF-8
+ \endcode
- When executed, the first QDoc will do is to read through
- the headers specified in the \l {header}{\c header}
- variable, and the ones located in the directories specified
- in the \c headerdir variable (including all
- subdirectories), building an internal structure of the
- classes and their functions.
-
- Then it will read through the sources specified in the \l
- {sources}{\c sources}, and the ones located in the
- directories specified in the \l {sourcedirs}{\c sourcedirs}
- varible (including all subdirectories), merging the
- documentation with the structure it retrieved from the
- header files.
-
- If both the \c sources and \c sourcedirs variables are
- defined, QDoc will read through both, first \l {sources}{\c
- sources} then \c sourcedirs.
-
- In the specified directories, QDoc will only read the files
- with the fileextensions specified in the \l
- {sources.fileextensions}{\c sources.fileextensions}
- variable. The default extensions are *.c++, *.cc, *.cpp and
- *.cxx. The files specified by \l {sources}{\c sources} will
- be read independent of their fileextensions.
-
- See also \l sources and \l sources.fileextensions.
+ By default, the output encoding is \c ISO-8859-1 (Latin1) for
+ compatibility with legacy documentation. When generating
+ documentation for some languages, particularly non-European
+ languages, this is not sufficient and an encoding such as UTF-8 is
+ required.
- \row
- \o \bold sourceencoding \target sourceencoding
- \o \bold {The \c sourceencoding variable specifies the encoding
- used for the source code and documentation.}
+ qdoc will encode HTML using this encoding and generate the correct
+ declarations to indicate to browsers which encoding is being
+ used. The \l naturallanguage configuration variable should also be
+ specified to provide browsers with a complete set of character
+ encoding and language information.
- For example:
+ See also \l outputencoding and \l naturallanguage.
- \code
- sourceencoding = UTF-8
- \endcode
+ \target outputformats-variable
+ \section1 outputformats
- By default, the source encoding is \c ISO-8859-1 (Latin1) for
- compatibility with legacy documentation. For some languages,
- particularly non-European languages, this is not sufficient
- and an encoding such as UTF-8 is required.
+ The \c outputformats variable specifies the format of
+ the generated documentation.
- Although qdoc will use the encoding to read source and
- documentation files, limitations of C++ compilers may prevent
- you from using non-ASCII characters in source code comments.
- In cases like these, it is possible to write API documentation
- completely in documentation files.
+ Currently, QDoc only supports the HTML format. It is also
+ the default format, and doesn't need to be specified.
- See also \l naturallanguage and \l outputencoding.
+ \target outputprefixes
+ \section1 outputprefixes
- \row
- \o \bold sources \target sources
- \o \bold {The \c sources variable allows you to specify
- individual source files in addition to those located in the
- directories specified by the \l {sourcedir}{\c sourcedir}
- variable.}
+ The \c outputprefixes variable specifies a mapping between types of files
+ and the prefixes to prepend to the HTML file names in the generated
+ documentation.
- For example:
+ \code
+ outputprefixes = QML
+ outputprefixes.QML = qt-components-
+ \endcode
- \code
- sources = $QTDIR/src/gui/widgets/qlineedit.cpp \
- $QTDIR/src/gui/widgets/qpushbutton.cpp
- \endcode
+ By default, files containing the API documentation for QML elements
+ or components are prefixed with "qml-". In the above example, the
+ prefix "qt-components-" is used instead.
- When processing the \c sources variable, QDoc behaves in the
- same way as it does when processing the \l {sourcedirs}{\c
- sourcedirs} variable. For more information, see the \l
- {sourcedirs}{\c sourcedirs} variable.
+ \target qhp-variable
+ \section1 qhp
- See also \l sourcedirs.
+ The \c qhp variable is used to define the information to be
+ written out to Qt Help Project (\c{qhp}) files.
- \row
- \o \bold sources.fileextensions \target sources.fileextensions
- \o \bold {The \c sources.fileextensions variable filters the
- files within a source directory.}
+ See the \l{Creating Help Project Files} chapter for information
+ about this process.
- When processing the source files specified in the \l
- {sourcedirs}{\c sourcedirs} variable, QDoc will only read
- the files with the fileextensions specified in the \c
- sources.fileextensions variable. In this way QDoc avoid
- spending time reading irrelevant files.
- The default extensions are *.c++, *.cc, *.cpp and *.cxx.
+ \target slow-variable
+ \section1 slow
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ The \c slow variable specifies whether QDoc should do
+ time-consuming processing, such as syntax highlighting. The
+ default value is false.
- \code
- sources.fileextensions += *.CC
- \endcode
+ \note This option has been replaced by the \l{syntaxhighlighting} option.
- \warning The above assignment may not work as described.
+ For compatibility, the \c -slow command-line option has been
+ retained. This has the effect of enabling syntax highlighting.
- See also \l sourcedirs and \l sources.
+ \target sourcedirs-variable
+ \section1 sourcedirs
- \row
- \o \bold spurious \target spurious
- \o \bold {The \c spurious variable excludes specified
- QDoc warnings from the output.}
+ The \c sourcedirs variable specifies the directories containing
+ the \c .cpp or \c .qdoc files used in the documentation.
- The warnings are specified using standard wildcard
- expressions. For example:
+ For example in \l qt.qdocconf
- \code
- spurious = "Cannot find .*" \
- "Missing .*"
- \endcode
+ \code
+ sourcedirs = $QTDIR/src \
+ $QTDIR/doc/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
- makes sure that warnings matching either of these
- expressions, will not be part of the output when running
- QDoc. For example would the following warning be omitted
- from the output:
+ When executed, the first QDoc will do is to read through the
+ headers specified in the \l {header-command} {\c header} variable,
+ and the ones located in the directories specified in the \c
+ headerdir variable (including all subdirectories), building an
+ internal structure of the classes and their functions.
- \code
- qt-4.0/src/opengl/qgl_mac.cpp:156: Missing parameter name
- \endcode
+ Then it will read through the sources specified in the \l
+ {sources} {\c sources}, and the ones located in the directories
+ specified in the \l {sourcedirs} {\c sourcedirs} varible
+ (including all subdirectories), merging the documentation with the
+ structure it retrieved from the header files.
- \row
- \o \bold syntaxhighlighting \target syntaxhighlighting
- \o \bold{The \c syntaxhighlighting variable specifies whether QDoc
- should perform syntax highlighting on source code quoted in the
- documentation it output.}
+ If both the \c sources and \c sourcedirs variables are defined,
+ QDoc will read through both, first \l {sources} {\c sources} then
+ \c sourcedirs.
- For example:
+ In the specified directories, QDoc will only read the files with
+ the fileextensions specified in the \l {sources.fileextensions}
+ {\c sources.fileextensions} variable. The default extensions are
+ *.c++, *.cc, *.cpp and *.cxx. The files specified by \l {sources}
+ {\c sources} will be read independent of their fileextensions.
- \code
- syntaxhighlighting = true
- \endcode
+ See also \l {sources-variable} {sources} and
+ \l {sources.fileextensions-variable} {sources.fileextensions}.
- will enable syntax highlighting for all supported programming
- languages.
+ \target sourceencoding-variable
+ \section1 sourceencoding
- \row
- \o \bold tabsize \target tabsize
- \o \bold {The \c tabsize variable defines the size of a tab
- character.}
+ The \c sourceencoding variable specifies the encoding used for the
+ source code and documentation.
- For example:
+ \code
+ sourceencoding = UTF-8
+ \endcode
- \code
- tabsize = 4
- \endcode
+ By default, the source encoding is \c ISO-8859-1 (Latin1) for
+ compatibility with legacy documentation. For some languages,
+ particularly non-European languages, this is not sufficient and an
+ encoding such as UTF-8 is required.
- will give the tab character the size of 4 spaces.
+ Although qdoc will use the encoding to read source and
+ documentation files, limitations of C++ compilers may prevent you
+ from using non-ASCII characters in source code comments. In cases
+ like these, it is possible to write API documentation completely
+ in documentation files.
- The default value of the variable is 8, and doesn't need to
- be specified.
+ See also \l {naturallanguage-variable} {naturallanguage} and
+ \l {outputencoding-variable} {outputencoding}.
- \row
- \o \bold tagfile \target tagfile
- \o \bold{The \c tagfile variable specifies the Doxygen tag file to be written
- when HTML is generated.}
- \row
- \o \bold version \target version
- \o \bold {The \c version variable specifies the version number of the
- documented software.}
+ \target sources-variable
+ \section1 sources
- For example:
+ The \c sources variable allows you to specify individual source
+ files in addition to those located in the directories specified by
+ the \l {sourcedirs-variable} {sourcedirs} variable.
- \code
- version = 4.0.1
- \endcode
+ \code
+ sources = $QTDIR/src/gui/widgets/qlineedit.cpp \
+ $QTDIR/src/gui/widgets/qpushbutton.cpp
+ \endcode
- When a version number is specified (using the \tt{\l
- version} or \tt {\l versionsym} variables in a \c .qdocconf
- file), it is accessible through the corresponding \\version
- command for use in the documentation.
+ When processing the \c sources variable, QDoc behaves in the same
+ way as it does when processing the \l {sourcedirs-variable}
+ {sourcedirs} variable. For more information, see the \l
+ {sourcedirs-variable} {sourcedirs} variable.
- \warning The \\version command's functionality is not
- fully implemented; currently it only works within raw HTML
- code.
+ See also \l {sourcedirs-variable} {sourcedirs}.
- See also \l versionsym.
+ \target sources.fileextensions-variable
+ \section1 sources.fileextensions
- \row
- \o \bold versionsym \target versionsym
- \o \bold {The \c versionsym variable specifies a C++
- preprocessor symbol that defines the version number
- of the documented software.}
+ The \c sources.fileextensions variable filters the files within a
+ source directory.
- For example in \l qt.qdocconf:
+ When processing the source files specified in the \l {sourcedirs}
+ {\c sourcedirs} variable, QDoc will only read the files with the
+ fileextensions specified in the \c sources.fileextensions
+ variable. In this way QDoc avoid spending time reading irrelevant
+ files.
- \code
- versionsym = QT_VERSION_STR
- \endcode
+ The default extensions are *.c++, *.cc, *.cpp and *.cxx.
- QT_VERSION_STR is defined in qglobal.h as follows
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- \code
- #define QT_VERSION_STR "4.0.1"
- \endcode
+ \code
+ sources.fileextensions += *.CC
+ \endcode
- When a version number is specified (using the \tt{\l
- version} or \tt {\l versionsym} variables in a \c .qdocconf
- file), it is accessible through the corresponding \\version
- command for use in the documentation.
+ \warning The above assignment may not work as described.
- \warning The \\version command's functionality is not fully
- implemented; currently it only works within raw HTML code.
+ See also \l {sourcedirs-variable} {sourcedirs} and \l
+ (sources-variable} {sources}.
- See also \l {version}{\\version}.
- \endtable
+ \target spurious-variable
+ \section1 spurious
+
+ The \c spurious variable excludes specified QDoc warnings from the
+ output. The warnings are specified using standard wildcard
+ expressions.
+
+ \code
+ spurious = "Cannot find .*" \
+ "Missing .*"
+ \endcode
+
+ makes sure that warnings matching either of these expressions,
+ will not be part of the output when running QDoc. For example
+ would the following warning be omitted from the output:
+
+ \code
+ qt-4.0/src/opengl/qgl_mac.cpp:156: Missing parameter name
+ \endcode
+
+ \target syntaxhighlighting
+ \section1 syntaxhighlighting
+
+ The \c syntaxhighlighting variable specifies whether QDoc should
+ perform syntax highlighting on source code quoted in the
+ documentation it generates.
+
+ \code
+ syntaxhighlighting = true
+ \endcode
+
+ will enable syntax highlighting for all supported programming
+ languages.
+
+ \target tabsize-variable
+ \section1 tabsize
+
+ The \c tabsize variable defines the size of a tab character.
+
+ \code
+ tabsize = 4
+ \endcode
+
+ will give the tab character the size of 4 spaces. The default
+ value of the variable is 8, and doesn't need to be specified.
+
+ \target tagfile-variable
+ \section1 tagfile
+
+ The \c tagfile variable specifies the Doxygen tag file to be
+ written when HTML is generated.
+
+ \target version-variable
+ \section1 version
+
+ The \c version variable specifies the version number of the
+ documented software.
+
+ \code
+ version = 4.0.1
+ \endcode
+
+ When a version number is specified (using the \tt{\l version} or
+ \tt {\l versionsym} variables in a \c .qdocconf file), it is
+ accessible through the corresponding \\version command for use in
+ the documentation.
+
+ \warning The \\version command's functionality is not fully
+ implemented; currently it only works within raw HTML code.
+
+ See also \l versionsym.
+
+ \target versionsym-variable
+ \section1 versionsym
+
+ The \c versionsym variable specifies a C++ preprocessor symbol
+ that defines the version number of the documented software.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ versionsym = QT_VERSION_STR
+ \endcode
+
+ QT_VERSION_STR is defined in qglobal.h as follows
+
+ \code
+ #define QT_VERSION_STR "4.0.1"
+ \endcode
+
+ When a version number is specified (using the \tt{\l version} or
+ \tt {\l versionsym} variables in a \c .qdocconf file), it is
+ accessible through the corresponding \\version command for use in
+ the documentation.
+
+ \warning The \\version command's functionality is not fully
+ implemented; currently it only works within raw HTML code.
+
+ See also \l {version} {\\version}.
*/
/*!
\page 22-creating-help-project-files.html
- \previouspage General Configuration Variables
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Generic Configuration Variables
+ \contentspage Table of Contents
\nextpage C++ Specific Configuration Variables
\title Creating Help Project Files
@@ -8131,7 +7903,7 @@
/*!
\page 23-qdoc-configuration-cppvariables.html
\previouspage Creating Help Project Files
- \contentspage QDoc Manual - Table of Contents
+ \contentspage Table of Contents
\nextpage HTML Specific Configuration Variables
\title C++ Specific Configuration Variables
@@ -8139,137 +7911,114 @@
The C++ specific configuration variables are provided to avoid
erroneous documentation due to non-standard C++ constructs.
- \section1 Alphabetical List
-
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
- {Cpp.ignoredirectives},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
- {Cpp.ignoretokens}
-
- \section1 Variable Descriptions
+ \target Cpp.ignoredirectives-variable
+ \section1 Cpp.ignoredirectives
- \table
-
- \header
- \o Variable
- \o Description
+ The \c Cpp.ignoredirectives variable makes QDoc ignore the
+ specified non-standard constructs, within C++ source code.
- \row
- \o \bold Cpp.ignoredirectives \target Cpp.ignoredirectives
- \o \bold {The \c Cpp.ignoredirectives variable makes QDoc ignore
- the specified non-standard constructs, within C++ source code.}
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt {\l
+ Cpp.ignoredirectives} variables, non-standard constructs
+ (typically macros) can result in erroneous documentation.
- If not specified by the \tt {\l Cpp.ignoretokens} or \tt
- {\l Cpp.ignoredirectives} variables, non-standard
- constructs (typically macros) can result in erroneous
- documentation.
+ In \l qt.qdocconf:
- In \l qt.qdocconf:
+ \code
+ Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
+ Q_DECLARE_OPERATORS_FOR_FLAGS \
+ Q_DECLARE_PRIVATE \
+ Q_DECLARE_PUBLIC \
+ Q_DISABLE_COPY \
+ Q_DUMMY_COMPARISON_OPERATOR \
+ Q_ENUMS \
+ Q_FLAGS \
+ Q_INTERFACES \
+ __attribute__
+ \endcode
- \code
- Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
- Q_DECLARE_OPERATORS_FOR_FLAGS \
- Q_DECLARE_PRIVATE \
- Q_DECLARE_PUBLIC \
- Q_DISABLE_COPY \
- Q_DUMMY_COMPARISON_OPERATOR \
- Q_ENUMS \
- Q_FLAGS \
- Q_INTERFACES \
- __attribute__
- \endcode
+ makes sure that when processing the code below, for example, QDoc
+ will simply ignore the 'Q_ENUMS' and 'Q_FLAGS' expressions:
- makes sure that when processing the code below, for
- example, QDoc will simply ignore the 'Q_ENUMS' and
- 'Q_FLAGS' expressions:
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+
+ public:
+ ...
+ };
+ \endcode
- \code
- class Q_CORE_EXPORT Qt {
- Q_OBJECT
- Q_ENUMS(Orientation TextFormat BackgroundMode
- DateFormat ScrollBarPolicy FocusPolicy
- ContextMenuPolicy CaseSensitivity
- LayoutDirection ArrowType)
- Q_ENUMS(ToolButtonStyle)
- Q_FLAGS(Alignment)
- Q_FLAGS(Orientations)
- Q_FLAGS(DockWidgetAreas)
-
- public:
- ...
- };
- \endcode
+ The Q_OBJECT macro, however, is an exception: QDoc recognizes this
+ particular non-standard construct, so there is no need specifying
+ it using the \tt {\l Cpp.ignoredirectives} variable.
- The Q_OBJECT macro, however, is an exception: QDoc
- recognizes this particular non-standard construct, so there
- is no need specifying it using the \tt {\l
- Cpp.ignoredirectives} variable.
+ Regarding the Q_CORE_EXPORT macro; see the documentation of the
+ \tt {\l Cpp.ignoretokens} variable.
- Regarding the Q_CORE_EXPORT macro; see the documentation of
- the \tt {\l Cpp.ignoretokens} variable.
+ See also \l Cpp.ignoretokens.
- See also \l Cpp.ignoretokens.
+ \target Cpp.ignoretokens-variable
+ \section1 Cpp.ignoretokens
- \row
- \o \bold Cpp.ignoretokens \target Cpp.ignoretokens
- \o \bold {The \c Cpp.ignoretokens variable makes QDoc ignore
- the specified non-standard constructs, within C++ source code.}
+ The \c Cpp.ignoretokens variable makes QDoc ignore the specified
+ non-standard constructs, within C++ source code.
- If not specified by the \tt {\l Cpp.ignoretokens} or \tt
- {\l Cpp.ignoredirectives} variables, non-standard
- constructs (typically macros) can result in erroneous
- documentation.
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt {\l
+ Cpp.ignoredirectives} variables, non-standard constructs
+ (typically macros) can result in erroneous documentation.
- In \l qt.qdocconf:
+ In \l qt.qdocconf:
- \code
- Cpp.ignoretokens = QAXFACTORY_EXPORT \
- QM_EXPORT_CANVAS \
- ...
- Q_COMPAT_EXPORT \
- Q_CORE_EXPORT \
- Q_EXPLICIT \
- Q_EXPORT \
- ...
- Q_TYPENAME \
- Q_XML_EXPORT
- \endcode
-
- makes sure that when processing the code below, for
- example, QDoc will simply ignore the 'Q_CORE_EXPORT'
- expression:
+ \code
+ Cpp.ignoretokens = QAXFACTORY_EXPORT \
+ QM_EXPORT_CANVAS \
+ ...
+ Q_COMPAT_EXPORT \
+ Q_CORE_EXPORT \
+ Q_EXPLICIT \
+ Q_EXPORT \
+ ...
+ Q_TYPENAME \
+ Q_XML_EXPORT
+ \endcode
- \code
- class Q_CORE_EXPORT Qt {
- Q_OBJECT
- Q_ENUMS(Orientation TextFormat BackgroundMode
- DateFormat ScrollBarPolicy FocusPolicy
- ContextMenuPolicy CaseSensitivity
- LayoutDirection ArrowType)
- Q_ENUMS(ToolButtonStyle)
- Q_FLAGS(Alignment)
- Q_FLAGS(Orientations)
- Q_FLAGS(DockWidgetAreas)
-
- public:
- ...
- };
- \endcode
+ makes sure that when processing the code below, for example, QDoc
+ will simply ignore the 'Q_CORE_EXPORT' expression:
- Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the
- documentation of the \tt {\l Cpp.ignoredirectives}
- variable.
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+ public:
+ ...
+ };
+ \endcode
- See also \l Cpp.ignoredirectives.
+ Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the
+ documentation of the \tt {\l Cpp.ignoredirectives} variable.
- \endtable
+ See also \l Cpp.ignoredirectives.
*/
-
/*!
\page 24-qdoc-configuration-htmlvariables.html
\previouspage C++ Specific Configuration Variables
- \contentspage QDoc Manual - Table of Contents
+ \contentspage Table of Contents
\nextpage Supporting Derived Projects
\title HTML Specific Configuration Variables
@@ -8279,219 +8028,188 @@
documentation's footer or postheader. The format of the variable
values are raw HTML.
- \section1 Alphabetical List
-
- \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
- {HTML.postheader},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.stylesheets}{HTML.stylesheets}
+ \target HTML.footer-variable
+ \section1 HTML.footer
+ The \c HTML.footer variable defines the content of the generated
+ HTML documentation's footer.
- \section1 Variable Descriptions
+ The footer is rendered at the bottom of the generated
+ documentation page.
- \table
+ The variable's value is given as raw HTML code enclosed by
+ quotation marks. Note that if the value spans several lines, each
+ line needs to be enclosed by quotation marks.
- \header
- \o Variable
- \o Description
+ For example in \l qt.qdocconf:
- \row
- \o \bold HTML.footer \target HTML.footer
- \o \bold {The \c HTML.footer variable defines the content
- of the generated HTML documentation's footer.}
+ \code
+ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
+ ...
+ "</tr></table></div></address>"
+ \endcode
- The footer is rendered at the bottom of the generated
- documentation page.
+ The complete variable entry in \l qt.qdocconf provides the
+ standard footer of the \l {http://qt.nokia.com/doc/4.0/index.html}
+ {Qt Reference Documentation}.
- The variable's value is given as raw HTML code enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ \target HTML.postheader-variable
+ \section1 HTML.postheader
- For example in \l qt.qdocconf:
+ The \c HTML.postheader variable defines the content of the
+ generated HTML documentation's postheader.
- \code
- HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
- ...
- "</tr></table></div></address>"
- \endcode
+ The header is rendered at the top of the generated documentation
+ page.
- The complete variable entry in \l qt.qdocconf provides the
- standard footer of the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The variable's value is given as raw HTML enclosed by quotation
+ marks. Note that if the value spans several lines, each line needs
+ to be enclosed by quotation marks.
- \row
- \o \bold HTML.postheader \target HTML.postheader
- \o \bold {The \c HTML.postheader variable defines the content
- of the generated HTML documentation's postheader.}
+ For example in \l qt.qdocconf:
- The header is rendered at the top of the generated
- documentation page.
+ \code
+ HTML.postheader = "<table border=\"0\"..." \
+ ...
+ "<img src=\"images/trolltech-logo.png\" \
+ "align=\"right\" width=\"203\" height=\"32\""\
+ "border=\"0\" />" \
+ "</td></tr>" \
+ "</table>"
+ \endcode
- The variable's value is given as raw HTML enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ The complete variable entry in \l qt.qdocconf provides the
+ standard header of the \l {http://qt.nokia.com/doc/4.0/index.html}
+ {Qt Reference Documentation}.
- For example in \l qt.qdocconf:
+ \target HTML.style-variable
+ \section1 HTML.style
- \code
- HTML.postheader = "<table border=\"0\"..." \
- ...
- "<img src=\"images/trolltech-logo.png\" \
- "align=\"right\" width=\"203\" height=\"32\""\
- "border=\"0\" />" \
- "</td></tr>" \
- "</table>"
- \endcode
+ The HTML.style variable defines the style for
+ the generated HTML documentation.
- The complete variable entry in \l qt.qdocconf provides the
- standard header of the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The variable's value is given as raw HTML enclosed by quotation
+ marks. Note that if the value spans several lines, each line needs
+ to be enclosed by quotation marks.
- \row
- \o \bold HTML.style \target HTML.style
- \o \bold {The HTML.style variable defines the style for
- the generated HTML documentation.}
+ For example in \l qt.qdocconf:
- The variable's value is given as raw HTML enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ \code
+ HTML.style = "h3.fn,span.fn" \
+ "{ margin-left: 1cm; text-indent: -1cm; }\n" \
+ "a:link { color: #004faf; text-decoration: none }\n" \
+ "a:visited" \
+ "{ color: #672967; text-decoration: none }\n" \
+ "td.postheader { font-family: sans-serif }\n" \
+ "tr.address { font-family: sans-serif }\n" \
+ "body { background: #ffffff; color: black; }"
+ \endcode
- For example in \l qt.qdocconf:
+ provides the HTML style for the \l
+ {http://qt.nokia.com/doc/4.0/index.html} {Qt Reference
+ Documentation}.
- \code
- HTML.style = "h3.fn,span.fn" \
- "{ margin-left: 1cm; text-indent: -1cm; }\n" \
- "a:link { color: #004faf; text-decoration: none }\n" \
- "a:visited" \
- "{ color: #672967; text-decoration: none }\n" \
- "td.postheader { font-family: sans-serif }\n" \
- "tr.address { font-family: sans-serif }\n" \
- "body { background: #ffffff; color: black; }"
- \endcode
+ \target HTML.stylesheets-variable
+ \section1 HTML.stylesheets
- provides the HTML style for the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The HTML.stylesheets variable defines a list of stylesheets
+ to use for the generated HTML documentation.
- \row
- \o \bold HTML.stylesheets \target HTML.stylesheets
- \o \bold {The HTML.stylesheets variable defines a list of stylesheets
- to use for the generated HTML documentation.}
+ Using separate stylesheets for the documentation makes it easier
+ to customize and experiment with the style used once the contents
+ has been generated. Typically, it is only necessary to define a
+ single stylesheet for any set of documentation; for example:
- Using separate stylesheets for the documentation makes it easier to
- customize and experiment with the style used once the contents has
- been generated. Typically, it is only necessary to define a single
- stylesheet for any set of documentation; for example:
+ \code
+ HTML.stylesheets = classic.css
+ \endcode
- \code
- HTML.stylesheets = classic.css
- \endcode
+ QDoc expects to find stylesheets in the directory containing the
+ \l qt.qdocconf file, and it will copy those specified to the output
+ directory alongside the HTML pages.
- QDoc expects to find stylesheets in the directory containing the
- \l qt.qdocconf file, and it will copy those specified to the output
- directory alongside the HTML pages.
- \endtable
*/
/*!
\page 25-qdoc-configuration-derivedprojects.html
\previouspage HTML Specific Configuration Variables
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Compatibility
+ \contentspage Table of Contents
+ \nextpage Compatibility Issues
\title Supporting Derived Projects
- \tableofcontents
+ Some configuration variables allow you to use QDoc to support
+ Qt-based projects; i.e allow your project to contain links to the
+ online Qt documentation. This means that QDoc will be able to
+ create links to the class reference documentation, without any
+ explicit linking command.
- Some particular configuration variables allow you to use QDoc to
- support Qt-based projects; i.e to make projects, such as Qt Solutions,
- contain references to the online Qt documentation. This
- means that QDoc will be able to create links to the class reference
- documentation, without any explicit linking command.
+ \target description-variable
+ \section1 description
- \section1 The Configuration Variables
+ The description variable holds a short description of the
+ associated project.
- \section2 Alphabetical List
+ See also \l project.
- \l{25-qdoc-configuration-derivedprojects.html#description}{description},
- \l{25-qdoc-configuration-derivedprojects.html#indexes}{indexes},
- \l{25-qdoc-configuration-derivedprojects.html#project}{project},
- \l{25-qdoc-configuration-derivedprojects.html#url}{url}
+ \target indexes-variable
+ \section1 indexes
- \section2 Variable Descriptions
+ The \c indexes variable lists the index files that will be used to
+ generate references.
- \table
- \header
- \o Variable
- \o Description
- \row
- \o \bold description \target description
- \o \bold {The description variable holds a short description of
- the associated project.}
+ For example. to make a derived Qt project contain links to the Qt
+ Reference documentation, you need to specify the associated index
+ file:
- See also \l project.
-
- \row
- \o \bold indexes \target indexes
- \o \bold {The \c indexes variable lists the index files
- that will be used to generate references.}
-
- For example. to make a derived Qt project contain links to
- the Qt Reference documentation, you need to specify the
- associated index file:
+ \code
+ indexes = $QTDIR/doc/html/qt.index
+ \endcode
- \code
- indexes = $QTDIR/doc/html/qt.index
- \endcode
+ See also \l project and \l url.
- See also \l project and \l url.
+ \target project-variable
+ \section1 project
- \row
- \o \bold project \target project
- \o \bold {The \c project variable provides a name for the project
- associated with the \c .qdocconf file.}
+ The \c project variable provides a name for the project associated
+ with the \c .qdocconf file.
- The project's name is used to form a file name for the
- associated project's \i index file. For example:
+ The project's name is used to form a file name for the associated
+ project's \e index file.
- \code
- project = QtMotif
- \endcode
+ \code
+ project = QtMotif
+ \endcode
- This will cause an index file called \c qtmotif.index to be
- created.
+ This will cause an index file called \c qtmotif.index to be
+ created.
- See also \l description and \l indexes.
- \row
- \o \bold url \target url
- \o \bold {The \c url variable holds the base URL for the
- reference documentation associated with the current project.}
+ See also \l description and \l indexes.
- The URL is stored in the generated index file for the
- project. When we use the index on its own, QDoc will use
- this as the base URL when constructing links to classes,
- functions, and other things listed in the index.
+ \target url-variable
+ \section1 url
- For example:
+ The \c url variable holds the base URL for the reference
+ documentation associated with the current project.
- \code
- project = Qt
- description = Qt Reference Documentation
- url = http://qt.nokia.com/doc/4.0
+ The URL is stored in the generated index file for the
+ project. When we use the index on its own, QDoc will use this as
+ the base URL when constructing links to classes, functions, and
+ other things listed in the index.
- ...
- \endcode
+ \code
+ project = Qt
+ description = Qt Reference Documentation
+ url = http://qt.nokia.com/doc/4.0
- This makes sure that whenever \c qt.index is used to generate
- references to for example Qt classes, the base URL is
- \c http://qt.nokia.com/doc/4.0.
+ ...
+ \endcode
- See also \l indexes.
+ This makes sure that whenever \c qt.index is used to generate
+ references to for example Qt classes, the base URL is \c
+ http://qt.nokia.com/doc/4.0.
- \endtable
+ See also \l indexes.
\target howto
\section1 How to Support Derived Projects
@@ -8544,7 +8262,7 @@
The code above requires that you run QDoc from the directory that
contains this file. You need to include the compat.qdocconf
file for compatibility reasons; this is further explained in the
- \l {QDoc Compatibility} section.
+ \l {Compatibility Issues} section.
\bold {To resolve the actual links to Qt classes, the
mini-project's \c .qdocconf file needs to assign a value to the \l
@@ -8561,47 +8279,43 @@
/*!
\page 26-qdoc-commands-compatibility.html
\previouspage Supporting Derived Projects
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Commands - Alphabetical List
+ \contentspage Table of Contents
+ \nextpage qt.qdocconf
- \title QDoc Compatibility
-
- \tableofcontents
+ \title Compatibility Issues
\section1 General Description
\target reason
- QDoc is a tool that constantly evolves to suit our needs, for that
- reason there are some compatibility issues in the transition
- between old and new practices.
+ Because QDoc evolves to suit our documentation needs, there can be
+ some compatibility issues when converting to a new version.
- To make the transition as smooth and rapid as possible, the
- general idea is to adopt the new commands and usage in new
- documentation. While waiting for the occurrences of the old
- practices to be eliminated from the old parts of the
- documentation, you can map the new commands and usage to the old
- ones using a compat.qdocconf file.
+ To allow you to proceed at your own speed when converting your
+ qdoc comments to use new qdoc commands and formats, the ability to
+ include a configuration file called \c {compat.qdocconf} is
+ provided.
- A compat.qdocconf file is a separate \c .qdocconf file which you
- can include in your main configuration file. It typically contains
- the mapping between old and new commands using the \l alias and \l
- {22-qdoc-configuration-generalvariables.html#macro}{macro}
- configuration variables.
+ A \c {compat.qdocconf} file is a separate configuration file,
+ which you include in your main configuration file. It typically
+ contains the mappings from old qdoc commands to new ones using
+ \l {alias} and
+ \l {22-qdoc-configuration-generalvariables.html#macro-variable}
+ {macro} configuration variables.
\section1 Qt Compatibility
In Qt's documentation there still exist occurrences of old
- commands, and the Qt \l {qt.qdocconf}{configuration file} needs to
+ commands, and the Qt \l {qt.qdocconf} {configuration file} needs to
include the compat.qdocconf file tailored for Qt. For more
detailed information about the commands creating compatibility
- issues, see the \l {Command Comments}{command comments}.
+ issues, see the \l {Command Comments} {command comments}.
- \section2 Qt's current compat.qdocconf file
+ \section1 Qt's current compat.qdocconf file
\quotefile files/compat.qdocconf
- \section2 Command Comments
+ \section1 Command Comments
\table
\header
@@ -8619,7 +8333,7 @@
\\e command name.
\bold {We still need to use the \\e command to render in
- italic in new documentation for \l {reason}{compatibility
+ italic in new documentation for \l {reason} {compatibility
reasons}}.
\row
@@ -8633,7 +8347,7 @@
\bold {We still need to use the \\input command to include
plain text in new documentation for \l
- {reason}{compatibility reasons}}.
+ {reason} {compatibility reasons}}.
\row
\o \\quotefile \target quotefile-versus-include
@@ -8646,7 +8360,7 @@
\bold {We still need to use the \\include command to quote
the entire contents of a source file in new documentation
- for \l {reason}{compatibility reasons}}.
+ for \l {reason} {compatibility reasons}}.
\row
\o \\quotefromfile \target quotefromfile-versus-quotefile
@@ -8656,7 +8370,7 @@
that command to quote an entire file, we introduce the new
\\quotefromfile command to quote from file.
- \bold {Use \l {quotefromfile}{\\quotefromfile} to quote
+ \bold {Use \l {quotefromfile-command} {\\quotefromfile} to quote
parts from a source file in new documentation}.
\row
@@ -8667,7 +8381,7 @@
in italic instead, we introduce the new \\o command for
this purpose.
- \bold {Use \l {o}{\\o} to indicate list and table items in
+ \bold {Use \l {o-command} {\\o} to indicate list and table items in
new documentation}.
\row
@@ -8676,7 +8390,7 @@
\o These commands are equivalent, and represent a simple name
change.
- \bold {Use \l {quotation}{\\quotation} in new
+ \bold {Use \l {quotation} {\\quotation} in new
documentation}.
\row
@@ -8685,116 +8399,129 @@
\o These commands are equivalent, and represent a simple name
change.
- \bold {Use \l {image}{\\image} in new documentation}.
+ \bold {Use \l {image-command} {\\image} in new documentation}.
\endtable
*/
/*!
\page 27-qdoc-commmands-alphabetical.html
- \previouspage QDoc Compatibility
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Introduction to QDoc
+ \contentspage Table of Contents
+ \nextpage Topic Commands
+
+ \title Command Index
- \title QDoc Commands - Alphabetical List
+ This is a complete, alphabetized list of the QDoc commands.
\list
- \o \l {04-qdoc-commands-textformatting.html#a}{\\a}
- \o \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract}
- \o \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode}
- \o \l {04-qdoc-commands-textformatting.html#bold}{\\bold}
- \o \l {11-qdoc-commands-documentcontents.html#brief}{\\brief}
- \o \l {04-qdoc-commands-textformatting.html#c}{\\c}
- \o \l {09-qdoc-commands-graphic.html#caption}{\\caption}
- \o \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter}
- \o \l {13-qdoc-commands-topical.html#class}{\\class}
- \o \l {06-qdoc-commands-verbatimcode.html#code}{\\code}
- \o \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \o \l {16-qdoc-commands-status.html#compat}{\\compat}
- \o \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage}
- \o \l {07-0-qdoc-commands-quoting.html#dots}{\\dots}
- \o \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else}
- \o \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif}
- \o \l {13-qdoc-commands-topical.html#enum}{\\enum}
- \o \l {13-qdoc-commands-topical.html#example-command}{\\example}
- \o \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire}
- \o \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage}
- \o \l {13-qdoc-commands-topical.html#fn}{\\fn}
- \o \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote}
- \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist}
- \o \l {13-qdoc-commands-topical.html#group}{\\group}
- \o \l {10-qdoc-commands-container.html#header}{\\header}
- \o \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile}
- \o \l {04-qdoc-commands-textformatting.html#i}{\\i}
- \o \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if}
- \o \l {09-qdoc-commands-graphic.html#image}{\\image}
- \o \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include}
- \o \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage}
- \o \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup}
- \o \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule}
- \o \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
- \o \l {16-qdoc-commands-status.html#internal}{\\internal}
- \o \l {08-qdoc-commands-linking.html#keyword}{\\keyword}
- \o \l {08-qdoc-commands-linking.html#l}{\\l}
- \o \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese}
- \o \l {10-qdoc-commands-container.html#list}{\\list}
- \o \l {13-qdoc-commands-topical.html#macro}{\\macro}
- \o \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass}
- \o \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta}
- \o \l {13-qdoc-commands-topical.html#module}{\\module}
- \o \l {13-qdoc-commands-topical.html#namespace}{\\namespace}
- \o \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage}
- \o \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode}
- \o \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant}
- \o \l {10-qdoc-commands-container.html#o}{\\o}
- \o \l {16-qdoc-commands-status.html#obsolete}{\\obsolete}
- \o \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
- \o \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit}
- \o \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue}
- \o \l {18-qdoc-commands-relating.html#overload}{\\overload}
- \o \l {13-qdoc-commands-topical.html#page}{\\page}
- \o \l {05-qdoc-commands-documentstructuring.html#part}{\\part}
- \o \l {16-qdoc-commands-status.html#preliminary}{\\preliminary}
- \o \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage}
- \o \l {07-0-qdoc-commands-quoting.html#printline}{\\printline}
- \o \l {07-0-qdoc-commands-quoting.html#printto}{\\printto}
- \o \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil}
- \o \l {13-qdoc-commands-topical.html#property}{\\property}
- \o \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation}
- \o \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile}
- \o \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
- \o \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw}
- \o \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant}
- \o \l {18-qdoc-commands-relating.html#reimp}{\\reimp}
- \o \l {18-qdoc-commands-relating.html#relates}{\\relates}
- \o \l {10-qdoc-commands-container.html#row}{\\row}
- \o \l {08-qdoc-commands-linking.html#sa}{\\sa}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
- \o \l {13-qdoc-commands-topical.html#service}{\\service}
- \o \l {16-qdoc-commands-status.html#since}{\\since}
- \o \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline}
- \o \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto}
- \o \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil}
- \o \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
- \o \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
- \o \l {04-qdoc-commands-textformatting.html#sub}{\\sub}
- \o \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
- \o \l {04-qdoc-commands-textformatting.html#sup}{\\sup}
- \o \l {10-qdoc-commands-container.html#table}{\\table}
- \o \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents}
- \o \l {08-qdoc-commands-linking.html#target}{\\target}
- \o \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
- \o \l {20-qdoc-commands-title.html#title}{\\title}
- \o \l {04-qdoc-commands-textformatting.html#tt}{\\tt}
- \o \l {13-qdoc-commands-topical.html#typedef}{\\typedef}
- \o \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
- \o \l {13-qdoc-commands-topical.html#variable}{\\variable}
- \o \l {10-qdoc-commands-container.html#value}{\\value}
- \o \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+ \o \l {04-qdoc-commands-textmarkup.html#a-command} {\\a}
+ \o \l {11-qdoc-commands-specialcontent.html#abstract-command} {\\abstract}
+ \o \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
+ \o \l {04-qdoc-commands-textmarkup.html#bold-command} {\\bold}
+ \o \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
+ \o \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
+ \o \l {09-qdoc-commands-includingimages.html#caption-command} {\\caption}
+ \o \l {05-qdoc-commands-documentstructure.html#chapter-command} {\\chapter}
+ \o \l {13-qdoc-commands-topics.html#class-command} {\\class}
+ \o \l {06-qdoc-commands-includecodeinline.html#code-command} {\\code}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#codeline-command} {\\codeline},
+ \o \l {16-qdoc-commands-status.html#compat-command} {\\compat}
+ \o \l {15-qdoc-commands-navigation.html#contentspage-command} {\\contentspage}
+ \o \l {16-qdoc-commands-status.html#default-command} {\\default} \span {class="newStuff"} {(new)}
+ \o \l {04-qdoc-commands-textmarkup.html#div-command} {\\div} \span {class="newStuff"} {(new)}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#dots-command} {\\dots}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#else-command} {\\else}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif}
+ \o \l {13-qdoc-commands-topics.html#enum-command} {\\enum}
+ \o \l {13-qdoc-commands-topics.html#example-command} {\\example}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire}
+ \o \l {13-qdoc-commands-topics.html#externalpage-command} {\\externalpage}
+ \o \l {13-qdoc-commands-topics.html#fn-command} {\\fn}
+ \o \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist-command} {\\generatelist}
+ \o \l {13-qdoc-commands-topics.html#group-command} {\\group}
+ \o \l {10-qdoc-commands-tablesandlists.html#header-command} {\\header}
+ \o \l {13-qdoc-commands-topics.html#headerfile-command} {\\headerfile}
+ \o \l {04-qdoc-commands-textmarkup.html#i-command} {\\i}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#if-command} {\\if}
+ \o \l {09-qdoc-commands-includingimages.html#image-command} {\\image}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include-command} {\\include}
+ \o \l {15-qdoc-commands-navigation.html#indexpage-command} {\\indexpage}
+ \o \l {19-qdoc-commands-grouping.html#ingroup-command} {\\ingroup}
+ \o \l {18-qdoc-commands-relating.html#inherits-command}{\\inherits} \span {class="newStuff"} {(new)}
+ \o \l {19-qdoc-commands-grouping.html#inmodule-command} {\\inmodule}
+ \o \l {09-qdoc-commands-includingimages.html#inlineimage-command} {\\inlineimage}
+ \o \l {16-qdoc-commands-status.html#internal-command} {\\internal}
+ \o \l {08-qdoc-commands-creatinglinks.html#keyword-command} {\\keyword}
+ \o \l {08-qdoc-commands-creatinglinks.html#l-command} {\\l}
+ \o \l {11-qdoc-commands-specialcontent.html#legalese-command} {\\legalese}
+ \o \l {10-qdoc-commands-tablesandlists.html#list-command} {\\list}
+ \o \l {13-qdoc-commands-topics.html#macro-command} {\\macro}
+ \o \l {19-qdoc-commands-grouping.html#mainclass-command} {\\mainclass}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#meta-command} {\\meta}
+ \o \l {13-qdoc-commands-topics.html#module-command} {\\module}
+ \o \l {13-qdoc-commands-topics.html#namespace-command} {\\namespace}
+ \o \l {15-qdoc-commands-navigation.html#nextpage-command} {\\nextpage}
+ \o \l {06-qdoc-commands-includecodeinline.html#newcode-command} {\\newcode}
+ \o \l {17-qdoc-commands-thread.html#nonreentrant-command} {\\nonreentrant}
+ \o \l {10-qdoc-commands-tablesandlists.html#o-command} {\\o}
+ \o \l {16-qdoc-commands-status.html#obsolete-command} {\\obsolete}
+ \o \l {06-qdoc-commands-includecodeinline.html#oldcode-command} {\\oldcode}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#omit-command} {\\omit}
+ \o \l {10-qdoc-commands-tablesandlists.html#omitvalue-command} {\\omitvalue}
+ \o \l {18-qdoc-commands-relating.html#overload-command} {\\overload}
+ \o \l {13-qdoc-commands-topics.html#page-command} {\\page}
+ \o \l {05-qdoc-commands-documentstructure.html#part-command} {\\part}
+ \o \l {16-qdoc-commands-status.html#preliminary-command} {\\preliminary}
+ \o \l {15-qdoc-commands-navigation.html#previouspage-command} {\\previouspage}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printline-command} {\\printline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printto-command} {\\printto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printuntil-command} {\\printuntil}
+ \o \l {13-qdoc-commands-topics.html#property-command} {\\property}
+ \o \l {13-qdoc-commands-topics.html#qmlattachedproperty-command} {\\qmlattachedproperty} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlattachedsignal-command} {\\qmlattachedsignal} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlbasictype-command} {\\qmlbasictype} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlclass-command} {\\qmlclass} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlmethod-command} {\\qmlmethod} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlproperty-command} {\\qmlproperty} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlsignal-command} {\\qmlsignal} \span {class="newStuff"} {(new)}
+ \o \l {11-qdoc-commands-specialcontent.html#quotation-command} {\\quotation}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefile-command} {\\quotefile}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command} {\\quotefromfile}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\raw} \span {class="newStuff"} {(avoid)}
+ \o \l {17-qdoc-commands-thread.html#reentrant-command} {\\reentrant}
+ \o \l {18-qdoc-commands-relating.html#reimp-command} {\\reimp}
+ \o \l {18-qdoc-commands-relating.html#relates-command} {\\relates}
+ \o \l {10-qdoc-commands-tablesandlists.html#row-command} {\\row}
+ \o \l {08-qdoc-commands-creatinglinks.html#sa-command} {\\sa}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionOne-command} {\\section1}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionTwo-command} {\\section2}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionThree-command} {\\section3}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionFour-command} {\\section4}
+ \o \l {13-qdoc-commands-topics.html#service-command} {\\service}
+ \o \l {16-qdoc-commands-status.html#since-command} {\\since}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipline-command} {\\skipline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipto-command} {\\skipto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipuntil-command} {\\skipuntil}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#snippet-command} {\\snippet},
+ \o \l {04-qdoc-commands-textmarkup.html#span-command} {\\span} \span {class="newStuff"} {(new)}
+ \o \l {15-qdoc-commands-navigation.html#startpage-command} {\\startpage}
+ \o \l {04-qdoc-commands-textmarkup.html#sub-command} {\\sub}
+ \o \l {20-qdoc-commands-namingthings.html#subtitle-command} {\\subtitle}
+ \o \l {04-qdoc-commands-textmarkup.html#sup-command} {\\sup}
+ \o \l {10-qdoc-commands-tablesandlists.html#table-command} {\\table}
+ \o \l {11-qdoc-commands-specialcontent.html#tableofcontents-command} {\\tableofcontents}
+ \o \l {08-qdoc-commands-creatinglinks.html#target-command} {\\target}
+ \o \l {17-qdoc-commands-thread.html#threadsafe-command} {\\threadsafe}
+ \o \l {20-qdoc-commands-namingthings.html#title-command} {\\title}
+ \o \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
+ \o \l {13-qdoc-commands-topics.html#typedef-command} {\\typedef}
+ \o \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
+ \o \l {13-qdoc-commands-topics.html#variable-command} {\\variable}
+ \o \l {10-qdoc-commands-tablesandlists.html#value-command} {\\value}
+ \o \l {11-qdoc-commands-specialcontent.html#warning-command} {\\warning}
\endlist
*/
diff --git a/tools/qdoc3/doc/qdoc-manual.qdocconf b/tools/qdoc3/doc/qdoc-manual.qdocconf
deleted file mode 100644
index 1e7ff017d8..0000000000
--- a/tools/qdoc3/doc/qdoc-manual.qdocconf
+++ /dev/null
@@ -1,234 +0,0 @@
-project = QDoc
-description = QDoc3 Manual
-
-indexes = ../../../doc/html/qt.index
-
-outputdir = html
-
-sources = qdoc-manual.qdoc
-sourcedirs = $PWD
-
-exampledirs += $PWD \
- ../../../examples
-
-imagedirs += images
-
-extraimages.HTML = qt-logo
-
-HTML.stylesheets = style/style.css \
- style/OfflineStyle.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style_ie6.css
-
-HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
- " <div class=\"content\"> \n" \
- " <div id=\"nav-logo\">\n" \
- " <a href=\"index.html\">Home</a></div>\n" \
- " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
- " <div id=\"narrowsearch\"></div>\n" \
- " <div id=\"nav-topright\">\n" \
- " <ul>\n" \
- " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
- " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \
- " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \
- " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \
- " DOC</a></li>\n" \
- " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <div id=\"shortCut\">\n" \
- " <ul>\n" \
- " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
- " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
- " </a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <ul class=\"sf-menu\" id=\"narrowmenu\"> \n" \
- " <li><a href=\"#\">API Lookup</a> \n" \
- " <ul> \n" \
- " <li><a href=\"classes.html\">Class index</a></li> \n" \
- " <li><a href=\"functions.html\">Function index</a></li> \n" \
- " <li><a href=\"modules.html\">Modules</a></li> \n" \
- " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
- " <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Qt Topics</a> \n" \
- " <ul> \n" \
- " <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
- " <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
- " <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Examples</a> \n" \
- " <ul> \n" \
- " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
- " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
- " <li><a href=\"demos.html\">Demos</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrapper\">\n" \
- " <div class=\"hd\">\n" \
- " <span></span>\n" \
- " </div>\n" \
- " <div class=\"bd group\">\n" \
- " <div class=\"sidebar\">\n" \
- " <div class=\"searchlabel\">\n" \
- " Search index:</div>\n" \
- " <div class=\"search\" id=\"sidebarsearch\">\n" \
- " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
- " <div id=\"resultdialog\"> \n" \
- " <a href=\"#\" id=\"resultclose\">Close</a> \n" \
- " <p id=\"resultlinks\" class=\"all\"><a href=\"#\" id=\"showallresults\">All</a> | <a href=\"#\" id=\"showapiresults\">API</a> | <a href=\"#\" id=\"showarticleresults\">Articles</a> | <a href=\"#\" id=\"showexampleresults\">Examples</a></p> \n" \
- " <p id=\"searchcount\" class=\"all\"><span id=\"resultcount\"></span><span id=\"apicount\"></span><span id=\"articlecount\"></span><span id=\"examplecount\"></span>&nbsp;results:</p> \n" \
- " <ul id=\"resultlist\" class=\"all\"> \n" \
- " </ul> \n" \
- " </div> \n" \
- " </fieldset>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2 title=\"API Lookup\"><span></span>\n" \
- " API Lookup</h2>\n" \
- " <div id=\"list001\" class=\"list\">\n" \
- " <ul id=\"ul001\" >\n" \
- " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2 title=\"Qt Topics\"><span></span>\n" \
- " Qt Topics</h2>\n" \
- " <div id=\"list002\" class=\"list\">\n" \
- " <ul id=\"ul002\" >\n" \
- " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box\" id=\"examples\">\n" \
- " <h2 title=\"Examples\"><span></span>\n" \
- " Examples</h2>\n" \
- " <div id=\"list003\" class=\"list\">\n" \
- " <ul id=\"ul003\">\n" \
- " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrap\">\n" \
- " <div class=\"toolbar\">\n" \
- " <div class=\"breadcrumb toolblock\">\n" \
- " <ul>\n" \
- " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n"
-
-HTML.postpostheader = " </ul>\n" \
- " </div>\n" \
- " <div class=\"toolbuttons toolblock\">\n" \
- " <ul>\n" \
- " <li id=\"smallA\" class=\"t_button\">A</li>\n" \
- " <li id=\"medA\" class=\"t_button active\">A</li>\n" \
- " <li id=\"bigA\" class=\"t_button\">A</li>\n" \
- " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
- " <span>Print</span></a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"content mainContent\">\n"
-
-HTML.footer = "" \
- " <div class=\"feedback t_button\">\n" \
- " [+] Documentation Feedback</div>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div> \n" \
- " <div class=\"ft\">\n" \
- " <span></span>\n" \
- " </div>\n" \
- " </div> \n" \
- " <div class=\"footer\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
- " in Finland and/or other countries worldwide.</p>\n" \
- " <p>\n" \
- " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Licensees holding valid Qt Commercial licenses may use this document 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.</p>\n" \
- " <p>\n" \
- " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
- " Free Documentation License version 1.3</a>\n" \
- " as published by the Free Software Foundation.</p>\n" \
- " </div>\n" \
- " <div id=\"feedbackBox\">\n" \
- " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
- " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p id=\"noteHead\">Thank you for giving your feedback.</p> <p class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
- " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</p>\n" \
- " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
- " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div id=\"blurpage\">\n" \
- " </div>\n"
-
-# This stuff is used by the Qt 4.7 doc format.
-scriptdirs = ../../../doc/src/template/scripts
-styledirs = ../../../doc/src/template/style
-
-scripts.HTML = functions.js \
- narrow.js \
- superfish.js \
- jquery.js
-
-styles.HTML = style.css \
- narrow.css \
- superfish.css \
- superfish_skin.css \
- style_ie6.css \
- style_ie7.css \
- style_ie8.css
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = scripts/functions.js \
- scripts/jquery.js \
- scripts/narrow.js \
- scripts/superfish.js \
- style/narrow.css \
- style/superfish.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
-
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index b4768db055..f05c0308a4 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -549,7 +549,10 @@ void Generator::generateAlsoList(const Node *node, CodeMarker *marker)
if (!alsoList.isEmpty()) {
Text text;
- text << Atom::ParaLeft << "See also ";
+ text << Atom::ParaLeft
+ << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << "See also "
+ << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
for (int i = 0; i < alsoList.size(); ++i)
text << alsoList.at(i) << separator(i, alsoList.size());
@@ -559,6 +562,28 @@ void Generator::generateAlsoList(const Node *node, CodeMarker *marker)
}
}
+/*!
+ Generate a list of maintainers in the output
+ */
+void Generator::generateMaintainerList(const InnerNode* node, CodeMarker* marker)
+{
+ QStringList sl = getMetadataElements(node,"maintainer");
+
+ if (!sl.isEmpty()) {
+ Text text;
+ text << Atom::ParaLeft
+ << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << "Maintained by: "
+ << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
+
+ for (int i = 0; i < sl.size(); ++i)
+ text << sl.at(i) << separator(i, sl.size());
+
+ text << Atom::ParaRight;
+ generateText(text, node, marker);
+ }
+}
+
void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
{
QList<RelatedClass>::ConstIterator r;
@@ -566,7 +591,10 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
if (!classe->baseClasses().isEmpty()) {
Text text;
- text << Atom::ParaLeft << "Inherits ";
+ text << Atom::ParaLeft
+ << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << "Inherits: "
+ << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
r = classe->baseClasses().begin();
index = 0;
@@ -604,7 +632,10 @@ void Generator::generateInheritedBy(const ClassNode *classe,
{
if (!classe->derivedClasses().isEmpty()) {
Text text;
- text << Atom::ParaLeft << "Inherited by ";
+ text << Atom::ParaLeft
+ << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << "Inherited by: "
+ << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD);
appendSortedNames(text, classe, classe->derivedClasses(), marker);
text << Atom::ParaRight;
@@ -1275,4 +1306,44 @@ QString Generator::outputPrefix(const QString &nodeType)
return outputPrefixes[nodeType];
}
+/*!
+ Looks up the tag \a t in the map of metadata values for the
+ current topic in \a inner. If a value for the tag is found,
+ the value is returned.
+
+ \note If \a t is found in the metadata map, it is erased.
+ i.e. Once you call this function for a particular \a t,
+ you consume \a t.
+ */
+QString Generator::getMetadataElement(const InnerNode* inner, const QString& t)
+{
+ QString s;
+ QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());
+ QStringMultiMap::iterator i = metaTagMap.find(t);
+ if (i != metaTagMap.end()) {
+ s = i.value();
+ metaTagMap.erase(i);
+ }
+ return s;
+}
+
+/*!
+ Looks up the tag \a t in the map of metadata values for the
+ current topic in \a inner. If values for the tag are found,
+ they are returned in a string list.
+
+ \note If \a t is found in the metadata map, all the pairs
+ having the key \a t are erased. i.e. Once you call this
+ function for a particular \a t, you consume \a t.
+ */
+QStringList Generator::getMetadataElements(const InnerNode* inner, const QString& t)
+{
+ QStringList s;
+ QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());
+ s = metaTagMap.values(t);
+ if (!s.isEmpty())
+ metaTagMap.remove(t);
+ return s;
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index 4482313f2e..8fd53709ee 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -106,6 +106,7 @@ class Generator
#endif
virtual void generateBody(const Node *node, CodeMarker *marker);
virtual void generateAlsoList(const Node *node, CodeMarker *marker);
+ virtual void generateMaintainerList(const InnerNode* node, CodeMarker* marker);
virtual void generateInherits(const ClassNode *classe,
CodeMarker *marker);
virtual void generateInheritedBy(const ClassNode *classe,
@@ -141,7 +142,6 @@ class Generator
void unknownAtom(const Atom *atom);
QMap<QString, QString> &formattingLeftMap();
QMap<QString, QString> &formattingRightMap();
-
QMap<QString, QStringList> editionModuleMap;
QMap<QString, QStringList> editionGroupMap;
@@ -150,6 +150,9 @@ class Generator
static void supplementAlsoList(const Node *node, QList<Text> &alsoList);
static QString outputPrefix(const QString &nodeType);
+ QString getMetadataElement(const InnerNode* inner, const QString& t);
+ QStringList getMetadataElements(const InnerNode* inner, const QString& t);
+
private:
void generateReimplementedFrom(const FunctionNode *func,
CodeMarker *marker);
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index f2e2f04786..1c7fcbf549 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -350,6 +350,14 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
}
break;
+ case Node::Variable:
+ {
+ QString location = HtmlGenerator::fullDocumentLocation(node);
+ project.files.insert(location.left(location.lastIndexOf(QLatin1Char('#'))));
+ project.keywords.append(keywordDetails(node));
+ }
+ break;
+
// Fake nodes (such as manual pages) contain subtypes, titles and other
// attributes.
case Node::Fake: {
@@ -694,6 +702,8 @@ void HelpProjectWriter::generateProject(HelpProject &project)
}
} else {
// Find a contents node and navigate from there, using the NextLink values.
+ QSet<QString> visited;
+
foreach (const Node *node, subproject.nodes) {
QString nextTitle = node->links().value(Node::NextLink).first;
if (!nextTitle.isEmpty() &&
@@ -707,9 +717,10 @@ void HelpProjectWriter::generateProject(HelpProject &project)
while (nextPage) {
writeNode(project, writer, nextPage);
nextTitle = nextPage->links().value(Node::NextLink).first;
- if(nextTitle.isEmpty())
+ if (nextTitle.isEmpty() || visited.contains(nextTitle))
break;
nextPage = const_cast<FakeNode *>(tree->findFakeNodeByTitle(nextTitle));
+ visited.insert(nextTitle);
}
break;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 0ff28af931..114db2611d 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -79,9 +79,9 @@ QString HtmlGenerator::sinceTitles[] =
" New Properties",
" New Variables",
" New QML Elements",
- " New Qml Properties",
- " New Qml Signals",
- " New Qml Methods",
+ " New QML Properties",
+ " New QML Signals",
+ " New QML Methods",
""
};
@@ -401,6 +401,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
switch (atom->type()) {
case Atom::AbstractLeft:
+ if (relative)
+ relative->doc().location().warning(tr("\abstract is not implemented."));
+ else
+ Location::information(tr("\abstract is not implemented."));
break;
case Atom::AbstractRight:
break;
@@ -476,6 +480,17 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE];
break;
+ case Atom::CaptionLeft:
+ out() << "<p class=\"figCaption\">";
+ in_para = true;
+ break;
+ case Atom::CaptionRight:
+ endLink();
+ if (in_para) {
+ out() << "</p>\n";
+ in_para = false;
+ }
+ break;
case Atom::Code:
out() << "<pre class=\"cpp\">"
<< trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
@@ -511,12 +526,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
<< "</pre>\n";
break;
- case Atom::Div:
+ case Atom::DivLeft:
out() << "<div";
if (!atom->string().isEmpty())
- out() << " class=\"" << atom->string() << "\">";
- else
- out() << ">";
+ out() << " " << atom->string();
+ out() << ">";
+ break;
+ case Atom::DivRight:
+ out() << "</div>";
break;
case Atom::FootnoteLeft:
// ### For now
@@ -535,7 +552,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::FormatIf:
break;
case Atom::FormattingLeft:
- out() << formattingLeftMap()[atom->string()];
+ if (atom->string().startsWith("span ")) {
+ out() << "<" + atom->string() << ">";
+ }
+ else
+ out() << formattingLeftMap()[atom->string()];
if (atom->string() == ATOM_FORMATTING_PARAMETER) {
if (atom->next() != 0 && atom->next()->type() == Atom::String) {
QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
@@ -551,6 +572,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (atom->string() == ATOM_FORMATTING_LINK) {
endLink();
}
+ else if (atom->string().startsWith("span ")) {
+ out() << "</span>";
+ }
else {
out() << formattingRightMap()[atom->string()];
}
@@ -891,9 +915,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (threeColumnEnumValueTable) {
out() << "<table class=\"valuelist\">";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<th class=\"tblConst\">Constant</th>"
<< "<th class=\"tblval\">Value</th>"
@@ -935,10 +959,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else { // (atom->string() == ATOM_LIST_VALUE)
// ### Trenton
- out() << "<tr><td class=\"topAlign\"><tt>"
+ out() << "<tr><td class=\"topAlign\"><tt>"
<< protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
- << "</tt></td><td class=\" topAlign\">";
+ << "</tt></td><td class=\"topAlign\">";
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -964,7 +988,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable) {
- out() << "</td><td class=\"topAlign\">";
+ out() << "</td><td class=\"topAlign\">";
if (matchAhead(atom, Atom::ListItemRight))
out() << "&nbsp;";
}
@@ -1056,8 +1080,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
in_para = false;
}
if (!atom->string().isEmpty()) {
- if (atom->string().contains("%"))
- out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n ";
+ if (atom->string().contains("%")) {
+ out() << "<table class=\"generic\" width=\""
+ << atom->string() << "\">\n ";
+ }
else {
out() << "<table class=\"generic\">\n";
}
@@ -1071,14 +1097,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</table>\n";
break;
case Atom::TableHeaderLeft:
- out() << "<thead><tr class=\"qt-style topAlign\">";
+ out() << "<thead><tr class=\"qt-style\">";
inTableHeader = true;
break;
case Atom::TableHeaderRight:
out() << "</tr>";
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- out() << "\n<tr class=\"qt-style topAlign\">";
+ out() << "\n<tr class=\"qt-style\">";
}
else {
out() << "</thead>\n";
@@ -1086,10 +1112,12 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
break;
case Atom::TableRowLeft:
- if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd topAlign\">";
+ if (!atom->string().isEmpty())
+ out() << "<tr " << atom->string() << ">";
+ else if (++numTableRows % 2 == 1)
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even topAlign\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
break;
case Atom::TableRowRight:
out() << "</tr>\n";
@@ -1101,16 +1129,28 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else
out() << "<td ";
- QStringList spans = atom->string().split(",");
- if (spans.size() == 2) {
- if (spans.at(0) != "1")
- out() << " colspan=\"" << spans.at(0) << "\"";
- if (spans.at(1) != "1")
- out() << " rowspan=\"" << spans.at(1) << "\"";
+ for (int i=0; i<atom->count(); ++i) {
+ if (i > 0)
+ out() << " ";
+ QString p = atom->string(i);
+ if (p.contains('=')) {
+ out() << p;
+ }
+ else {
+ QStringList spans = p.split(",");
+ if (spans.size() == 2) {
+ if (spans.at(0) != "1")
+ out() << " colspan=\"" << spans.at(0) << "\"";
+ if (spans.at(1) != "1")
+ out() << " rowspan=\"" << spans.at(1) << "\"";
+ }
+ }
+ }
if (inTableHeader)
out() << ">";
- else
- out() << "><p>";
+ else {
+ out() << ">";
+ //out() << "><p>";
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1119,8 +1159,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::TableItemRight:
if (inTableHeader)
out() << "</th>";
- else
- out() << "</p></td>";
+ else {
+ out() << "</td>";
+ //out() << "</p></td>";
+ }
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
@@ -1136,9 +1178,6 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<b class=\"redFont\"><code>\\" << protectEnc(atom->string())
<< "</code></b>";
break;
- case Atom::EndDiv:
- out() << "</div>";
- break;
#ifdef QDOC_QML
case Atom::QmlText:
case Atom::EndQmlText:
@@ -1288,6 +1327,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
generateBody(inner, marker);
out() << "</div>\n"; // QTBUG-9504
generateAlsoList(inner, marker);
+ generateMaintainerList(inner, marker);
generateExtractionMark(inner, EndMark);
}
@@ -1556,75 +1596,125 @@ QString HtmlGenerator::fileExtension(const Node * /* node */) const
/*!
Output breadcrumb list in the html file.
*/
-void HtmlGenerator::generateBreadCrumbs(const QString& title,
+void HtmlGenerator::generateBreadCrumbs(const QString &title,
const Node *node,
CodeMarker *marker)
{
- Text breadcrumb;
+ Text breadcrumbs;
+
if (node->type() == Node::Class) {
- const ClassNode* cn = static_cast<const ClassNode*>(node);
+ const ClassNode *cn = static_cast<const ClassNode *>(node);
QString name = node->moduleName();
- out() << " <li><a href=\"modules.html\">Modules</a></li>";
- if (!name.isEmpty()) {
- out() << " <li>";
- breadcrumb << Atom(Atom::AutoLink,name);
- generateText(breadcrumb, node, marker);
- out() << "</li>\n";
- }
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("All Modules"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Modules"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
+ if (!name.isEmpty())
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, name)
+ << Atom(Atom::ListItemRight);
if (!cn->name().isEmpty())
- out() << " <li>" << protectEnc(cn->name()) << "</li>\n";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(cn->name()))
+ << Atom(Atom::ListItemRight);
}
else if (node->type() == Node::Fake) {
const FakeNode* fn = static_cast<const FakeNode*>(node);
if (node->subType() == Node::Module) {
- out() << " <li><a href=\"modules.html\">Modules</a></li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("All Modules"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Modules"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
QString name = node->name();
if (!name.isEmpty())
- out() << " <li>" << protectEnc(name) << "</li>\n";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(name))
+ << Atom(Atom::ListItemRight);
}
else if (node->subType() == Node::Group) {
if (fn->name() == QString("modules"))
- out() << " <li>Modules</li>";
- else {
- out() << " <li>" << protectEnc(title) << "</li>";
- }
+ breadcrumbs << Atom(Atom::String, QLatin1String("Modules"));
+ else
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
else if (node->subType() == Node::Page) {
if (fn->name() == QString("qdeclarativeexamples.html")) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>QML Examples &amp; Demos</li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("Qt Examples"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Examples"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, QLatin1String("QML Examples & Demos"))
+ << Atom(Atom::ListItemRight);
}
else if (fn->name().startsWith("examples-")) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>" << protectEnc(title) << "</li>";
- }
- else if (fn->name() == QString("namespaces.html")) {
- out() << " <li>Namespaces</li>";
- }
- else {
- out() << " <li>" << protectEnc(title) << "</li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("Qt Examples"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Examples"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
+ else if (fn->name() == QString("namespaces.html"))
+ breadcrumbs << Atom(Atom::String, QLatin1String("Namespaces"));
+ else
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
else if (node->subType() == Node::QmlClass) {
- out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
- out() << " <li>" << protectEnc(title) << "</li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, QLatin1String("QML Elements"))
+ << Atom(Atom::ListItemRight);
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
else if (node->subType() == Node::Example) {
- out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("Qt Examples"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Examples"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
QStringList sl = fn->name().split('/');
if (sl.contains("declarative"))
- out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples &amp; Demos</a></li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::AutoLink, QLatin1String("QML Examples & Demos"))
+ << Atom(Atom::ListItemRight);
else {
QString name = protectEnc("examples-" + sl.at(0) + ".html"); // this generates an empty link
QString t = CodeParser::titleFromName(name);
}
- out() << " <li>" << protectEnc(title) << "</li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
}
else if (node->type() == Node::Namespace) {
- out() << " <li><a href=\"namespaces.html\">Namespaces</a></li>";
- out() << " <li>" << protectEnc(title) << "</li>";
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::Link, QLatin1String("All Namespaces"))
+ << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
+ << Atom(Atom::String, QLatin1String("Namespaces"))
+ << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
+ << Atom(Atom::ListItemRight);
+ breadcrumbs << Atom(Atom::ListItemLeft)
+ << Atom(Atom::String, protectEnc(title))
+ << Atom(Atom::ListItemRight);
}
+
+ generateText(breadcrumbs, node, marker);
}
void HtmlGenerator::generateHeader(const QString& title,
@@ -2571,7 +2661,7 @@ void HtmlGenerator::generateSection(const NodeList& nl,
else {
if (twoColumn)
out() << "<table class=\"propsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
}
@@ -2588,7 +2678,7 @@ void HtmlGenerator::generateSection(const NodeList& nl,
}
else {
if (twoColumn && i == (int) (nl.count() + 1) / 2)
- out() << "</ul></td><td class=\"topAlign\"><ul>\n";
+ out() << "</ul></td><td class=\"topAlign\"><ul>\n";
out() << "<li class=\"fn\">";
}
@@ -2632,7 +2722,7 @@ void HtmlGenerator::generateSectionList(const Section& section,
else {
if (twoColumn)
out() << "<table class=\"propsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
}
@@ -3833,9 +3923,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlPropNode\"><p>";
@@ -3860,9 +3950,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<table class=\"qmlname\">";
//out() << "<tr>";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qsn) + "\"></a>";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
@@ -3877,9 +3967,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<table class=\"qmlname\">";
//out() << "<tr>";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qmn) + "\"></a>";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp
index 5a513f7594..cbf040fa5b 100644
--- a/tools/qdoc3/jscodemarker.cpp
+++ b/tools/qdoc3/jscodemarker.cpp
@@ -43,11 +43,11 @@
jscodemarker.cpp
*/
-#include "private/qdeclarativejsast_p.h"
-#include "private/qdeclarativejsengine_p.h"
-#include "private/qdeclarativejslexer_p.h"
-#include "private/qdeclarativejsnodepool_p.h"
-#include "private/qdeclarativejsparser_p.h"
+#include "declarativeparser/qdeclarativejsast_p.h"
+#include "declarativeparser/qdeclarativejsengine_p.h"
+#include "declarativeparser/qdeclarativejslexer_p.h"
+#include "declarativeparser/qdeclarativejsnodepool_p.h"
+#include "declarativeparser/qdeclarativejsparser_p.h"
#include "atom.h"
#include "node.h"
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 7eb806798f..52715a3376 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -235,6 +235,26 @@ static void processQdocconfFile(const QString &fileName)
QStringList indexFiles = config.getStringList(CONFIG_INDEXES);
tree->readIndexes(indexFiles);
+#if 0
+ /*
+ I think we won't beusing this...
+
+ Read the list of DITA excluded directories.
+ */
+ QSet<QString> ditaExcludedDirs;
+ QStringList ditaExcludedDirsList = config.getStringList("dita.metadata.excludedirs");
+ foreach (const QString &t, ditaExcludedDirsList)
+ ditaExcludedDirs.insert(QDir::fromNativeSeparators(t));
+
+ if (!ditaExcludedDirs.isEmpty()) {
+ QSet<QString>::iterator i = ditaExcludedDirs.begin();
+ while (i != ditaExcludedDirs.end()) {
+ qDebug() << "DITA EXCLUDED DIR:" << (*i);
+ ++i;
+ }
+ }
+#endif
+
/*
Read the list of excluded directories.
*/
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 7195322be1..ee050f52da 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -947,10 +947,35 @@ void ClassNode::fixBaseClasses()
Search the child list to find the property node with the
specified \a name.
*/
-const PropertyNode* ClassNode::findPropertyNode(const QString& name) const
+const PropertyNode *ClassNode::findPropertyNode(const QString &name) const
{
- const Node* n = findNode(name,Node::Property);
- return (n ? static_cast<const PropertyNode*>(n) : 0);
+ const Node *n = findNode(name, Node::Property);
+
+ if (n)
+ return static_cast<const PropertyNode*>(n);
+
+ const PropertyNode *pn = 0;
+
+ const QList<RelatedClass> &bases = baseClasses();
+ if (!bases.isEmpty()) {
+ for (int i = 0; i < bases.size(); ++i) {
+ const ClassNode *cn = bases[i].node;
+ pn = cn->findPropertyNode(name);
+ if (pn)
+ break;
+ }
+ }
+ const QList<RelatedClass>& ignoredBases = ignoredBaseClasses();
+ if (!ignoredBases.isEmpty()) {
+ for (int i = 0; i < ignoredBases.size(); ++i) {
+ const ClassNode *cn = ignoredBases[i].node;
+ pn = cn->findPropertyNode(name);
+ if (pn)
+ break;
+ }
+ }
+
+ return pn;
}
/*!
@@ -1406,6 +1431,7 @@ PropertyNode::PropertyNode(InnerNode *parent, const QString& name)
usr(Trool_Default),
cst(false),
fnl(false),
+ rev(-1),
overrides(0)
{
// nothing.
@@ -1657,7 +1683,7 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
}
}
-static QString valueType(const QString& n)
+static QString valueType(const QString &n)
{
if (n == "QPoint")
return "QDeclarativePointValueType";
@@ -1700,6 +1726,19 @@ bool QmlPropertyNode::isWritable(const Tree* tree) const
if (wri != Trool_Default)
return fromTrool(wri, false);
+ const PropertyNode *pn = correspondingProperty(tree);
+ if (pn)
+ return pn->isWritable();
+ else {
+ location().warning(tr("Can't determine read-only status of QML property %1; writable assumed.").arg(name()));
+ return true;
+ }
+}
+
+const PropertyNode *QmlPropertyNode::correspondingProperty(const Tree *tree) const
+{
+ const PropertyNode *pn;
+
Node* n = parent();
while (n && n->subType() != Node::QmlClass)
n = n->parent();
@@ -1708,93 +1747,35 @@ bool QmlPropertyNode::isWritable(const Tree* tree) const
const ClassNode* cn = qcn->classNode();
if (cn) {
QStringList dotSplit = name().split(QChar('.'));
- const PropertyNode* pn = cn->findPropertyNode(dotSplit[0]);
+ pn = cn->findPropertyNode(dotSplit[0]);
if (pn) {
if (dotSplit.size() > 1) {
+ // Find the C++ property corresponding to the QML property in
+ // the property group, <group>.<property>.
+
QStringList path(extractClassName(pn->qualifiedDataType()));
const Node* nn = tree->findNode(path,Class);
if (nn) {
const ClassNode* cn = static_cast<const ClassNode*>(nn);
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- else {
- const QList<RelatedClass>& bases = cn->baseClasses();
- if (!bases.isEmpty()) {
- for (int i=0; i<bases.size(); ++i) {
- const ClassNode* cn = bases[i].node;
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
- if (!ignoredBases.isEmpty()) {
- for (int i=0; i<ignoredBases.size(); ++i) {
- const ClassNode* cn = ignoredBases[i].node;
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- QString vt = valueType(cn->name());
- if (!vt.isEmpty()) {
- QStringList path(vt);
- const Node* vtn = tree->findNode(path,Class);
- if (vtn) {
- const ClassNode* cn = static_cast<const ClassNode*>(vtn);
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- }
+ const PropertyNode *pn2 = cn->findPropertyNode(dotSplit[1]);
+ if (pn2)
+ return pn2; // Return the property for the QML property.
+ else
+ return pn; // Return the property for the QML group.
}
}
- else {
- return pn->isWritable();
- }
+ else
+ return pn;
}
else {
- const QList<RelatedClass>& bases = cn->baseClasses();
- if (!bases.isEmpty()) {
- for (int i=0; i<bases.size(); ++i) {
- const ClassNode* cn = bases[i].node;
- pn = cn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
- if (!ignoredBases.isEmpty()) {
- for (int i=0; i<ignoredBases.size(); ++i) {
- const ClassNode* cn = ignoredBases[i].node;
- pn = cn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- if (isAttached()) {
- QString classNameAttached = cn->name() + "Attached";
- QStringList path(classNameAttached);
- const Node* nn = tree->findNode(path,Class);
- const ClassNode* acn = static_cast<const ClassNode*>(nn);
- pn = acn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
+ pn = cn->findPropertyNode(dotSplit[0]);
+ if (pn)
+ return pn;
}
}
}
- location().warning(tr("Can't determine read-only status of QML property %1; writable assumed.").arg(name()));
- return true;
+
+ return 0;
}
#endif
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index aa7c78ab09..d1123dcdc1 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -466,6 +466,8 @@ class QmlPropertyNode : public LeafNode
bool isAttached() const { return att; }
virtual bool isQmlNode() const { return true; }
+ const PropertyNode *correspondingProperty(const Tree *tree) const;
+
const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); }
private:
@@ -689,6 +691,7 @@ class PropertyNode : public LeafNode
void setRuntimeScrFunc(const QString& scrf) { runtimeScrFunc = scrf; }
void setConstant() { cst = true; }
void setFinal() { fnl = true; }
+ void setRevision(int revision) { rev = revision; }
const QString &dataType() const { return dt; }
QString qualifiedDataType() const;
@@ -732,6 +735,7 @@ class PropertyNode : public LeafNode
Trool usr;
bool cst;
bool fnl;
+ int rev;
const PropertyNode* overrides;
};
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 2fedc0f360..69d7e289bb 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -88,15 +88,29 @@ SOURCES += atom.cpp \
INCLUDEPATH += $$QT_BUILD_TREE/include/QtDeclarative
-include($$QT_SOURCE_TREE/src/declarative/qml/parser/parser.pri)
+include(declarativeparser/parser.pri)
### Documentation for qdoc3 ###
qtPrepareTool(QDOC, qdoc3)
+qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
-html-docs.commands = cd \"$$PWD/doc\" && $$QDOC qdoc-manual.qdocconf
+equals(QMAKE_DIR_SEP, /) {
+ QDOC = QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QDOC
+} else {
+ QDOC = set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QDOC
+ QDOC = $$replace(QDOC, "/", "\\")
+}
+
+html-docs.commands = cd \"$$QT_BUILD_TREE/doc\" && $$QDOC $$QT_SOURCE_TREE/tools/qdoc3/doc/config/qdoc.qdocconf
+html-docs.files = $$QT_BUILD_TREE/doc/html
+
+qch-docs.commands = cd \"$$QT_BUILD_TREE/doc\" && $$QHELPGENERATOR $$QT_BUILD_TREE/tools/qdoc3/doc/html/qdoc.qhp -o $$QT_BUILD_TREE/tools/qdoc3/doc/qch/qdoc.qch
+qch-docs.files = $$QT_BUILD_TREE/tools/qdoc3/doc/qch
+qch-docs.path = $$[QT_INSTALL_DOCS]
+qch-docs.CONFIG += no_check_exist directory
-QMAKE_EXTRA_TARGETS += html-docs
+QMAKE_EXTRA_TARGETS += html-docs qch-docs
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp
index a7dc5a0f56..ccca7b5a54 100644
--- a/tools/qdoc3/qmlcodemarker.cpp
+++ b/tools/qdoc3/qmlcodemarker.cpp
@@ -43,12 +43,12 @@
qmlcodemarker.cpp
*/
-#include "private/qdeclarativejsast_p.h"
-#include "private/qdeclarativejsastfwd_p.h"
-#include "private/qdeclarativejsengine_p.h"
-#include "private/qdeclarativejslexer_p.h"
-#include "private/qdeclarativejsnodepool_p.h"
-#include "private/qdeclarativejsparser_p.h"
+#include "declarativeparser/qdeclarativejsast_p.h"
+#include "declarativeparser/qdeclarativejsastfwd_p.h"
+#include "declarativeparser/qdeclarativejsengine_p.h"
+#include "declarativeparser/qdeclarativejslexer_p.h"
+#include "declarativeparser/qdeclarativejsnodepool_p.h"
+#include "declarativeparser/qdeclarativejsparser_p.h"
#include "atom.h"
#include "node.h"
diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h
index d693456ffd..aab3455803 100644
--- a/tools/qdoc3/qmlcodemarker.h
+++ b/tools/qdoc3/qmlcodemarker.h
@@ -46,7 +46,7 @@
#ifndef QMLCODEMARKER_H
#define QMLCODEMARKER_H
-#include "private/qdeclarativejsastfwd_p.h"
+#include "declarativeparser/qdeclarativejsastfwd_p.h"
#include "cppcodemarker.h"
QT_BEGIN_NAMESPACE
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp
index 9c1d4eeab8..45ca96f2a2 100644
--- a/tools/qdoc3/qmlcodeparser.cpp
+++ b/tools/qdoc3/qmlcodeparser.cpp
@@ -43,9 +43,9 @@
qmlcodeparser.cpp
*/
-#include "private/qdeclarativejsast_p.h"
-#include "private/qdeclarativejsastvisitor_p.h"
-#include "private/qdeclarativejsnodepool_p.h"
+#include "declarativeparser/qdeclarativejsast_p.h"
+#include "declarativeparser/qdeclarativejsastvisitor_p.h"
+#include "declarativeparser/qdeclarativejsnodepool_p.h"
#include "qmlcodeparser.h"
#include "node.h"
@@ -142,7 +142,7 @@ void QmlCodeParser::doneParsingSourceFiles(Tree *tree)
}
/*!
- Returns the set of strings reopresenting the topic commands.
+ Returns the set of strings representing the topic commands.
*/
QSet<QString> QmlCodeParser::topicCommands()
{
diff --git a/tools/qdoc3/qmlcodeparser.h b/tools/qdoc3/qmlcodeparser.h
index e5cc0dd748..667cf5e5fc 100644
--- a/tools/qdoc3/qmlcodeparser.h
+++ b/tools/qdoc3/qmlcodeparser.h
@@ -47,9 +47,9 @@
#define QMLCODEPARSER_H
#include <QSet>
-#include "private/qdeclarativejsengine_p.h"
-#include "private/qdeclarativejslexer_p.h"
-#include "private/qdeclarativejsparser_p.h"
+#include "declarativeparser/qdeclarativejsengine_p.h"
+#include "declarativeparser/qdeclarativejslexer_p.h"
+#include "declarativeparser/qdeclarativejsparser_p.h"
#include "codeparser.h"
#include "location.h"
diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp
index 7acac4880a..d88694bd09 100644
--- a/tools/qdoc3/qmlmarkupvisitor.cpp
+++ b/tools/qdoc3/qmlmarkupvisitor.cpp
@@ -41,9 +41,9 @@
#include <QStringList>
#include <QtGlobal>
-#include "private/qdeclarativejsast_p.h"
-#include "private/qdeclarativejsastfwd_p.h"
-#include "private/qdeclarativejsengine_p.h"
+#include "declarativeparser/qdeclarativejsast_p.h"
+#include "declarativeparser/qdeclarativejsastfwd_p.h"
+#include "declarativeparser/qdeclarativejsengine_p.h"
#include "qmlmarkupvisitor.h"
diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h
index 709a85823d..97e392fb8b 100644
--- a/tools/qdoc3/qmlmarkupvisitor.h
+++ b/tools/qdoc3/qmlmarkupvisitor.h
@@ -43,7 +43,7 @@
#define QMLVISITOR_H
#include <QString>
-#include "private/qdeclarativejsastvisitor_p.h"
+#include "declarativeparser/qdeclarativejsastvisitor_p.h"
#include "node.h"
#include "tree.h"
diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp
index 9295624351..fc6509384a 100644
--- a/tools/qdoc3/qmlvisitor.cpp
+++ b/tools/qdoc3/qmlvisitor.cpp
@@ -42,9 +42,9 @@
#include <QFileInfo>
#include <QStringList>
#include <QtGlobal>
-#include "private/qdeclarativejsast_p.h"
-#include "private/qdeclarativejsastfwd_p.h"
-#include "private/qdeclarativejsengine_p.h"
+#include "declarativeparser/qdeclarativejsast_p.h"
+#include "declarativeparser/qdeclarativejsastfwd_p.h"
+#include "declarativeparser/qdeclarativejsengine_p.h"
#include "node.h"
#include "qmlvisitor.h"
diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h
index 9da2c7207e..4771f9eb83 100644
--- a/tools/qdoc3/qmlvisitor.h
+++ b/tools/qdoc3/qmlvisitor.h
@@ -43,7 +43,7 @@
#define QMLVISITOR_H
#include <QString>
-#include "private/qdeclarativejsastvisitor_p.h"
+#include "declarativeparser/qdeclarativejsastvisitor_p.h"
#include "node.h"
#include "tree.h"
diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp
index dadf67ce81..d9210e352c 100644
--- a/tools/qdoc3/quoter.cpp
+++ b/tools/qdoc3/quoter.cpp
@@ -41,6 +41,7 @@
#include <qfileinfo.h>
#include <qregexp.h>
+#include <qdebug.h>
#include "quoter.h"
@@ -65,7 +66,7 @@ static void replaceMultipleNewlines(QString &s)
}
// This is equivalent to line.split( QRegExp("\n(?!\n|$)") ) but much faster
-static QStringList splitLines(const QString &line)
+QStringList Quoter::splitLines(const QString &line)
{
QStringList result;
int i = line.size();
diff --git a/tools/qdoc3/quoter.h b/tools/qdoc3/quoter.h
index 6a59ab482a..ee515b2ef8 100644
--- a/tools/qdoc3/quoter.h
+++ b/tools/qdoc3/quoter.h
@@ -69,6 +69,8 @@ public:
const QString& pattern );
QString quoteSnippet(const Location &docLocation, const QString &identifier);
+ static QStringList splitLines(const QString &line);
+
private:
QString getLine(int unindent = 0);
void failedAtEnd( const Location& docLocation, const QString& command );
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 0e9a2a86aa..4141a03db3 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Assistant
qhp.Assistant.file = assistant.qhp
-qhp.Assistant.namespace = com.trolltech.assistant.472
+qhp.Assistant.namespace = com.trolltech.assistant.474
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
qhp.Assistant.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Assistant.filterAttributes = qt 4.7.2 tools assistant
+qhp.Assistant.filterAttributes = qt 4.7.4 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant
qhp.Assistant.subprojects = manual examples
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 637399bf2f..6c98ddf025 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Designer
qhp.Designer.file = designer.qhp
-qhp.Designer.namespace = com.trolltech.designer.472
+qhp.Designer.namespace = com.trolltech.designer.474
qhp.Designer.virtualFolder = qdoc
qhp.Designer.indexTitle = Qt Designer Manual
qhp.Designer.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Designer.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Designer.filterAttributes = qt 4.7.2 tools designer
+qhp.Designer.filterAttributes = qt 4.7.4 tools designer
qhp.Designer.customFilters.Designer.name = Qt Designer Manual
qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer
qhp.Designer.subprojects = manual examples
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 8ee298ece9..c9d6751c79 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Linguist
qhp.Linguist.file = linguist.qhp
-qhp.Linguist.namespace = com.trolltech.linguist.472
+qhp.Linguist.namespace = com.trolltech.linguist.474
qhp.Linguist.virtualFolder = qdoc
qhp.Linguist.indexTitle = Qt Linguist Manual
qhp.Linguist.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Linguist.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Linguist.filterAttributes = qt 4.7.2 tools linguist
+qhp.Linguist.filterAttributes = qt 4.7.4 tools linguist
qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual
qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist
qhp.Linguist.subprojects = manual examples
diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf
index 2262daa98e..87e442d663 100644
--- a/tools/qdoc3/test/macros.qdocconf
+++ b/tools/qdoc3/test/macros.qdocconf
@@ -29,6 +29,7 @@ macro.begincomment = "\\c{/*}"
macro.endcomment = "\\c{*/}"
macro.uuml.HTML = "&uuml;"
macro.mdash.HTML = "&mdash;"
+macro.pi.HTML = "&Pi;"
macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">"
macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index e68a935fec..8fe9034697 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -21,7 +21,7 @@ edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qml
qhp.Qml.file = qml.qhp
-qhp.Qml.namespace = com.trolltech.qml.472
+qhp.Qml.namespace = com.trolltech.qml.474
qhp.Qml.virtualFolder = qdoc
qhp.Qml.indexTitle = Qml Reference
@@ -61,9 +61,9 @@ qhp.Qml.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Qml.filterAttributes = qt 4.7.2 qtrefdoc
-qhp.Qml.customFilters.Qt.name = Qt 4.7.2
-qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.2
+qhp.Qml.filterAttributes = qt 4.7.4 qtrefdoc
+qhp.Qml.customFilters.Qt.name = Qt 4.7.4
+qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.4
qhp.Qml.subprojects = classes
qhp.Qml.subprojects.classes.title = Elements
qhp.Qml.subprojects.classes.indexTitle = Qml Elements
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index b5bc96c6e5..c5a0f4087d 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = qmake
qhp.qmake.file = qmake.qhp
-qhp.qmake.namespace = com.trolltech.qmake.472
+qhp.qmake.namespace = com.trolltech.qmake.474
qhp.qmake.virtualFolder = qdoc
qhp.qmake.indexTitle = QMake Manual
qhp.qmake.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.qmake.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.qmake.filterAttributes = qt 4.7.2 tools qmake
+qhp.qmake.filterAttributes = qt 4.7.4 tools qmake
qhp.qmake.customFilters.qmake.name = qmake Manual
qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake
qhp.qmake.subprojects = manual
diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
index 24696d5b84..a14054c873 100644
--- a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
@@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.472
+qhp.Qt.namespace = com.trolltech.qt.474
qhp.Qt.virtualFolder = qdoc
qhp.Qt.title = Qt
qhp.Qt.indexTitle = Qt
qhp.Qt.selectors = fake:example
-qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc ja_JP
-qhp.Qt.customFilters.Qt.name = Qt 4.7.2
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
+qhp.Qt.filterAttributes = qt 4.7.4 qtrefdoc ja_JP
+qhp.Qt.customFilters.Qt.name = Qt 4.7.4
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.4
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
@@ -96,7 +96,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
$QT_SOURCE_TREE/src/3rdparty/phonon/waveout
sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.css"
examples.imageextensions = "*.png"
exampledirs = $QT_SOURCE_TREE/doc/src \
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index 7789bf7ca8..d4d43b827a 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.472
+qhp.Qt.namespace = com.trolltech.qt.474
qhp.Qt.virtualFolder = qdoc
qhp.Qt.title = 教程
qhp.Qt.indexTitle = 教程
qhp.Qt.selectors = fake:example
-qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc zh_CN
-qhp.Qt.customFilters.Qt.name = Qt 4.7.2
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
+qhp.Qt.filterAttributes = qt 4.7.4 qtrefdoc zh_CN
+qhp.Qt.customFilters.Qt.name = Qt 4.7.4
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.4
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
@@ -96,7 +96,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
$QT_SOURCE_TREE/src/3rdparty/phonon/waveout
sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.css"
examples.imageextensions = "*.png"
exampledirs = $QT_SOURCE_TREE/doc/src \
diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
index dc84e7d42b..77ab3c5e8a 100644
--- a/tools/qdoc3/test/qt-html-templates-online.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
@@ -40,8 +40,7 @@ HTML.postheader = \
" <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
" <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
" <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li><a href=\"supported-platforms.html\">Supported Platforms</a></li> \n" \
" <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
" <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
" </ul> \n" \
@@ -101,8 +100,7 @@ HTML.postheader = \
" <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"supported-platforms.html\">Supported Platforms</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
" </ul> \n" \
@@ -196,37 +194,3 @@ HTML.footer = \
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \
" })();\n" \
" </script>\n"
-
-
-# Files not referenced in any qdoc file.
-# See also extraimages.HTML
-qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ul_blank.png \
- images/header_bg.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/arrow_down.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/spinner.gif \
- scripts/functions.js \
- scripts/jquery.js \
- scripts/narrow.js \
- scripts/superfish.js \
- style/narrow.css \
- style/superfish.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 6f756da987..8a70f3b3e3 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -52,3 +52,259 @@ qhp.Qt.extraFiles = index.html \
images/horBar.png \
images/sprites-combined.png \
style/offline.css
+
+#QtWebKit Guide files
+qhp.Qt.extraFiles += webkit-guide/anim_accord.htm \
+webkit-guide/anim_demo-rotate.htm \
+webkit-guide/anim_demo-scale.htm \
+webkit-guide/anim_demo-skew.htm \
+webkit-guide/anim_gallery.htm \
+webkit-guide/anim_panel.htm \
+webkit-guide/anim_pulse.htm \
+webkit-guide/anim_skew.htm \
+webkit-guide/anim_slide1.htm \
+webkit-guide/anim_slide2.htm \
+webkit-guide/anim_slide3.htm \
+webkit-guide/anim_tabbedSkew.htm \
+webkit-guide/_copyright.txt \
+webkit-guide/css3_backgrounds.htm \
+webkit-guide/css3_border-img.htm \
+webkit-guide/css3_gradientBack.htm \
+webkit-guide/css3_gradientBackStop.htm \
+webkit-guide/css3_gradientButton.htm \
+webkit-guide/css3_grad-radial.htm \
+webkit-guide/css3_mask-grad.htm \
+webkit-guide/css3_mask-img.htm \
+webkit-guide/css3_multicol.htm \
+webkit-guide/css3_reflect.htm \
+webkit-guide/css3_scroll.htm \
+webkit-guide/css3_sel-nth.htm \
+webkit-guide/css3_shadow.htm \
+webkit-guide/css3_text-overflow.htm \
+webkit-guide/css3_text-shadow.htm \
+webkit-guide/css3_text-stroke.htm \
+webkit-guide/form_tapper.htm \
+webkit-guide/form_toggler.htm \
+webkit-guide/_image_assets.htm \
+webkit-guide/_index.html \
+webkit-guide/layout_link-fmt.htm \
+webkit-guide/layout_tbl-keyhole.htm \
+webkit-guide/mob_condjs.htm \
+webkit-guide/mob_layout.htm \
+webkit-guide/mob_mediaquery.htm \
+webkit-guide/storage.htm \
+webkit-guide/css/anim_accord.css \
+webkit-guide/css/anim_demo-rotate.css \
+webkit-guide/css/anim_demo-scale.css \
+webkit-guide/css/anim_demo-skew.css \
+webkit-guide/css/anim_gallery.css \
+webkit-guide/css/anim_panel.css \
+webkit-guide/css/anim_pulse.css \
+webkit-guide/css/anim_skew.css \
+webkit-guide/css/anim_slide.css \
+webkit-guide/css/anim_tabbedSkew.css \
+webkit-guide/css/css3_backgrounds.css \
+webkit-guide/css/css3_border-img.css \
+webkit-guide/css/css3_gradientBack.css \
+webkit-guide/css/css3_gradientBackStop.css \
+webkit-guide/css/css3_gradientButton.css \
+webkit-guide/css/css3_grad-radial.css \
+webkit-guide/css/css3_mask-grad.css \
+webkit-guide/css/css3_mask-img.css \
+webkit-guide/css/css3_multicol.css \
+webkit-guide/css/css3_reflect.css \
+webkit-guide/css/css3_scroll.css \
+webkit-guide/css/css3_sel-nth.css \
+webkit-guide/css/css3_shadowBlur.css \
+webkit-guide/css/css3_shadow.css \
+webkit-guide/css/css3_text-overflow.css \
+webkit-guide/css/css3_text-shadow.css \
+webkit-guide/css/css3_text-stroke.css \
+webkit-guide/css/form_tapper.css \
+webkit-guide/css/form_toggler.css \
+webkit-guide/css/layout_link-fmt.css \
+webkit-guide/css/layout_tbl-keyhole.css \
+webkit-guide/css/mob_condjs.css \
+webkit-guide/css/mobile.css \
+webkit-guide/css/mob_mediaquery.css \
+webkit-guide/css/mq_desktop.css \
+webkit-guide/css/mqlayout_desktop.css \
+webkit-guide/css/mqlayout_mobile.css \
+webkit-guide/css/mqlayout_touch.css \
+webkit-guide/css/mq_mobile.css \
+webkit-guide/css/mq_touch.css \
+webkit-guide/css/storage.css \
+webkit-guide/img/border-frame.png \
+webkit-guide/img/gal0.png \
+webkit-guide/img/gal1.png \
+webkit-guide/img/gal2.png \
+webkit-guide/img/gal3.png \
+webkit-guide/img/gal4.png \
+webkit-guide/img/gal5.png \
+webkit-guide/img/gal6.png \
+webkit-guide/img/gal7.png \
+webkit-guide/img/gal8.png \
+webkit-guide/img/gradient.jpg \
+webkit-guide/img/gray_icon_close.png \
+webkit-guide/img/ic_ag_016.png \
+webkit-guide/img/ic_ag_032.png \
+webkit-guide/img/ic_ag_036.png \
+webkit-guide/img/ic_ag_048.png \
+webkit-guide/img/ic_al_016.png \
+webkit-guide/img/ic_al_032.png \
+webkit-guide/img/ic_al_036.png \
+webkit-guide/img/ic_al_048.png \
+webkit-guide/img/ic_ar_016.png \
+webkit-guide/img/ic_ar_032.png \
+webkit-guide/img/ic_ar_036.png \
+webkit-guide/img/ic_ar_048.png \
+webkit-guide/img/ic_b_016.png \
+webkit-guide/img/ic_b_032.png \
+webkit-guide/img/ic_b_036.png \
+webkit-guide/img/ic_b_048.png \
+webkit-guide/img/ic_be_016.png \
+webkit-guide/img/ic_be_032.png \
+webkit-guide/img/ic_be_036.png \
+webkit-guide/img/ic_be_048.png \
+webkit-guide/img/ic_c_016.png \
+webkit-guide/img/ic_c_032.png \
+webkit-guide/img/ic_c_036.png \
+webkit-guide/img/ic_c_048.png \
+webkit-guide/img/ic_ca_016.png \
+webkit-guide/img/ic_ca_032.png \
+webkit-guide/img/ic_ca_036.png \
+webkit-guide/img/ic_ca_048.png \
+webkit-guide/img/ic_cl_016.png \
+webkit-guide/img/ic_cl_032.png \
+webkit-guide/img/ic_cl_036.png \
+webkit-guide/img/ic_cl_048.png \
+webkit-guide/img/ic_cu_016.png \
+webkit-guide/img/ic_cu_032.png \
+webkit-guide/img/ic_cu_036.png \
+webkit-guide/img/ic_cu_048.png \
+webkit-guide/img/ic_f_016.png \
+webkit-guide/img/ic_f_032.png \
+webkit-guide/img/ic_f_036.png \
+webkit-guide/img/ic_f_048.png \
+webkit-guide/img/ic_fe_016.png \
+webkit-guide/img/ic_fe_032.png \
+webkit-guide/img/ic_fe_036.png \
+webkit-guide/img/ic_fe_048.png \
+webkit-guide/img/ic_h_016.png \
+webkit-guide/img/ic_h_032.png \
+webkit-guide/img/ic_h_036.png \
+webkit-guide/img/ic_h_048.png \
+webkit-guide/img/ic_he_016.png \
+webkit-guide/img/ic_he_032.png \
+webkit-guide/img/ic_he_036.png \
+webkit-guide/img/ic_he_048.png \
+webkit-guide/img/ic_k_016.png \
+webkit-guide/img/ic_k_032.png \
+webkit-guide/img/ic_k_036.png \
+webkit-guide/img/ic_k_048.png \
+webkit-guide/img/ic_li_016.png \
+webkit-guide/img/ic_li_032.png \
+webkit-guide/img/ic_li_036.png \
+webkit-guide/img/ic_li_048.png \
+webkit-guide/img/ic_mg_016.png \
+webkit-guide/img/ic_mg_032.png \
+webkit-guide/img/ic_mg_036.png \
+webkit-guide/img/ic_mg_048.png \
+webkit-guide/img/ic_n_016.png \
+webkit-guide/img/ic_n_032.png \
+webkit-guide/img/ic_n_036.png \
+webkit-guide/img/ic_n_048.png \
+webkit-guide/img/ic_na_016.png \
+webkit-guide/img/ic_na_032.png \
+webkit-guide/img/ic_na_036.png \
+webkit-guide/img/ic_na_048.png \
+webkit-guide/img/ic_ne_016.png \
+webkit-guide/img/ic_ne_032.png \
+webkit-guide/img/ic_ne_036.png \
+webkit-guide/img/ic_ne_048.png \
+webkit-guide/img/ic_ni_016.png \
+webkit-guide/img/ic_ni_032.png \
+webkit-guide/img/ic_ni_036.png \
+webkit-guide/img/ic_ni_048.png \
+webkit-guide/img/ic_o_016.png \
+webkit-guide/img/ic_o_032.png \
+webkit-guide/img/ic_o_036.png \
+webkit-guide/img/ic_o_048.png \
+webkit-guide/img/icon_check.png \
+webkit-guide/img/icon_check_x24green.png \
+webkit-guide/img/icon_dismiss.png \
+webkit-guide/img/icon_dismiss_x22.png \
+webkit-guide/img/icon_drill-down.png \
+webkit-guide/img/icon_drill-down_x32.png \
+webkit-guide/img/icon_drill-up.png \
+webkit-guide/img/icon_drill-up_x32.png \
+webkit-guide/img/icon_expand-nav.png \
+webkit-guide/img/icon_head-collapsed.png \
+webkit-guide/img/icon_head-collapsed_x13.png \
+webkit-guide/img/icon_head-expanded.png \
+webkit-guide/img/icon_head-expanded_x13.png \
+webkit-guide/img/icon_info.png \
+webkit-guide/img/icon_info_x24.png \
+webkit-guide/img/icon_link-doc.png \
+webkit-guide/img/icon_link-email.png \
+webkit-guide/img/icon_link-external.png \
+webkit-guide/img/icon_link-pdf.png \
+webkit-guide/img/icon_link-ppt.png \
+webkit-guide/img/icon_link-rss.png \
+webkit-guide/img/icon_link-sms.png \
+webkit-guide/img/icon_link-tel.png \
+webkit-guide/img/icon_link-xls.png \
+webkit-guide/img/icon_list-all_circ.png \
+webkit-guide/img/icon_list-all.png \
+webkit-guide/img/icon_nav_end.png \
+webkit-guide/img/icon_nav-start.png \
+webkit-guide/img/icon_nav-top.png \
+webkit-guide/img/icon_nav-up.png \
+webkit-guide/img/icon_question.png \
+webkit-guide/img/icon_scroll-left.png \
+webkit-guide/img/icon_scroll-right.png \
+webkit-guide/img/icon_trash.png \
+webkit-guide/img/ic_pt_016.png \
+webkit-guide/img/ic_pt_032.png \
+webkit-guide/img/ic_pt_036.png \
+webkit-guide/img/ic_pt_048.png \
+webkit-guide/img/ic_si_016.png \
+webkit-guide/img/ic_si_032.png \
+webkit-guide/img/ic_si_036.png \
+webkit-guide/img/ic_si_048.png \
+webkit-guide/img/ic_zn_016.png \
+webkit-guide/img/ic_zn_032.png \
+webkit-guide/img/ic_zn_036.png \
+webkit-guide/img/ic_zn_048.png \
+webkit-guide/img/land1.png \
+webkit-guide/img/land2.png \
+webkit-guide/img/land3.png \
+webkit-guide/img/land4.png \
+webkit-guide/img/land5.png \
+webkit-guide/img/land6.png \
+webkit-guide/img/land7.png \
+webkit-guide/img/land8.png \
+webkit-guide/img/mask.png \
+webkit-guide/img/tnail_gal1.png \
+webkit-guide/img/tnail_gal2.png \
+webkit-guide/img/tnail_gal3.png \
+webkit-guide/img/tnail_gal4.png \
+webkit-guide/img/tnail_gal5.png \
+webkit-guide/img/tnail_gal6.png \
+webkit-guide/img/tnail_gal7.png \
+webkit-guide/img/tnail_gal8.png \
+webkit-guide/js/anim_accord.js \
+webkit-guide/js/anim_gallery.js \
+webkit-guide/js/anim_panel.js \
+webkit-guide/js/anim_skew.js \
+webkit-guide/js/css3_backgrounds.js \
+webkit-guide/js/css3_border-img.js \
+webkit-guide/js/css3_grad-radial.js \
+webkit-guide/js/css3_mask-grad.js \
+webkit-guide/js/css3_mask-img.js \
+webkit-guide/js/css3_text-overflow.js \
+webkit-guide/js/form_tapper.js \
+webkit-guide/js/mob_condjs.js \
+webkit-guide/js/mobile.js \
+webkit-guide/js/storage.js \
+
diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf
index 3ed7cffa73..9c18608852 100644
--- a/tools/qdoc3/test/qt-project.qdocconf
+++ b/tools/qdoc3/test/qt-project.qdocconf
@@ -6,7 +6,7 @@ include(qt-defines.qdocconf)
project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.7
-version = 4.7.2
+version = 4.7.3
sourceencoding = UTF-8
outputencoding = UTF-8
@@ -15,14 +15,14 @@ naturallanguage = en_US
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.472
+qhp.Qt.namespace = com.trolltech.qt.474
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
-qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.7.2
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
+qhp.Qt.filterAttributes = qt 4.7.4 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.4
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.4
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
@@ -35,6 +35,13 @@ qhp.Qt.subprojects.examples.title = Tutorials and Examples
qhp.Qt.subprojects.examples.indexTitle = Qt Examples
qhp.Qt.subprojects.examples.selectors = fake:example
+dita.metadata.default.author = Qt Development Frameworks
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Nokia
+dita.metadata.default.copyryear = 2011
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
language = Cpp
headerdirs = $QT_SOURCE_TREE/src \
@@ -90,7 +97,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
examples.imageextensions = "*.png"
exampledirs = $QT_SOURCE_TREE/doc/src \
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
index e1c0460f61..6778bd5e2c 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
@@ -47,7 +47,6 @@
#include <private/qpixmap_raster_p.h>
#include <private/qwindowsurface_gl_p.h>
#include "qmeegoruntime.h"
-#include "qmeegoswitchevent.h"
QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName()
{
@@ -77,44 +76,12 @@ bool QMeeGoGraphicsSystemHelper::isRunningRuntime()
void QMeeGoGraphicsSystemHelper::switchToMeeGo()
{
- if (isRunningMeeGo())
- return;
-
- if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
- qWarning("Can't switch to meego - switching only supported with 'runtime' graphics system.");
- else {
- QMeeGoSwitchEvent willSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::WillSwitch);
- foreach (QWidget *widget, QApplication::topLevelWidgets())
- QCoreApplication::sendEvent(widget, &willSwitchEvent);
-
- QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
- app->setGraphicsSystem(QLatin1String("meego"));
-
- QMeeGoSwitchEvent didSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::DidSwitch);
- foreach (QWidget *widget, QApplication::topLevelWidgets())
- QCoreApplication::sendEvent(widget, &didSwitchEvent);
- }
+ QMeeGoRuntime::switchToMeeGo();
}
void QMeeGoGraphicsSystemHelper::switchToRaster()
{
- if (runningGraphicsSystemName() == QLatin1String("raster"))
- return;
-
- if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
- qWarning("Can't switch to raster - switching only supported with 'runtime' graphics system.");
- else {
- QMeeGoSwitchEvent willSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::WillSwitch);
- foreach (QWidget *widget, QApplication::topLevelWidgets())
- QCoreApplication::sendEvent(widget, &willSwitchEvent);
-
- QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
- app->setGraphicsSystem(QLatin1String("raster"));
-
- QMeeGoSwitchEvent didSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::DidSwitch);
- foreach (QWidget *widget, QApplication::topLevelWidgets())
- QCoreApplication::sendEvent(widget, &didSwitchEvent);
- }
+ QMeeGoRuntime::switchToRaster();
}
Qt::HANDLE QMeeGoGraphicsSystemHelper::imageToEGLSharedImage(const QImage &image)
@@ -168,3 +135,13 @@ void QMeeGoGraphicsSystemHelper::setSwapBehavior(SwapMode mode)
else if (mode == KillSwap)
QGLWindowSurface::swapBehavior = QGLWindowSurface::KillSwap;
}
+
+void QMeeGoGraphicsSystemHelper::setSwitchPolicy(SwitchPolicy policy)
+{
+ QMeeGoRuntime::setSwitchPolicy(policy);
+}
+
+void QMeeGoGraphicsSystemHelper::enableSwitchEvents()
+{
+ QMeeGoRuntime::enableSwitchEvents();
+}
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
index 5a3b57ee57..4612190686 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
@@ -97,14 +97,22 @@ public:
*/
static bool isRunningRuntime();
+ //! Enables the sending of QMeeGoSwitchEvent's when the graphicssystem switches.
+ /*!
+ An application that wishes to start receive QMeegoSwitchEvents must call this function.
+ */
+ static void enableSwitchEvents();
+
//! Switches to meego graphics system.
/*!
When running with the 'runtime' graphics system, sets the currently active
system to 'meego'. The window surface and all the resources are automatically
migrated to OpenGL. Will fail if the active graphics system is not 'runtime'.
Calling this function will emit QMeeGoSwitchEvent to the top level widgets.
- Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch)
- and one after the switch (QMeeGoSwitchEvent::DidSwitch).
+ If switch events are enabled, two events will be emitted for each switch --
+ one before the switch (QMeeGoSwitchEvent::WillSwitch) and one after the
+ switch (QMeeGoSwitchEvent::DidSwitch).
+ If the switch policy is set to NoSwitch, this function has no effect.
*/
static void switchToMeeGo();
@@ -114,12 +122,30 @@ public:
system to 'raster'. The window surface and the graphics resources (including the
EGL shared image resources) are automatically migrated back to the CPU. All OpenGL
resources (surface, context, cache, font cache) are automaticall anihilated.
- Calling this function will emit QMeeGoSwitchEvent to the top level widgets.
- Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch)
- and one after the switch (QMeeGoSwitchEvent::DidSwitch).
+ Calling this function will emit QMeeGoSwitchEvent to the top level widgets. If switch
+ events are enabled, two events will be emitted for each switch -- one before the
+ switch (QMeeGoSwitchEvent::WillSwitch) and one after the switch (QMeeGoSwitchEvent::DidSwitch).
+ If the switch policy is set to NoSwitch, this function has no effect.
*/
static void switchToRaster();
+ //! Used to specify the policy for graphics system switching.
+ enum SwitchPolicy {
+ AutomaticSwitch, /**< Automatic switching */
+ ManualSwitch, /**< Switching is controleld by the application */
+ NoSwitch /**< Switching is disabled completely */
+ };
+
+ //! Sets the policy of graphicssystem switching
+ /*!
+ By default, the switch to raster happens automatically when all windows are either
+ minimized or when the last window is destroyed. This function lets the application
+ change the graphicssystem switching policy to prevent the switching from happening
+ automatically (that is if the application doesn't want switching at all or wishes
+ to control the switching manually).
+ */
+ static void setSwitchPolicy(SwitchPolicy policy);
+
//! Returns the name of the active graphics system
/*!
Returns the name of the currently active system. If running with 'runtime' graphics
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
index c32b654f1d..928d01a4ac 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
@@ -41,6 +41,11 @@
#include "qmeegoruntime.h"
+#include "qmeegoswitchevent.h"
+
+#include <QtGui/QApplication>
+#include <QtGui/QWidget>
+
#include <private/qlibrary_p.h>
#include <private/qfactoryloader_p.h>
#include <private/qgraphicssystemplugin_p.h>
@@ -49,6 +54,7 @@
#define ENSURE_INITIALIZED {if (!initialized) initialize();}
bool QMeeGoRuntime::initialized = false;
+bool QMeeGoRuntime::switchEventsEnabled = false;
typedef int (*QMeeGoImageToEglSharedImageFunc) (const QImage&);
typedef QPixmapData* (*QMeeGoPixmapDataFromEglSharedImageFunc) (Qt::HANDLE handle, const QImage&);
@@ -65,6 +71,11 @@ typedef bool (*QMeeGoLiveTextureReleaseFunc) (QPixmap*, QImage *i);
typedef Qt::HANDLE (*QMeeGoLiveTextureGetHandleFunc) (QPixmap*);
typedef void* (*QMeeGoCreateFenceSyncFunc) (void);
typedef void (*QMeeGoDestroyFenceSyncFunc) (void *fs);
+typedef void (*QMeeGoInvalidateLiveSurfacesFunc) (void);
+typedef void (*QMeeGoSwitchToRasterFunc) (void);
+typedef void (*QMeeGoSwitchToMeeGoFunc) (void);
+typedef void (*QMeeGoRegisterSwitchCallbackFunc) (void (*callback)(int type, const char *name));
+typedef void (*QMeeGoSetSwitchPolicyFunc) (int policy);
static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL;
static QMeeGoPixmapDataFromEglSharedImageFunc qt_meego_pixmapdata_from_egl_shared_image = NULL;
@@ -81,6 +92,18 @@ static QMeeGoLiveTextureReleaseFunc qt_meego_live_texture_release = NULL;
static QMeeGoLiveTextureGetHandleFunc qt_meego_live_texture_get_handle = NULL;
static QMeeGoCreateFenceSyncFunc qt_meego_create_fence_sync = NULL;
static QMeeGoDestroyFenceSyncFunc qt_meego_destroy_fence_sync = NULL;
+static QMeeGoInvalidateLiveSurfacesFunc qt_meego_invalidate_live_surfaces = NULL;
+static QMeeGoSwitchToRasterFunc qt_meego_switch_to_raster = NULL;
+static QMeeGoSwitchToMeeGoFunc qt_meego_switch_to_meego = NULL;
+static QMeeGoRegisterSwitchCallbackFunc qt_meego_register_switch_callback = NULL;
+static QMeeGoSetSwitchPolicyFunc qt_meego_set_switch_policy = NULL;
+
+extern "C" void handleSwitch(int type, const char *name)
+{
+ QMeeGoSwitchEvent switchEvent((QLatin1String(name)), QMeeGoSwitchEvent::State(type));
+ foreach (QWidget *widget, QApplication::topLevelWidgets())
+ QCoreApplication::sendEvent(widget, &switchEvent);
+}
void QMeeGoRuntime::initialize()
{
@@ -109,13 +132,20 @@ void QMeeGoRuntime::initialize()
qt_meego_live_texture_get_handle = (QMeeGoLiveTextureGetHandleFunc) library.resolve("qt_meego_live_texture_get_handle");
qt_meego_create_fence_sync = (QMeeGoCreateFenceSyncFunc) library.resolve("qt_meego_create_fence_sync");
qt_meego_destroy_fence_sync = (QMeeGoDestroyFenceSyncFunc) library.resolve("qt_meego_destroy_fence_sync");
+ qt_meego_invalidate_live_surfaces = (QMeeGoInvalidateLiveSurfacesFunc) library.resolve("qt_meego_invalidate_live_surfaces");
+ qt_meego_switch_to_raster = (QMeeGoSwitchToRasterFunc) library.resolve("qt_meego_switch_to_raster");
+ qt_meego_switch_to_meego = (QMeeGoSwitchToMeeGoFunc) library.resolve("qt_meego_switch_to_meego");
+ qt_meego_register_switch_callback = (QMeeGoRegisterSwitchCallbackFunc) library.resolve("qt_meego_register_switch_callback");
+ qt_meego_set_switch_policy = (QMeeGoSetSwitchPolicyFunc) library.resolve("qt_meego_set_switch_policy");
if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image &&
qt_meego_pixmapdata_with_gl_texture && qt_meego_destroy_egl_shared_image && qt_meego_update_egl_shared_image_pixmap &&
qt_meego_set_surface_fixed_size && qt_meego_set_surface_scaling && qt_meego_set_translucent &&
qt_meego_pixmapdata_with_new_live_texture && qt_meego_pixmapdata_from_live_texture_handle &&
qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle &&
- qt_meego_create_fence_sync && qt_meego_destroy_fence_sync)
+ qt_meego_create_fence_sync && qt_meego_destroy_fence_sync && qt_meego_invalidate_live_surfaces &&
+ qt_meego_switch_to_raster && qt_meego_switch_to_meego && qt_meego_register_switch_callback &&
+ qt_meego_set_switch_policy)
{
qDebug("Successfully resolved MeeGo graphics system: %s %s\n", qPrintable(libraryPrivate->fileName), qPrintable(libraryPrivate->fullVersion));
} else {
@@ -232,3 +262,41 @@ void QMeeGoRuntime::destroyFenceSync(void *fs)
Q_ASSERT(qt_meego_destroy_fence_sync);
qt_meego_destroy_fence_sync(fs);
}
+
+void QMeeGoRuntime::invalidateLiveSurfaces()
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_invalidate_live_surfaces);
+ qt_meego_invalidate_live_surfaces();
+}
+
+void QMeeGoRuntime::switchToRaster()
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_switch_to_raster);
+ qt_meego_switch_to_raster();
+}
+
+void QMeeGoRuntime::switchToMeeGo()
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_switch_to_meego);
+ qt_meego_switch_to_meego();
+}
+
+void QMeeGoRuntime::enableSwitchEvents()
+{
+ ENSURE_INITIALIZED;
+ if (!switchEventsEnabled) {
+ Q_ASSERT(qt_meego_register_switch_callback);
+ qt_meego_register_switch_callback(handleSwitch);
+ switchEventsEnabled = true;
+ }
+}
+
+void QMeeGoRuntime::setSwitchPolicy(QMeeGoGraphicsSystemHelper::SwitchPolicy policy)
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_set_switch_policy);
+ qt_meego_set_switch_policy(int(policy));
+}
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h
index bdc4eefa5a..b8986997a2 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.h
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h
@@ -42,6 +42,8 @@
#include <QPixmap>
#include <QImage>
+#include "qmeegographicssystemhelper.h"
+
class QMeeGoRuntime
{
public:
@@ -62,7 +64,13 @@ public:
static Qt::HANDLE getLiveTextureHandle(QPixmap *pixmap);
static void* createFenceSync();
static void destroyFenceSync(void *fs);
+ static void invalidateLiveSurfaces();
+ static void switchToRaster();
+ static void switchToMeeGo();
+ static void enableSwitchEvents();
+ static void setSwitchPolicy(QMeeGoGraphicsSystemHelper::SwitchPolicy policy);
private:
static bool initialized;
+ static bool switchEventsEnabled;
};
diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp
index 0ab272f950..b833e31b05 100644
--- a/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp
@@ -65,4 +65,4 @@ QEvent::Type QMeeGoSwitchEvent::eventNumber()
switchEventNumber = QEvent::registerEventType();
return (QEvent::Type) switchEventNumber;
-} \ No newline at end of file
+}
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp
index e128cd240d..5e6bc120cf 100644
--- a/tools/shared/symbian/epocroot.cpp
+++ b/tools/shared/symbian/epocroot.cpp
@@ -99,6 +99,11 @@ static void fixEpocRoot(QString &path)
if (!path.size() || path[path.size()-1] != QLatin1Char('/')) {
path += QLatin1Char('/');
}
+#ifdef Q_OS_WIN32
+ // Make sure we have drive letter in epocroot
+ if (path.startsWith(QLatin1Char('/')))
+ path.prepend(QDir::currentPath().left(2));
+#endif
}
/**
diff --git a/translations/assistant_pl.ts b/translations/assistant_pl.ts
index 8d3c8a3bb2..87524a4d7c 100644
--- a/translations/assistant_pl.ts
+++ b/translations/assistant_pl.ts
@@ -4,7 +4,6 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+117"/>
<source>&amp;Close</source>
<translation>Za&amp;mknij</translation>
</message>
@@ -12,18 +11,15 @@
<context>
<name>AboutLabel</name>
<message>
- <location line="-15"/>
<source>Warning</source>
<translation>Ostrzeżenie</translation>
</message>
<message>
- <location line="+1"/>
<source>Unable to launch external application.
</source>
<translation>Nie można uruchomić zewnętrznej aplikacji.</translation>
</message>
<message>
- <location line="+0"/>
<source>OK</source>
<translation>OK</translation>
</message>
@@ -31,17 +27,14 @@
<context>
<name>Assistant</name>
<message>
- <location filename="../tools/assistant/tools/assistant/main.cpp" line="+177"/>
<source>Error registering documentation file &apos;%1&apos;: %2</source>
<translation>Błąd podczas zarejestrowania pliku z dokumentacją &quot;%1&quot;: %2</translation>
</message>
<message>
- <location line="+39"/>
<source>Error: %1</source>
<translation>Błąd: %1</translation>
</message>
<message>
- <location line="+42"/>
<source>Could not register documentation file
%1
@@ -54,12 +47,10 @@ Powód:
%2</translation>
</message>
<message>
- <location line="+6"/>
<source>Documentation successfully registered.</source>
<translation>Dokumentacja poprawnie zarejestrowana.</translation>
</message>
<message>
- <location line="+12"/>
<source>Could not unregister documentation file
%1
@@ -72,27 +63,22 @@ Powód:
%2</translation>
</message>
<message>
- <location line="+8"/>
<source>Documentation successfully unregistered.</source>
<translation>Dokumentacja poprawnie wyrejestrowana.</translation>
</message>
<message>
- <location line="+55"/>
<source>Error reading collection file &apos;%1&apos;: %2.</source>
<translation>Błąd podczas czytania pliku kolekcji &quot;%1&quot;: %2.</translation>
</message>
<message>
- <location line="+11"/>
<source>Error creating collection file &apos;%1&apos;: %2.</source>
<translation>Błąd podczas tworzenia pliku kolekcji &quot;%1&quot;: %2.</translation>
</message>
<message>
- <location line="+7"/>
<source>Error reading collection file &apos;%1&apos;: %2</source>
- <translation>Błąd podczas czytania pliku kolekcji &quot;%1&quot;: %2</translation>
+ <translation type="obsolete">Błąd podczas czytania pliku kolekcji &quot;%1&quot;: %2</translation>
</message>
<message>
- <location line="+53"/>
<source>Cannot load sqlite database driver!</source>
<translation>Nie można załadować sterownika bazy danych sqlite!</translation>
</message>
@@ -100,95 +86,88 @@ Powód:
<context>
<name>BookmarkDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
<source>Add Bookmark</source>
<translation>Dodaj zakładkę</translation>
</message>
<message>
- <location/>
<source>Bookmark:</source>
<translation>Zakładka:</translation>
</message>
<message>
- <location/>
<source>Add in Folder:</source>
<translation>Dodaj do katalogu:</translation>
</message>
<message>
- <location/>
<source>+</source>
<translation>+</translation>
</message>
<message>
- <location/>
<source>New Folder</source>
<translation>Nowy katalog</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkdialog.cpp" line="+227"/>
<source>Rename Folder</source>
<translation>Zmień nazwę katalogu</translation>
</message>
</context>
<context>
+ <name>BookmarkItem</name>
+ <message>
+ <source>New Folder</source>
+ <translation>Nowy katalog</translation>
+ </message>
+ <message>
+ <source>Untitled</source>
+ <translation>Nienazwany</translation>
+ </message>
+</context>
+<context>
<name>BookmarkManager</name>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+151"/>
<source>Untitled</source>
<translation>Nienazwany</translation>
</message>
<message>
- <location line="+65"/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
<message>
- <location line="+1"/>
<source>You are going to delete a Folder, this will also&lt;br&gt;remove it&apos;s content. Are you sure to continue?</source>
<translation>Zamierzasz usunąć katalog co spowoduje również usunięcie jego zawartości. Czy chcesz kontynuować?</translation>
</message>
<message>
- <location line="+148"/>
<source>Manage Bookmarks...</source>
<translation>Zarządzanie zakładkami...</translation>
</message>
<message>
- <location line="+3"/>
<source>Add Bookmark...</source>
<translation>Dodaj zakładkę...</translation>
</message>
<message>
- <location line="+1"/>
<source>Ctrl+D</source>
<translation>Ctrl+D</translation>
</message>
<message>
- <location line="+68"/>
<source>Delete Folder</source>
<translation>Usuń katalog</translation>
</message>
<message>
- <location line="+1"/>
<source>Rename Folder</source>
<translation>Zmień nazwę katalogu</translation>
</message>
<message>
- <location line="+2"/>
<source>Show Bookmark</source>
<translation>Pokaż zakładkę</translation>
</message>
<message>
- <location line="+1"/>
<source>Show Bookmark in New Tab</source>
<translation>Pokaż zakładkę w nowej karcie</translation>
</message>
<message>
- <location line="+2"/>
<source>Delete Bookmark</source>
<translation>Usuń zakładkę</translation>
</message>
<message>
- <location line="+1"/>
<source>Rename Bookmark</source>
<translation>Zmień nazwę zakładki</translation>
</message>
@@ -196,100 +175,78 @@ Powód:
<context>
<name>BookmarkManagerWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.ui"/>
<source>Manage Bookmarks</source>
<translation>Zarządzanie zakładkami</translation>
</message>
<message>
- <location/>
<source>Search:</source>
<translation>Wyszukaj:</translation>
</message>
<message>
- <location/>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="+258"/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
<message>
- <location/>
<source>Import and Backup</source>
- <translation type="unfinished"></translation>
+ <translation>Import i kopie</translation>
</message>
<message>
- <location/>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="-30"/>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanagerwidget.cpp" line="-142"/>
<source>Import...</source>
<translation>Importuj...</translation>
</message>
<message>
- <location line="+1"/>
<source>Export...</source>
<translation>Exportuj...</translation>
</message>
<message>
- <location line="+112"/>
<source>Open File</source>
<translation>Otwórz plik</translation>
</message>
<message>
- <location line="+1"/>
- <location line="+16"/>
<source>Files (*.xbel)</source>
<translation>Pliki (*.xbel)</translation>
</message>
<message>
- <location line="-1"/>
<source>Save File</source>
<translation>Zachowaj plik</translation>
</message>
<message>
- <location line="+12"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="+1"/>
<source>Unable to save bookmarks.</source>
<translation>Nie można zachować zakładek.</translation>
</message>
<message>
- <location line="+30"/>
<source>You are goingto delete a Folder, this will also&lt;br&gt; remove it&apos;s content. Are you sure to continue?</source>
<translation>Zamierzasz usunąć katalog co spowoduje również&lt;br&gt;usunięcie jego zawartości. Czy chcesz kontynuować?</translation>
</message>
<message>
- <location line="+28"/>
<source>Delete Folder</source>
<translation>Usuń katalog</translation>
</message>
<message>
- <location line="+1"/>
<source>Rename Folder</source>
<translation>Zmień nazwę katalogu</translation>
</message>
<message>
- <location line="+2"/>
<source>Show Bookmark</source>
<translation>Pokaż zakładkę</translation>
</message>
<message>
- <location line="+1"/>
<source>Show Bookmark in New Tab</source>
<translation>Pokaż zakładkę w nowej karcie</translation>
</message>
<message>
- <location line="+2"/>
<source>Delete Bookmark</source>
<translation>Usuń zakładkę</translation>
</message>
<message>
- <location line="+1"/>
<source>Rename Bookmark</source>
<translation>Zmień nazwę zakładki</translation>
</message>
@@ -297,17 +254,14 @@ Powód:
<context>
<name>BookmarkModel</name>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmodel.cpp" line="+88"/>
<source>Name</source>
<translation>Nazwa</translation>
</message>
<message>
- <location line="+0"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
- <location line="+2"/>
<source>Bookmarks Menu</source>
<translation>Menu zakładek</translation>
</message>
@@ -315,22 +269,18 @@ Powód:
<context>
<name>BookmarkWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/bookmarkwidget.ui"/>
<source>Bookmarks</source>
<translation>Zakładki</translation>
</message>
<message>
- <location/>
<source>Filter:</source>
<translation>Filtr:</translation>
</message>
<message>
- <location/>
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
- <location/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
@@ -338,48 +288,38 @@ Powód:
<context>
<name>CentralWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+121"/>
<source>Add new page</source>
<translation>Dodaj nową stronę</translation>
</message>
<message>
- <location line="+9"/>
<source>Close current page</source>
<translation>Zamknij bieżącą stronę</translation>
</message>
<message>
- <location line="+287"/>
<source>Print Document</source>
<translation>Wydrukuj dokument</translation>
</message>
<message>
- <location line="+126"/>
- <location line="+2"/>
<source>unknown</source>
<translation>nieznany</translation>
</message>
<message>
- <location line="+101"/>
<source>Add New Page</source>
<translation>Dodaj nową stronę</translation>
</message>
<message>
- <location line="+3"/>
<source>Close This Page</source>
<translation>Zamknij tą stronę</translation>
</message>
<message>
- <location line="+3"/>
<source>Close Other Pages</source>
<translation>Zamknij inne strony</translation>
</message>
<message>
- <location line="+5"/>
<source>Add Bookmark for this Page...</source>
<translation>Dodaj zakładkę dla tej strony...</translation>
</message>
<message>
- <location line="+264"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
@@ -387,62 +327,111 @@ Powód:
<context>
<name>CmdLineParser</name>
<message>
- <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+137"/>
+ <source>Usage: assistant [Options]
+
+-collectionFile file Uses the specified collection
+ file instead of the default one
+-showUrl url Shows the document with the
+ url.
+-enableRemoteControl Enables Assistant to be
+ remotely controlled.
+-show widget Shows the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-activate widget Activates the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-hide widget Hides the specified dockwidget
+ which can be &quot;contents&quot;, &quot;index&quot;
+ &quot;bookmarks&quot; or &quot;search&quot;.
+-register helpFile Registers the specified help file
+ (.qch) in the given collection
+ file.
+-unregister helpFile Unregisters the specified help file
+ (.qch) from the give collection
+ file.
+-setCurrentFilter filter Set the filter as the active filter.
+-remove-search-index Removes the full text search index.
+-rebuild-search-index Re-builds the full text search index (potentially slow).
+-quiet Does not display any error or
+ status message.
+-help Displays this help.
+</source>
+ <translation>Sposób użycia: assistant [opcje]
+
+-collectionFile plik Używa podanego pliku kolekcji
+ zamiast domyślego.
+-showUrl url Pokazuje dokument z
+ url.
+-enableRemoteControl Umożliwia zdalną kontrolę
+ nad Assistantem.
+-show widżet Pokazuje podany widżet
+ dokowalny, którym może być &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; albo &quot;search&quot;.
+-activate widżet Aktywuje podany widżet
+ dokowalny, którym może być &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; albo &quot;search&quot;.
+-hide widżet Ukrywa podany widżet
+ dokowalny, którym może być &quot;contents&quot;, &quot;index&quot;,
+ &quot;bookmarks&quot; albo &quot;search&quot;.
+-register plikPomocy Rejestruje podany plik pomocy
+ (.qch) w podanym pliku kolekcji.
+-unregister plikPomocy Wyrejestrowuje podany plik pomocy
+ (.qch) w podanym pliku kolekcji.
+-setCurrentFilter filtr Ustawia filtr jako aktywny.
+-remove-search-index Usuwa indeks pełnego przeszukiwania tekstu.
+-rebuild-search-index Przebudowuje indeks pełnego
+ przeszukiwania tekstu (potencjalnie wolne).
+-quiet Nie pokazuje żadnych błędów ani
+ komunikatów o stanie.
+-help Pokazuje tę pomoc.
+</translation>
+ </message>
+ <message>
<source>Unknown option: %1</source>
<translation>Nieznana opcja: %1</translation>
</message>
<message>
- <location line="+33"/>
<source>The collection file &apos;%1&apos; does not exist.</source>
<translation>Plik kolekcji &quot;%1&quot; nie istnieje.</translation>
</message>
<message>
- <location line="+3"/>
<source>Missing collection file.</source>
<translation>Brak pliku kolekcji.</translation>
</message>
<message>
- <location line="+13"/>
<source>Invalid URL &apos;%1&apos;.</source>
<translation>Niepoprawny URL &quot;%1&quot;.</translation>
</message>
<message>
- <location line="+2"/>
<source>Missing URL.</source>
<translation>Brak URL.</translation>
</message>
<message>
- <location line="+36"/>
<source>Unknown widget: %1</source>
<translation>Nieznany widżet: %1</translation>
</message>
<message>
- <location line="+2"/>
<source>Missing widget.</source>
<translation>Brak widżetu.</translation>
</message>
<message>
- <location line="+23"/>
<source>The Qt help file &apos;%1&apos; does not exist.</source>
<translation>Plik pomocy Qt &quot;%1&quot; nie istnieje.</translation>
</message>
<message>
- <location line="+4"/>
<source>Missing help file.</source>
<translation>Brak pliku pomocy.</translation>
</message>
<message>
- <location line="+10"/>
<source>Missing filter argument.</source>
<translation>Brak argumentu dla filtru.</translation>
</message>
<message>
- <location line="+20"/>
<source>Error</source>
<translation>Błąd</translation>
</message>
<message>
- <location line="+2"/>
<source>Notice</source>
<translation>Uwaga</translation>
</message>
@@ -450,222 +439,433 @@ Powód:
<context>
<name>ContentWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+173"/>
<source>Open Link</source>
<translation>Otwórz odsyłacz</translation>
</message>
<message>
- <location line="+1"/>
<source>Open Link in New Tab</source>
<translation>Otwórz odsyłacz w nowej karcie</translation>
</message>
</context>
<context>
+ <name>ConversionWizard</name>
+ <message>
+ <source>Help Conversion Wizard</source>
+ <translation>Kreator konwersji pomocy</translation>
+ </message>
+ <message>
+ <source>Converting %1...</source>
+ <translation>Konwertowanie %1...</translation>
+ </message>
+ <message>
+ <source>Writing help collection file...</source>
+ <translation>Zapisywanie pliku kolekcji pomocy...</translation>
+ </message>
+ <message>
+ <source>Done.</source>
+ <translation>Zrobione.</translation>
+ </message>
+</context>
+<context>
+ <name>FilesPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Files:</source>
+ <translation>Pliki:</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+ <message>
+ <source>Remove All</source>
+ <translation>Usuń wszystko</translation>
+ </message>
+ <message>
+ <source>Unreferenced Files</source>
+ <translation>Niezreferowane pliki</translation>
+ </message>
+ <message>
+ <source>Remove files which are neither referenced by a keyword nor by the TOC.</source>
+ <translation>Usuwa pliki do których nie odnoszą się słowa kluczowe ani spis treści.</translation>
+ </message>
+ <message>
+ <source>&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; When removing images or stylesheets, be aware that those files are not directly referenced by the .adp or .dcf file.&lt;/p&gt;</source>
+ <translation>&lt;p&gt;&lt;b&gt;Ostrzeżenie:&lt;/b&gt; Podczas usuwania obrazów oraz arkuszy stylów, bądź świadom, iż owe pliki nie są bezpośrednio używane przez plik .adp lub .dcf.&lt;/p&gt;</translation>
+ </message>
+</context>
+<context>
<name>FilterNameDialogClass</name>
<message>
- <location filename="../tools/assistant/tools/assistant/filternamedialog.ui"/>
<source>Add Filter Name</source>
<translation>Dodaj nazwę filtru</translation>
</message>
<message>
- <location/>
<source>Filter Name:</source>
<translation>Nazwa filtru:</translation>
</message>
</context>
<context>
+ <name>FilterPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Filter attributes for current documentation (comma separated list):</source>
+ <translation>Atrybuty filtru bieżącej dokumentacji (lista oddzielona przecinkami):</translation>
+ </message>
+ <message>
+ <source>Custom Filters</source>
+ <translation>Własne filtry</translation>
+ </message>
+ <message>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+ <message>
+ <source>2</source>
+ <translation>2</translation>
+ </message>
+ <message>
+ <source>Add</source>
+ <translation>Dodaj</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+ <message>
+ <source>Filter Settings</source>
+ <translation>Ustawienia filtru</translation>
+ </message>
+ <message>
+ <source>Specify the filter attributes for the documentation. If filter attributes are used, also define a custom filter for it. Both the filter attributes and the custom filters are optional.</source>
+ <translation type="unfinished">Podaj atrybuty filtru dla dokumentacji. </translation>
+ </message>
+ <message>
+ <source>Filter Name</source>
+ <translation>Nazwa filtru</translation>
+ </message>
+ <message>
+ <source>Filter Attributes</source>
+ <translation>Atrybuty filtru</translation>
+ </message>
+ <message>
+ <source>The custom filter &apos;%1&apos; is defined multiple times.</source>
+ <translation>Własny filtr &quot;%1&quot; jest wielokrotnie zdefiniowany.</translation>
+ </message>
+ <message>
+ <source>The attributes for custom filter &apos;%1&apos; are defined multiple times.</source>
+ <translation>Atrybuty własnego filtru &quot;%1&quot; są wielokrotnie zdefiniowane.</translation>
+ </message>
+ <message>
+ <source>unfiltered</source>
+ <comment>list of available documentation</comment>
+ <translation>nieprzefiltrowana</translation>
+ </message>
+</context>
+<context>
<name>FindWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/findwidget.cpp" line="+85"/>
<source>Previous</source>
<translation>Poprzedni</translation>
</message>
<message>
- <location line="+6"/>
<source>Next</source>
<translation>Następny</translation>
</message>
<message>
- <location line="+5"/>
<source>Case Sensitive</source>
<translation>Uwzględniaj wielkość liter</translation>
</message>
<message>
- <location line="+9"/>
<source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Przeszukano od początku</translation>
+ </message>
+</context>
+<context>
+ <name>FinishPage</name>
+ <message>
+ <source>Converting File</source>
+ <translation>Konwertowanie pliku</translation>
+ </message>
+ <message>
+ <source>Creating the new Qt help files from the old ADP file.</source>
+ <translation>Tworzenie nowych plików pomocy Qt ze starego pliku ADP.</translation>
</message>
</context>
<context>
<name>FontPanel</name>
<message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
<source>Font</source>
<translation>Czcionka</translation>
</message>
<message>
- <location line="+11"/>
<source>&amp;Writing system</source>
<translation>Sys&amp;tem pisania</translation>
</message>
<message>
- <location line="+3"/>
<source>&amp;Family</source>
<translation>&amp;Rodzina</translation>
</message>
<message>
- <location line="+4"/>
<source>&amp;Style</source>
<translation>&amp;Styl</translation>
</message>
<message>
- <location line="+4"/>
<source>&amp;Point size</source>
<translation>&amp;Wielkość punktu</translation>
</message>
</context>
<context>
+ <name>GeneralPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Namespace:</source>
+ <translation>Przestrzeń nazw:</translation>
+ </message>
+ <message>
+ <source>Virtual Folder:</source>
+ <translation>Wirtualny katalog:</translation>
+ </message>
+ <message>
+ <source>General Settings</source>
+ <translation>Ustawienia ogólne</translation>
+ </message>
+ <message>
+ <source>Specify the namespace and the virtual folder for the documentation.</source>
+ <translation>Podaj przestrzeń nazw i wirtualny katalog dla dokumentacji.</translation>
+ </message>
+ <message>
+ <source>Namespace Error</source>
+ <translation>Błąd przestrzeni nazw</translation>
+ </message>
+ <message>
+ <source>The namespace contains some invalid characters.</source>
+ <translation>Przestrzeń nazw zawiera niepoprawne znaki.</translation>
+ </message>
+ <message>
+ <source>Virtual Folder Error</source>
+ <translation>Błąd wirtualnego katalogu</translation>
+ </message>
+ <message>
+ <source>The virtual folder contains some invalid characters.</source>
+ <translation>Wirtualny katalog zawiera niepoprawne znaki.</translation>
+ </message>
+</context>
+<context>
+ <name>HelpEngineWrapper</name>
+ <message>
+ <source>Unfiltered</source>
+ <translation>Nieprzefiltrowane</translation>
+ </message>
+</context>
+<context>
+ <name>HelpGenerator</name>
+ <message>
+ <source>Warning: %1</source>
+ <translation>Ostrzeżenie: %1</translation>
+ </message>
+</context>
+<context>
<name>HelpViewer</name>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+58"/>
<source>&lt;title&gt;about:blank&lt;/title&gt;</source>
<translation>&lt;title&gt;o:pusty&lt;/title&gt;</translation>
</message>
<message>
- <location line="+6"/>
<source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
<translation>&lt;title&gt;Błąd 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;Strona nie może być znaleziona&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer_qtb.cpp" line="+230"/>
<source>Copy &amp;Link Location</source>
<translation>Skopiuj &amp;odsyłacz</translation>
</message>
<message>
- <location line="+3"/>
<source>Open Link in New Tab Ctrl+LMB</source>
<translation>Otwórz odsyłacz w nowej karcie Ctrl+LMB</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer_qwv.cpp" line="+260"/>
<source>Open Link in New Tab</source>
<translation>Otwórz odsyłacz w nowej karcie</translation>
</message>
</context>
<context>
+ <name>HelpWindow</name>
+ <message>
+ <source>&lt;center&gt;&lt;b&gt;Wizard Assistant&lt;/b&gt;&lt;/center&gt;</source>
+ <translation>&lt;center&gt;&lt;b&gt;Asystent kreatora&lt;/b&gt;&lt;/center&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>IdentifierPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Create identifiers</source>
+ <translation>Utwórz identyfikatory</translation>
+ </message>
+ <message>
+ <source>Global prefix:</source>
+ <translation>Przedrostek globalny:</translation>
+ </message>
+ <message>
+ <source>Inherit prefix from file names</source>
+ <translation>Wywiedź przedrostek z nazw plików</translation>
+ </message>
+ <message>
+ <source>Identifiers</source>
+ <translation>Identyfikatory</translation>
+ </message>
+ <message>
+ <source>This page allows you to create identifiers from the keywords found in the .adp or .dcf file.</source>
+ <translation>Ta strona umożliwia utworzenie identyfikatorów na podstawie kluczy znalezionych w pliku .adp lub .dcf.</translation>
+ </message>
+</context>
+<context>
<name>IndexWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+68"/>
<source>&amp;Look for:</source>
<translation>Wy&amp;szukaj:</translation>
</message>
<message>
- <location line="+74"/>
<source>Open Link</source>
<translation>Otwórz odsyłacz</translation>
</message>
<message>
- <location line="+1"/>
<source>Open Link in New Tab</source>
<translation>Otwórz odsyłacz w nowej karcie</translation>
</message>
</context>
<context>
+ <name>InputPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>File name:</source>
+ <translation>Nazwa pliku:</translation>
+ </message>
+ <message>
+ <source>...</source>
+ <translation>...</translation>
+ </message>
+ <message>
+ <source>Input File</source>
+ <translation>Plik wejściowy</translation>
+ </message>
+ <message>
+ <source>Specify the .adp or .dcf file you want to convert to the new Qt help project format and/or collection format.</source>
+ <translation>Podaj plik .adp albo .dcf, który chcesz skonwertować do nowego formatu projektu albo kolekcji pomocy Qt.</translation>
+ </message>
+ <message>
+ <source>Open file</source>
+ <translation>Otwórz plik</translation>
+ </message>
+ <message>
+ <source>Qt Help Files (*.adp *.dcf)</source>
+ <translation>Pliki pomocy Qt (*.adp *.dcf)</translation>
+ </message>
+ <message>
+ <source>File Open Error</source>
+ <translation>Błąd otwierania pliku</translation>
+ </message>
+ <message>
+ <source>The specified file could not be opened!</source>
+ <translation>Nie można otworzyć podanego pliku!</translation>
+ </message>
+ <message>
+ <source>File Parsing Error</source>
+ <translation>Błąd parsowania pliku</translation>
+ </message>
+ <message>
+ <source>Parsing error in line %1!</source>
+ <translation>Błąd parsowania w linii %1!</translation>
+ </message>
+</context>
+<context>
<name>InstallDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
- <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+78"/>
<source>Install Documentation</source>
<translation>Zainstaluj dokumentację</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+33"/>
<source>Downloading documentation info...</source>
<translation>Pobieranie informacji o dokumentacji...</translation>
</message>
<message>
- <location line="+51"/>
<source>Download canceled.</source>
<translation>Anulowano pobieranie.</translation>
</message>
<message>
- <location line="+28"/>
- <location line="+79"/>
- <location line="+27"/>
<source>Done.</source>
<translation>Zrobione.</translation>
</message>
<message>
- <location line="-91"/>
<source>The file %1 already exists. Do you want to overwrite it?</source>
<translation>Plik %1 już istnieje. Czy chcesz go nadpisać?</translation>
</message>
<message>
- <location line="+11"/>
<source>Unable to save the file %1: %2.</source>
<translation>Nie można zachować pliku %1: %2.</translation>
</message>
<message>
- <location line="+8"/>
<source>Downloading %1...</source>
<translation>Pobieranie %1...</translation>
</message>
<message>
- <location line="+20"/>
- <location line="+42"/>
- <location line="+40"/>
<source>Download failed: %1.</source>
<translation>Pobieranie nie powiodło się: %1.</translation>
</message>
<message>
- <location line="-72"/>
<source>Documentation info file is corrupt!</source>
<translation>Plik z informacjami o dokumentacji jest uszkodzony!</translation>
</message>
<message>
- <location line="+37"/>
<source>Download failed: Downloaded file is corrupted.</source>
<translation>Pobieranie nie powiodło się: pobrany plik jest uszkodzony.</translation>
</message>
<message>
- <location line="+2"/>
<source>Installing documentation %1...</source>
<translation>Instalowanie dokumentacji %1...</translation>
</message>
<message>
- <location line="+23"/>
<source>Error while installing documentation:
%1</source>
<translation>Błąd podczas instalowania dokumentacji:
%1</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
<source>Available Documentation:</source>
<translation>Dostępna dokumentacja:</translation>
</message>
<message>
- <location/>
<source>Install</source>
<translation>Zainstaluj</translation>
</message>
<message>
- <location/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location/>
<source>Close</source>
<translation>Zamknij</translation>
</message>
<message>
- <location/>
<source>Installation Path:</source>
<translation>Ścieżka instalacji:</translation>
</message>
<message>
- <location/>
<source>...</source>
<translation>...</translation>
</message>
@@ -673,346 +873,363 @@ Powód:
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+123"/>
- <location line="+369"/>
<source>Index</source>
<translation>Indeks</translation>
</message>
<message>
- <location line="-363"/>
- <location line="+361"/>
<source>Contents</source>
<translation>Spis treści</translation>
</message>
<message>
- <location line="-354"/>
- <location line="+358"/>
<source>Bookmarks</source>
<translation>Zakładki</translation>
</message>
<message>
- <location line="+2"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
<message>
- <location line="-338"/>
- <location line="+680"/>
- <location line="+284"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="-705"/>
<source>Page Set&amp;up...</source>
<translation>&amp;Ustawienia strony...</translation>
</message>
<message>
- <location line="+2"/>
<source>Print Preview...</source>
<translation>Podgląd wydruku...</translation>
</message>
<message>
- <location line="+3"/>
<source>&amp;Print...</source>
<translation>Wy&amp;drukuj...</translation>
</message>
<message>
- <location line="-10"/>
<source>New &amp;Tab</source>
<translation>Nowa kar&amp;ta</translation>
</message>
<message>
- <location line="+17"/>
<source>&amp;Close Tab</source>
<translation>&amp;Zamknij kartę</translation>
</message>
<message>
- <location line="+5"/>
<source>&amp;Quit</source>
<translation>Za&amp;kończ</translation>
</message>
<message>
- <location line="+3"/>
<source>CTRL+Q</source>
<translation>CTRL+Q</translation>
</message>
<message>
- <location line="+6"/>
<source>&amp;Copy selected Text</source>
<translation>S&amp;kopiuj zaznaczony tekst</translation>
</message>
<message>
- <location line="+8"/>
<source>&amp;Find in Text...</source>
<translation>Znajdź w &amp;tekście...</translation>
</message>
<message>
- <location line="+2"/>
<source>&amp;Find</source>
<translation>&amp;Znajdź</translation>
</message>
<message>
- <location line="+4"/>
<source>Find &amp;Next</source>
<translation>Znajdź &amp;następny</translation>
</message>
<message>
- <location line="+4"/>
<source>Find &amp;Previous</source>
<translation>Znajdź &amp;poprzedni</translation>
</message>
<message>
- <location line="+5"/>
<source>Preferences...</source>
<translation>Ustawienia...</translation>
</message>
<message>
- <location line="+4"/>
<source>Zoom &amp;in</source>
<translation>Po&amp;większ</translation>
</message>
<message>
- <location line="+6"/>
<source>Zoom &amp;out</source>
<translation>Po&amp;mniejsz</translation>
</message>
<message>
- <location line="+6"/>
<source>Normal &amp;Size</source>
<translation>Normalny &amp;rozmiar</translation>
</message>
<message>
- <location line="+4"/>
<source>Ctrl+0</source>
<translation>Ctrl+0</translation>
</message>
<message>
- <location line="+5"/>
<source>ALT+C</source>
<translation>ALT+C</translation>
</message>
<message>
- <location line="+2"/>
<source>ALT+I</source>
<translation>ALT+I</translation>
</message>
<message>
- <location line="+4"/>
<source>ALT+S</source>
<translation>ALT+S</translation>
</message>
<message>
- <location line="+3"/>
<source>&amp;Home</source>
<translation>Strona &amp;startowa</translation>
</message>
<message>
- <location line="+4"/>
<source>&amp;Back</source>
<translation>&amp;Wstecz</translation>
</message>
<message>
- <location line="+5"/>
<source>&amp;Forward</source>
<translation>W &amp;przód</translation>
</message>
<message>
- <location line="+6"/>
<source>Sync with Table of Contents</source>
<translation>Znajdź bieżącą stronę w spisie treści</translation>
</message>
<message>
- <location line="+2"/>
<source>Sync</source>
- <translation type="unfinished"></translation>
+ <translation>Zsynchronizuj</translation>
</message>
<message>
- <location line="+5"/>
<source>Next Page</source>
<translation>Następna strona</translation>
</message>
<message>
- <location line="+1"/>
<source>Ctrl+Alt+Right</source>
<translation></translation>
</message>
<message>
- <location line="+3"/>
<source>Previous Page</source>
<translation>Poprzednia strona</translation>
</message>
<message>
- <location line="+1"/>
<source>Ctrl+Alt+Left</source>
<translation></translation>
</message>
<message>
- <location line="+596"/>
+ <source>&lt;center&gt;&lt;h3&gt;%1&lt;/h3&gt;&lt;p&gt;Version %2&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>Could not register file &apos;%1&apos;: %2</source>
<translation>Nie można zarejestrować pliku &quot;%1&quot;: %2</translation>
</message>
<message>
- <location line="-589"/>
<source>About...</source>
<translation>Informacje o programie...</translation>
</message>
<message>
- <location line="+21"/>
<source>Navigation Toolbar</source>
<translation>Pasek do nawigacji</translation>
</message>
<message>
- <location line="+69"/>
<source>Toolbars</source>
<translation>Paski narzędzi</translation>
</message>
<message>
- <location line="+16"/>
<source>Filter Toolbar</source>
<translation>Pasek filtrowania</translation>
</message>
<message>
- <location line="+2"/>
<source>Filtered by:</source>
<translation>Przefiltrowane przez:</translation>
</message>
<message>
- <location line="+26"/>
<source>Address Toolbar</source>
<translation>Pasek adresu</translation>
</message>
<message>
- <location line="+4"/>
<source>Address:</source>
<translation>Adres:</translation>
</message>
<message>
- <location line="+112"/>
<source>Could not find the associated content item.</source>
<translation>Nie można znaleźć skojarzonego elementu zawartości.</translation>
</message>
<message>
- <location line="+60"/>
<source>About %1</source>
<translation>Informacje o %1</translation>
</message>
<message>
- <location line="+175"/>
<source>Updating search index</source>
<translation>Uaktualnianie indeksu wyszukiwawczego</translation>
</message>
<message>
- <location line="-669"/>
<source>Looking for Qt Documentation...</source>
<translation>Szukanie dokumentacji Qt...</translation>
</message>
<message>
- <location line="+227"/>
<source>&amp;Window</source>
<translation>&amp;Okno</translation>
</message>
<message>
- <location line="+3"/>
<source>Minimize</source>
<translation>Zminimalizuj</translation>
</message>
<message>
- <location line="+1"/>
<source>Ctrl+M</source>
<translation></translation>
</message>
<message>
- <location line="-2"/>
<source>Zoom</source>
<translation>Powiększenie</translation>
</message>
<message>
- <location line="-169"/>
<source>&amp;File</source>
<translation>&amp;Plik</translation>
</message>
<message>
- <location line="+32"/>
<source>&amp;Edit</source>
<translation>&amp;Edycja</translation>
</message>
<message>
- <location line="+27"/>
<source>&amp;View</source>
<translation>&amp;Widok</translation>
</message>
<message>
- <location line="+30"/>
<source>&amp;Go</source>
<translation>&amp;Nawigacja</translation>
</message>
<message>
- <location line="+2"/>
<source>ALT+Home</source>
<translation>ALT+Home</translation>
</message>
<message>
- <location line="+30"/>
<source>&amp;Bookmarks</source>
<translation>&amp;Zakładki</translation>
</message>
<message>
- <location line="+2"/>
<source>&amp;Help</source>
<translation>&amp;Pomoc</translation>
</message>
<message>
- <location line="-38"/>
<source>ALT+O</source>
<translation>ALT+O</translation>
</message>
</context>
<context>
+ <name>OutputPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Project file name:</source>
+ <translation>Nazwa pliku projektu:</translation>
+ </message>
+ <message>
+ <source>Collection file name:</source>
+ <translation>Nazwa pliku kolekcji:</translation>
+ </message>
+ <message>
+ <source>Output File Names</source>
+ <translation>Nazwy plików wyjściowych</translation>
+ </message>
+ <message>
+ <source>Specify the file names for the output files.</source>
+ <translation>Podaj nazwy plików wyjściowych.</translation>
+ </message>
+ <message>
+ <source>Convert...</source>
+ <translation>Konwertuj...</translation>
+ </message>
+ <message>
+ <source>Qt Help Project File</source>
+ <translation>Plik projektu pomocy Qt</translation>
+ </message>
+ <message>
+ <source>Qt Help Collection Project File</source>
+ <translation>Plik projektu kolekcji pomocy Qt</translation>
+ </message>
+ <message>
+ <source>The specified file %1 already exist.
+
+Do you want to remove it?</source>
+ <translation>Podany plik %1 już istnieje.
+
+Czy chcesz go usunąć?</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+ <translation>Anuluj</translation>
+ </message>
+</context>
+<context>
+ <name>PathPage</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>File filters:</source>
+ <translation>Filtry pliku:</translation>
+ </message>
+ <message>
+ <source>Documentation source file paths:</source>
+ <translation>Ścieżki do plików źródłowych dokumentacji:</translation>
+ </message>
+ <message>
+ <source>Add</source>
+ <translation>Dodaj</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Usuń</translation>
+ </message>
+ <message>
+ <source>Source File Paths</source>
+ <translation>Ścieżki do plików źródłowych</translation>
+ </message>
+ <message>
+ <source>Specify the paths where the sources files are located. By default, all files in those directories matched by the file filter will be included.</source>
+ <translation>Podaj ścieżki do plików źródłowych. Domyślnie dołączone zostaną wszystkie pliki przepuszczone przez filtr w tych katalogach.</translation>
+ </message>
+ <message>
+ <source>Source File Path</source>
+ <translation>Ścieżka do pliku źródłowego</translation>
+ </message>
+</context>
+<context>
<name>PreferencesDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+252"/>
- <location line="+44"/>
<source>Add Documentation</source>
<translation>Dodaj dokumentację</translation>
</message>
<message>
- <location line="-44"/>
<source>Qt Compressed Help Files (*.qch)</source>
<translation>Skompresowane pliki pomocy Qt (*.qch)</translation>
</message>
<message>
- <location line="+38"/>
<source>The specified file is not a valid Qt Help File!</source>
<translation>Podany plik nie jest poprawnym plikiem pomocy Qt!</translation>
</message>
<message>
- <location line="-8"/>
<source>The namespace %1 is already registered!</source>
<translation>Przestrzeń nazw %1 jest już zarejestrowana!</translation>
</message>
<message>
- <location line="+32"/>
<source>Remove Documentation</source>
<translation>Usuń dokumentację</translation>
</message>
<message>
- <location line="+1"/>
<source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source>
<translation>Niektóre dokumenty otwarte w Assistant odwołują sie do dokumentacji którą próbujesz usunąć. Usunięcie dokumentacji spowoduje zamknięcie tych dokumentów.</translation>
</message>
<message>
- <location line="+2"/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location line="+1"/>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
- <location line="+83"/>
<source>Use custom settings</source>
<translation>Użyj własnych ustawień</translation>
</message>
@@ -1020,130 +1237,272 @@ Powód:
<context>
<name>PreferencesDialogClass</name>
<message>
- <location filename="../tools/assistant/tools/assistant/preferencesdialog.ui"/>
<source>Preferences</source>
<translation>Ustawienia</translation>
</message>
<message>
- <location/>
<source>Fonts</source>
<translation>Czcionki</translation>
</message>
<message>
- <location/>
<source>Font settings:</source>
<translation>Ustawienia czcionki:</translation>
</message>
<message>
- <location/>
<source>Browser</source>
<translation>Przeglądarka</translation>
</message>
<message>
- <location/>
<source>Application</source>
<translation>Aplikacja</translation>
</message>
<message>
- <location/>
<source>Filters</source>
<translation>Filtry</translation>
</message>
<message>
- <location/>
<source>Filter:</source>
<translation>Filtr:</translation>
</message>
<message>
- <location/>
<source>Attributes:</source>
<translation>Atrybuty:</translation>
</message>
<message>
- <location/>
<source>1</source>
<translation>1</translation>
</message>
<message>
- <location/>
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
- <location/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
<message>
- <location/>
<source>Documentation</source>
<translation>Dokumentacja</translation>
</message>
<message>
- <location/>
<source>Registered Documentation:</source>
<translation>Zarejestrowana dokumentacja:</translation>
</message>
<message>
- <location/>
<source>Add...</source>
<translation>Dodaj...</translation>
</message>
<message>
- <location/>
<source>Options</source>
<translation>Opcje</translation>
</message>
<message>
- <location/>
<source>Current Page</source>
<translation>Bieżąca strona</translation>
</message>
<message>
- <location/>
<source>Restore to default</source>
<translation>Przywróć domyślną</translation>
</message>
<message>
- <location/>
<source>Homepage</source>
<translation>Strona startowa</translation>
</message>
<message>
- <location/>
<source>On help start:</source>
- <translation>Po uruchomieniu</translation>
+ <translation>Po uruchomieniu:</translation>
</message>
<message>
- <location/>
<source>Show my home page</source>
<translation>Pokaż stronę startową</translation>
</message>
<message>
- <location/>
<source>Show a blank page</source>
<translation>Pokaż pustą stronę</translation>
</message>
<message>
- <location/>
<source>Show my tabs from last session</source>
<translation>Pokaż moje karty z ostatniej sesji</translation>
</message>
<message>
- <location/>
<source>Blank Page</source>
<translation>Pusta strona</translation>
</message>
</context>
<context>
+ <name>QCollectionGenerator</name>
+ <message>
+ <source>Unknown token at line %1.</source>
+ <translation>Nieznany znak w linii %1.</translation>
+ </message>
+ <message>
+ <source>Unknown token at line %1. Expected &quot;QtHelpCollectionProject&quot;.</source>
+ <translation>Nieznany znak w linii %1. Oczekiwano &quot;QtHelpCollectionProject&quot;.</translation>
+ </message>
+ <message>
+ <source>Missing end tags.</source>
+ <translation>Brak tagu końcowego.</translation>
+ </message>
+ <message>
+ <source>Missing input or output file for help file generation.</source>
+ <translation>Brak pliku wejściowego lub wyjściowego potrzebnego do wygenerowania pliku pomocy.</translation>
+ </message>
+ <message>
+ <source>Missing output file name.</source>
+ <translation>Brak nazwy pliku wyjściowego.</translation>
+ </message>
+ <message>
+ <source>Qt Collection Generator version 1.0 (Qt %1)
+</source>
+ <translation>Wersja 1.0 (Qt %1) generatora kolekcji Qt</translation>
+ </message>
+ <message>
+ <source>Missing collection config file.</source>
+ <translation>Brak pliku konfiguracyjnego kolekcji.</translation>
+ </message>
+ <message>
+ <source>
+Usage:
+
+qcollectiongenerator &lt;collection-config-file&gt; [options]
+
+ -o &lt;collection-file&gt; Generates a collection file
+ called &lt;collection-file&gt;. If
+ this option is not specified
+ a default name will be used.
+ -v Displays the version of
+ qcollectiongenerator.
+
+</source>
+ <translation>
+Sposób użycia:
+
+qcollectiongenerator &lt;plik-konfiguracyjny-kolekcji&gt; [opcje]
+
+ -o &lt;plik-kolekcji&gt; Generuje plik kolekcji
+ &lt;plik-kolekcji&gt;. Jeśli opcja ta
+ nie jest podana, użyta zostanie
+ domyślna nazwa.
+ -v Wyświetla wersję
+ qcollectiongeneratora.
+
+</translation>
+ </message>
+ <message>
+ <source>Could not open %1.
+</source>
+ <translation>Nie można otworzyć %1.
+</translation>
+ </message>
+ <message>
+ <source>Reading collection config file...
+</source>
+ <translation>Wczytywanie pliku konfiguracyjnego kolekcji...</translation>
+ </message>
+ <message>
+ <source>Collection config file error: %1
+</source>
+ <translation>Błąd pliku konfiguracyjnego kolekcji: %1
+</translation>
+ </message>
+ <message>
+ <source>Generating help for %1...
+</source>
+ <translation>Generowanie pomocy dla %1...
+</translation>
+ </message>
+ <message>
+ <source>Creating collection file...
+</source>
+ <translation>Tworzenie pliku kolekcji...
+</translation>
+ </message>
+ <message>
+ <source>The file %1 cannot be overwritten.
+</source>
+ <translation>Nie można nadpisać pliku %1.
+</translation>
+ </message>
+ <message>
+ <source>Cannot open %1.
+</source>
+ <translation>Nie można otworzyć %1.
+</translation>
+ </message>
+ <message>
+ <source>Cannot open referenced image file %1.
+</source>
+ <translation>Nie można otworzyć pliku obrazu %1.
+</translation>
+ </message>
+</context>
+<context>
+ <name>QHelpGenerator</name>
+ <message>
+ <source>Missing output file name.</source>
+ <translation>Brak nazwy pliku wyjściowego.</translation>
+ </message>
+ <message>
+ <source>Qt Help Generator version 1.0 (Qt %1)
+</source>
+ <translation>Wersja 1.0 (Qt %1) generatora pomocy Qt</translation>
+ </message>
+ <message>
+ <source>Missing Qt help project file.</source>
+ <translation>Brak pliku projektu pomocy Qt.</translation>
+ </message>
+ <message>
+ <source>
+Usage:
+
+qhelpgenerator &lt;help-project-file&gt; [options]
+
+ -o &lt;compressed-file&gt; Generates a Qt compressed help
+ file called &lt;compressed-file&gt;.
+ If this option is not specified
+ a default name will be used.
+ -c Checks whether all links in HTML files
+ point to files in this help project.
+ -v Displays the version of
+ qhelpgenerator.
+
+</source>
+ <translation>
+Sposób użycia:
+
+qhelpgenerator &lt;plik-projektu-pomocy&gt; [opcje]
+
+ -o &lt;skompresowany-plik&gt; Generuje skompresowany plik
+ pomocy Qt &lt;skompresowany-plik&gt;.
+ Jeśli opcja ta nie jest podana, użyta
+ zostanie domyślna nazwa.
+ -c Sprawdza czy wszystkie odnośniki w plikach HTML
+ wskazują na pliki w tym projekcie pomocy.
+ -v Wyświetla wersję
+ qhelpgeneratora.
+
+</translation>
+ </message>
+ <message>
+ <source>Could not open %1.
+</source>
+ <translation>Nie można otworzyć %1.
+</translation>
+ </message>
+ <message>
+ <source>Could not create output directory: %1
+</source>
+ <translation>Nie można utorzyć katalogu wyjściowego: %1
+</translation>
+ </message>
+</context>
+<context>
<name>RemoteControl</name>
<message>
- <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+165"/>
<source>Debugging Remote Control</source>
<translation>Zdalne debugowanie</translation>
</message>
<message>
- <location line="+1"/>
<source>Received Command: %1 %2</source>
<translation>Odebrano komendę: %1 %2</translation>
</message>
@@ -1151,22 +1510,18 @@ Powód:
<context>
<name>SearchWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+210"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
<message>
- <location line="+4"/>
<source>Copy &amp;Link Location</source>
<translation>Skopiuj &amp;odsyłacz</translation>
</message>
<message>
- <location line="+4"/>
<source>Open Link in New Tab</source>
<translation>Otwórz odsyłacz w nowej karcie</translation>
</message>
<message>
- <location line="+8"/>
<source>Select All</source>
<translation>Zaznacz wszystko</translation>
</message>
@@ -1174,27 +1529,22 @@ Powód:
<context>
<name>TopicChooser</name>
<message>
- <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+53"/>
<source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;:</source>
<translation>Wybierz temat dla &lt;b&gt;%1&lt;/b&gt;:</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/topicchooser.ui"/>
<source>Choose Topic</source>
<translation>Wybierz temat</translation>
</message>
<message>
- <location/>
<source>&amp;Topics</source>
<translation>&amp;Tematy</translation>
</message>
<message>
- <location/>
<source>&amp;Display</source>
<translation>&amp;Pokaż</translation>
</message>
<message>
- <location/>
<source>&amp;Close</source>
<translation>&amp;Zamknij</translation>
</message>
diff --git a/translations/designer_pl.ts b/translations/designer_pl.ts
index 0c9b863d73..c2b5ebac8f 100644
--- a/translations/designer_pl.ts
+++ b/translations/designer_pl.ts
@@ -25,6 +25,49 @@
</message>
</context>
<context>
+ <name>AbstractItemEditor</name>
+ <message>
+ <source>Selectable</source>
+ <translation>Do wyboru</translation>
+ </message>
+ <message>
+ <source>Editable</source>
+ <translation>Do edycji</translation>
+ </message>
+ <message>
+ <source>DragEnabled</source>
+ <translation>Do przeciągania</translation>
+ </message>
+ <message>
+ <source>DropEnabled</source>
+ <translation>Do upuszczania</translation>
+ </message>
+ <message>
+ <source>UserCheckable</source>
+ <translation>Do zaznaczania</translation>
+ </message>
+ <message>
+ <source>Enabled</source>
+ <translation>Włączony</translation>
+ </message>
+ <message>
+ <source>Tristate</source>
+ <translation>Trójstanowy</translation>
+ </message>
+ <message>
+ <source>Unchecked</source>
+ <translation>Niezaznaczony</translation>
+ </message>
+ <message>
+ <source>PartiallyChecked</source>
+ <translation>Częściowo zaznaczony</translation>
+ </message>
+ <message>
+ <source>Checked</source>
+ <translation>Zaznaczony</translation>
+ </message>
+</context>
+<context>
<name>AddLinkDialog</name>
<message>
<source>Insert Link</source>
@@ -852,6 +895,7 @@ Parsing grid layout minimum size values</extracomment>
<name>FormEditorOptionsPage</name>
<message>
<source>%1 %</source>
+ <extracomment>Zoom percentage</extracomment>
<translation>%1 %</translation>
</message>
<message>
@@ -2513,6 +2557,10 @@ Empty class name passed to widget factory method</extracomment>
<context>
<name>QtLocalePropertyManager</name>
<message>
+ <source>&lt;Invalid&gt;</source>
+ <translation>&lt;Niepoprawny&gt;</translation>
+ </message>
+ <message>
<source>%1, %2</source>
<translation>%1, %2</translation>
</message>
@@ -4654,7 +4702,7 @@ Wybierz inną nazwę.</translation>
</message>
<message>
<source>Disabled</source>
- <translation>Wyszarzony</translation>
+ <translation>Wyłączony</translation>
</message>
<message>
<source>Inactive</source>
@@ -4680,15 +4728,15 @@ Wybierz inną nazwę.</translation>
</message>
<message>
<source>Active</source>
- <translation>Aktywna</translation>
+ <translation>Aktywny</translation>
</message>
<message>
<source>Inactive</source>
- <translation>Nieaktywna</translation>
+ <translation>Nieaktywny</translation>
</message>
<message>
<source>Disabled</source>
- <translation>Wyszarzona</translation>
+ <translation>Wyłączony</translation>
</message>
</context>
<context>
@@ -4732,6 +4780,14 @@ Wybierz inną nazwę.</translation>
<translation>Informacje o wtyczkach</translation>
</message>
<message>
+ <source>Loaded Plugins</source>
+ <translation>Załadowane wtyczki</translation>
+ </message>
+ <message>
+ <source>Failed Plugins</source>
+ <translation>Wtyczki których nie można załadować</translation>
+ </message>
+ <message>
<source>Qt Designer couldn&apos;t find any plugins</source>
<translation>Qt Designer nie mógł znaleźć żadnej wtyczki</translation>
</message>
diff --git a/translations/linguist_de.ts b/translations/linguist_de.ts
index cb0b36d2c1..bb4889b28d 100644
--- a/translations/linguist_de.ts
+++ b/translations/linguist_de.ts
@@ -85,6 +85,10 @@
<context>
<name>DataModel</name>
<message>
+ <source>The translation file &apos;%1&apos; will not be loaded because it is empty.</source>
+ <translation>Die Übersetzungsdatei &apos;%1&apos; ist leer und wird daher nicht geladen.</translation>
+ </message>
+ <message>
<source>&lt;qt&gt;Duplicate messages found in &apos;%1&apos;:</source>
<translation>&lt;qt&gt;Mehrfach vorhandene Meldungen in &apos;%1&apos;:</translation>
</message>
@@ -724,7 +728,8 @@ Options:
<message>
<source>Updating &apos;%1&apos;...
</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Bringe &apos;%1&apos; auf aktuellen Stand...
+</translation>
</message>
<message>
<source>Stripping non plural forms in &apos;%1&apos;...
diff --git a/translations/linguist_pl.ts b/translations/linguist_pl.ts
index 661f060e28..550d76b074 100644
--- a/translations/linguist_pl.ts
+++ b/translations/linguist_pl.ts
@@ -4,7 +4,6 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1366"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
@@ -12,7 +11,6 @@
<context>
<name>BatchTranslationDialog</name>
<message numerus="yes">
- <location filename="../tools/linguist/linguist/batchtranslationdialog.cpp" line="+159"/>
<source>Batch translated %n entries</source>
<translation>
<numerusform>Automat przetłumaczył %n wpis</numerusform>
@@ -21,82 +19,66 @@
</translation>
</message>
<message>
- <location line="-43"/>
<source>&amp;Cancel</source>
<translation>&amp;Anuluj</translation>
</message>
<message>
- <location line="-37"/>
<source>Batch Translation of &apos;%1&apos; - Qt Linguist</source>
<translation>Automatyczne tłumaczenie &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
- <location line="+79"/>
<source>Linguist batch translator</source>
<translation>Zautomatyzowany tłumacz Linguist&apos;a</translation>
</message>
<message>
- <location line="-42"/>
<source>Searching, please wait...</source>
<translation>Przeszukiwanie, proszę czekać...</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/batchtranslation.ui"/>
<source>Qt Linguist - Batch Translation</source>
<translation>Qt Linguist - automatyczne tłumaczenie</translation>
</message>
<message>
- <location/>
<source>Options</source>
<translation>Opcje</translation>
</message>
<message>
- <location/>
<source>Set translated entries to finished</source>
<translation>Ustaw przetłumaczone wpisy jako ukończone</translation>
</message>
<message>
- <location/>
<source>Retranslate entries with existing translation</source>
<translation>Przetłumacz wpisy z istniejącymi tłumaczeniami</translation>
</message>
<message>
- <location/>
<source>Translate also finished entries</source>
<translation>Przetłumacz również ukończone wpisy</translation>
</message>
<message>
- <location/>
<source>Phrase book preference</source>
<translation>Ustawienia książki wyrażeń</translation>
</message>
<message>
- <location/>
<source>Move up</source>
<translation>Przenieś do góry</translation>
</message>
<message>
- <location/>
<source>Move down</source>
<translation>Przenieś w dół</translation>
</message>
<message>
- <location/>
<source>&amp;Run</source>
<translation>&amp;Uruchom</translation>
</message>
<message>
- <location/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location/>
<source>Note that the modified entries will be reset to unfinished if &apos;Set translated entries to finished&apos; above is unchecked</source>
<translation>Zwróć uwagę że zmodyfikowane wpisy będą ustawione jako nieukończone jeśli znajdujące się powyżej &apos;Ustaw przetłumaczone wpisy jako ukończone&apos; nie jest zaznaczone</translation>
</message>
<message>
- <location/>
<source>The batch translator will search through the selected phrase books in the order given above</source>
<translation>Automatyczny tłumacz będzie przeszukiwał wybrane książki wyrażeń w porządku ustalonym powyżej</translation>
</message>
@@ -104,45 +86,40 @@
<context>
<name>DataModel</name>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+214"/>
+ <source>The translation file &apos;%1&apos; will not be loaded because it is empty.</source>
+ <translation>Plik z tłumaczeniami &quot;%1&quot; nie zostanie załadowany ponieważ jest pusty.</translation>
+ </message>
+ <message>
<source>&lt;qt&gt;Duplicate messages found in &apos;%1&apos;:</source>
<translation>&lt;qt&gt;Znaleziono powtórzenia w &apos;%1&apos;:</translation>
</message>
<message>
- <location line="+4"/>
- <location line="+8"/>
<source>&lt;p&gt;[more duplicates omitted]</source>
<translation>&lt;p&gt;[pominięto resztę powtórzeń]</translation>
</message>
<message>
- <location line="-5"/>
<source>&lt;p&gt;* ID: %1</source>
<translation>&lt;p&gt;* identyfikator: %1</translation>
</message>
<message>
- <location line="+8"/>
<source>&lt;p&gt;* Context: %1&lt;br&gt;* Source: %2</source>
<translation>&lt;p&gt;* Kontekst: %1&lt;br&gt;* Źródło: %2</translation>
</message>
<message>
- <location line="+3"/>
<source>&lt;br&gt;* Comment: %3</source>
<translation>&lt;br&gt;* Komentarz: %3</translation>
</message>
<message>
- <location line="+71"/>
<source>Linguist does not know the plural rules for &apos;%1&apos;.
Will assume a single universal form.</source>
<translation>Linguist nie zna reguł liczby mnogiej dla &quot;%1&quot;.
Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</message>
<message>
- <location line="+56"/>
<source>Cannot create &apos;%2&apos;: %1</source>
<translation>Nie można utworzyć &apos;%2&apos;: %1</translation>
</message>
<message>
- <location line="+56"/>
<source>Universal Form</source>
<translation>Forma uniwersalna</translation>
</message>
@@ -150,37 +127,30 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<context>
<name>ErrorsView</name>
<message>
- <location filename="../tools/linguist/linguist/errorsview.cpp" line="+76"/>
<source>Accelerator possibly superfluous in translation.</source>
<translation>Prawdopodobnie nadmiarowy klawisz skrótu w tłumaczeniu.</translation>
</message>
<message>
- <location line="+3"/>
<source>Accelerator possibly missing in translation.</source>
<translation>Prawdopodobnie brakuje klawisza skrótu w tłumaczeniu.</translation>
</message>
<message>
- <location line="+3"/>
<source>Translation does not end with the same punctuation as the source text.</source>
<translation>Tłumaczenie nie kończy się tym samym znakiem interpunkcyjnym co tekst źródłowy.</translation>
</message>
<message>
- <location line="+3"/>
<source>A phrase book suggestion for &apos;%1&apos; was ignored.</source>
<translation>Podpowiedź &apos;%1&apos; z książki wyrażeń została zignorowana.</translation>
</message>
<message>
- <location line="+3"/>
<source>Translation does not refer to the same place markers as in the source text.</source>
<translation>Tłumaczenie nie zawiera tych samych znaczników co tekst źródłowy.</translation>
</message>
<message>
- <location line="+3"/>
<source>Translation does not contain the necessary %n place marker.</source>
<translation>Tłumaczenie nie zawiera koniecznego znacznika %n.</translation>
</message>
<message>
- <location line="+3"/>
<source>Unknown error</source>
<translation>Nieznany błąd</translation>
</message>
@@ -188,97 +158,78 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<context>
<name>FindDialog</name>
<message>
- <location filename="../tools/linguist/linguist/finddialog.ui"/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location/>
<source>Click here to close this window.</source>
<translation>Kliknij tutaj aby zamknąć to okno.</translation>
</message>
<message>
- <location/>
<source>Click here to find the next occurrence of the text you typed in.</source>
<translation>Kliknij tutaj aby znaleźć następne wystąpienie szukanego tekstu.</translation>
</message>
<message>
- <location/>
<source>Comments and contexts are searched when checked.</source>
<translation>Jeśli zaznaczone, przeszukuje także komentarze i konteksty.</translation>
</message>
<message>
- <location/>
<source>Find Next</source>
<translation>Znajdź następny</translation>
</message>
<message>
- <location/>
<source>Options</source>
<translation>Opcje</translation>
</message>
<message>
- <location/>
<source>Source texts are searched when checked.</source>
<translation>Jeśli zaznaczone przeszukuje także teksty źródłowe.</translation>
</message>
<message>
- <location/>
<source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
<translation>Jeśli zaznaczone, teksty &apos;TeX&apos; oraz &apos;tex&apos; są interpretowane jako różne.</translation>
</message>
<message>
- <location/>
<source>This window allows you to search for some text in the translation source file.</source>
<translation>Pozwala na szukanie w językowym pliku źródłowym.</translation>
</message>
<message>
- <location/>
<source>Translations are searched when checked.</source>
<translation>Jeśli zaznaczone, przeszukuje także tłumaczenia.</translation>
</message>
<message>
- <location/>
<source>Type in the text to search for.</source>
<translation>Wprowadź tekst do wyszukania.</translation>
</message>
<message>
- <location/>
<source>Find</source>
<translation>Znajdź</translation>
</message>
<message>
- <location/>
<source>&amp;Find what:</source>
<translation>&amp;Znajdź:</translation>
</message>
<message>
- <location/>
<source>&amp;Source texts</source>
<translation>Teksty ź&amp;ródłowe</translation>
</message>
<message>
- <location/>
<source>&amp;Translations</source>
<translation>&amp;Tłumaczenia</translation>
</message>
<message>
- <location/>
<source>&amp;Match case</source>
<translation>Uwzględniaj &amp;wielkość liter</translation>
</message>
<message>
- <location/>
<source>&amp;Comments</source>
<translation>&amp;Komentarze</translation>
</message>
<message>
- <location/>
<source>Ignore &amp;accelerators</source>
<translation>Ignoruj kl&amp;awisze skrótów</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/finddialog.cpp" line="+14"/>
<source></source>
<comment>Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog</comment>
<translation></translation>
@@ -287,38 +238,125 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<context>
<name>FormMultiWidget</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditorwidgets.cpp" line="+302"/>
<source>Alt+Delete</source>
<extracomment>translate, but don&apos;t change</extracomment>
<translation>Alt+Delete</translation>
</message>
<message>
- <location line="+1"/>
<source>Shift+Alt+Insert</source>
<extracomment>translate, but don&apos;t change</extracomment>
<translation>Shift+Alt+Insert</translation>
</message>
<message>
- <location line="+1"/>
<source>Alt+Insert</source>
<extracomment>translate, but don&apos;t change</extracomment>
<translation>Alt+Insert</translation>
</message>
<message>
- <location line="+131"/>
<source>Confirmation - Qt Linguist</source>
<translation>Potwierdzenie - Qt Linguist</translation>
</message>
<message>
- <location line="+1"/>
<source>Delete non-empty length variant?</source>
<translation>Skasować niepusty wariant?</translation>
</message>
</context>
<context>
+ <name>LConvert</name>
+ <message>
+ <source>
+Usage:
+ lconvert [options] &lt;infile&gt; [&lt;infile&gt;...]
+
+lconvert is part of Qt&apos;s Linguist tool chain. It can be used as a
+stand-alone tool to convert and filter translation data files.
+The following file formats are supported:
+
+%1
+If multiple input files are specified, they are merged with
+translations from later files taking precedence.
+
+Options:
+ -h
+ --help Display this information and exit.
+
+ -i &lt;infile&gt;
+ --input-file &lt;infile&gt;
+ Specify input file. Use if &lt;infile&gt; might start with a dash.
+ This option can be used several times to merge inputs.
+ May be &apos;-&apos; (standard input) for use in a pipe.
+
+ -o &lt;outfile&gt;
+ --output-file &lt;outfile&gt;
+ Specify output file. Default is &apos;-&apos; (standard output).
+
+ -if &lt;informat&gt;
+ --input-format &lt;format&gt;
+ Specify input format for subsequent &lt;infile&gt;s.
+ The format is auto-detected from the file name and defaults to &apos;ts&apos;.
+
+ -of &lt;outformat&gt;
+ --output-format &lt;outformat&gt;
+ Specify output format. See -if.
+
+ --input-codec &lt;codec&gt;
+ Specify encoding for QM and PO input files. Default is &apos;Latin1&apos;
+ for QM and &apos;UTF-8&apos; for PO files. UTF-8 is always tried as well for
+ QM, corresponding to the possible use of the trUtf8() function.
+
+ --output-codec &lt;codec&gt;
+ Specify encoding for PO output files. Default is &apos;UTF-8&apos;.
+
+ --drop-tags &lt;regexp&gt;
+ Drop named extra tags when writing TS or XLIFF files.
+ May be specified repeatedly.
+
+ --drop-translations
+ Drop existing translations and reset the status to &apos;unfinished&apos;.
+ Note: this implies --no-obsolete.
+
+ --source-language &lt;language&gt;[_&lt;region&gt;]
+ Specify/override the language of the source strings. Defaults to
+ POSIX if not specified and the file does not name it yet.
+
+ --target-language &lt;language&gt;[_&lt;region&gt;]
+ Specify/override the language of the translation.
+ The target language is guessed from the file name if this option
+ is not specified and the file contents name no language yet.
+
+ --no-obsolete
+ Drop obsolete messages.
+
+ --no-finished
+ Drop finished messages.
+
+ --sort-contexts
+ Sort contexts in output TS file alphabetically.
+
+ --locations {absolute|relative|none}
+ Override how source code references are saved in TS files.
+ Default is absolute.
+
+ --no-ui-lines
+ Drop line numbers from references to UI files.
+
+ --verbose
+ be a bit more verbose
+
+Long options can be specified with only one leading dash, too.
+
+Return value:
+ 0 on success
+ 1 on command line parse failures
+ 2 on read failures
+ 3 on write failures
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>LRelease</name>
<message numerus="yes">
- <location filename="../tools/linguist/shared/qm.cpp" line="+763"/>
<source>Dropped %n message(s) which had no ID.</source>
<translation>
<numerusform>Opuszczono %n wyrażenie które nie miało identyfikatora.</numerusform>
@@ -327,7 +365,6 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</translation>
</message>
<message numerus="yes">
- <location line="+4"/>
<source>Excess context/disambiguation dropped from %n message(s).</source>
<translation>
<numerusform>Opuszczono nadmiarowy kontekst / ujednoznacznienie w %n wyrażeniu.</numerusform>
@@ -336,7 +373,6 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</translation>
</message>
<message numerus="yes">
- <location line="+8"/>
<source> Generated %n translation(s) (%1 finished and %2 unfinished)</source>
<translation>
<numerusform> Wygenerowano %n tłumaczenie (przetłumaczonych %1, nieprzetłumaczonych %2)</numerusform>
@@ -345,7 +381,6 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</translation>
</message>
<message numerus="yes">
- <location line="+4"/>
<source> Ignored %n untranslated source text(s)</source>
<translation>
<numerusform> Pominięto %n nieprzetłumaczony tekst źródłowy</numerusform>
@@ -377,431 +412,1010 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</numerusform>
</translation>
</message>
+ <message>
+ <source>Usage:
+ lrelease [options] project-file
+ lrelease [options] ts-files [-qm qm-file]
+
+lrelease is part of Qt&apos;s Linguist tool chain. It can be used as a
+stand-alone tool to convert XML-based translations files in the TS
+format into the &apos;compiled&apos; QM format used by QTranslator objects.
+
+Options:
+ -help Display this information and exit
+ -idbased
+ Use IDs instead of source strings for message keying
+ -compress
+ Compress the QM files
+ -nounfinished
+ Do not include unfinished translations
+ -removeidentical
+ If the translated text is the same as
+ the source text, do not include the message
+ -markuntranslated &lt;prefix&gt;
+ If a message has no real translation, use the source text
+ prefixed with the given string instead
+ -silent
+ Do not explain what is being done
+ -version
+ Display the version of lrelease and exit
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>lrelease error: %1</source>
+ <translation>Błąd lrelease: %1</translation>
+ </message>
+ <message>
+ <source>Updating &apos;%1&apos;...
+</source>
+ <translation>Uaktualnianie &quot;%1&quot;...
+</translation>
+ </message>
+ <message>
+ <source>Removing translations equal to source text in &apos;%1&apos;...
+</source>
+ <translation>Usuwanie tłumaczeń tożsamych z tekstem źródłowym w &quot;%1&quot;...
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot create &apos;%1&apos;: %2
+</source>
+ <translation>Błąd lrelease: nie można utworzyć &quot;%1&quot;: %2
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot save &apos;%1&apos;: %2</source>
+ <translation>Błąd lrelease: nie można zachować &quot;%1&quot;: %2</translation>
+ </message>
+ <message>
+ <source>lrelease version %1
+</source>
+ <translation>Wersja lrelease %1
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot read project file &apos;%1&apos;.
+</source>
+ <translation>Błąd lrelease: nie można odczytać pliku projektu &quot;%1&quot;.
+</translation>
+ </message>
+ <message>
+ <source>lrelease error: cannot process project file &apos;%1&apos;.
+</source>
+ <translation>Błąd lrelease: nie można przetworzyć pliku projektu &quot;%1&quot;.
+</translation>
+ </message>
+ <message>
+ <source>lrelease warning: Met no &apos;TRANSLATIONS&apos; entry in project file &apos;%1&apos;
+</source>
+ <translation>Ostrzeżenie lrelease: Brak &quot;TRANSLATIONS&quot; w pliku projektu &quot;%1&quot;
+</translation>
+ </message>
+</context>
+<context>
+ <name>LUpdate</name>
+ <message>
+ <source>Parenthesis/bracket/brace mismatch between #if and #else branches; using #if branch
+</source>
+ <translation>Niezgodność nawiasów pomiędzy #if a #else w gałęzi #if
+</translation>
+ </message>
+ <message>
+ <source>Parenthesis/brace mismatch between #if and #else branches; using #if branch
+</source>
+ <translation>Niezgodność nawiasów okrągłych/klamrowych pomiędzy #if a #else w gałęzi #if
+</translation>
+ </message>
+ <message>
+ <source>Unterminated C++ comment
+</source>
+ <translation>Niedokończony komentarz C++
+</translation>
+ </message>
+ <message>
+ <source>Unterminated C++ string
+</source>
+ <translation>Niedokończony ciąg C++
+</translation>
+ </message>
+ <message>
+ <source>Excess closing brace in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Nadmiar zamykających nawiasów klamrowych w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>Excess closing parenthesis in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Nadmiar zamykających nawiasów okrągłych w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>Excess closing bracket in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Nadmiar zamykających nawiasów kwadratowych w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>circular inclusion of %1
+</source>
+ <translation>cykliczne dołączenie %1
+</translation>
+ </message>
+ <message>
+ <source>Cannot open %1: %2
+</source>
+ <translation>Nie można otworzyć %1: %2
+</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with tr() / QT_TR_NOOP(). Ignoring
+</source>
+ <translation>//% nie można użyć z tr() / QT_TR_NOOP() i zostanie pominięte
+</translation>
+ </message>
+ <message>
+ <source>Qualifying with unknown namespace/class %1::%2
+</source>
+ <translation>Kwalifikowanie z nieznaną przestrzenią nazw/klasą %1::%2
+</translation>
+ </message>
+ <message>
+ <source>tr() cannot be called without context
+</source>
+ <translation>Nie można użyć tr() bez kontekstu
+</translation>
+ </message>
+ <message>
+ <source>Class &apos;%1&apos; lacks Q_OBJECT macro
+</source>
+ <translation>Brak makra &quot;Q_OBJECT&quot; w klasie &quot;%1&quot;
+</translation>
+ </message>
+ <message>
+ <source>It is not recommended to call tr() from within a constructor &apos;%1::%2&apos;
+</source>
+ <translation>Nie jest rekomendowane użycie tr() w konstruktorze &quot;%1::%2&quot;
+</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring
+</source>
+ <translation>//% nie można użyć z translate() / QT_TRANSLATE_NOOP() i zostanie pominięte
+</translation>
+ </message>
+ <message>
+ <source>//= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring
+</source>
+ <translation>//= nie można użyć z qtTrId() / QT_TRID_NOOP() i zostanie pominięte
+</translation>
+ </message>
+ <message>
+ <source>Unexpected character in meta string
+</source>
+ <translation>Nieoczekiwany znak w ciągu meta
+</translation>
+ </message>
+ <message>
+ <source>Unterminated meta string
+</source>
+ <translation>Niedokończony ciąg meta
+</translation>
+ </message>
+ <message>
+ <source>Cannot invoke tr() like this
+</source>
+ <translation>W ten sposób nie można wywołać tr()
+</translation>
+ </message>
+ <message>
+ <source>Discarding unconsumed meta data
+</source>
+ <translation>Nieskonsumowane metadane zostają porzucone
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening brace in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Niezbalansowane otwierające nawiasy klamrowe w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Niezbalansowane otwierające nawiasy okrągłe w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening bracket in C++ code (or abuse of the C++ preprocessor)
+</source>
+ <translation>Niezbalansowane otwierające nawiasy kwadratowe w kodzie C++ (lub nadużycie preprocesora C++)
+</translation>
+ </message>
+ <message>
+ <source>Cannot open %1: %2</source>
+ <translation>Nie można otworzyc %1: %2</translation>
+ </message>
+ <message>
+ <source>Unterminated Java comment.
+</source>
+ <translation>Niedokończony komentarz Java.
+</translation>
+ </message>
+ <message>
+ <source>Invalid Unicode value.
+</source>
+ <translation>Niepoprawna wartość Unicode.
+</translation>
+ </message>
+ <message>
+ <source>Unterminated string.
+</source>
+ <translation>Niedokończony ciąg.
+</translation>
+ </message>
+ <message>
+ <source>String used in translation can contain only literals concatenated with other literals, not expressions or numbers.
+</source>
+ <translation>Ciągi użyte w tłumaczeniach mogą zawierać jedynie literały połączone z innymi literałami, nie mogą być to wyrażenia ani liczby.
+</translation>
+ </message>
+ <message>
+ <source>&apos;class&apos; must be followed by a class name.
+</source>
+ <translation>Po &quot;class&quot; musi następować nazwa klasy.
+</translation>
+ </message>
+ <message>
+ <source>Excess closing brace.
+</source>
+ <translation>Nadmiar zamykających nawiasów.
+</translation>
+ </message>
+ <message>
+ <source>&apos;package&apos; must be followed by package name.
+</source>
+ <translation>Po &quot;package&quot; musi nasępować nazwa pakietu.
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening brace.
+</source>
+ <translation>Niezbalansowana ilość otwierających nawiasów.
+</translation>
+ </message>
+ <message>
+ <source>Unbalanced opening parenthesis.
+</source>
+ <translation>Niezbalansowana ilość otwierających cudzysłowów.
+</translation>
+ </message>
+ <message>
+ <source>Usage:
+ lupdate [options] [project-file]...
+ lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file
+
+lupdate is part of Qt&apos;s Linguist tool chain. It extracts translatable
+messages from Qt UI files, C++, Java and JavaScript/QtScript source code.
+Extracted messages are stored in textual translation source files (typically
+Qt TS XML). New and modified messages can be merged into existing TS files.
+
+Options:
+ -help Display this information and exit.
+ -no-obsolete
+ Drop all obsolete strings.
+ -extensions &lt;ext&gt;[,&lt;ext&gt;]...
+ Process files with the given extensions only.
+ The extension list must be separated with commas, not with whitespace.
+ Default: &apos;%1&apos;.
+ -pluralonly
+ Only include plural form messages.
+ -silent
+ Do not explain what is being done.
+ -no-sort
+ Do not sort contexts in TS files.
+ -no-recursive
+ Do not recursively scan the following directories.
+ -recursive
+ Recursively scan the following directories (default).
+ -I &lt;includepath&gt; or -I&lt;includepath&gt;
+ Additional location to look for include files.
+ May be specified multiple times.
+ -locations {absolute|relative|none}
+ Specify/override how source code references are saved in TS files.
+ Default is absolute.
+ -no-ui-lines
+ Do not record line numbers in references to UI files.
+ -disable-heuristic {sametext|similartext|number}
+ Disable the named merge heuristic. Can be specified multiple times.
+ -pro &lt;filename&gt;
+ Name of a .pro file. Useful for files with .pro file syntax but
+ different file suffix. Projects are recursed into and merged.
+ -source-language &lt;language&gt;[_&lt;region&gt;]
+ Specify the language of the source strings for new files.
+ Defaults to POSIX if not specified.
+ -target-language &lt;language&gt;[_&lt;region&gt;]
+ Specify the language of the translations for new files.
+ Guessed from the file name if not specified.
+ -ts &lt;ts-file&gt;...
+ Specify the output file(s). This will override the TRANSLATIONS
+ and nullify the CODECFORTR from possibly specified project files.
+ -codecfortr &lt;codec&gt;
+ Specify the codec assumed for tr() calls. Effective only with -ts.
+ -version
+ Display the version of lupdate and exit.
+ @lst-file
+ Read additional file names (one per line) from lst-file.
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>lupdate warning: Codec for tr() &apos;%1&apos; disagrees with existing file&apos;s codec &apos;%2&apos;. Expect trouble.
+</source>
+ <translation>Ostrzeżenie lupdate: Kodek dla tr() &quot;%1&quot; nie zgadza się z istniejącym kodekiem pliku &quot;%2&quot;. Spodziewaj się problemów.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: Specified target language &apos;%1&apos; disagrees with existing file&apos;s language &apos;%2&apos;. Ignoring.
+</source>
+ <translation>Ostrzeżenie lupdate: Podany język docelowy &quot;%1&quot; nie zgadza się z istniejącym językiem pliku &quot;%2&quot; i zostanie pominięty.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: Specified source language &apos;%1&apos; disagrees with existing file&apos;s language &apos;%2&apos;. Ignoring.
+</source>
+ <translation>Ostrzeżenie lupdate: Podany język źródłowy &quot;%1&quot; nie zgadza się z istniejącym językiem pliku &quot;%2&quot; i zostanie pominięty.
+</translation>
+ </message>
+ <message>
+ <source>Updating &apos;%1&apos;...
+</source>
+ <translation>Uaktualnianie &quot;%1&quot;...
+</translation>
+ </message>
+ <message>
+ <source>Stripping non plural forms in &apos;%1&apos;...
+</source>
+ <translation>Rozbieranie niemnogich form w &quot;%1&quot;...
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: Codec for source &apos;%1&apos; is invalid. Falling back to codec for tr().
+</source>
+ <translation>Ostrzeżenie lupdate: Kodek dla źródła &quot;%1&quot; nie jest poprawny. Przywracanie kodeka dla tr().
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: TS files from command line will override TRANSLATIONS in %1.
+</source>
+ <translation>Ostrzeżenie lupdate: Pliki TS z linii komend nadpiszą TRANSLATIONS w %1.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: TS files from command line prevent recursing into %1.
+</source>
+ <translation>Ostrzeżenie lupdate: Pliki TS z linii komend zapobiegają rekursji %1.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: no TS files specified. Only diagnostics will be produced for &apos;%1&apos;.
+</source>
+ <translation>Ostrzeżenie lupdate: Brak podanych plików TS. Zostaną utworzone tylko wyniki diagnostyki dla &quot;%1&quot;.
+</translation>
+ </message>
+ <message>
+ <source>The option -target-language requires a parameter.
+</source>
+ <translation>Opcja -target-language wymaga podania parametru.
+</translation>
+ </message>
+ <message>
+ <source>The option -source-language requires a parameter.
+</source>
+ <translation>Opcja -source-language wymaga podania parametru.
+</translation>
+ </message>
+ <message>
+ <source>The option -disable-heuristic requires a parameter.
+</source>
+ <translation>Opcja -disable-heuristic wymaga podania parametru.
+</translation>
+ </message>
+ <message>
+ <source>Invalid heuristic name passed to -disable-heuristic.
+</source>
+ <translation>Niepoprawna nazwa heurystyki przekazana do -disable-heuristic.
+</translation>
+ </message>
+ <message>
+ <source>The option -locations requires a parameter.
+</source>
+ <translation>Opcja -locations wymaga podania parametru.
+</translation>
+ </message>
+ <message>
+ <source>Invalid parameter passed to -locations.
+</source>
+ <translation>Niepoprawny parametr przekazany do -locations.
+</translation>
+ </message>
+ <message>
+ <source>The -codecfortr option should be followed by a codec name.
+</source>
+ <translation>Po opcji -codecfortr powinna następować nazwa kodeka.
+</translation>
+ </message>
+ <message>
+ <source>The -extensions option should be followed by an extension list.
+</source>
+ <translation>Po opcji -extenstions powinna następować lista rozszerzeń.
+</translation>
+ </message>
+ <message>
+ <source>The -pro option should be followed by a filename of .pro file.
+</source>
+ <translation>Po opcji -pro powinna następować nazwa pliku .pro.
+</translation>
+ </message>
+ <message>
+ <source>The -I option should be followed by a path.
+</source>
+ <translation>Po opcji -I powinna następować ścieżka.
+</translation>
+ </message>
+ <message>
+ <source>Unrecognized option &apos;%1&apos;.
+</source>
+ <translation>Nierozpoznana opcja &quot;%1&quot;.
+</translation>
+ </message>
+ <message>
+ <source>lupdate error: List file &apos;%1&apos; is not readable.
+</source>
+ <translation>Błąd lrelease: plik listy &quot;%1&quot; nie jest do odczytu.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: For some reason, &apos;%1&apos; is not writable.
+</source>
+ <translation>Ostrzeżenie lupdate: &quot;%1&quot; nie jest zapisywalny.
+</translation>
+ </message>
+ <message>
+ <source>lupdate error: File &apos;%1&apos; has no recognized extension.
+</source>
+ <translation>Błąd lupdate: Plik &quot;%1&quot; nie posiada rozpoznawalnego rozszerzenia.
+</translation>
+ </message>
+ <message>
+ <source>lupdate error: File &apos;%1&apos; does not exist.
+</source>
+ <translation>Błąs lupdate: Plik &quot;%1&quot; nie istnieje.
+</translation>
+ </message>
+ <message>
+ <source>Scanning directory &apos;%1&apos;...
+</source>
+ <translation>Skanowanie katalogu &quot;%1&quot;...
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: -target-language usually only makes sense with exactly one TS file.
+</source>
+ <translation>Ostrzeżenie lupdate: zwykle opcja -target-language ma sens z dokładnie jednym plikiem TS.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: -codecfortr has no effect without -ts.
+</source>
+ <translation>Ostrzeżenie lupdate: opcja -codecfortr nie działa bez -ts.
+</translation>
+ </message>
+ <message>
+ <source>lupdate warning: no TS files specified. Only diagnostics will be produced.
+</source>
+ <translation>Ostrzeżenie lupdate: Brak podanych plików TS. Zostaną utworzone tylko wyniki diagnostyki.
+</translation>
+ </message>
+ <message>
+ <source>lupdate error: Both project and source files / include paths specified.
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <source> Found %n source text(s) (%1 new and %2 already existing)
+</source>
+ <translation>
+ <numerusform> Znaleziono %n tekst źródłowy (%1 nowych oraz %2 istniejących)
+</numerusform>
+ <numerusform> Znaleziono %n teksty źródłowe (%1 nowych oraz %2 istniejących)
+</numerusform>
+ <numerusform> Znaleziono %n tekstów źródłowych (%1 nowych oraz %2 istniejących)
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Removed %n obsolete entries
+</source>
+ <translation>
+ <numerusform> Usunięto %n zdezaktualizowany wpis
+</numerusform>
+ <numerusform> Usunięto %n zdezaktualizowane wpisy
+</numerusform>
+ <numerusform> Usunięto %n zdezaktualizowanych wpisów
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Kept %n obsolete entries
+</source>
+ <translation>
+ <numerusform> Zachowano %n zdezaktualizowany wpis
+</numerusform>
+ <numerusform> Zachowano %n zdezaktualizowane wpisy
+</numerusform>
+ <numerusform> Zachowano %n zdezaktualizowanych wpisów
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Number heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform> Heurystyka liczbowa dostarczyła %n tłumaczenie
+</numerusform>
+ <numerusform> Heurystyka liczbowa dostarczyła %n tłumaczeń
+</numerusform>
+ <numerusform> Heurystyka liczbowa dostarczyła %n tłumaczeń
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Same-text heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform> Heurystyka &quot;ten sam tekst&quot; dostarczyła %n tłumaczenie
+</numerusform>
+ <numerusform> Heurystyka &quot;ten sam tekst&quot; dostarczyła %n tłumaczeń
+</numerusform>
+ <numerusform> Heurystyka &quot;ten sam tekst&quot; dostarczyła %n tłumaczeń
+</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source> Similar-text heuristic provided %n translation(s)
+</source>
+ <translation>
+ <numerusform> Heurystyka &quot;podobny tekst&quot; dostarczyła %n tłumaczenie
+</numerusform>
+ <numerusform> Heurystyka &quot;podobny tekst&quot; dostarczyła %n tłumaczeń
+</numerusform>
+ <numerusform> Heurystyka &quot;podobny tekst&quot; dostarczyła %n tłumaczeń
+</numerusform>
+ </translation>
+ </message>
+ <message>
+ <source>Illegal character</source>
+ <translation>Niepoprawny znak</translation>
+ </message>
+ <message>
+ <source>Unclosed string at end of line</source>
+ <translation>Niedomknięty ciąg na końcu linii</translation>
+ </message>
+ <message>
+ <source>Illegal escape sequence</source>
+ <translation>Niepoprawna sekwencja escape</translation>
+ </message>
+ <message>
+ <source>Illegal unicode escape sequence</source>
+ <translation>Niepoprawna sekwencja escape unicode</translation>
+ </message>
+ <message>
+ <source>Unclosed comment at end of file</source>
+ <translation>Niedomknięty komentarz na końcu pliku</translation>
+ </message>
+ <message>
+ <source>Illegal syntax for exponential number</source>
+ <translation>Niepoprawna składnia liczby wykładniczej</translation>
+ </message>
+ <message>
+ <source>Identifier cannot start with numeric literal</source>
+ <translation>Identyfikator nie może rozpoczynać się literałem liczbowym</translation>
+ </message>
+ <message>
+ <source>Unterminated regular expression literal</source>
+ <translation>Niedokończone wyrażenie regularne</translation>
+ </message>
+ <message>
+ <source>//% cannot be used with %1(). Ignoring
+</source>
+ <translation>//% nie można użyć z %1() i zostanie pominięte
+</translation>
+ </message>
+ <message>
+ <source>%1() requires at least two arguments.
+</source>
+ <translation>%1() wymaga przynajmniej dwóch argumentów.
+</translation>
+ </message>
+ <message>
+ <source>%1(): both arguments must be literal strings.
+</source>
+ <translation>%1(): oba argumenty muszą być literałami znakowymi.
+</translation>
+ </message>
+ <message>
+ <source>%1() requires at least one argument.
+</source>
+ <translation>%1() wymaga przynajmniej jednego argumentu.
+</translation>
+ </message>
+ <message>
+ <source>%1(): text to translate must be a literal string.
+</source>
+ <translation>%1(): tekst do przetłumaczenia musi być literałem znakowym.
+</translation>
+ </message>
+ <message>
+ <source>//= cannot be used with %1(). Ignoring
+</source>
+ <translation>//= nie można użyć z %1() i zostanie pominięte
+</translation>
+ </message>
+ <message>
+ <source>%1(): identifier must be a literal string.
+</source>
+ <translation>%1(): identyfikator musi być literałem znakowym.
+</translation>
+ </message>
+ <message>
+ <source>Expected </source>
+ <extracomment>Beginning of the string that contains comma-separated list of expected tokens</extracomment>
+ <translation>Oczekiwano </translation>
+ </message>
+ <message>
+ <source>XML error: Parse error at line %1, column %2 (%3).</source>
+ <translation>Błąd XML: Błąd parsowania w linii %1, w kolumnie %2 (%3).</translation>
+ </message>
+ <message>
+ <source>Parse error in UI file</source>
+ <translation>Błąd parsowania w pliku UI</translation>
+ </message>
</context>
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
<source>About Qt</source>
<translation>Informacje o Qt</translation>
</message>
<message>
- <location/>
<source>About Qt Linguist</source>
<translation>Informacje o Qt Linguist</translation>
</message>
<message>
- <location/>
<source>&amp;Accelerators</source>
<translation>Klawisze &amp;skrótów</translation>
</message>
<message>
- <location/>
<source>Batch translate all entries using the information in the phrase books.</source>
<translation>Automatycznie tłumaczy wszystkie wpisy używając książek wyrażeń.</translation>
</message>
<message>
- <location/>
<source>&amp;Close Phrase Book</source>
<translation>&amp;Zamknij książkę wyrażeń</translation>
</message>
<message>
- <location/>
<source>Close this window and exit.</source>
<translation>Zamknij okno i zakończ program.</translation>
</message>
<message>
- <location/>
<source>Continue the search where it was left.</source>
<translation>Kontynuuj przeszukiwanie od miejsca gdzie je zatrzymano.</translation>
</message>
<message>
- <location/>
<source>Copies the source text into the translation field.</source>
<translation>Kopiuje tekst źródłowy do pola z tłumaczeniem.</translation>
</message>
<message>
- <location/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
<message>
- <location/>
<source>Copy the selected translation text to the clipboard.</source>
<translation>Skopiuj zaznaczony tekst do schowka.</translation>
</message>
<message>
- <location/>
<source>Copy the selected translation text to the clipboard and deletes it.</source>
<translation>Skopiuj zaznaczony tekst do schowka i usuń go.</translation>
</message>
<message>
- <location/>
<source>Create a new phrase book.</source>
<translation>Utwórz nową książkę wyrażeń.</translation>
</message>
<message>
- <location/>
<source>Create a Qt message file suitable for released applications from the current message file.</source>
<translation>Utwórz binarny plik z tłumaczeniami na podstawie bieżącego tłumaczenia, gotowy do użycia w aplikacjach.</translation>
</message>
<message>
- <location/>
<source>Ctrl+A</source>
<translation>Ctrl+A</translation>
</message>
<message>
- <location/>
<source>Ctrl+B</source>
<translation>Ctrl+B</translation>
</message>
<message>
- <location/>
<source>Ctrl+C</source>
<translation>Ctrl+C</translation>
</message>
<message>
- <location/>
<source>Ctrl+F</source>
<translation>Ctrl+F</translation>
</message>
<message>
- <location/>
<source>Ctrl+H</source>
<translation>Ctrl+H</translation>
</message>
<message>
- <location/>
<source>Ctrl+K</source>
<translation>Ctrl+K</translation>
</message>
<message>
- <location/>
<source>Ctrl+N</source>
<translation>Ctrl+N</translation>
</message>
<message>
- <location/>
<source>Ctrl+O</source>
<translation>Ctrl+O</translation>
</message>
<message>
- <location/>
<source>Ctrl+P</source>
<translation>Ctrl+P</translation>
</message>
<message>
- <location/>
<source>Ctrl+Q</source>
<translation>Ctrl+Q</translation>
</message>
<message>
- <location/>
<source>Open Read-O&amp;nly...</source>
<translation>Otwórz tylko do od&amp;czytu...</translation>
</message>
<message>
- <location/>
<source>&amp;Save All</source>
<translation>Zapisz &amp;wszystko</translation>
</message>
<message>
- <location/>
<source>Ctrl+S</source>
<translation>Ctrl+S</translation>
</message>
<message>
- <location/>
<source>Ctrl+Shift+K</source>
<translation>Ctrl+Shift+K</translation>
</message>
<message>
- <location/>
<source>Ctrl+V</source>
<translation>Ctrl+V</translation>
</message>
<message>
- <location/>
<source>Ctrl+X</source>
<translation>Ctrl+X</translation>
</message>
<message>
- <location/>
<source>Ctrl+Y</source>
<translation>Ctrl+Y</translation>
</message>
<message>
- <location/>
<source>Ctrl+Z</source>
<translation>Ctrl+Z</translation>
</message>
<message>
- <location/>
<source>Cu&amp;t</source>
<translation>Wy&amp;tnij</translation>
</message>
<message>
- <location/>
<source>&amp;Display guesses</source>
<translation>Pokaż &amp;podpowiedzi</translation>
</message>
<message>
- <location/>
<source>&amp;Done and Next</source>
<translation>&amp;Zrobione i do następnego</translation>
</message>
<message>
- <location/>
<source>&amp;Edit</source>
<translation>&amp;Edycja</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+764"/>
<source>Edit</source>
<translation>Edycja</translation>
</message>
<message>
- <location/>
<source>&amp;Edit Phrase Book</source>
<translation>&amp;Redaguj książkę wyrażeń</translation>
</message>
<message>
- <location/>
<source>&amp;Ending Punctuation</source>
<translation>Za&amp;kończenia interpunkcyjne</translation>
</message>
<message>
- <location/>
<source>Enter What&apos;s This? mode.</source>
<translation>Wejdź do trybu &quot;Co to jest?&quot;.</translation>
</message>
<message>
- <location/>
<source>E&amp;xit</source>
<translation>Za&amp;kończ</translation>
</message>
<message>
- <location/>
<source>F1</source>
<translation>F1</translation>
</message>
<message>
- <location/>
<source>F3</source>
<translation>F3</translation>
</message>
<message>
- <location/>
<source>F5</source>
<translation>F5</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-7"/>
<source>File</source>
<translation>Plik</translation>
</message>
<message>
- <location/>
<source>&amp;File</source>
<translation>&amp;Plik</translation>
</message>
<message>
- <location/>
<source>Find &amp;Next</source>
<translation>Znajdź &amp;następny</translation>
</message>
<message>
- <location/>
<source>Form Preview Tool</source>
<translation>Podgląd formularzy</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+26"/>
<source>Help</source>
<translation>Pomoc</translation>
</message>
<message>
- <location/>
<source>&amp;Help</source>
<translation>P&amp;omoc</translation>
</message>
<message>
- <location/>
<source>MainWindow</source>
<translation>Okno główne</translation>
</message>
<message>
- <location/>
<source>&amp;Manual</source>
<translation>Pod&amp;ręcznik</translation>
</message>
<message>
- <location/>
<source>Ne&amp;xt</source>
<translation>N&amp;astępne</translation>
</message>
<message>
- <location/>
<source>&amp;Next Unfinished</source>
<translation>&amp;Następne nieukończone</translation>
</message>
<message>
- <location/>
<source>Open a phrase book to assist translation.</source>
<translation>Otwórz książkę wyrażeń pomocną przy tłumaczeniu.</translation>
</message>
<message>
- <location/>
<source>Open a Qt translation source file (TS file) for editing</source>
<translation>Otwórz plik z tłumaczeniami Qt (plik TS) do redagowania</translation>
</message>
<message>
- <location/>
<source>Open/Refresh Form &amp;Preview</source>
<translation>Otwórz/odśwież &amp;podgląd formularzy</translation>
</message>
<message>
- <location/>
<source>&amp;Paste</source>
<translation>Wk&amp;lej</translation>
</message>
<message>
- <location/>
<source>Paste the clipboard text into the translation.</source>
<translation>Wklej tekst ze schowka do pola z tłumaczeniem.</translation>
</message>
<message>
- <location/>
<source>&amp;Phrase matches</source>
<translation>&amp;Cudzysłowy</translation>
</message>
<message>
- <location/>
<source>&amp;Phrases</source>
<translation>W&amp;yrażenia</translation>
</message>
<message>
- <location/>
<source>Place &amp;Marker Matches</source>
<translation>Z&amp;naczniki</translation>
</message>
<message>
- <location/>
<source>P&amp;rev</source>
<translation>P&amp;oprzednie</translation>
</message>
<message>
- <location/>
<source>&amp;Prev Unfinished</source>
<translation>&amp;Poprzednie nieukończone</translation>
</message>
<message>
- <location/>
<source>&amp;Print Phrase Book</source>
<translation>Wy&amp;drukuj książkę wyrażeń</translation>
</message>
<message>
- <location/>
<source>&amp;Redo</source>
<translation>&amp;Przywróć</translation>
</message>
<message>
- <location/>
<source>Redo an undone editing operation performed on the translation.</source>
<translation>Przywróć ostatnio cofniętą zmianę w tłumaczeniach.</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-99"/>
<source>&amp;Release</source>
<translation>W&amp;ydaj</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-13"/>
- <location line="+10"/>
<source>Release As...</source>
<translation>Wydaj jako...</translation>
</message>
<message>
- <location/>
<source>Replace the translation on all entries that matches the search source text.</source>
<translation>Zamienia tłumaczenia we wszystkich pasujących do wzorca wpisach.</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2035"/>
<source></source>
<comment>This is the application&apos;s main window.</comment>
<translation></translation>
</message>
<message>
- <location line="+190"/>
<source>Source text</source>
<translation>Tekst źródłowy</translation>
</message>
<message>
- <location line="+1"/>
- <location line="+25"/>
<source>Index</source>
<translation>Indeks</translation>
</message>
<message>
- <location line="-2"/>
- <location line="+63"/>
<source>Context</source>
<translation>Kontekst</translation>
</message>
<message>
- <location line="-62"/>
<source>Items</source>
<translation>Elementy</translation>
</message>
<message>
- <location line="+79"/>
<source>This panel lists the source contexts.</source>
<translation>Ten panel pokazuje listę kontekstów.</translation>
</message>
<message>
- <location line="+13"/>
<source>Strings</source>
<translation>Tłumaczenia</translation>
</message>
<message>
- <location line="+37"/>
<source>Phrases and guesses</source>
<translation>Wyrażenia i podpowiedzi</translation>
</message>
<message>
- <location line="+10"/>
<source>Sources and Forms</source>
<translation>Źródła i formularze</translation>
</message>
<message>
- <location line="+15"/>
<source>Warnings</source>
<translation>Ostrzeżenia</translation>
</message>
<message>
- <location line="+59"/>
<source> MOD </source>
<comment>status bar: file(s) modified</comment>
<translation> MOD </translation>
</message>
<message>
- <location line="+139"/>
<source>Loading...</source>
<translation>Ładowanie...</translation>
</message>
<message>
- <location line="+32"/>
- <location line="+22"/>
<source>Loading File - Qt Linguist</source>
<translation>Wczytywanie pliku - Qt Linguist</translation>
</message>
<message>
- <location line="-21"/>
<source>The file &apos;%1&apos; does not seem to be related to the currently open file(s) &apos;%2&apos;.
Close the open file(s) first?</source>
@@ -810,7 +1424,6 @@ Close the open file(s) first?</source>
Czy chcesz najpierw zamknąć otwarty plik (pliki)?</translation>
</message>
<message>
- <location line="+22"/>
<source>The file &apos;%1&apos; does not seem to be related to the file &apos;%2&apos; which is being loaded as well.
Skip loading the first named file?</source>
@@ -819,7 +1432,6 @@ Skip loading the first named file?</source>
Czy chcesz pominąć pierwszy plik?</translation>
</message>
<message numerus="yes">
- <location line="+61"/>
<source>%n translation unit(s) loaded.</source>
<translation>
<numerusform>Załadowano %n część z tłumaczeniami.</numerusform>
@@ -828,129 +1440,88 @@ Czy chcesz pominąć pierwszy plik?</translation>
</translation>
</message>
<message>
- <location line="+94"/>
<source>Related files (%1);;</source>
<translation>Związane pliki (%1);;</translation>
</message>
<message>
- <location line="+4"/>
<source>Open Translation Files</source>
<translation>Otwórz pliki z tłumaczeniami</translation>
</message>
<message>
- <location line="+10"/>
- <location line="+31"/>
<source>File saved.</source>
<translation>Plik zachowany.</translation>
</message>
<message>
- <location line="+526"/>
<source>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist is a tool for adding translations to Qt applications.&lt;/p&gt;&lt;p&gt;Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-511"/>
- <location line="+1187"/>
<source>Release</source>
<translation>Wydaj</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1186"/>
<source>Qt message files for released applications (*.qm)
All files (*)</source>
<translation>Pliki z wydanymi tłumaczeniami (*.qm)
Wszystkie pliki (*)</translation>
</message>
<message>
- <location line="+3"/>
- <location line="+12"/>
<source>File created.</source>
<translation>Plik utworzony.</translation>
</message>
<message>
- <location line="+34"/>
- <location line="+355"/>
<source>Printing...</source>
<translation>Drukowanie...</translation>
</message>
<message>
- <location line="-347"/>
<source>Context: %1</source>
<translation>Kontekst: %1</translation>
</message>
<message>
- <location line="+32"/>
<source>finished</source>
<translation>zakończony</translation>
</message>
<message>
- <location line="+3"/>
<source>unresolved</source>
<translation>nierozwiązany</translation>
</message>
<message>
- <location line="+3"/>
<source>obsolete</source>
<translation>przestarzały</translation>
</message>
<message>
- <location line="+15"/>
- <location line="+307"/>
<source>Printing... (page %1)</source>
<translation>Drukowanie...(strona %1)</translation>
</message>
<message>
- <location line="-300"/>
- <location line="+307"/>
<source>Printing completed</source>
<translation>Drukowanie zakończone</translation>
</message>
<message>
- <location line="-305"/>
- <location line="+307"/>
<source>Printing aborted</source>
<translation>Drukowanie przerwane</translation>
</message>
<message>
- <location line="-232"/>
<source>Search wrapped.</source>
<translation>Szukanie od początku.</translation>
</message>
<message>
- <location line="+17"/>
- <location line="+278"/>
- <location line="+34"/>
- <location line="+24"/>
- <location line="+22"/>
- <location line="+538"/>
- <location line="+1"/>
- <location line="+274"/>
- <location line="+40"/>
- <location line="+10"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
<message>
- <location line="-1220"/>
- <location line="+102"/>
<source>Cannot find the string &apos;%1&apos;.</source>
<translation>Nie można znaleźć tekstu &apos;%1&apos;.</translation>
</message>
<message>
- <location line="-82"/>
<source>Search And Translate in &apos;%1&apos; - Qt Linguist</source>
<translation>Wyszukiwanie i tłumaczenie w &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
- <location line="+34"/>
- <location line="+23"/>
- <location line="+24"/>
<source>Translate - Qt Linguist</source>
<translation>Tłumaczenie - Qt Linguist</translation>
</message>
<message numerus="yes">
- <location line="-46"/>
<source>Translated %n entry(s)</source>
<translation>
<numerusform>Przetłumaczono %n wpis</numerusform>
@@ -959,39 +1530,32 @@ Wszystkie pliki (*)</translation>
</translation>
</message>
<message>
- <location line="+23"/>
<source>No more occurrences of &apos;%1&apos;. Start over?</source>
<translation>Brak więcej &quot;%1&quot;. Rozpocząć od nowa?</translation>
</message>
<message>
- <location line="+30"/>
<source>Create New Phrase Book</source>
<translation>Utwórz nową książkę wyrażeń</translation>
</message>
<message>
- <location line="+1"/>
<source>Qt phrase books (*.qph)
All files (*)</source>
<translation>Książki wyrażeń Qt (*.qph)
Wszystkie pliki (*)</translation>
</message>
<message>
- <location line="+11"/>
<source>Phrase book created.</source>
<translation>Utworzono podręcznik wyrażeń.</translation>
</message>
<message>
- <location line="+17"/>
<source>Open Phrase Book</source>
<translation>Otwórz książkę wyrażeń</translation>
</message>
<message>
- <location line="+1"/>
<source>Qt phrase books (*.qph);;All files (*)</source>
<translation>Książki wyrażeń Qt (*.qph);;Wszystkie pliki (*)</translation>
</message>
<message numerus="yes">
- <location line="+7"/>
<source>%n phrase(s) loaded.</source>
<translation>
<numerusform>Wczytano %n wyrażenie.</numerusform>
@@ -1000,524 +1564,410 @@ Wszystkie pliki (*)</translation>
</translation>
</message>
<message>
- <location line="+93"/>
- <location line="+3"/>
- <location line="+7"/>
<source>Add to phrase book</source>
<translation>Dodaj do książki wyrażeń</translation>
</message>
<message>
- <location line="-9"/>
<source>No appropriate phrasebook found.</source>
<translation>Brak odpowiedniej książki wyrażeń.</translation>
</message>
<message>
- <location line="+3"/>
<source>Adding entry to phrasebook %1</source>
<translation>Dodawanie wpisu do książki wyrażeń %1</translation>
</message>
<message>
- <location line="+7"/>
<source>Select phrase book to add to</source>
<translation>Wybierz książkę do której chcesz dodać</translation>
</message>
<message>
- <location line="+29"/>
<source>Unable to launch Qt Assistant (%1)</source>
<translation>Nie można uruchomić Qt Assistant (%1)</translation>
</message>
<message>
- <location line="+17"/>
<source>Version %1</source>
<translation>Wersja %1</translation>
</message>
<message>
- <location line="+41"/>
<source>Do you want to save the modified files?</source>
<translation>Czy chcesz zachować zmodyfikowane pliki?</translation>
</message>
<message>
- <location line="+22"/>
<source>Do you want to save &apos;%1&apos;?</source>
<translation>Czy chcesz zachować &apos;%1&apos;?</translation>
</message>
<message>
- <location line="+43"/>
<source>Qt Linguist[*]</source>
<translation>Qt Linguist[*]</translation>
</message>
<message>
- <location line="+2"/>
<source>%1[*] - Qt Linguist</source>
<translation>%1[*] - Qt Linguist</translation>
</message>
<message>
- <location line="+267"/>
- <location line="+12"/>
<source>No untranslated translation units left.</source>
<translation>Wszystkie wyrażenia są przetłumaczone.</translation>
</message>
<message>
- <location line="+198"/>
<source>&amp;Window</source>
<translation>&amp;Okno</translation>
</message>
<message>
- <location line="+2"/>
<source>Minimize</source>
<translation>Zminimalizuj</translation>
</message>
<message>
- <location line="+1"/>
<source>Ctrl+M</source>
<translation>Ctrl+M</translation>
</message>
<message>
- <location line="+12"/>
<source>Display the manual for %1.</source>
<translation>Pokaż podręcznik dla %1.</translation>
</message>
<message>
- <location line="+1"/>
<source>Display information about %1.</source>
<translation>Pokaż informacje o %1.</translation>
</message>
<message>
- <location line="+70"/>
<source>&amp;Save &apos;%1&apos;</source>
<translation>&amp;Zachowaj &apos;%1&apos;</translation>
</message>
<message>
- <location line="+1"/>
<source>Save &apos;%1&apos; &amp;As...</source>
<translation>Zachowaj &apos;%1&apos; &amp;jako...</translation>
</message>
<message>
- <location line="+1"/>
<source>Release &apos;%1&apos;</source>
<translation>Wydaj &apos;%1&apos;</translation>
</message>
<message>
- <location line="+1"/>
<source>Release &apos;%1&apos; As...</source>
<translation>Wydaj &apos;%1&apos; jako...</translation>
</message>
<message>
- <location line="+1"/>
<source>&amp;Close &apos;%1&apos;</source>
<translation>Za&amp;mknij &apos;%1&apos;</translation>
</message>
<message>
- <location line="+2"/>
- <location line="+15"/>
<source>&amp;Save</source>
<translation>&amp;Zachowaj</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-14"/>
- <location line="+11"/>
<source>Save &amp;As...</source>
<translation>Zachowaj j&amp;ako...</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-8"/>
- <location line="+13"/>
<source>&amp;Close</source>
<translation>Za&amp;mknij</translation>
</message>
<message>
- <location line="-10"/>
<source>Save All</source>
<translation>Zachowaj wszystko</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1"/>
<source>&amp;Release All</source>
<translation>Wydaj &amp;wszystko</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1"/>
<source>Close All</source>
<translation>Zamknij wszystko</translation>
</message>
<message>
- <location line="+23"/>
<source>Translation File &amp;Settings for &apos;%1&apos;...</source>
<translation>&amp;Ustawienia pliku z tłumaczeniami dla &apos;%1&apos;...</translation>
</message>
<message>
- <location line="+1"/>
<source>&amp;Batch Translation of &apos;%1&apos;...</source>
<translation>&amp;Automatyczne tłumaczenie &apos;%1&apos;...</translation>
</message>
<message>
- <location line="+1"/>
<source>Search And &amp;Translate in &apos;%1&apos;...</source>
<translation>Wyszukiwanie i &amp;tłumaczenie w &apos;%1&apos;...</translation>
</message>
<message>
- <location line="+4"/>
<source>Search And &amp;Translate...</source>
<translation>Wyszukiwanie i &amp;tłumaczenie...</translation>
</message>
<message>
- <location line="+161"/>
<source>Cannot read from phrase book &apos;%1&apos;.</source>
<translation>Nie można odczytać z książki wyrażeń &apos;%1&apos;.</translation>
</message>
<message>
- <location line="+15"/>
<source>Close this phrase book.</source>
<translation>Zamknij tą książkę wyrażeń.</translation>
</message>
<message>
- <location line="+4"/>
<source>Enables you to add, modify, or delete entries in this phrase book.</source>
<translation>Pozwala na dodawanie, modyfikowanie i usuwanie wpisów w tej książce.</translation>
</message>
<message>
- <location line="+5"/>
<source>Print the entries in this phrase book.</source>
<translation>Wydrukuj wpisy z książki wyrażeń.</translation>
</message>
<message>
- <location line="+16"/>
<source>Cannot create phrase book &apos;%1&apos;.</source>
<translation>Nie można utworzyć książki wyrażeń &apos;%1&apos;.</translation>
</message>
<message>
- <location line="+10"/>
<source>Do you want to save phrase book &apos;%1&apos;?</source>
<translation>Czy chcesz zachować książke wyrażeń &apos;%1&apos;?</translation>
</message>
<message>
- <location line="+349"/>
<source>All</source>
<translation>Wszystko</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.ui"/>
<source>Save As...</source>
<translation>Zachowaj jako...</translation>
</message>
<message>
- <location/>
<source>Save changes made to this Qt translation source file</source>
<translation>Zachowaj wprowadzone zmiany w tym pliku z tłumaczeniami</translation>
</message>
<message>
- <location/>
<source>Save changes made to this Qt translation source file into a new file.</source>
<translation>Zachowaj wprowadzone zmiany w tym pliku z tłumaczeniami jako nowy plik.</translation>
</message>
<message>
- <location/>
<source>Search for some text in the translation source file.</source>
<translation>Szukaj tekstu w pliku z tłumaczeniem.</translation>
</message>
<message>
- <location/>
<source>Select &amp;All</source>
<translation>Zaznacz &amp;wszystko</translation>
</message>
<message>
- <location/>
<source>Select the whole translation text.</source>
<translation>Zaznacz cały tekst tłumaczenia.</translation>
</message>
<message>
- <location/>
<source>Set whether or not to display translation guesses.</source>
<translation>Ustaw czy pokazywać podpowiedzi tłumaczeń.</translation>
</message>
<message>
- <location/>
<source>Shift+F1</source>
<translation>Shift+F1</translation>
</message>
<message>
- <location/>
<source>Sort the items back in the same order as in the message file.</source>
<translation>Z powrotem sortuj elementy w takiej samej kolejności jak w pliku źródłowym.</translation>
</message>
<message>
- <location/>
<source>&amp;Statistics</source>
<translation>&amp;Statystyki</translation>
</message>
<message>
- <location/>
<source>&amp;Toolbars</source>
<translation>Paski &amp;narzędzi</translation>
</message>
<message>
- <location/>
<source>&amp;Translation</source>
<translation>&amp;Tłumaczenie</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-496"/>
<source>Translation</source>
<translation>Tłumaczenie</translation>
</message>
<message>
- <location/>
<source>&amp;Undo</source>
<translation>&amp;Cofnij</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+6"/>
<source>Validation</source>
<translation>Walidacja</translation>
</message>
<message>
- <location/>
<source>V&amp;alidation</source>
<translation>W&amp;alidacja</translation>
</message>
<message>
- <location/>
<source>&amp;View</source>
<translation>&amp;Widok</translation>
</message>
<message>
- <location/>
<source>Vie&amp;ws</source>
<translation>&amp;Widoki</translation>
</message>
<message>
- <location/>
<source>&amp;What&apos;s This?</source>
<translation>&amp;Co to jest?</translation>
</message>
<message>
- <location/>
<source>What&apos;s This?</source>
<translation>Co to jest?</translation>
</message>
<message>
- <location/>
<source>&amp;Open...</source>
<translation>&amp;Otwórz...</translation>
</message>
<message>
- <location/>
<source>&amp;Print...</source>
<translation>Wy&amp;drukuj...</translation>
</message>
<message>
- <location/>
<source>&amp;Find...</source>
<translation>&amp;Znajdź...</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.</source>
<translation>Przełącz sprawdzanie zgodności końcowych znaków interpunkcyjnych. W przypadku niezgodności pojawia się komunikat w oknie z ostrzeżeniami.</translation>
</message>
<message>
- <location/>
<source>&amp;New Phrase Book...</source>
<translation>&amp;Nowa książka wyrażeń...</translation>
</message>
<message>
- <location/>
<source>&amp;Open Phrase Book...</source>
<translation>&amp;Otwórz książkę wyrażeń...</translation>
</message>
<message>
- <location/>
<source>&amp;Reset Sorting</source>
<translation>Wyłącz so&amp;rtowanie</translation>
</message>
<message>
- <location/>
<source>Display translation statistics.</source>
<translation>Pokaż statystyki tłumaczeń.</translation>
</message>
<message>
- <location/>
<source>&amp;Search And Translate...</source>
<translation>Wy&amp;szukiwanie i tłumaczenie...</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-71"/>
<source>&amp;Batch Translation...</source>
<translation>Automatyczne &amp;tłumaczenie...</translation>
</message>
<message>
- <location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1"/>
<source>Translation File &amp;Settings...</source>
<translation>&amp;Ustawienia pliku z tłumaczeniami...</translation>
</message>
<message>
- <location/>
<source>&amp;Add to Phrase Book</source>
<translation>Dod&amp;aj do książki wyrażeń</translation>
</message>
<message>
- <location/>
<source>Ctrl+T</source>
<translation>Ctrl+T</translation>
</message>
<message>
- <location/>
<source>Recently Opened &amp;Files</source>
<translation>Os&amp;tatnio otwierane pliki</translation>
</message>
<message>
- <location/>
<source>Save</source>
<translation>Zachowaj</translation>
</message>
<message>
- <location/>
<source>Print a list of all the translation units in the current translation source file.</source>
<translation>Wydrukuj pełną listę wyrażeń z bieżącego pliku z tłumaczeniami.</translation>
</message>
<message>
- <location/>
<source>Undo the last editing operation performed on the current translation.</source>
<translation>Cofnij ostatnio wykonaną zmianę w bieżącym tłumaczeniu.</translation>
</message>
<message>
- <location/>
<source>Move to the previous unfinished item.</source>
<translation>Przechodzi do poprzedniego nieukończonego elementu.</translation>
</message>
<message>
- <location/>
<source>Move to the next unfinished item.</source>
<translation>Przechodzi do następnego nieukończonego elementu.</translation>
</message>
<message>
- <location/>
<source>Move to the previous item.</source>
<translation>Przejdź do poprzedniego elementu.</translation>
</message>
<message>
- <location/>
<source>Move to the next item.</source>
<translation>Przejdź do następnego elementu.</translation>
</message>
<message>
- <location/>
<source>Mark this item as done and move to the next unfinished item.</source>
<translation>Oznacz ten element jako ukończony i przejdź do następnego nieukończonego elementu.</translation>
</message>
<message>
- <location/>
<source>Copy from source text</source>
<translation>Skopiuj ze źródła tekstu</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.</source>
<translation>Przełącz sprawdzanie zgodności klawiszy skrótów, tzn. czy liczba znaków: &amp; w tekście źródłowym i w tłumaczeniu jest taka sama. W przypadku niezgodności pojawia się komunikat w oknie z ostrzeżeniami.</translation>
</message>
<message>
- <location/>
<source>Close</source>
<translation>Zamknij</translation>
</message>
<message>
- <location/>
<source>&amp;Close All</source>
<translation>Zam&amp;knij wszystko</translation>
</message>
<message>
- <location/>
<source>Ctrl+W</source>
<translation>Ctrl+W</translation>
</message>
<message>
- <location/>
<source>Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.</source>
<translation>Przełącz sprawdzanie czy użyto zasugerowanego wyrażenia. W przypadku niezgodności pojawia się komunikat w oknie z ostrzeżeniami.</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.</source>
<translation>Przełącz sprawdzanie zgodności znaczników, tzn. czy: %1, %2, ... są spójnie użyte w tekście źródłowym i tłumaczeniu. W przypadku niezgodności pojawia się komunikat w oknie z ostrzeżeniami.</translation>
</message>
<message>
- <location/>
<source>Ctrl+J</source>
<translation>Ctrl+J</translation>
</message>
<message>
- <location/>
<source>Ctrl+Shift+J</source>
<translation>Ctrl+Shift+J</translation>
</message>
<message>
- <location/>
<source>Previous unfinished item</source>
<translation>Poprzedni nieukończony element</translation>
</message>
<message>
- <location/>
<source>Next unfinished item</source>
<translation>Następny nieukończony element</translation>
</message>
<message>
- <location/>
<source>Move to previous item</source>
<translation>Przejdź do poprzedniego elementu</translation>
</message>
<message>
- <location/>
<source>Next item</source>
<translation>Następny element</translation>
</message>
<message>
- <location/>
<source>Mark item as done and move to the next unfinished item</source>
<translation>Oznacz element jako ukończony i przejdź do następnego nieukończonego elementu</translation>
</message>
<message>
- <location/>
<source>Copies the source text into the translation field</source>
<translation>Kopiuje tekst źródłowy do pola z tłumaczeniem</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of accelerators</source>
<translation>Przełącz sprawdzanie zgodności klawiszy skrótów</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of ending punctuation</source>
<translation>Przełącz sprawdzanie zgodności końcowych znaków interpunkcyjnych</translation>
</message>
<message>
- <location/>
<source>Toggle checking that phrase suggestions are used</source>
<translation>Przełącz sprawdzanie czy użyto zasugerowanego wyrażenia</translation>
</message>
<message>
- <location/>
<source>Toggle the validity check of place markers</source>
<translation>Przełącz sprawdzanie zgodności znaczników</translation>
</message>
<message>
- <location/>
<source>Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file.</source>
<translation>Utwórz binarny plik &quot;.qm&quot; z tłumaczeniami na podstawie bieżącego tłumaczenia, gotowy do użycia w aplikacjach. Nazwa pliku będzie automatycznie określona na podstawie nazwy pliku &quot;.ts&quot; z bieżącym tłumaczeniem.</translation>
</message>
<message>
- <location/>
<source>Length Variants</source>
<translation>Warianty tłumaczeń</translation>
</message>
<message>
- <location/>
<source>Display information about the Qt toolkit by Nokia.</source>
<translation>Pokaż informacje o pakiecie narzędziowym Qt oferowanym przez Nokię.</translation>
</message>
@@ -1525,103 +1975,83 @@ Wszystkie pliki (*)</translation>
<context>
<name>MessageEditor</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="+42"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
</message>
<message>
- <location line="+30"/>
<source>Russian</source>
<translation>rosyjski</translation>
</message>
<message>
- <location line="+1"/>
<source>German</source>
<translation>niemiecki</translation>
</message>
<message>
- <location line="+1"/>
<source>Japanese</source>
<translation>japoński</translation>
</message>
<message>
- <location line="+1"/>
<source>French</source>
<translation>francuski</translation>
</message>
<message>
- <location line="+1"/>
<source>Polish</source>
<translation>polski</translation>
</message>
<message>
- <location line="+1"/>
<source>Chinese</source>
<translation>chiński</translation>
</message>
<message>
- <location line="+47"/>
<source>This whole panel allows you to view and edit the translation of some source text.</source>
<translation>Ten panel pozwala na podgląd i redagowanie tłumaczenia tekstu źródłowego.</translation>
</message>
<message>
- <location line="+10"/>
<source>Source text</source>
<translation>Tekst źródłowy</translation>
</message>
<message>
- <location line="+2"/>
<source>This area shows the source text.</source>
<translation>W tym obszarze wyświetlany jest tekst źródłowy.</translation>
</message>
<message>
- <location line="+4"/>
<source>Source text (Plural)</source>
<translation>Tekst źródłowy (liczba mnoga)</translation>
</message>
<message>
- <location line="+2"/>
<source>This area shows the plural form of the source text.</source>
<translation>W tym obszarze wyświetlana jest forma mnoga źródłowego tekstu.</translation>
</message>
<message>
- <location line="+4"/>
<source>Developer comments</source>
<translation>Komentarze programisty</translation>
</message>
<message>
- <location line="+3"/>
<source>This area shows a comment that may guide you, and the context in which the text occurs.</source>
<translation>W tym obszarze wyświetlany jest komentarz oraz kontekst, w którym dany tekst wystąpił.</translation>
</message>
<message>
- <location line="+59"/>
<source>Here you can enter comments for your own use. They have no effect on the translated applications.</source>
<translation>Tutaj można wprowadzić komentarze na własny użytek. One nie mają wpływu na przetłumaczoną aplikację.</translation>
</message>
<message>
- <location line="+234"/>
<source>%1 translation (%2)</source>
<translation>Tłumaczenie na język %1 (%2)</translation>
</message>
<message>
- <location line="+9"/>
<source>This is where you can enter or modify the translation of the above source text.</source>
<translation>Tutaj można wprowadzić lub zmodyfikować tłumaczenie tekstu źródłowego.</translation>
</message>
<message>
- <location line="+5"/>
<source>%1 translation</source>
<translation>Tłumaczenie na język %1</translation>
</message>
<message>
- <location line="+1"/>
<source>%1 translator comments</source>
<translation>Komentarze tłumacza (język %1).</translation>
</message>
<message>
- <location line="+157"/>
<source>&apos;%1&apos;
Line: %2</source>
<translation>&apos;%1&apos;
@@ -1631,22 +2061,18 @@ Linia: %2</translation>
<context>
<name>MessageModel</name>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+839"/>
<source>Completion status for %1</source>
<translation>Stan ukończenia dla %1</translation>
</message>
<message>
- <location line="+15"/>
<source>&lt;file header&gt;</source>
<translation>&lt;nagłówek pliku&gt;</translation>
</message>
<message>
- <location line="+2"/>
<source>&lt;context comment&gt;</source>
<translation>&lt;komentarz kontekstu&gt;</translation>
</message>
<message>
- <location line="+71"/>
<source>&lt;unnamed context&gt;</source>
<translation>nienazwany kontekst</translation>
</message>
@@ -1654,121 +2080,105 @@ Linia: %2</translation>
<context>
<name>MsgEdit</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-600"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
</message>
</context>
<context>
+ <name>PhraseBook</name>
+ <message>
+ <source>Parse error at line %1, column %2 (%3).</source>
+ <translation>Błąd parsowania w linii %1, w kolumnie %2 (%3).</translation>
+ </message>
+</context>
+<context>
<name>PhraseBookBox</name>
<message>
- <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+66"/>
<source>(New Entry)</source>
<translation>(Nowe wyrażenie)</translation>
</message>
<message>
- <location line="+3"/>
<source>%1[*] - Qt Linguist</source>
<translation>%1[*] - Qt Linguist</translation>
</message>
<message>
- <location line="+91"/>
<source>Cannot save phrase book &apos;%1&apos;.</source>
<translation>Nie można zachować książki wyrażeń &apos;%1&apos;.</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/phrasebookbox.ui"/>
<source>Click here to add the phrase to the phrase book.</source>
<translation>Kliknij aby dodać wyrażenie do książki.</translation>
</message>
<message>
- <location/>
<source>&amp;New Entry</source>
<translation>&amp;Nowy wpis</translation>
</message>
<message>
- <location/>
<source>Click here to remove the entry from the phrase book.</source>
<translation>Kliknij tutaj aby usunąć wpis z książki.</translation>
</message>
<message>
- <location/>
<source>&amp;Remove Entry</source>
<translation>&amp;Usuń wpis</translation>
</message>
<message>
- <location/>
<source>Settin&amp;gs...</source>
<translation>&amp;Ustawienia</translation>
</message>
<message>
- <location/>
<source>Click here to close this window.</source>
<translation>Kliknij tutaj aby zamknąć to okno.</translation>
</message>
<message>
- <location/>
<source>Click here to save the changes made.</source>
<translation>Kliknij tutaj aby zachować wprowadzone zmiany.</translation>
</message>
<message>
- <location/>
<source>Close</source>
<translation>Zamknij</translation>
</message>
<message>
- <location/>
<source>&amp;Definition:</source>
<translation>&amp;Definicja:</translation>
</message>
<message>
- <location/>
<source>Edit Phrase Book</source>
<translation>Edytuj książkę wyrażeń</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="-1"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/phrasebookbox.ui"/>
<source>&amp;Save</source>
<translation>&amp;Zachowaj</translation>
</message>
<message>
- <location/>
<source>S&amp;ource phrase:</source>
<translation>Wyrażenie źródł&amp;owe:</translation>
</message>
<message>
- <location/>
<source>This window allows you to add, modify, or delete entries in a phrase book.</source>
<translation>To okno pozwala na dodawanie, modyfikowanie i usuwanie wpisów w książce.</translation>
</message>
<message>
- <location/>
<source>This is a definition for the source phrase.</source>
<translation>To jest definicja wyrażenia źródłowego.</translation>
</message>
<message>
- <location/>
<source>This is the phrase in the source language.</source>
<translation>To jest wyrażenie zapisane w języku źródłowym.</translation>
</message>
<message>
- <location/>
<source>This is the phrase in the target language corresponding to the source phrase.</source>
<translation>To jest wyrażenie w języku docelowym odpowiadające wyrażeniu w języku źródłowym.</translation>
</message>
<message>
- <location/>
<source>&amp;Translation:</source>
<translation>&amp;Tłumaczenie:</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="-145"/>
<source></source>
<comment>Go to Phrase &gt; Edit Phrase Book... The dialog that pops up is a PhraseBookBox.</comment>
<translation></translation>
@@ -1777,17 +2187,14 @@ Linia: %2</translation>
<context>
<name>PhraseModel</name>
<message>
- <location filename="../tools/linguist/linguist/phrasemodel.cpp" line="+121"/>
<source>Definition</source>
<translation>Definicja</translation>
</message>
<message>
- <location line="-4"/>
<source>Source phrase</source>
<translation>Wyrażenie źródłowe</translation>
</message>
<message>
- <location line="+2"/>
<source>Translation</source>
<translation>Tłumaczenie</translation>
</message>
@@ -1795,22 +2202,18 @@ Linia: %2</translation>
<context>
<name>PhraseView</name>
<message>
- <location filename="../tools/linguist/linguist/phraseview.cpp" line="+122"/>
<source>Insert</source>
<translation>Wstaw</translation>
</message>
<message>
- <location line="+3"/>
<source>Edit</source>
<translation>Edycja</translation>
</message>
<message>
- <location line="+113"/>
<source>Guess (%1)</source>
<translation>Podpowiedź (%1)</translation>
</message>
<message>
- <location line="+2"/>
<source>Guess</source>
<translation>Podpowiedź</translation>
</message>
@@ -1818,81 +2221,67 @@ Linia: %2</translation>
<context>
<name>QObject</name>
<message>
- <location filename="../tools/linguist/shared/qm.cpp" line="+12"/>
<source>Compiled Qt translations</source>
<translation>Skompilowane tłumaczenia Qt</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1302"/>
<source>Translation files (%1);;</source>
<translation>Pliki z tłumaczeniami (%1);;</translation>
</message>
<message>
- <location line="+5"/>
<source>All files (*)</source>
<translation>Wszystkie pliki (*)</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1134"/>
- <location line="+27"/>
- <location line="+67"/>
- <location line="+39"/>
- <location line="+17"/>
- <location line="+15"/>
- <location filename="../tools/linguist/linguist/phrase.cpp" line="+196"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/po.cpp" line="+870"/>
<source>GNU Gettext localization files</source>
<translation>Pliki GNU Gettext</translation>
</message>
<message>
- <location line="+7"/>
<source>GNU Gettext localization template files</source>
<translation>Szablony plików GNU Gettext</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/ts.cpp" line="+752"/>
<source>Qt translation sources (format 1.1)</source>
<translation>Źródła tłumaczeń Qt (format 1.1)</translation>
</message>
<message>
- <location line="+8"/>
<source>Qt translation sources (format 2.0)</source>
<translation>Źródła tłumaczeń Qt (format 2.0)</translation>
</message>
<message>
- <location line="+9"/>
<source>Qt translation sources (latest format)</source>
<translation>Źródła tłumaczeń Qt (najnowszy format)</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/xliff.cpp" line="+829"/>
<source>XLIFF localization files</source>
<translation>Pliki XLIFF</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/qph.cpp" line="+195"/>
<source>Qt Linguist &apos;Phrase Book&apos;</source>
<translation>Qt Linguist &quot;Książka wyrażeń&quot;</translation>
</message>
+ <message>
+ <source>lupdate version %1
+</source>
+ <translation>Wersja lrelease %1
+</translation>
+ </message>
</context>
<context>
<name>SourceCodeView</name>
<message>
- <location filename="../tools/linguist/linguist/sourcecodeview.cpp" line="+70"/>
<source>&lt;i&gt;Source code not available&lt;/i&gt;</source>
<translation>&lt;i&gt;Kod źródłowy nie jest dostępny&lt;/i&gt;</translation>
</message>
<message>
- <location line="+33"/>
<source>&lt;i&gt;File %1 not available&lt;/i&gt;</source>
<translation>&lt;i&gt;Plik %1 nie jest dostępny&lt;/i&gt;</translation>
</message>
<message>
- <location line="+5"/>
<source>&lt;i&gt;File %1 not readable&lt;/i&gt;</source>
<translation>&lt;i&gt;Nie można odczytać pliku %1&lt;/i&gt;</translation>
</message>
@@ -1900,42 +2289,34 @@ Linia: %2</translation>
<context>
<name>Statistics</name>
<message>
- <location filename="../tools/linguist/linguist/statistics.ui"/>
<source>0</source>
<translation>0</translation>
</message>
<message>
- <location/>
<source>Characters:</source>
<translation>Znaków:</translation>
</message>
<message>
- <location/>
<source>Characters (with spaces):</source>
<translation>Znaków (ze spacjami):</translation>
</message>
<message>
- <location/>
<source>Source</source>
<translation>Źródło</translation>
</message>
<message>
- <location/>
<source>Statistics</source>
<translation>Statystyki</translation>
</message>
<message>
- <location/>
<source>Translation</source>
<translation>Tłumaczenie</translation>
</message>
<message>
- <location/>
<source>Words:</source>
<translation>Słów:</translation>
</message>
<message>
- <location/>
<source>Close</source>
<translation>Zamknij</translation>
</message>
@@ -1943,7 +2324,6 @@ Linia: %2</translation>
<context>
<name>TrWindow</name>
<message>
- <location filename="../tools/linguist/linguist/trwindow.cpp" line="+14"/>
<source></source>
<comment>This is the application&apos;s main window.</comment>
<translation></translation>
@@ -1952,72 +2332,58 @@ Linia: %2</translation>
<context>
<name>TranslateDialog</name>
<message>
- <location filename="../tools/linguist/linguist/translatedialog.ui"/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location/>
<source>Click here to close this window.</source>
<translation>Kliknij tutaj aby zamknąć to okno.</translation>
</message>
<message>
- <location/>
<source>Click here to find the next occurrence of the text you typed in.</source>
<translation>Kliknij tutaj aby znaleźć następne wystąpienie wprowadzonego tekstu.</translation>
</message>
<message>
- <location/>
<source>Find Next</source>
<translation>Znajdź następny</translation>
</message>
<message>
- <location/>
<source>Find &amp;source text:</source>
<translation>Szukaj tek&amp;stu źródłowego:</translation>
</message>
<message>
- <location/>
<source>Mark new translation as &amp;finished</source>
<translation>Zaznacz nowe tłumaczenie jako &amp;zrobione</translation>
</message>
<message>
- <location/>
<source>Match &amp;case</source>
<translation>Uwzględniaj &amp;wielkość liter</translation>
</message>
<message>
- <location/>
<source>Search options</source>
<translation>Opcje szukania</translation>
</message>
<message>
- <location/>
<source>Texts such as &apos;TeX&apos; and &apos;tex&apos; are considered as different when checked.</source>
<translation>Jeśli zaznaczone, teksty &apos;TeX&apos; oraz &apos;tex&apos; są interpretowane jako różne.</translation>
</message>
<message>
- <location/>
<source>This window allows you to search for some text in the translation source file.</source>
<translation>To okno pozwala na szukanie tekstów w pliku źródłowym tłumaczenia.</translation>
</message>
<message>
- <location/>
<source>Translate</source>
<translation>Przetłumacz</translation>
</message>
<message>
- <location/>
<source>Translate All</source>
<translation>Przetłumacz wszystko</translation>
</message>
<message>
- <location/>
<source>&amp;Translate to:</source>
<translation>Prze&amp;tłumacz na:</translation>
</message>
<message>
- <location/>
<source>Type in the text to search for.</source>
<translation>Wprowadź tekst do wyszukania.</translation>
</message>
@@ -2025,33 +2391,26 @@ Linia: %2</translation>
<context>
<name>TranslationSettingsDialog</name>
<message>
- <location filename="../tools/linguist/linguist/translationsettingsdialog.cpp" line="+93"/>
<source>Any Country</source>
<translation>Dowolny kraj</translation>
</message>
<message>
- <location line="-22"/>
- <location line="+8"/>
<source>Settings for &apos;%1&apos; - Qt Linguist</source>
<translation>Ustawienia dla &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/translationsettings.ui"/>
<source>Source language</source>
<translation>Język źródłowy</translation>
</message>
<message>
- <location/>
<source>Language</source>
<translation>Język</translation>
</message>
<message>
- <location/>
<source>Country/Region</source>
<translation>Kraj/Region</translation>
</message>
<message>
- <location/>
<source>Target language</source>
<translation>Język docelowy</translation>
</message>
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index f56978fa70..0e62340f55 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -320,6 +320,10 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass
<source>Playback complete</source>
<translation>Abspielen beendet</translation>
</message>
+ <message>
+ <source>Download error</source>
+ <translation>Fehler beim Download</translation>
+ </message>
</context>
<context>
<name>Phonon::MMF::AbstractVideoPlayer</name>
@@ -439,6 +443,10 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass
<source>Error opening source: media type could not be determined</source>
<translation>Die Quelle konnte nicht geöffnet werden: Der Medientyp konnte nicht bestimmt werden</translation>
</message>
+ <message>
+ <source>Failed to set requested IAP</source>
+ <translation>Der angeforderte Internetzugriffspunkt konnte nicht gesetzt werden</translation>
+ </message>
</context>
<context>
<name>Phonon::MMF::StereoWidening</name>
@@ -1214,6 +1222,11 @@ nach
<translation>%1: Keine Ressourcen mehr verfügbar</translation>
</message>
<message>
+ <source>%1: permission denied</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: Zugriff verweigert</translation>
+ </message>
+ <message>
<source>%1: unknown error %2</source>
<comment>QSystemSemaphore</comment>
<translation>%1: Unbekannter Fehler %2</translation>
@@ -1365,6 +1378,13 @@ nach
</message>
</context>
<context>
+ <name>QDeclarativeApplication</name>
+ <message>
+ <source>Application is an abstract class</source>
+ <translation>&apos;Application&apos; ist eine abstrakte Klasse</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeBehavior</name>
<message>
<source>Cannot change the animation assigned to a Behavior.</source>
@@ -1544,6 +1564,14 @@ nach
<translation>Komponentenobjekte können keine neuen Funktionen deklarieren.</translation>
</message>
<message>
+ <source>&quot;%1.%2&quot; is not available in %3 %4.%5.</source>
+ <translation>&quot;%1.%2&quot; ist in %3 %4.%5 nicht verfügbar.</translation>
+ </message>
+ <message>
+ <source>&quot;%1.%2&quot; is not available due to component versioning.</source>
+ <translation>&quot;%1.%2&quot; ist in dieser Version der Komponente nicht verfügbar </translation>
+ </message>
+ <message>
<source>Cannot assign a value to a signal (expecting a script to be run)</source>
<translation>Einem Signal können keine Werte zugewiesen werden (es wird ein Skript erwartet)</translation>
</message>
@@ -1596,6 +1624,10 @@ nach
<translation>Ungültige Zuweisung bei Eigenschaft: Es wird ein Skript erwartet</translation>
</message>
<message>
+ <source>Cannot assign multiple values to a singular property</source>
+ <translation>Eine Zuweisung mehrerer Werte an eine einfache Eigenschaft ist nicht zulässig</translation>
+ </message>
+ <message>
<source>Cannot assign object to property</source>
<translation>Zuweisung eines Objekts an eine Eigenschaft nicht zulässig</translation>
</message>
@@ -1688,8 +1720,16 @@ nach
<translation>Ungültige Quellangabe bei Alias-Eigenschaft</translation>
</message>
<message>
+ <source>Invalid alias reference. An alias reference must be specified as &lt;id&gt;, &lt;id&gt;.&lt;property&gt; or &lt;id&gt;.&lt;value property&gt;.&lt;property&gt;</source>
+ <translation>Ungültige Alias-Referenz. Eine Alias-Referenz muss in der Form &lt;id&gt;, &lt;id&gt;.&lt;property&gt; or &lt;id&gt;.&lt;value property&gt;.&lt;property&gt; angegeben werden</translation>
+ </message>
+ <message>
+ <source>Alias property exceeds alias bounds</source>
+ <translation>Die Alias-Eigenschaft überschreitet die Grenzen des Alias</translation>
+ </message>
+ <message>
<source>Invalid alias reference. An alias reference must be specified as &lt;id&gt; or &lt;id&gt;.&lt;property&gt;</source>
- <translation>Ungültige Referenzierung einer Alias-Eigenschaft. Die Referenz muss in der Form &lt;id&gt; oder &lt;id&gt;.&lt;property&gt; angegeben werden</translation>
+ <translation type="obsolete">Ungültige Referenzierung einer Alias-Eigenschaft. Die Referenz muss in der Form &lt;id&gt; oder &lt;id&gt;.&lt;property&gt; angegeben werden</translation>
</message>
<message>
<source>Invalid alias reference. Unable to find id &quot;%1&quot;</source>
@@ -1702,6 +1742,10 @@ nach
<source>Invalid empty URL</source>
<translation>Ungültige (leere) URL</translation>
</message>
+ <message>
+ <source>createObject: value is not an object</source>
+ <translation>createObject: Der Wert ist kein Objekt</translation>
+ </message>
</context>
<context>
<name>QDeclarativeCompositeTypeManager</name>
@@ -1782,6 +1826,10 @@ nach
<context>
<name>QDeclarativeImportDatabase</name>
<message>
+ <source>cannot load module &quot;%1&quot;: File name case mismatch for &quot;%2&quot;</source>
+ <translation>Der Module &quot;%1&quot; kann nicht geladen werden: Der Dateiname &quot;%2&quot; unterscheidet sich in der Groß/Kleinschreibung</translation>
+ </message>
+ <message>
<source>module &quot;%1&quot; definition &quot;%2&quot; not readable</source>
<translation>Modul &quot;%1&quot; Definition &quot;%2&quot; kann nicht gelesen werden</translation>
</message>
@@ -1837,6 +1885,10 @@ nach
<source>is not a type</source>
<translation>ist kein Typ</translation>
</message>
+ <message>
+ <source>File name case mismatch for &quot;%2&quot;</source>
+ <translation>Die Groß/Kleinschreibung des Dateinamens &quot;%2&quot; stimmt nicht überein</translation>
+ </message>
</context>
<context>
<name>QDeclarativeKeyNavigationAttached</name>
@@ -1853,6 +1905,17 @@ nach
</message>
</context>
<context>
+ <name>QDeclarativeLayoutMirroringAttached</name>
+ <message>
+ <source>LayoutDirection attached property only works with Items</source>
+ <translation>Eigenschaften des Typs &apos;attached&apos; können nur mit Elementen der Klasse Item verwendet werden</translation>
+ </message>
+ <message>
+ <source>LayoutMirroring is only available via attached properties</source>
+ <translation>LayoutMirroring ist nur in Verbindung mit Eigenschaften des Typs &quot;attached&quot; möglich</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeListModel</name>
<message>
<source>remove: index %1 out of range</source>
@@ -6187,7 +6250,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
</message>
<message>
<source>Voice Dial</source>
- <extracomment>Button to trigger voice dialling</extracomment>
+ <extracomment>Button to trigger voice dialing</extracomment>
<translation>Sprachwahl</translation>
</message>
<message>
@@ -6556,6 +6619,10 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Es konnte keine SSL-Sitzung erzeugt werden: %1</translation>
</message>
<message>
+ <source>The peer certificate is blacklisted</source>
+ <translation>Das Zertifikat der Gegenstelle ist in einer Schwarzen Liste enthalten</translation>
+ </message>
+ <message>
<source>Cannot provide a certificate with no key, %1</source>
<translation>Ohne Schlüssel kann kein Zertifikat zur Verfügung gestellt werden, %1</translation>
</message>
diff --git a/translations/qt_help_pl.ts b/translations/qt_help_pl.ts
index de3cce08ed..f5cfa796ef 100644
--- a/translations/qt_help_pl.ts
+++ b/translations/qt_help_pl.ts
@@ -4,27 +4,22 @@
<context>
<name>QCLuceneResultWidget</name>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+110"/>
<source>Search Results</source>
<translation>Wyniki wyszukiwania</translation>
</message>
<message>
- <location line="+7"/>
<source>Note:</source>
<translation>Uwaga:</translation>
</message>
<message>
- <location line="+1"/>
<source>The search results may not be complete since the documentation is still being indexed!</source>
<translation>Wyniki wyszukiwania mogą być niekompletne ponieważ dokumentacja jest wciąż indeksowana!</translation>
</message>
<message>
- <location line="+11"/>
<source>Your search did not match any documents.</source>
<translation>Nie znaleziono żadnych pasujących dokumentów.</translation>
</message>
<message>
- <location line="+4"/>
<source>(The reason for this might be that the documentation is still being indexed.)</source>
<translation>(Może to być spowodowane tym że dokumentacja jest wciąż indeksowana.)</translation>
</message>
@@ -32,7 +27,6 @@
<context>
<name>QHelp</name>
<message>
- <location filename="../tools/assistant/lib/qhelp_global.cpp" line="+64"/>
<source>Untitled</source>
<translation>Nienazwany</translation>
</message>
@@ -40,78 +34,62 @@
<context>
<name>QHelpCollectionHandler</name>
<message>
- <location filename="../tools/assistant/lib/qhelpcollectionhandler.cpp" line="+79"/>
<source>The collection file &apos;%1&apos; is not set up yet!</source>
<translation>Plik z kolekcją &quot;%1&quot; nie jest jeszcze ustawiony!</translation>
</message>
<message>
- <location line="+23"/>
<source>Cannot load sqlite database driver!</source>
<translation>Nie można załadować sterownika bazy danych sqlite!</translation>
</message>
<message>
- <location line="+11"/>
- <location line="+52"/>
<source>Cannot open collection file: %1</source>
<translation>Nie można otworzyć pliku z kolekcją: %1</translation>
</message>
<message>
- <location line="-40"/>
<source>Cannot create tables in file %1!</source>
<translation>Nie można utworzyć tabel w pliku %1!</translation>
</message>
<message>
- <location line="+16"/>
<source>The collection file &apos;%1&apos; already exists!</source>
<translation>Plik z kolekcją &quot;%1&quot; już istnieje!</translation>
</message>
<message>
- <location line="+151"/>
<source>Unknown filter &apos;%1&apos;!</source>
<translation>Nieznany filtr &quot;%1&quot;!</translation>
</message>
<message>
- <location line="+103"/>
<source>Invalid documentation file &apos;%1&apos;!</source>
<translation>Niepoprawny plik z dokumentacją &quot;%1&quot;!</translation>
</message>
<message>
- <location line="+167"/>
<source>Cannot register namespace &apos;%1&apos;!</source>
<translation>Nie można zarejestrować przestrzeni nazw &quot;%1&quot;!</translation>
</message>
<message>
- <location line="+24"/>
<source>Cannot open database &apos;%1&apos; to optimize!</source>
<translation>Nie można otworzyć bazy danych &quot;%1&quot; do zoptymalizowania!</translation>
</message>
<message>
- <location line="-439"/>
<source>Cannot create directory: %1</source>
<translation>Nie można utworzyć katalogu: %1</translation>
</message>
<message>
- <location line="+26"/>
<source>Cannot copy collection file: %1</source>
<translation>Nie można skopiować pliku z kolekcją: %1</translation>
</message>
<message>
- <location line="+172"/>
<source>Cannot register filter %1!</source>
<translation>Nie można zarejestrować pliku %1!</translation>
</message>
<message>
- <location line="+44"/>
<source>Cannot open documentation file %1!</source>
<translation>Nie można otworzyć pliku z dokumentacją %1!</translation>
</message>
<message>
- <location line="+40"/>
<source>The namespace %1 was not registered!</source>
<translation>Przestrzeń nazw %1 nie została zarejestrowana!</translation>
</message>
<message>
- <location line="+120"/>
<source>Namespace %1 already exists!</source>
<translation>Przestrzeń nazw %1 już istnieje!</translation>
</message>
@@ -119,7 +97,6 @@
<context>
<name>QHelpDBReader</name>
<message>
- <location filename="../tools/assistant/lib/qhelpdbreader.cpp" line="+98"/>
<source>Cannot open database &apos;%1&apos; &apos;%2&apos;: %3</source>
<extracomment>The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string</extracomment>
<translation>Nie można otworzyć bazy danych &apos;%1&apos; &apos;%2&apos;: %3</translation>
@@ -128,12 +105,10 @@
<context>
<name>QHelpEngineCore</name>
<message>
- <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+122"/>
<source>Cannot open documentation file %1: %2!</source>
<translation>Nie można otworzyć pliku z dokumentacją %1: %2!</translation>
</message>
<message>
- <location line="+404"/>
<source>The specified namespace does not exist!</source>
<translation>Podana przestrzeń nazw nie istnieje!</translation>
</message>
@@ -141,132 +116,106 @@
<context>
<name>QHelpGenerator</name>
<message>
- <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+158"/>
<source>Invalid help data!</source>
<translation>Niepoprawne dane pomocy!</translation>
</message>
<message>
- <location line="+6"/>
<source>No output file name specified!</source>
<translation>Nie podano nazwy pliku wyjściowego!</translation>
</message>
<message>
- <location line="+14"/>
<source>Building up file structure...</source>
<translation>Budowanie struktury plików...</translation>
</message>
<message>
- <location line="-7"/>
<source>The file %1 cannot be overwritten!</source>
<translation>Nie można nadpisać pliku %1!</translation>
</message>
<message>
- <location line="+18"/>
<source>Cannot open data base file %1!</source>
<translation>Nie można otworzyć pliku z bazą danych %1!</translation>
</message>
<message>
- <location line="+14"/>
<source>Cannot register namespace %1!</source>
<translation>Nie można zarejestrować przestrzeni nazw %1!</translation>
</message>
<message>
- <location line="+6"/>
<source>Insert custom filters...</source>
<translation>Wstaw własne filtry...</translation>
</message>
<message>
- <location line="+12"/>
<source>Insert help data for filter section (%1 of %2)...</source>
<translation>Wstaw dane pomocy dla sekcji filtra (%1 z %2)...</translation>
</message>
<message>
- <location line="+18"/>
<source>Documentation successfully generated.</source>
<translation>Dokumentacja została poprawnie wygenerowana.</translation>
</message>
<message>
- <location line="+76"/>
<source>Some tables already exist!</source>
<translation>Niektóre tabele już istnieją!</translation>
</message>
<message>
- <location line="+61"/>
<source>Cannot create tables!</source>
<translation>Nie można utworzyć tabel!</translation>
</message>
<message>
- <location line="+86"/>
<source>Cannot register virtual folder!</source>
<translation>Nie można zarejestrować wirtualnego katalogu!</translation>
</message>
<message>
- <location line="+10"/>
<source>Insert files...</source>
<translation>Wstaw pliki...</translation>
</message>
<message>
- <location line="+42"/>
<source>The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it.</source>
<translation>Plik %1 do którego się odwołano musi być wewnątrz poddrzewa (%2). Plik ten został pominięty.</translation>
</message>
<message>
- <location line="+7"/>
<source>The file %1 does not exist! Skipping it.</source>
<translation>Plik %1 nie istnieje! Zostaje on opuszczony.</translation>
</message>
<message>
- <location line="+6"/>
<source>Cannot open file %1! Skipping it.</source>
<translation>Nie można otworzyć pliku %1! Zostaje on opuszczony.</translation>
</message>
<message>
- <location line="+133"/>
<source>The filter %1 is already registered!</source>
<translation>Filtr %1 jest już zarejestrowany!</translation>
</message>
<message>
- <location line="+5"/>
<source>Cannot register filter %1!</source>
<translation>Nie można zarejestrować filtru %1!</translation>
</message>
<message>
- <location line="+24"/>
<source>Insert indices...</source>
<translation>Wstaw indeksy...</translation>
</message>
<message>
- <location line="+91"/>
<source>Insert contents...</source>
<translation>Wstaw zawartość...</translation>
</message>
<message>
- <location line="+8"/>
<source>Cannot insert contents!</source>
<translation>Nie można wstawić zawartości!</translation>
</message>
<message>
- <location line="+12"/>
<source>Cannot register contents!</source>
<translation>Nie można zarejestrować zawartości!</translation>
</message>
<message>
- <location line="+56"/>
<source>File &apos;%1&apos; does not exist.</source>
<translation>Plik %1 nie istnieje.</translation>
</message>
<message>
- <location line="+19"/>
<source>File &apos;%1&apos; cannot be opened.</source>
<translation>Nie można otworzyć pliku &quot;%1&quot;.</translation>
</message>
<message>
- <location line="+19"/>
<source>File &apos;%1&apos; contains an invalid link to file &apos;%2&apos;</source>
<translation>Plik &quot;%1&quot; zawiera niepoprawny odnośnik do pliku &quot;%2&quot;</translation>
</message>
<message>
- <location line="+9"/>
<source>Invalid links in HTML files.</source>
<translation>Niepoprawne odnośniki w plikach HTML.</translation>
</message>
@@ -274,47 +223,38 @@
<context>
<name>QHelpProject</name>
<message>
- <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+88"/>
<source>Unknown token.</source>
<translation>Nieznany znak.</translation>
</message>
<message>
- <location line="+13"/>
<source>Unknown token. Expected &quot;QtHelpProject&quot;!</source>
<translation>Nieznany znak. Spodziewano się &quot;QtHelpProject&quot;!</translation>
</message>
<message>
- <location line="+6"/>
<source>Error in line %1: %2</source>
<translation>Błąd w linii %1: %2</translation>
</message>
<message>
- <location line="+14"/>
<source>Virtual folder has invalid syntax.</source>
<translation>Wirtualny katalog posiada niepoprawną składnię.</translation>
</message>
<message>
- <location line="+5"/>
<source>Namespace has invalid syntax.</source>
<translation>Przestrzeń nazw posiada niepoprawną składnię.</translation>
</message>
<message>
- <location line="+19"/>
<source>Missing namespace in QtHelpProject.</source>
<translation>Brak przestrzeni nazw w QtHelpProject.</translation>
</message>
<message>
- <location line="+3"/>
<source>Missing virtual folder in QtHelpProject</source>
<translation>Brak wirtualnego katalogu QtHelpProject</translation>
</message>
<message>
- <location line="+89"/>
<source>Missing attribute in keyword at line %1.</source>
<translation>Brak atrybutu w słowie kluczowym w linii %1.</translation>
</message>
<message>
- <location line="+143"/>
<source>The input file %1 could not be opened!</source>
<translation>Nie można otworzyć pliku wejściowego %1!</translation>
</message>
@@ -322,52 +262,42 @@
<context>
<name>QHelpSearchQueryWidget</name>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+124"/>
<source>Search for:</source>
<translation>Wyszukaj:</translation>
</message>
<message>
- <location line="+1"/>
<source>Previous search</source>
<translation>Poprzednie wyszukiwanie</translation>
</message>
<message>
- <location line="+1"/>
<source>Next search</source>
<translation>Następne wyszukiwanie</translation>
</message>
<message>
- <location line="+1"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
<message>
- <location line="+2"/>
<source>Advanced search</source>
<translation>Wyszukiwanie zaawansowane</translation>
</message>
<message>
- <location line="+1"/>
<source>words &lt;B&gt;similar&lt;/B&gt; to:</source>
<translation>słowa &lt;B&gt;podobne&lt;/B&gt; do:</translation>
</message>
<message>
- <location line="+1"/>
<source>&lt;B&gt;without&lt;/B&gt; the words:</source>
<translation>&lt;B&gt;bez&lt;/B&gt; słów:</translation>
</message>
<message>
- <location line="+1"/>
<source>with &lt;B&gt;exact phrase&lt;/B&gt;:</source>
<translation>z &lt;B&gt;dokładnym wyrażeniem&lt;/B&gt;:</translation>
</message>
<message>
- <location line="+1"/>
<source>with &lt;B&gt;all&lt;/B&gt; of the words:</source>
<translation>ze &lt;B&gt;wszystkimi&lt;/B&gt; słowami:</translation>
</message>
<message>
- <location line="+1"/>
<source>with &lt;B&gt;at least one&lt;/B&gt; of the words:</source>
<translation>z &lt;B&gt;przynajmniej jednym&lt;/B&gt; ze słów:</translation>
</message>
@@ -375,7 +305,6 @@
<context>
<name>QHelpSearchResultWidget</name>
<message numerus="yes">
- <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+174"/>
<source>%1 - %2 of %n Hits</source>
<translation>
<numerusform>%1 - %2 z %n trafienia</numerusform>
@@ -384,7 +313,6 @@
</translation>
</message>
<message>
- <location line="+61"/>
<source>0 - 0 of 0 Hits</source>
<translation>0 - 0 z 0 Trafień</translation>
</message>
diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts
index 37fbee1927..0c9c01e474 100644
--- a/translations/qt_pl.ts
+++ b/translations/qt_pl.ts
@@ -321,6 +321,10 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<source>Playback complete</source>
<translation>Zakończono odtwarzanie</translation>
</message>
+ <message>
+ <source>Download error</source>
+ <translation>Błąd pobierania</translation>
+ </message>
</context>
<context>
<name>Phonon::MMF::AbstractVideoPlayer</name>
@@ -440,6 +444,10 @@ zainstalowałeś libgstreamer-plugins-base.</translation>
<source>Error opening source: media type could not be determined</source>
<translation>Błąd otwierania źródła: nie można określić typu multimediów</translation>
</message>
+ <message>
+ <source>Failed to set requested IAP</source>
+ <translation>Nie można ustawić żądanego IAP</translation>
+ </message>
</context>
<context>
<name>Phonon::MMF::StereoWidening</name>
@@ -1200,6 +1208,11 @@ na
<translation>%1: zasoby wyczerpane</translation>
</message>
<message>
+ <source>%1: permission denied</source>
+ <comment>QSystemSemaphore</comment>
+ <translation>%1: brak uprawnień</translation>
+ </message>
+ <message>
<source>%1: unknown error %2</source>
<comment>QSystemSemaphore</comment>
<translation>%1: nieznany błąd %2</translation>
@@ -1366,6 +1379,13 @@ na
</message>
</context>
<context>
+ <name>QDeclarativeApplication</name>
+ <message>
+ <source>Application is an abstract class</source>
+ <translation>&quot;Application&quot; jest klasą abstrakcyjną</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeBehavior</name>
<message>
<source>Cannot change the animation assigned to a Behavior.</source>
@@ -1501,6 +1521,14 @@ na
<translation>Nie można utworzyć pustej specyfikacji komponentu</translation>
</message>
<message>
+ <source>&quot;%1.%2&quot; is not available in %3 %4.%5.</source>
+ <translation>&quot;%1.%2&quot; nie jest dostępne w %3 %4.%5.</translation>
+ </message>
+ <message>
+ <source>&quot;%1.%2&quot; is not available due to component versioning.</source>
+ <translation>&quot;%1.%2&quot; nie jest dostępny z powodu niekompatybilności wersji komponentu.</translation>
+ </message>
+ <message>
<source>Incorrectly specified signal assignment</source>
<translation>Przypisanie sygnału błędnie podane</translation>
</message>
@@ -1597,6 +1625,10 @@ na
<translation>Niepoprawne przypisanie wartości: oczekiwano skryptu</translation>
</message>
<message>
+ <source>Cannot assign multiple values to a singular property</source>
+ <translation>Nie można przypisać wielu wartości do pojedynczej właściwości</translation>
+ </message>
+ <message>
<source>Cannot assign object to property</source>
<translation>Nie można przypisać obiektu dla właściwości</translation>
</message>
@@ -1678,7 +1710,7 @@ na
</message>
<message>
<source>ID illegally masks global JavaScript property</source>
- <translation type="unfinished"></translation>
+ <translation>Identyfikator nielegalnie maskuje globalną właściwość JavaScript</translation>
</message>
<message>
<source>No property alias location</source>
@@ -1689,8 +1721,16 @@ na
<translation>Niepoprawne położenie aliasu</translation>
</message>
<message>
+ <source>Invalid alias reference. An alias reference must be specified as &lt;id&gt;, &lt;id&gt;.&lt;property&gt; or &lt;id&gt;.&lt;value property&gt;.&lt;property&gt;</source>
+ <translation>Niepoprawna referencja aliasu. Referencja aliasu musi być podana jako &lt;id&gt;, &lt;id&gt;.&lt;property&gt; lub &lt;id&gt;.&lt;value property&gt;.&lt;property&gt;</translation>
+ </message>
+ <message>
+ <source>Alias property exceeds alias bounds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>Invalid alias reference. An alias reference must be specified as &lt;id&gt; or &lt;id&gt;.&lt;property&gt;</source>
- <translation>Niepoprawna referencja aliasu. Referencja aliasu musi być podana jako &lt;id&gt; lub &lt;id&gt; &lt;property&gt;</translation>
+ <translation type="obsolete">Niepoprawna referencja aliasu. Referencja aliasu musi być podana jako &lt;id&gt; lub &lt;id&gt; &lt;property&gt;</translation>
</message>
<message>
<source>Invalid alias reference. Unable to find id &quot;%1&quot;</source>
@@ -1703,24 +1743,28 @@ na
<source>Invalid empty URL</source>
<translation>Niepoprawny pusty URL</translation>
</message>
+ <message>
+ <source>createObject: value is not an object</source>
+ <translation>&quot;createObject&quot;: wartość nie jest obiektem</translation>
+ </message>
</context>
<context>
<name>QDeclarativeCompositeTypeManager</name>
<message>
<source>Resource %1 unavailable</source>
- <translation>Zasób %1 nie jest dostępny</translation>
+ <translation type="obsolete">Zasób %1 nie jest dostępny</translation>
</message>
<message>
<source>Namespace %1 cannot be used as a type</source>
- <translation>Przestrzeń nazw %1 nie może być użyta jako typ</translation>
+ <translation type="obsolete">Przestrzeń nazw %1 nie może być użyta jako typ</translation>
</message>
<message>
<source>%1 %2</source>
- <translation>%1 %2</translation>
+ <translation type="obsolete">%1 %2</translation>
</message>
<message>
<source>Type %1 unavailable</source>
- <translation>Typ %1 nie jest dostępny</translation>
+ <translation type="obsolete">Typ %1 nie jest dostępny</translation>
</message>
</context>
<context>
@@ -1762,7 +1806,7 @@ na
</message>
<message>
<source>transaction: missing callback</source>
- <translation type="unfinished"></translation>
+ <translation>transakcja: brak wywołania zwrotnego</translation>
</message>
<message>
<source>SQL: database version mismatch</source>
@@ -1783,6 +1827,10 @@ na
<context>
<name>QDeclarativeImportDatabase</name>
<message>
+ <source>cannot load module &quot;%1&quot;: File name case mismatch for &quot;%2&quot;</source>
+ <translation>nie można załadować modułu &quot;%1&quot;: Niezgodność wielkości liter w &quot;%2&quot;</translation>
+ </message>
+ <message>
<source>module &quot;%1&quot; definition &quot;%2&quot; not readable</source>
<translation>definicja &quot;%2&quot; modułu &quot;%1&quot; nie może zostać odczytana</translation>
</message>
@@ -1838,6 +1886,10 @@ na
<source>is not a type</source>
<translation>nie jest typem</translation>
</message>
+ <message>
+ <source>File name case mismatch for &quot;%2&quot;</source>
+ <translation>Niezgodność wielkości liter w &quot;%2&quot;</translation>
+ </message>
</context>
<context>
<name>QDeclarativeKeyNavigationAttached</name>
@@ -1854,6 +1906,17 @@ na
</message>
</context>
<context>
+ <name>QDeclarativeLayoutMirroringAttached</name>
+ <message>
+ <source>LayoutDirection attached property only works with Items</source>
+ <translation>Dołączona właściwość &quot;LayoutDirection&quot; działa tylko z &quot;Item&quot;</translation>
+ </message>
+ <message>
+ <source>LayoutMirroring is only available via attached properties</source>
+ <translation>&quot;LayoutMirroring&quot; dostępny jest tylko poprzez dołączone właściwości</translation>
+ </message>
+</context>
+<context>
<name>QDeclarativeListModel</name>
<message>
<source>remove: index %1 out of range</source>
@@ -1911,37 +1974,37 @@ na
<name>QDeclarativeParentAnimation</name>
<message>
<source>Unable to preserve appearance under complex transform</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy złożonej transformacji</translation>
</message>
<message>
<source>Unable to preserve appearance under non-uniform scale</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy niejednolitej skali</translation>
</message>
<message>
<source>Unable to preserve appearance under scale of 0</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy zerowej skali</translation>
</message>
</context>
<context>
<name>QDeclarativeParentChange</name>
<message>
<source>Unable to preserve appearance under complex transform</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy złożonej transformacji</translation>
</message>
<message>
<source>Unable to preserve appearance under non-uniform scale</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy niejednolitej skali</translation>
</message>
<message>
<source>Unable to preserve appearance under scale of 0</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można utrzymać wyglądu przy zerowej skali</translation>
</message>
</context>
<context>
<name>QDeclarativeParser</name>
<message>
<source>Illegal unicode escape sequence</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawny znak w sekwencji escape</translation>
</message>
<message>
<source>Illegal character</source>
@@ -1953,7 +2016,7 @@ na
</message>
<message>
<source>Illegal escape sequence</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawna sekwencja escape</translation>
</message>
<message>
<source>Unclosed comment at end of file</source>
@@ -1965,7 +2028,7 @@ na
</message>
<message>
<source>Identifier cannot start with numeric literal</source>
- <translation>Identyfikator nie może rozpoczynać się stałą liczbową</translation>
+ <translation>Identyfikator nie może rozpoczynać się literałem liczbowym</translation>
</message>
<message>
<source>Unterminated regular expression literal</source>
@@ -1977,7 +2040,7 @@ na
</message>
<message>
<source>Unterminated regular expression backslash sequence</source>
- <translation type="unfinished"></translation>
+ <translation>Niedokończone sekwencja backslash wyrażenia regularnego</translation>
</message>
<message>
<source>Unterminated regular expression class</source>
@@ -2005,7 +2068,7 @@ na
</message>
<message>
<source>Invalid import qualifier ID</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawny kwalifikator ID importu</translation>
</message>
<message>
<source>Reserved name &quot;Qt&quot; cannot be used as an qualifier</source>
@@ -2115,11 +2178,30 @@ na
<name>QDeclarativeTextInput</name>
<message>
<source>Could not load cursor delegate</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można załadować delegata kursora</translation>
</message>
<message>
<source>Could not instantiate cursor delegate</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można zinstancjonować delegata kursora</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeTypeLoader</name>
+ <message>
+ <source>Script %1 unavailable</source>
+ <translation>Skrypt &quot;%1&quot; nie jest dostępny</translation>
+ </message>
+ <message>
+ <source>Type %1 unavailable</source>
+ <translation>Typ %1 nie jest dostępny</translation>
+ </message>
+ <message>
+ <source>Namespace %1 cannot be used as a type</source>
+ <translation>Przestrzeń nazw %1 nie może być użyta jako typ</translation>
+ </message>
+ <message>
+ <source>%1 %2</source>
+ <translation>%1 %2</translation>
</message>
</context>
<context>
@@ -2142,7 +2224,7 @@ na
</message>
<message>
<source>Cannot assign an object to signal property %1</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można przypisać obiektu do właściwości sygnału %1</translation>
</message>
<message>
<source>Cannot assign object to list</source>
@@ -2150,7 +2232,7 @@ na
</message>
<message>
<source>Cannot assign object to interface property</source>
- <translation type="unfinished"></translation>
+ <translation>Nie można przypisać obiektu do właściwości interfejsu</translation>
</message>
<message>
<source>Unable to create attached object</source>
@@ -2165,7 +2247,7 @@ na
<name>QDeclarativeVisualDataModel</name>
<message>
<source>Delegate component must be Item type.</source>
- <translation type="unfinished"></translation>
+ <translation>Delegat musi być typu &quot;Item&quot;.</translation>
</message>
</context>
<context>
@@ -3343,11 +3425,11 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<name>QLibrary</name>
<message>
<source>Could not mmap &apos;%1&apos;: %2</source>
- <translation>Nie można wykonać przypisania &apos;%1&apos;: %2</translation>
+ <translation type="obsolete">Nie można wykonać przypisania &apos;%1&apos;: %2</translation>
</message>
<message>
<source>Could not unmap &apos;%1&apos;: %2</source>
- <translation>Nie można usunąć przypisania &apos;%1&apos;: %2</translation>
+ <translation type="obsolete">Nie można usunąć przypisania &apos;%1&apos;: %2</translation>
</message>
<message>
<source>Plugin verification data mismatch in &apos;%1&apos;</source>
@@ -4111,7 +4193,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
<message>
<source>&quot;%1&quot; duplicates a previous role name and will be disabled.</source>
- <translation type="unfinished"></translation>
+ <translation>&quot;%1&quot; powiela poprzednią nazwę roli i zostanie wyłączone.</translation>
</message>
<message>
<source>invalid query: &quot;%1&quot;</source>
@@ -5488,7 +5570,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<source>Media Pause</source>
<extracomment>Media player pause button</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Media pauza</translation>
</message>
<message>
<source>Toggle Media Play/Pause</source>
@@ -5870,27 +5952,27 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<source>Toggle Call/Hangup</source>
<extracomment>Button that will hang up if we&apos;re in call, or make a call if we&apos;re not.</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Przełącz dzwoń/zawieś</translation>
</message>
<message>
<source>Voice Dial</source>
- <extracomment>Button to trigger voice dialling</extracomment>
- <translation type="unfinished"></translation>
+ <extracomment>Button to trigger voice dialing</extracomment>
+ <translation>Wybieranie głosowe</translation>
</message>
<message>
<source>Last Number Redial</source>
<extracomment>Button to redial the last number called</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Wykręć ostatni numer</translation>
</message>
<message>
<source>Camera Shutter</source>
<extracomment>Button to trigger the camera shutter (take a picture)</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Migawka aparatu</translation>
</message>
<message>
<source>Camera Focus</source>
<extracomment>Button to focus the camera</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Ostrość aparatu</translation>
</message>
<message>
<source>Kanji</source>
@@ -6525,6 +6607,10 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Błąd tworzenia sesji SSL: %1</translation>
</message>
<message>
+ <source>The peer certificate is blacklisted</source>
+ <translation>Element równorzędny widnieje na czarnej liście</translation>
+ </message>
+ <message>
<source>Cannot provide a certificate with no key, %1</source>
<translation>Nie można dostarczyć certyfikatu bez klucza, %1</translation>
</message>
@@ -7717,7 +7803,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>external parsed general entity reference not allowed in attribute value</source>
- <translation>odwołanie do jednostki ogólnej zewnętrznie przetworzonej nie dozwolone dla wartości atrybutu </translation>
+ <translation>odwołanie do jednostki ogólnej zewnętrznie przetworzonej nie dozwolone dla wartości atrybutu</translation>
</message>
<message>
<source>external parsed general entity reference not allowed in DTD</source>
@@ -7827,7 +7913,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>Unexpected character &apos;%1&apos; in public id literal.</source>
- <translation>Nieoczekiwany znak &apos;%1&apos; w publicznej stałej znakowej.</translation>
+ <translation>Nieoczekiwany znak &apos;%1&apos; w publicznym literale.</translation>
</message>
<message>
<source>Invalid XML version string.</source>
@@ -8062,7 +8148,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
- <translation>Podczas rzutowania na %1 lub na typ pochodny, wartość źródłowa musi być tego samego typu lub musi być stałą znakową. Typ %2 nie jest dozwolony.</translation>
+ <translation>Podczas rzutowania na %1 lub na typ pochodny, wartość źródłowa musi być tego samego typu lub musi być literałem znakowym. Typ %2 nie jest dozwolony.</translation>
</message>
<message>
<source>A comment cannot contain %1</source>
@@ -8150,11 +8236,11 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source>
- <translation type="unfinished">W ciągu zastępczym, po %1 musi następować przynajmniej jedna cyfra</translation>
+ <translation>W ciągu zastępczym, po %1 musi następować przynajmniej jedna cyfra pod warunkiem, że nie jest ona w sekwencji escape.</translation>
</message>
<message>
<source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source>
- <translation type="unfinished">W ciągu zastępczym, %1 może być użyte tylko do zabezpieczenia samej siebie lub %2, nigdy %3</translation>
+ <translation>W ciągu zastępczym, %1 może być użyte tylko do zabezpieczenia samej siebie lub %2, nigdy %3</translation>
</message>
<message>
<source>%1 matches newline characters</source>
@@ -8298,7 +8384,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>%1 is not a valid numeric literal.</source>
- <translation>%1 nie jest poprawną stałą liczbową.</translation>
+ <translation>%1 nie jest poprawnym literałem liczbowym.</translation>
</message>
<message>
<source>W3C XML Schema identity constraint selector</source>
@@ -8350,15 +8436,15 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source>
- <translation>Gdy funkcja %1 jest wykorzystana do dopasowania wewnątrz wzorca, jej argument musi być referencją do zmiennej lub stałą znakową.</translation>
+ <translation>Gdy funkcja %1 jest wykorzystana do dopasowania wewnątrz wzorca, jej argument musi być referencją do zmiennej lub literałem znakowym.</translation>
</message>
<message>
<source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source>
- <translation>We wzorze XSL-T pierwszy argument w funkcji %1 musi być stałą znakową podczas dopasowywania.</translation>
+ <translation>We wzorze XSL-T pierwszy argument w funkcji %1 musi być literałem znakowym podczas dopasowywania.</translation>
</message>
<message>
<source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source>
- <translation>We wzorze XSL-T pierwszy argument w funkcji %1 musi być stałą znakową lub nazwą zmiennej podczas dopasowywania.</translation>
+ <translation>We wzorze XSL-T pierwszy argument w funkcji %1 musi być literałem znakowym lub nazwą zmiennej podczas dopasowywania.</translation>
</message>
<message>
<source>In an XSL-T pattern, function %1 cannot have a third argument.</source>
@@ -9747,7 +9833,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<source>Key constraint %1 contains references nillable element %2.</source>
- <translation type="unfinished"></translation>
+ <translation>Ograniczenie klucza %1 zawiera odwołania do elementu zerowalnego %2.</translation>
</message>
<message>
<source>No referenced value found for key reference %1.</source>
diff --git a/translations/qtconfig_pl.ts b/translations/qtconfig_pl.ts
index a4719d059a..b2a0c52f1b 100644
--- a/translations/qtconfig_pl.ts
+++ b/translations/qtconfig_pl.ts
@@ -4,151 +4,134 @@
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/qtconfig/mainwindow.cpp" line="+353"/>
<source>On The Spot</source>
<translation>W oknie dokumentu (On-The-Spot)</translation>
</message>
<message>
- <location line="+33"/>
- <location line="+1"/>
- <location line="+40"/>
- <location line="+1"/>
<source>Auto (default)</source>
<translation>Automatyczny (domyślnie)</translation>
</message>
<message>
- <location line="-40"/>
<source>Choose audio output automatically.</source>
<translation>Wybierz automatycznie wyjście dźwiękowe.</translation>
</message>
<message>
- <location line="+1"/>
- <location line="+1"/>
<source>aRts</source>
<translation>aRts</translation>
</message>
<message>
- <location line="+1"/>
<source>Experimental aRts support for GStreamer.</source>
<translation>Eksperymentalna obsługa aRts dla GStreamer.</translation>
</message>
<message>
- <location line="+33"/>
<source>Phonon GStreamer backend not available.</source>
<translation>Końcówka Phonon GStreamer nie jest dostępna.</translation>
</message>
<message>
- <location line="+4"/>
<source>Choose render method automatically</source>
<translation>Wybierz automatycznie metodę renderowania</translation>
</message>
<message>
- <location line="+2"/>
- <location line="+1"/>
<source>X11</source>
<translation>X11</translation>
</message>
<message>
- <location line="+0"/>
<source>Use X11 Overlays</source>
<translation>Użyj warstwy X11</translation>
</message>
<message>
- <location line="+3"/>
- <location line="+1"/>
<source>OpenGL</source>
<translation>OpenGL</translation>
</message>
<message>
- <location line="+2"/>
- <location line="+1"/>
<source>Software</source>
<translation>Oprogramowanie</translation>
</message>
<message>
- <location line="+0"/>
<source>Use simple software rendering</source>
<translation>Użyj prostego oprogramowania renderującego</translation>
</message>
<message>
- <location line="+79"/>
<source>Over The Spot</source>
<translation>Nad oknem dokumentu (Over-The-Spot)</translation>
</message>
<message>
- <location line="+2"/>
<source>Off The Spot</source>
<translation>Na pasku stanu (Off-The-Spot)</translation>
</message>
<message>
- <location line="+2"/>
<source>Root</source>
<translation>W dodatkowym oknie (Root)</translation>
</message>
<message>
- <location line="+466"/>
<source>Select a Directory</source>
<translation>Wybierz katalog</translation>
</message>
<message>
- <location line="+17"/>
<source>&lt;h3&gt;%1&lt;/h3&gt;&lt;br/&gt;Version %2&lt;br/&gt;&lt;br/&gt;Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <location line="+1"/>
- <location line="+8"/>
<source>Qt Configuration</source>
<translation>Konfiguracja Qt</translation>
</message>
<message>
- <location line="+22"/>
<source>Save Changes</source>
<translation>Zapisz zmiany</translation>
</message>
<message>
- <location line="+1"/>
<source>Save changes to settings?</source>
<translation>Zapisać zmiany do ustawień?</translation>
</message>
<message>
- <location line="+1"/>
<source>&amp;Yes</source>
<translation>&amp;Tak</translation>
</message>
<message>
- <location line="+0"/>
<source>&amp;No</source>
<translation>&amp;Nie</translation>
</message>
<message>
- <location line="+0"/>
<source>&amp;Cancel</source>
<translation>&amp;Anuluj</translation>
</message>
<message>
- <location line="-575"/>
<source>No changes to be saved.</source>
<translation>Brak zmian do zapisania.</translation>
</message>
<message>
- <location line="-261"/>
+ <source>&lt;p&gt;&lt;b&gt;&lt;font size+=2&gt;Appearance&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;hr&gt;&lt;p&gt;Use this tab to customize the appearance of your Qt applications.&lt;/p&gt;&lt;p&gt;You can select the default GUI Style from the drop down list and customize the colors.&lt;/p&gt;&lt;p&gt;Any GUI Style plugins in your plugin path will automatically be added to the list of built-in Qt styles. (See the Library Paths tab for information on adding new plugin paths.)&lt;/p&gt;&lt;p&gt;When you choose 3-D Effects and Window Background colors, the Qt Configuration program will automatically generate a palette for you. To customize colors further, press the Tune Palette button to open the advanced palette editor.&lt;p&gt;The Preview Window shows what the selected Style and colors look like.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;p&gt;&lt;b&gt;&lt;font size+=2&gt;Fonts&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;hr&gt;&lt;p&gt;Use this tab to select the default font for your Qt applications. The selected font is shown (initially as &apos;Sample Text&apos;) in the line edit below the Family, Style and Point Size drop down lists.&lt;/p&gt;&lt;p&gt;Qt has a powerful font substitution feature that allows you to specify a list of substitute fonts. Substitute fonts are used when a font cannot be loaded, or if the specified font doesn&apos;t have a particular character.&lt;p&gt;For example, if you select the font Lucida, which doesn&apos;t have Korean characters, but need to show some Korean text using the Mincho font family you can do so by adding Mincho to the list. Once Mincho is added, any Korean characters that are not found in the Lucida font will be taken from the Mincho font. Because the font substitutions are lists, you can also select multiple families, such as Song Ti (for use with Chinese text).</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;p&gt;&lt;b&gt;&lt;font size+=2&gt;Interface&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;hr&gt;&lt;p&gt;Use this tab to customize the feel of your Qt applications.&lt;/p&gt;&lt;p&gt;If the Resolve Symlinks checkbox is checked Qt will follow symlinks when handling URLs. For example, in the file dialog, if this setting is turned on and /usr/tmp is a symlink to /var/tmp, entering the /usr/tmp directory will cause the file dialog to change to /var/tmp. With this setting turned off, symlinks are not resolved or followed.&lt;/p&gt;&lt;p&gt;The Global Strut setting is useful for people who require a minimum size for all widgets (e.g. when using a touch panel or for users who are visually impaired). Leaving the Global Strut width and height at 0 will disable the Global Strut feature&lt;/p&gt;&lt;p&gt;XIM (Extended Input Methods) are used for entering characters in languages that have large character sets, for example, Chinese and Japanese.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;p&gt;&lt;b&gt;&lt;font size+=2&gt;Printer&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;hr&gt;&lt;p&gt;Use this tab to configure the way Qt generates output for the printer.You can specify if Qt should try to embed fonts into its generated output.If you enable font embedding, the resulting postscript will be more portable and will more accurately reflect the visual output on the screen; however the resulting postscript file size will be bigger.&lt;p&gt;When using font embedding you can select additional directories where Qt should search for embeddable font files. By default, the X server font path is used.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;p&gt;&lt;b&gt;&lt;font size+=2&gt;Phonon&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;hr&gt;&lt;p&gt;Use this tab to configure the Phonon GStreamer multimedia backend. &lt;p&gt;It is reccommended to leave all settings on &quot;Auto&quot; to let Phonon determine your settings automatically.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>Desktop Settings (Default)</source>
<translation>Ustawienia pulpitu (domyślne)</translation>
</message>
<message>
- <location line="+5"/>
<source>Choose style and palette based on your desktop settings.</source>
<translation>Wybierz styl i paletę na podstawie ustawień Twojego pulpitu.</translation>
</message>
<message>
- <location line="+226"/>
<source>Use OpenGL if available</source>
<translation>Użyj OpenGL jeśli jest dostępny</translation>
</message>
<message>
- <location line="+34"/>
<source>Saving changes...</source>
<translation>Zapisywanie zmian...</translation>
</message>
@@ -156,347 +139,278 @@
<context>
<name>MainWindowBase</name>
<message>
- <location filename="../tools/qtconfig/mainwindowbase.ui"/>
<source>Qt Configuration</source>
<translation>Konfiguracja Qt</translation>
</message>
<message>
- <location/>
<source>Appearance</source>
<translation>Wygląd</translation>
</message>
<message>
- <location/>
<source>GUI Style</source>
<translation>Styl GUI</translation>
</message>
<message>
- <location/>
<source>Select GUI &amp;Style:</source>
<translation>Wybierz &amp;styl GUI:</translation>
</message>
<message>
- <location/>
<source>Build Palette</source>
<translation>Wersje palety</translation>
</message>
<message>
- <location/>
<source>&amp;3-D Effects:</source>
<translation>&amp;Efekty 3-D:</translation>
</message>
<message>
- <location/>
<source>Window Back&amp;ground:</source>
<translation>&amp;Tło okna:</translation>
</message>
<message>
- <location/>
<source>&amp;Tune Palette...</source>
<translation>&amp;Ustaw paletę...</translation>
</message>
<message>
- <location/>
<source>Please use the KDE Control Center to set the palette.</source>
<translation>Użyj Centrum Kontroli KDE aby zmienić paletę.</translation>
</message>
<message>
- <location/>
<source>Preview</source>
<translation>Podgląd</translation>
</message>
<message>
- <location/>
<source>Select &amp;Palette:</source>
<translation>Wybierz &amp;paletę:</translation>
</message>
<message>
- <location/>
<source>Active Palette</source>
<translation>Aktywna paleta</translation>
</message>
<message>
- <location/>
<source>Inactive Palette</source>
<translation>Nieaktywna paleta</translation>
</message>
<message>
- <location/>
<source>Disabled Palette</source>
<translation>Paleta &quot;zablokowane&quot;</translation>
</message>
<message>
- <location/>
<source>Fonts</source>
<translation>Czcionki</translation>
</message>
<message>
- <location/>
<source>Default Font</source>
<translation>Domyślna czcionka</translation>
</message>
<message>
- <location/>
<source>&amp;Style:</source>
<translation>&amp;Styl:</translation>
</message>
<message>
- <location/>
<source>&amp;Point Size:</source>
<translation>&amp;Rozmiar czcionki:</translation>
</message>
<message>
- <location/>
<source>F&amp;amily:</source>
<translation>&amp;Nazwa czcionki:</translation>
</message>
<message>
- <location/>
<source>Sample Text</source>
<translation>Przykładowy tekst</translation>
</message>
<message>
- <location/>
<source>Font Substitution</source>
<translation>Zamiana czcionki</translation>
</message>
<message>
- <location/>
<source>S&amp;elect or Enter a Family:</source>
<translation>&amp;Wybierz lub wpisz nazwę czcionki:</translation>
</message>
<message>
- <location/>
<source>Current Substitutions:</source>
<translation>Bieżące zamiany:</translation>
</message>
<message>
- <location/>
<source>Up</source>
<translation>W górę</translation>
</message>
<message>
- <location/>
<source>Down</source>
<translation>W dół</translation>
</message>
<message>
- <location/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
<message>
- <location/>
<source>Select s&amp;ubstitute Family:</source>
<translation>Wybierz &amp;nazwę czcionki do zamiany na:</translation>
</message>
<message>
- <location/>
<source>Add</source>
<translation>Dodaj</translation>
</message>
<message>
- <location/>
<source>Interface</source>
<translation>Interfejs</translation>
</message>
<message>
- <location/>
<source>Feel Settings</source>
<translation>Ustawienia działania</translation>
</message>
<message>
- <location/>
<source> ms</source>
<translation> ms</translation>
</message>
<message>
- <location/>
<source>&amp;Double Click Interval:</source>
<translation>&amp;Odstęp pomiędzy dwukrotnym kliknięciem:</translation>
</message>
<message>
- <location/>
<source>No blinking</source>
<translation>Brak migotania</translation>
</message>
<message>
- <location/>
<source>&amp;Cursor Flash Time:</source>
<translation>&amp;Czas zmiany kursora:</translation>
</message>
<message>
- <location/>
<source> lines</source>
<translation> linie</translation>
</message>
<message>
- <location/>
<source>Wheel &amp;Scroll Lines:</source>
<translation>Obrócenie kółkiem powoduje &amp;przesunięcie o tyle linii:</translation>
</message>
<message>
- <location/>
<source>Resolve symlinks in URLs</source>
<translation>Rozwiązuj dowiązania symboliczne w adresach URL</translation>
</message>
<message>
- <location/>
<source>GUI Effects</source>
<translation>Efekty GUI</translation>
</message>
<message>
- <location/>
<source>&amp;Enable</source>
<translation>&amp;Włącz</translation>
</message>
<message>
- <location/>
<source>Alt+E</source>
<translation>Alt+E</translation>
</message>
<message>
- <location/>
<source>&amp;Menu Effect:</source>
<translation>Efekty &amp;menu:</translation>
</message>
<message>
- <location/>
<source>C&amp;omboBox Effect:</source>
<translation>Efekty c&amp;ombobox&apos;a:</translation>
</message>
<message>
- <location/>
<source>&amp;ToolTip Effect:</source>
<translation>Efekt &amp;chmurki:</translation>
</message>
<message>
- <location/>
<source>Tool&amp;Box Effect:</source>
<translation>Efekty &amp;paska narzędzi:</translation>
</message>
<message>
- <location/>
<source>Disable</source>
<translation>Wyłącz</translation>
</message>
<message>
- <location/>
<source>Animate</source>
<translation>Animacja</translation>
</message>
<message>
- <location/>
<source>Fade</source>
<translation>Wyłanianie</translation>
</message>
<message>
- <location/>
<source>Global Strut</source>
<translation>Minimalny rozmiar widżetów</translation>
</message>
<message>
- <location/>
<source>Minimum &amp;Width:</source>
<translation>Minimalna &amp;szerokość:</translation>
</message>
<message>
- <location/>
<source>Minimum Hei&amp;ght:</source>
<translation>Minimalna &amp;wysokość:</translation>
</message>
<message>
- <location/>
<source> pixels</source>
<translation> pikseli</translation>
</message>
<message>
- <location/>
<source>Enhanced support for languages written right-to-left</source>
<translation>Rozszerzona obsługa dla języków pisanych od prawej do lewej</translation>
</message>
<message>
- <location/>
<source>XIM Input Style:</source>
<translation>Rodzaje wprowadzania znaków (XIM):</translation>
</message>
<message>
- <location/>
<source>On The Spot</source>
<translation>W oknie dokumentu (On-The-Spot)</translation>
</message>
<message>
- <location/>
<source>Over The Spot</source>
<translation>Nad oknem dokumentu (Over-The-Spot)</translation>
</message>
<message>
- <location/>
<source>Off The Spot</source>
<translation>Na pasku stanu (Off-The-Spot)</translation>
</message>
<message>
- <location/>
<source>Root</source>
<translation>W dodatkowym oknie (Root)</translation>
</message>
<message>
- <location/>
<source>Default Input Method:</source>
<translation>Domyślna metoda wprowadzania:</translation>
</message>
<message>
- <location/>
<source>Printer</source>
<translation>Drukarka</translation>
</message>
<message>
- <location/>
<source>Enable Font embedding</source>
<translation>Włącz czcionki wbudowane</translation>
</message>
<message>
- <location/>
<source>Font Paths</source>
<translation>Ścieżki czcionek</translation>
</message>
<message>
- <location/>
<source>Browse...</source>
<translation>Przeglądaj...</translation>
</message>
<message>
- <location/>
<source>Press the &lt;b&gt;Browse&lt;/b&gt; button or enter a directory and press Enter to add them to the list.</source>
<translation>Naciśnij przycisk &lt;b&gt;Przeglądaj&lt;/b&gt; lub wpisz nazwę katalogu i naciśnij Enter aby dodać do listy.</translation>
</message>
<message>
- <location/>
<source>Phonon</source>
<translation>Phonon</translation>
</message>
<message>
- <location/>
<source>About Phonon</source>
<translation>Informacje o Phonon</translation>
</message>
<message>
- <location/>
<source>Current Version:</source>
<translation>Bieżąca wersja:</translation>
</message>
<message>
- <location/>
<source>Not available</source>
<translation>Nie dostępne</translation>
</message>
<message>
- <location/>
<source>Website:</source>
<translation>Witryna:</translation>
</message>
<message>
- <location/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
@@ -509,12 +423,10 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://phonon.kde.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://phonon.kde.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
- <location/>
<source>About GStreamer</source>
<translation>Informacje o GStreamer</translation>
</message>
<message>
- <location/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
@@ -527,22 +439,18 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://gstreamer.freedesktop.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://gstreamer.freedesktop.org/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
- <location/>
<source>GStreamer backend settings</source>
<translation>Ustawienia końcówki GStreamer</translation>
</message>
<message>
- <location/>
<source>Preferred audio sink:</source>
<translation>Preferowane ujście dźwiękowe:</translation>
</message>
<message>
- <location/>
<source>Preferred render method:</source>
<translation>Preferowana metoda renderowania:</translation>
</message>
<message>
- <location/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
@@ -555,57 +463,46 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Zwróć uwagę że zmiany dla tych ustawień mogą spowodować nieprawidłowe działanie aplikacji&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
- <location/>
<source>&amp;File</source>
<translation>&amp;Plik</translation>
</message>
<message>
- <location/>
<source>&amp;Help</source>
<translation>&amp;Pomoc</translation>
</message>
<message>
- <location/>
<source>&amp;Save</source>
<translation>&amp;Zapisz</translation>
</message>
<message>
- <location/>
<source>Save</source>
<translation>Zapisz</translation>
</message>
<message>
- <location/>
<source>Ctrl+S</source>
<translation>Ctrl+S</translation>
</message>
<message>
- <location/>
<source>E&amp;xit</source>
<translation>&amp;Zakończ</translation>
</message>
<message>
- <location/>
<source>Exit</source>
<translation>Zakończ</translation>
</message>
<message>
- <location/>
<source>&amp;About</source>
<translation>&amp;Informacje o</translation>
</message>
<message>
- <location/>
<source>About</source>
<translation>Informacje o</translation>
</message>
<message>
- <location/>
<source>About &amp;Qt</source>
<translation>Informacje o &amp;Qt</translation>
</message>
<message>
- <location/>
<source>About Qt</source>
<translation>Informacje o Qt</translation>
</message>
@@ -613,207 +510,166 @@ p, li { white-space: pre-wrap; }
<context>
<name>PaletteEditorAdvancedBase</name>
<message>
- <location filename="../tools/qtconfig/paletteeditoradvancedbase.ui"/>
<source>Tune Palette</source>
<translation>Ustaw paletę</translation>
</message>
<message>
- <location/>
<source>&lt;b&gt;Edit Palette&lt;/b&gt;&lt;p&gt;Change the palette of the current widget or form.&lt;/p&gt;&lt;p&gt;Use a generated palette or select colors for each color group and each color role.&lt;/p&gt;&lt;p&gt;The palette can be tested with different widget layouts in the preview section.&lt;/p&gt;</source>
<translation>&lt;b&gt;Edycja palety&lt;/b&gt;&lt;p&gt;Zmień paletę bieżącego widżetu lub formularza.&lt;/p&gt;&lt;p&gt;Użyj wygenerowanej palety lub wybierz kolory dla każdej grupy i roli koloru.&lt;/p&gt;&lt;p&gt;Paleta może być przetestowana z różnymi rozmieszczeniami widżetów w sekcji podglądu.&lt;/p&gt;</translation>
</message>
<message>
- <location/>
<source>Select &amp;Palette:</source>
<translation>Wybierz &amp;paletę:</translation>
</message>
<message>
- <location/>
<source>Active Palette</source>
<translation>Paleta &quot;aktywne&quot;</translation>
</message>
<message>
- <location/>
<source>Inactive Palette</source>
<translation>Paleta &quot;nieaktywne&quot;</translation>
</message>
<message>
- <location/>
<source>Disabled Palette</source>
<translation>Paleta &quot;zablokowane&quot;</translation>
</message>
<message>
- <location/>
<source>Auto</source>
<translation>Automatycznie</translation>
</message>
<message>
- <location/>
<source>Build inactive palette from active</source>
<translation>Twórz paletę &quot;nieaktywne&quot; z &quot;aktywne&quot;</translation>
</message>
<message>
- <location/>
<source>Build disabled palette from active</source>
<translation>Twórz paletę &quot;zablokowane&quot; z &quot;aktywne&quot;</translation>
</message>
<message>
- <location/>
<source>Central color &amp;roles</source>
<translation>Główne &amp;role koloru</translation>
</message>
<message>
- <location/>
<source>Choose central color role</source>
<translation>Wybierz główną rolę koloru</translation>
</message>
<message>
- <location/>
<source>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available central roles are: &lt;ul&gt; &lt;li&gt;Window - general background color.&lt;/li&gt; &lt;li&gt;WindowText - general foreground color. &lt;/li&gt; &lt;li&gt;Base - used as background color for e.g. text entry widgets, usually white or another light color. &lt;/li&gt; &lt;li&gt;Text - the foreground color used with Base. Usually this is the same as WindowText, in what case it must provide good contrast both with Window and Base. &lt;/li&gt; &lt;li&gt;Button - general button background color, where buttons need a background different from Window, as in the Macintosh style. &lt;/li&gt; &lt;li&gt;ButtonText - a foreground color used with the Button color. &lt;/li&gt; &lt;li&gt;Highlight - a color to indicate a selected or highlighted item. &lt;/li&gt; &lt;li&gt;HighlightedText - a text color that contrasts to Highlight. &lt;/li&gt; &lt;li&gt;BrightText - a text color that is very different from WindowText and contrasts well with e.g. black. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</source>
<translation>&lt;b&gt;Wybierz rolę koloru.&lt;/b&gt;&lt;p&gt;Dostępne role główne: &lt;ul&gt; &lt;li&gt;Okno - główny kolor tła.&lt;/li&gt; &lt;li&gt;Tekst Okna - główny kolor pierwszoplanowy. &lt;/li&gt; &lt;li&gt;Bazowy - używany jako kolor tła dla np. widżetów wejściowych, zwykle biały lub inny jasny kolor. &lt;/li&gt; &lt;li&gt;Tekst - kolor pierwszoplanowy używany z Bazowym. Zwykle jest on taki sam jak Tekst Okna i wtedy powinien dobrze kontrastować jednocześnie z Oknem i Bazowym &lt;/li&gt; &lt;li&gt;Przycisk - główny kolor tła przycisku, gdy przyciski potrzebują innego tła niż Okno, jak np. w stylu Macintosh. &lt;/li&gt; &lt;li&gt;Tekst Przycisku - kolor pierwszoplanowy używany z Przyciskiem. &lt;/li&gt; &lt;li&gt;Podświetlony - kolor użyty w zaznaczonych lub podświetlonych elementach. &lt;/li&gt; &lt;li&gt;Podświetlony Tekst - kolor tekstu który kontrastuje z Podświetlonym. &lt;/li&gt; &lt;li&gt;Jasny Tekst - kolor teksty który znacznie różni się od Tekstu Okna i dobrze kontrastuje z np. czarnym. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</translation>
</message>
<message>
- <location/>
<source>Window</source>
<translation>Okno</translation>
</message>
<message>
- <location/>
<source>WindowText</source>
<translation>Tekst Okna</translation>
</message>
<message>
- <location/>
<source>Button</source>
<translation>Przycisk</translation>
</message>
<message>
- <location/>
<source>Base</source>
<translation>Podstawa</translation>
</message>
<message>
- <location/>
<source>Text</source>
<translation>Tekst</translation>
</message>
<message>
- <location/>
<source>BrightText</source>
<translation>Jasny tekst</translation>
</message>
<message>
- <location/>
<source>ButtonText</source>
<translation>Tekst przycisku</translation>
</message>
<message>
- <location/>
<source>Highlight</source>
<translation>Wyróżnienie</translation>
</message>
<message>
- <location/>
<source>HighlightedText</source>
<translation>Tekst wyróżniony</translation>
</message>
<message>
- <location/>
<source>&amp;Select Color:</source>
<translation>&amp;Wybierz kolor:</translation>
</message>
<message>
- <location/>
<source>Choose a color</source>
<translation>Wybierz kolor</translation>
</message>
<message>
- <location/>
<source>Choose a color for the selected central color role.</source>
<translation>Wybierz kolor dla zaznaczonej głównej roli koloru.</translation>
</message>
<message>
- <location/>
<source>3-D shadow &amp;effects</source>
<translation>&amp;Efekty cień 3-D </translation>
</message>
<message>
- <location/>
<source>Build &amp;from button color</source>
<translation>&amp;Zbuduj w oparciu o kolor przycisku</translation>
</message>
<message>
- <location/>
<source>Generate shadings</source>
<translation>Wygeneruj cienie</translation>
</message>
<message>
- <location/>
<source>Check to let 3D-effect colors be calculated from button-color.</source>
<translation>Zaznacz aby kolory efektów trójwymiarowych były obliczone na podstawie koloru przycisku.</translation>
</message>
<message>
- <location/>
<source>Choose 3D-effect color role</source>
<translation>Wybierz rolę koloru efektu trójwymiarowego</translation>
</message>
<message>
- <location/>
<source>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available effect roles are: &lt;ul&gt; &lt;li&gt;Light - lighter than Button color. &lt;/li&gt; &lt;li&gt;Midlight - between Button and Light. &lt;/li&gt; &lt;li&gt;Mid - between Button and Dark. &lt;/li&gt; &lt;li&gt;Dark - darker than Button. &lt;/li&gt; &lt;li&gt;Shadow - a very dark color. &lt;/li&gt; &lt;/ul&gt;</source>
<translation>&lt;b&gt;Wybierz rolę koloru.&lt;/b&gt;&lt;p&gt;Dostępne role kolorów: &lt;ul&gt; &lt;li&gt;Jasny - jaśniejszy od koloru Przycisku. &lt;/li&gt; &lt;li&gt;Średnio Jasny - pomiędzy kolorem Przycisku i Jasnym. &lt;/li&gt; &lt;li&gt;Średni - pomiędzy kolorem Przycisku i Ciemnym. &lt;/li&gt; &lt;li&gt;Ciemny - ciemniejszy od koloru Przycisku. &lt;/li&gt; &lt;li&gt;Cień - bardzo ciemny kolor. &lt;/li&gt; &lt;/ul&gt;</translation>
</message>
<message>
- <location/>
<source>Light</source>
<translation>Jasny</translation>
</message>
<message>
- <location/>
<source>Midlight</source>
<translation>Średnio jasny</translation>
</message>
<message>
- <location/>
<source>Mid</source>
<translation>Średni</translation>
</message>
<message>
- <location/>
<source>Dark</source>
<translation>Ciemny</translation>
</message>
<message>
- <location/>
<source>Shadow</source>
<translation>Cień</translation>
</message>
<message>
- <location/>
<source>Select Co&amp;lor:</source>
<translation>Wybierz &amp;kolor:</translation>
</message>
<message>
- <location/>
<source>Choose a color for the selected effect color role.</source>
<translation>Wybierz kolor dla zaznaczonej roli koloru dla efektu.</translation>
</message>
<message>
- <location/>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
- <location/>
<source>Close dialog and apply all changes.</source>
<translation>Zamknij okno i zastosuj wszystkie zmiany.</translation>
</message>
<message>
- <location/>
<source>Cancel</source>
<translation>Anuluj</translation>
</message>
<message>
- <location/>
<source>Close dialog and discard all changes.</source>
<translation>Zamknij okno i anuluj wszystkie zmiany.</translation>
</message>
@@ -821,7 +677,6 @@ p, li { white-space: pre-wrap; }
<context>
<name>PreviewFrame</name>
<message>
- <location filename="../tools/qtconfig/previewframe.cpp" line="+81"/>
<source>Desktop settings will only take effect after an application restart.</source>
<translation>Ustawienia pulpitu zostaną zaaplikowane po ponownym uruchomieniu aplikacji.</translation>
</message>
@@ -829,62 +684,50 @@ p, li { white-space: pre-wrap; }
<context>
<name>PreviewWidgetBase</name>
<message>
- <location filename="../tools/qtconfig/previewwidgetbase.ui"/>
<source>Preview Window</source>
<translation>Okno podglądu</translation>
</message>
<message>
- <location/>
<source>ButtonGroup</source>
<translation>ButtonGroup</translation>
</message>
<message>
- <location/>
<source>RadioButton1</source>
<translation>RadioButton1</translation>
</message>
<message>
- <location/>
<source>RadioButton2</source>
<translation>RadioButton2</translation>
</message>
<message>
- <location/>
<source>RadioButton3</source>
<translation>RadioButton3</translation>
</message>
<message>
- <location/>
<source>ButtonGroup2</source>
<translation>ButtonGroup2</translation>
</message>
<message>
- <location/>
<source>CheckBox1</source>
<translation>CheckBox1</translation>
</message>
<message>
- <location/>
<source>CheckBox2</source>
<translation>CheckBox2</translation>
</message>
<message>
- <location/>
<source>LineEdit</source>
<translation>LineEdit</translation>
</message>
<message>
- <location/>
<source>ComboBox</source>
<translation>ComboBox</translation>
</message>
<message>
- <location/>
<source>PushButton</source>
<translation>PushButton</translation>
</message>
<message>
- <location/>
<source>&lt;p&gt;
&lt;a href=&quot;http://qt.nokia.com&quot;&gt;http://qt.nokia.com&lt;/a&gt;
&lt;/p&gt;
diff --git a/translations/qvfb_pl.ts b/translations/qvfb_pl.ts
index 9b85ad965a..7c18a5bb4f 100644
--- a/translations/qvfb_pl.ts
+++ b/translations/qvfb_pl.ts
@@ -4,71 +4,54 @@
<context>
<name>AnimationSaveWidget</name>
<message>
- <location filename="../tools/qvfb/qvfb.cpp" line="+868"/>
- <location line="+204"/>
<source>Record</source>
<translation>Nagraj</translation>
</message>
<message>
- <location line="-202"/>
<source>Reset</source>
<translation>Wyzeruj</translation>
</message>
<message>
- <location line="+2"/>
<source>Save</source>
<translation>Zachowaj</translation>
</message>
<message>
- <location line="+18"/>
<source>Save in MPEG format (requires netpbm package installed)</source>
<translation>Zachowaj w formacie MPEG (wymaga zainstalowanego pakietu netpbm)</translation>
</message>
<message>
- <location line="+8"/>
- <location line="+206"/>
<source>Click record to begin recording.</source>
<translation>Kliknij przycisk aby rozpocząć nagrywanie.</translation>
</message>
<message>
- <location line="-115"/>
- <location line="+147"/>
<source>Finished saving.</source>
<translation>Zachowywanie zakończone.</translation>
</message>
<message>
- <location line="-63"/>
<source>Paused. Click record to resume, or save if done.</source>
<translation>Wstrzymany. Kliknij nagrywaj aby powrócić lub zachować jeżeli zakończono.</translation>
</message>
<message>
- <location line="+6"/>
<source>Pause</source>
<translation>Wstrzymaj</translation>
</message>
<message>
- <location line="+1"/>
<source>Recording...</source>
<translation>Nagrywanie...</translation>
</message>
<message>
- <location line="+40"/>
<source>Saving... </source>
<translation>Zapisywanie... </translation>
</message>
<message>
- <location line="+4"/>
- <location line="+4"/>
<source>Save animation...</source>
<translation>Zachowaj animacje...</translation>
</message>
<message>
- <location line="+2"/>
<source>Save canceled.</source>
<translation>Zachowywanie anulowane.</translation>
</message>
<message>
- <location line="+9"/>
<source>Save failed!</source>
<translation>Zachowywanie zakończone błędem!</translation>
</message>
@@ -76,192 +59,154 @@
<context>
<name>Config</name>
<message>
- <location filename="../tools/qvfb/config.ui"/>
<source>Configure</source>
<translation>Skonfiguruj</translation>
</message>
<message>
- <location/>
<source>Size</source>
<translation>Rozmiar</translation>
</message>
<message>
- <location/>
<source>176x220 &quot;SmartPhone&quot;</source>
<translation>176x220 &quot;SmartPhone&quot;</translation>
</message>
<message>
- <location/>
<source>240x320 &quot;PDA&quot;</source>
<translation>240x320 &quot;PDA&quot;</translation>
</message>
<message>
- <location/>
<source>320x240 &quot;TV&quot; / &quot;QVGA&quot;</source>
<translation>320x240 &quot;TV&quot; / &quot;QVGA&quot;</translation>
</message>
<message>
- <location/>
<source>640x480 &quot;VGA&quot;</source>
<translation>640x480 &quot;VGA&quot;</translation>
</message>
<message>
- <location/>
<source>800x600</source>
<translation>800x600</translation>
</message>
<message>
- <location/>
<source>1024x768</source>
<translation>1024x768</translation>
</message>
<message>
- <location/>
<source>Custom</source>
<translation>Niestandardowy</translation>
</message>
<message>
- <location/>
<source>Depth</source>
<translation>Głębokość</translation>
</message>
<message>
- <location/>
<source>1 bit monochrome</source>
<translation>1 bitowa monochromatyczna</translation>
</message>
<message>
- <location/>
<source>4 bit grayscale</source>
<translation>4 bitowa skala szarości</translation>
</message>
<message>
- <location/>
<source>8 bit</source>
<translation>8 bitowa</translation>
</message>
<message>
- <location/>
<source>12 (16) bit</source>
<translation>12 (16) bitowa</translation>
</message>
<message>
- <location/>
<source>16 bit</source>
<translation>16 bitowa</translation>
</message>
<message>
- <location/>
<source>18 bit</source>
<translation>18 bitowa</translation>
</message>
<message>
- <location/>
<source>24 bit</source>
<translation>24 bitowa</translation>
</message>
<message>
- <location/>
<source>32 bit</source>
<translation>32 bitowa</translation>
</message>
<message>
- <location/>
<source>Skin</source>
<translation>Skórka</translation>
</message>
<message>
- <location/>
<source>None</source>
<translation>Brak</translation>
</message>
<message>
- <location/>
<source>Emulate touch screen (no mouse move)</source>
<translation>Symuluj ekran dotykowy (brak ruchu myszy)</translation>
</message>
<message>
- <location/>
<source>Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)</source>
<translation>Symuluj ekran LCD (tylko ze stałym powiększeniem x 3)</translation>
</message>
<message>
- <location/>
<source>&lt;p&gt;Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth &lt;i&gt;above&lt;/i&gt;. You may freely modify the Gamma &lt;i&gt;below&lt;/i&gt;.</source>
<translation>&lt;p&gt;Uwaga, każda aplikacja korzystająca z virtual framebuffer zostanie zakończona przy zmianie Rozmiaru bądź Głębokości &lt;i&gt;powyżej&lt;/i&gt;. Można swobodnie zmieniać parametr Gamma &lt;i&gt;poniżej&lt;/i&gt;.</translation>
</message>
<message>
- <location/>
<source>Gamma</source>
<translation>Gamma</translation>
</message>
<message>
- <location/>
<source>Blue</source>
<translation>Błękit</translation>
</message>
<message>
- <location/>
<source>1.0</source>
<translation>1.0</translation>
</message>
<message>
- <location/>
<source>Green</source>
<translation>Zieleń</translation>
</message>
<message>
- <location/>
<source>All</source>
<translation>Wszystkie</translation>
</message>
<message>
- <location/>
<source>Red</source>
<translation>Czerwień</translation>
</message>
<message>
- <location/>
<source>Set all to 1.0</source>
<translation>Ustaw wszystkie na 1.0</translation>
</message>
<message>
- <location/>
<source>&amp;OK</source>
<translation>&amp;OK</translation>
</message>
<message>
- <location/>
<source>&amp;Cancel</source>
<translation>&amp;Anuluj</translation>
</message>
<message>
- <location/>
<source>15 bit</source>
<translation>15 bitowa</translation>
</message>
<message>
- <location/>
<source>32 bit ARGB</source>
<translation>32 bitowa ARGB</translation>
</message>
<message>
- <location/>
<source>2 bit grayscale</source>
<translation>2 bitowa skala szarości</translation>
</message>
<message>
- <location/>
<source>Swap red and blue channels</source>
<translation>Zamień kanał czerwony z niebieskim</translation>
</message>
<message>
- <location/>
<source>BGR format</source>
<translation>format BGR</translation>
</message>
<message>
- <location/>
<source>800x480</source>
<translation>800x480</translation>
</message>
@@ -269,57 +214,46 @@
<context>
<name>DeviceSkin</name>
<message>
- <location filename="../tools/shared/deviceskin/deviceskin.cpp" line="+79"/>
<source>The image file &apos;%1&apos; could not be loaded.</source>
<translation>Nie można załadować pliku z obrazkiem &apos;%1&apos;.</translation>
</message>
<message>
- <location line="+64"/>
<source>The skin directory &apos;%1&apos; does not contain a configuration file.</source>
<translation>Katalog ze skórkami &apos;%1&apos; nie zawiera pliku konfiguracyjnego.</translation>
</message>
<message>
- <location line="+5"/>
<source>The skin configuration file &apos;%1&apos; could not be opened.</source>
<translation>Nie można otworzyć pliku konfiguracyjnego skórki &apos;%1&apos;.</translation>
</message>
<message>
- <location line="+6"/>
<source>The skin configuration file &apos;%1&apos; could not be read: %2</source>
<translation>Nie można odczytać pliku konfiguracyjnego skórki &apos;%1&apos;: %2</translation>
</message>
<message>
- <location line="+70"/>
<source>Syntax error: %1</source>
<translation>Błąd składni: %1</translation>
</message>
<message>
- <location line="+21"/>
<source>The skin &quot;up&quot; image file &apos;%1&apos; does not exist.</source>
<translation>Nie istnieje plik &apos;%1&apos; z obrazkiem &quot;góra&quot; dla skórki.</translation>
</message>
<message>
- <location line="+10"/>
<source>The skin &quot;down&quot; image file &apos;%1&apos; does not exist.</source>
<translation>Nie istnieje plik &apos;%1&apos; z obrazkiem &quot;dół&quot; dla skórki.</translation>
</message>
<message>
- <location line="+11"/>
<source>The skin &quot;closed&quot; image file &apos;%1&apos; does not exist.</source>
<translation>Nie istnieje plik &apos;%1&apos; z obrazkiem &quot;zamknij&quot; dla skórki.</translation>
</message>
<message>
- <location line="+12"/>
<source>The skin cursor image file &apos;%1&apos; does not exist.</source>
<translation>Nie istnieje plik &apos;%1&apos; z obrazkiem kursora dla skórki.</translation>
</message>
<message>
- <location line="+25"/>
<source>Syntax error in area definition: %1</source>
<translation>Błąd składni w obszarze definicji: %1</translation>
</message>
<message>
- <location line="+38"/>
<source>Mismatch in number of areas, expected %1, got %2.</source>
<translation>Niezgodność w liczbie obszarów, spodziewano się %1, otrzymano %2.</translation>
</message>
@@ -327,19 +261,155 @@
<context>
<name>QVFb</name>
<message>
- <location filename="../tools/qvfb/qvfb.cpp" line="-504"/>
+ <source>&amp;File</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Configure...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Save image...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Animation...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;View</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Show &amp;Cursor</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Refresh Rate...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;No rotation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;90° rotation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>1&amp;80° rotation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>2&amp;70° rotation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;0.5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale 0.7&amp;5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom scale &amp;4</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Zoom &amp;scale...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&amp;About...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Save Main Screen image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>snapshot.png</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Portable Network Graphics (*.png)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Save Main Screen Image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Save failed. Check that you have permission to write to the target directory.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Save Second Screen image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Save Second Screen Image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>About QVFB</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>&lt;h2&gt;The Qt for Embedded Linux Virtual X11 Framebuffer&lt;/h2&gt;&lt;p&gt;This application runs under Qt for X11, emulating a simple framebuffer, which the Qt for Embedded Linux server and clients can attach to just as if it was a hardware Linux framebuffer. &lt;p&gt;With the aid of this development tool, you can develop Qt for Embedded Linux applications under X11 without having to switch to a virtual console. This means you can comfortably use your other development tools such as GUI profilers and debuggers.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>Browse...</source>
<translation>Przeglądaj...</translation>
</message>
<message>
- <location line="+143"/>
<source>Load Custom Skin...</source>
<translation>Załaduj skórki użytkownika...</translation>
</message>
<message>
- <location line="+1"/>
<source>All QVFB Skins (*.skin)</source>
<translation>Wszystkie skórki QVFB (*.skin)</translation>
</message>
</context>
+<context>
+ <name>QVFbRateDialog</name>
+ <message>
+ <source>Target frame rate:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1fps</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>